Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] Add some more documentation for dynamic coloring #101369

Merged
merged 14 commits into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/user/dashboard/lens.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,22 @@ Pagination in a data table is unsupported in *Lens*. However, the <<types-of-vis
===== Is it possible to have more than one y-axis scale in visualizations?

*Lens* lets you pick, for each Y dimension, up to two distinct axis: *left* and *right*. Each axis can have a different scale.

[float]
[[why-my-value-is-not-of-the-right-color-using-dynamic-coloring]]
===== Why mt value is not of the right color when using dynamic coloring?
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we using the term "dynamic coloring" anywhere else? I don't think it's self-explanatory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair point. I assumed here it will be in the release notes.
Probably I'd suggest then datatable coloring, wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good to me. Other things that would work IMHO:

  • conditional coloring
  • value-based coloring
  • table cell coloring


There could be various reason for a specific value in the table to have a different color than expected.
dej611 marked this conversation as resolved.
Show resolved Hide resolved

Here's a short list of few different aspects to check:
* Make sure the value falls within the desidered color stop value defined in the panel. Color stop values are "inclusive".
dej611 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a little out of my realm here. Do users know what "inclusive" means when it comes to color stop values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Inclusivity, in this context refers to "ranges", so I would expect they are. I do not have a strong opinion here on the terminology, so if anything better comes I'm open.


* Make sure to have the right value precision setup: value formatters could round up or down numeric values.
dej611 marked this conversation as resolved.
Show resolved Hide resolved

* Make sure the right color continuity option is selected: if the number is below the first color stop value a continuity of type `Below` or `Above and below range` is required
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Make sure the right color continuity option is selected: if the number is below the first color stop value a continuity of type `Below` or `Above and below range` is required
* Make sure the right color continuity option is selected: if the number is below the first color stop value, a continuity of type `Below` or `Above and below range` is required.


* The values set by default by the Value type are based on the current data range displayed on the data table.
dej611 marked this conversation as resolved.
Show resolved Hide resolved

** If a `Number` custom configuration is used, check the color stops value are covering the current data range.
dej611 marked this conversation as resolved.
Show resolved Hide resolved

** If a `Percent` configuration is used, when the data range changes this has an effect on colors displayed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
** If a `Percent` configuration is used, when the data range changes this has an effect on colors displayed.
** If a `Percent` configuration is used, and the data range changes, the colors displayed are affected.

Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,24 @@ export function CustomizablePalette({
/>
</EuiFormRow>
<EuiFormRow
label={i18n.translate('xpack.lens.table.dynamicColoring.continuity.label', {
defaultMessage: 'Color continuity',
})}
label={
<>
{i18n.translate('xpack.lens.table.dynamicColoring.continuity.label', {
defaultMessage: 'Color continuity',
})}{' '}
<EuiIconTip
content={i18n.translate(
'xpack.lens.table.dynamicColoring.customPalette.continuityHelp',
{
defaultMessage:
'Decide how colors should behave before the first color stop and after the last one.',
dej611 marked this conversation as resolved.
Show resolved Hide resolved
}
)}
position="top"
size="s"
/>
</>
}
display="rowCompressed"
>
<EuiSuperSelect
Expand Down