Set bar color depends on field value

Greetings,
I have vertical bars visualisation, that show duration of software compilation steps (X-axis are steps, Y-axis is duration). I would like to set GREEN color, when field "success" is true and RED on opposite.
I I assume I have to do it with JSON input but I canno find any example

Are you just looking for a way to customize the colors for the data series? You can do that in the legend:

No, something like this:success_or_not

Sure, you can make the x-axis aggregated by terms, choose the field that has the A, B, and C as the term, and split the series by another terms aggregation, choosing the field that has the true and false as that term.

You can also change the bar chart from stacked (default) to "normal" to get everything as multiple bars per term.

Aggregations:

Select normal mode for the metrics mode:

Then pick the colors in the legend as I showed in my first response: a red for false and a green for true.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.