Skip to content

Fix Visual Builder wrong color rules on multiple metric - #31455

Merged
sulemanof merged 1 commit into
elastic:masterfrom
sulemanof:#16431
Feb 21, 2019
Merged

sulemanof merged 1 commit into
elastic:masterfrom
sulemanof:#16431

Conversation

@sulemanof

Copy link
Copy Markdown
Contributor

Fix #16431 .
The same problem has been already fixed for gauge tab in PR: #27810 - find out the full description of a problem there.

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@flash1293
flash1293 self-requested a review February 19, 2019 14:57

@flash1293 flash1293 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍 Tested and works

@timroes timroes added Feature:TSVB TSVB (Time Series Visual Builder) v7.0.0 Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.0.0 v7.2.0 labels Feb 20, 2019
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app

@alexwizp alexwizp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code LGTM.

model.background_color_rules.forEach((rule) => {
if (rule.operator && rule.value != null) {
const value = series[0] && getLastValue(series[0].data) || 0;
const value = (series[0] && getLastValue(series[0].data)) ||

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about to simplify it
const value = getLastValue((series[0] || series[1] || {}).data || 0);

But it's optional

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:TSVB TSVB (Time Series Visual Builder) release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.0.0 v7.2.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Color rules not working on visual builder when splitting via terms agg

5 participants