mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[MetricVis] Removed the rule of color applying. (#131128)
* Removed the rule of color applying. * Added check on the level of to_ast.
This commit is contained in:
parent
88eaa3e738
commit
29650b2bc8
2 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ class MetricVisComponent extends Component<MetricVisComponentProps> {
|
|||
title = `${bucketValue} - ${title}`;
|
||||
}
|
||||
|
||||
const shouldBrush = stops.length > 1 && shouldApplyColor(color ?? '');
|
||||
const shouldBrush = shouldApplyColor(color ?? '');
|
||||
return {
|
||||
label: title,
|
||||
value: formattedValue,
|
||||
|
|
|
@ -83,7 +83,7 @@ export const toExpressionAst: VisToExpressionAst<VisParams> = (vis, params) => {
|
|||
)
|
||||
);
|
||||
|
||||
if (colorsRange && colorsRange.length) {
|
||||
if (colorsRange && colorsRange.length > 1) {
|
||||
const stopsWithColors = getStopsWithColorsFromRanges(colorsRange, colorSchema, invertColors);
|
||||
const palette = buildExpressionFunction('palette', {
|
||||
...stopsWithColors,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue