Skip to content

[Lens] [Metric] Improve "Supporting visualization" section#243608

Merged
mariairiartef merged 11 commits intoelastic:mainfrom
mariairiartef:lens/234901
Nov 28, 2025
Merged

[Lens] [Metric] Improve "Supporting visualization" section#243608
mariairiartef merged 11 commits intoelastic:mainfrom
mariairiartef:lens/234901

Conversation

@mariairiartef
Copy link
Contributor

@mariairiartef mariairiartef commented Nov 20, 2025

Summary

Closes #234901

  • Move Color by value and Color mapping / Color settings from "Appearance" section into "Supporting visualization" section
  • Rename Color by value to Color mode in Primary Metric and Secondary Metric editors
  • Rename Color mapping to Dynamic color mapping
  • Rename Color to Select color
  • Add static color control in "Appearance" section for non-numeric metrics since non-numeric metrics do not support the "Supporting visualization" section

Numeric metric

Screen.Recording.2025-11-24.at.12.13.03.mov

Non-numeric metric

Screenshot 2025-11-24 at 12 01 43

Checklist

Release note

The color settings in the Primary Metric editor have been reorganized and renamed. For numeric metrics, the "Color by value" and "Color mapping" / "Color" settings are now located under the chart type field. The settings have been renamed as follows: "Color by value" is now "Color mode", "Color mapping" is now "Dynamic color mapping", and "Color" is now "Select color".

@mariairiartef mariairiartef self-assigned this Nov 24, 2025
@mariairiartef mariairiartef added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// release_note:skip Skip the PR/issue when compiling release notes Feature:Lens backport:skip This PR does not require backporting labels Nov 24, 2025
@mariairiartef
Copy link
Contributor Author

/ci

@mariairiartef
Copy link
Contributor Author

/ci

@mariairiartef mariairiartef marked this pull request as ready for review November 24, 2025 11:29
@mariairiartef mariairiartef requested a review from a team as a code owner November 24, 2025 11:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@elasticmachine
Copy link
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #9 / dimension editor primary metric dimension static color control is visible when metric is non-numeric even if palette is set
  • [job] [logs] Jest Tests #9 / dimension editor primary metric dimension static color control is visible when metric is non-numeric even if palette is set
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension doesn't break when layer data is missing
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension doesn't break when layer data is missing
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label clicking on the buttons calls setState with a correct secondaryLabel
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label clicking on the buttons calls setState with a correct secondaryLabel
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label correctly renders chosen auto label
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label correctly renders chosen auto label
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label correctly renders chosen none label
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label correctly renders chosen none label
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label correctly renders custom label
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label correctly renders custom label
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label does not show the label position option if Label is None
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label does not show the label position option if Label is None
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label sets a custom label value
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label sets a custom label value
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label sets the label position to after
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label sets the label position to after
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label sets the label position to before
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension metric label sets the label position to before
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension renders when the accessor matches
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension renders when the accessor matches
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend coloring should change the color mode to dynamic
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend coloring should change the color mode to dynamic
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend coloring should change the color mode to static
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend coloring should change the color mode to static
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend coloring should correctly select the reversed Trend color palette based on configuration
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend coloring should correctly select the reversed Trend color palette based on configuration
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend coloring should disable the "Primary metric" baseline if the primary is not of number type
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend coloring should disable the "Primary metric" baseline if the primary is not of number type
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend coloring should prevent the dynamic coloring if the value type is not numeric
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend coloring should prevent the dynamic coloring if the value type is not numeric
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend coloring should show no color controls if none is selected
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend coloring should show no color controls if none is selected
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend should change the baselineValue to "primary" when changing the baseline mode from static
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend should change the baselineValue to "primary" when changing the baseline mode from static
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend should not show the baseline textbox if Primary Metric baseline is chosen
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend should not show the baseline textbox if Primary Metric baseline is chosen
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend should set a default secondary label if auto is set and Primary Metric is chosen
  • [job] [logs] Jest Tests #9 / dimension editor secondary metric dimension secondary trend should set a default secondary label if auto is set and Primary Metric is chosen

