I am seeing odd behavior when modifying the panel’s JSON to update overrides directly.
For the sake of this post I’ll simplify things:
I have a field (Field_1)
There are two distinct values (“yes” and “no”)
I want to create a bar chart where the “yes” bar is green, and the “no” bar is red.
Here’s what’s odd - when I apply my override to a pie chart (again, updating the JSON directly) it works, but if I duplicate and switch the chart type to bars, it does not. Has anyone experienced this? If so, how do we work around this?
I think @sowdenraymond meant: do you know which numerical value you want to be yes or no?
such as a 1 is a yes and a 0 a no for example.
By the way, even if it’s not what he meant, this info might still be useful.
Hi there - just tried your solution, but didn’t work for me. Not sure why. Out of curiosity, did you do any transformations to achieve the mappings in the bar chart, or are you using manual overrides alone?
I see - what I need is to color my bars based on dimension value, not metric value. Not sure if that changes anything. So, for example, I would want (in your example) the “bina” bar to be blue, regardless of value.
A dimension, in my case, would be the unique values in field_1 (in my example, these would be ‘yes’ and ‘no’). The metric associated is the COUNT(*) that is calculated after the GROUP BY statement (also above).
So, in a bar graph, I want the “yes” bar to be green, and the “no” bar to be red. I am able to achieve this in both pie charts and time series (each section or breakdown line is the correct color), but the same overwrite method does not work for a bar graph.
In fact, I just changed the bar chart to a pie chart, and my overrides were picked up immediately. Not sure why a bar chart wouldn’t be able to understand an override that a donut chart can.