Hi, I’d like to know if I can assign a specific color to an exact value in a visualization’s data. How can I do that?, is it possible?
Specific colors for values in a chart
emoya
#2
Actually yes, you can do something like this:
let color = cf.Color();
// setting the color for different attribute values
color.match({
'your_value_1': 'red',
'your_value_2': 'blue',
'your_value_3': '#FFF'
});
yourViz.set("color", color);
With that configuration You assign specific colors to attribute values in your chart.
davisg
#3
I understand, but I have a Multimetric Bars, so can this setting be applied to specific metrics?
emoya
#4
Then you can use a config by metric like this one:
let color = cf.Color();
// setting the color for different metric names
color.match({
"metric1": "red",
"metric2": "blue",
"Transactions": "#f4589d" // Using the count metric
});
yourViz.set("color", color);