History

cc @mariairiartef

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a regression with this PR when transitioning from a numeric dynamic colouring to a non-numeric scenario.
Before the configuration was falling back into static colouring, but with this PR the entire colour control disappears:

Image

Tested in main the previous behaviour:

Image

Note: this only happens when coming from a Dynamic coluring, from a Static colouring setting all is fine.

const showStaticColorControl = !isMetricNumeric && !state.palette;

return (
<div className="lnsIndexPatternDimensionEditor--padded">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not strictly related to this PR, but while in the area, can we solve the controls padding issue here?

Image
Copy link
Contributor Author

@mariairiartef mariairiartef Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think this issue was introduced by the tabs PR. Let's fix it in another PR

@mariairiartef mariairiartef requested a review from dej611 November 28, 2025 07:43
@mariairiartef
Copy link
Contributor Author

mariairiartef commented Nov 28, 2025

Found a regression with this PR when transitioning from a numeric dynamic colouring to a non-numeric scenario. Before the configuration was falling back into static colouring, but with this PR the entire colour control disappears:

Image Tested in `main` the previous behaviour: Image Note: this only happens when coming from a `Dynamic coluring`, from a `Static colouring` setting all is fine.

Thanks! I fixed it here. I think we can rely only in the isMetricNumeric to show/hide that field

@mariairiartef mariairiartef merged commit 8bab7e1 into elastic:main Nov 28, 2025
12 checks passed
tkajtoch pushed a commit to tkajtoch/kibana that referenced this pull request Dec 1, 2025
…43608)

## Summary

Closes elastic#234901

- Move `Color by value` and `Color mapping` / `Color` settings from
"Appearance" section into "Supporting visualization" section
- Rename `Color by value` to `Color mode` in Primary Metric and
Secondary Metric editors
- Rename `Color mapping` to `Dynamic color mapping`
- Rename `Color` to `Select color`
- Add static color control in "Appearance" section for non-numeric
metrics since non-numeric metrics do not support the "Supporting
visualization" section

#### Numeric metric

https://github.com/user-attachments/assets/6ebd8b46-8293-4940-b604-806c3bfb3dde

#### Non-numeric metric
<img width="1920" height="935" alt="Screenshot 2025-11-24 at 12 01 43"
src="https://github.com/user-attachments/assets/ecc3a56d-e2f8-4d0e-bb82-56058f37d061"
/>


### Checklist
- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Dec 2, 2025
…43608)

## Summary

Closes elastic#234901

- Move `Color by value` and `Color mapping` / `Color` settings from
"Appearance" section into "Supporting visualization" section
- Rename `Color by value` to `Color mode` in Primary Metric and
Secondary Metric editors
- Rename `Color mapping` to `Dynamic color mapping`
- Rename `Color` to `Select color`
- Add static color control in "Appearance" section for non-numeric
metrics since non-numeric metrics do not support the "Supporting
visualization" section

#### Numeric metric

https://github.com/user-attachments/assets/6ebd8b46-8293-4940-b604-806c3bfb3dde

#### Non-numeric metric
<img width="1920" height="935" alt="Screenshot 2025-11-24 at 12 01 43"
src="https://github.com/user-attachments/assets/ecc3a56d-e2f8-4d0e-bb82-56058f37d061"
/>


### Checklist
- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
JordanSh pushed a commit to JordanSh/kibana that referenced this pull request Dec 9, 2025
…43608)

## Summary

Closes elastic#234901

- Move `Color by value` and `Color mapping` / `Color` settings from
"Appearance" section into "Supporting visualization" section
- Rename `Color by value` to `Color mode` in Primary Metric and
Secondary Metric editors
- Rename `Color mapping` to `Dynamic color mapping`
- Rename `Color` to `Select color`
- Add static color control in "Appearance" section for non-numeric
metrics since non-numeric metrics do not support the "Supporting
visualization" section

#### Numeric metric

https://github.com/user-attachments/assets/6ebd8b46-8293-4940-b604-806c3bfb3dde

#### Non-numeric metric
<img width="1920" height="935" alt="Screenshot 2025-11-24 at 12 01 43"
src="https://github.com/user-attachments/assets/ecc3a56d-e2f8-4d0e-bb82-56058f37d061"
/>


### Checklist
- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
@mariairiartef mariairiartef added release_note:enhancement and removed release_note:skip Skip the PR/issue when compiling release notes labels Dec 11, 2025
mariairiartef added a commit that referenced this pull request Dec 15, 2025
… visualization" title (#245979)

## Summary

Follow up to #243608

- Removes supporting visualization section title
- Renames "Type" field to "Background chart" and the "Panel" option to
"None"

**Note**

Internally, we don't remove the "Supporting visualization" section, that
is the `DimensionEditorAdditionalSection`. We remove the "Supporting
visualization" title and the line separator so it looks like it is only
one section now.

### After

#### Background chart "None"

<img width="1404" height="1295" alt="Screenshot 2025-12-11 at 13 08 01"
src="https://github.com/user-attachments/assets/b45b6756-1d42-4fcd-8258-4a88dd2937e7"
/>

#### Background chart "Line"

<img width="1402" height="1294" alt="Screenshot 2025-12-11 at 13 09 49"
src="https://github.com/user-attachments/assets/2854e33f-cbbf-4261-b4e0-82d6fda73c7e"
/>

#### Background chart "Line" and dynamic coloring

<img width="1402" height="1294" alt="Screenshot 2025-12-11 at 13 08 35"
src="https://github.com/user-attachments/assets/094759fc-56c7-47a1-ac00-f027906c6d12"
/>

#### Not numeric

<img width="1403" height="1294" alt="Screenshot 2025-12-11 at 13 08 52"
src="https://github.com/user-attachments/assets/1fb87b45-b3e2-490b-b7a8-0f969ac72fcc"
/>



## Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

## Release note

Removed the "Supporting visualization" section heading from the Primary
Metric editor. All configuration options remain fully accessible in the
same location under "Appearance". The "Type" field has been renamed to
"Background chart" and the "Panel" option has been renamed to "None".

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
seanrathier pushed a commit to seanrathier/kibana that referenced this pull request Dec 15, 2025
… visualization" title (elastic#245979)

## Summary

Follow up to elastic#243608

- Removes supporting visualization section title
- Renames "Type" field to "Background chart" and the "Panel" option to
"None"

**Note**

Internally, we don't remove the "Supporting visualization" section, that
is the `DimensionEditorAdditionalSection`. We remove the "Supporting
visualization" title and the line separator so it looks like it is only
one section now.

### After

#### Background chart "None"

<img width="1404" height="1295" alt="Screenshot 2025-12-11 at 13 08 01"
src="https://github.com/user-attachments/assets/b45b6756-1d42-4fcd-8258-4a88dd2937e7"
/>

#### Background chart "Line"

<img width="1402" height="1294" alt="Screenshot 2025-12-11 at 13 09 49"
src="https://github.com/user-attachments/assets/2854e33f-cbbf-4261-b4e0-82d6fda73c7e"
/>

#### Background chart "Line" and dynamic coloring

<img width="1402" height="1294" alt="Screenshot 2025-12-11 at 13 08 35"
src="https://github.com/user-attachments/assets/094759fc-56c7-47a1-ac00-f027906c6d12"
/>

#### Not numeric

<img width="1403" height="1294" alt="Screenshot 2025-12-11 at 13 08 52"
src="https://github.com/user-attachments/assets/1fb87b45-b3e2-490b-b7a8-0f969ac72fcc"
/>



## Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

## Release note

Removed the "Supporting visualization" section heading from the Primary
Metric editor. All configuration options remain fully accessible in the
same location under "Appearance". The "Type" field has been renamed to
"Background chart" and the "Panel" option has been renamed to "None".

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Lens needs_docs release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v9.3.0

5 participants