I have have a column chart which has a number of categories, each with a single data point (e.g. like this one). Is it possible to change the colour of the bar for each category? i.e. so each bar would have its own unique colour rather than all being blue?
You can also set the color individually for each point/bar if you change the data array to be configuration objects instead of numbers.
Adding colour to your charts in Splunk dashboards is done using Simple XML. Go to the 'Edit' mode of the relevant dashboard and select the 'Source' option. There are two main ways to add colours to your dashboards.
In a chart, click to select the data series for which you want to change the colors. On the Format tab, in the Current Selection group, click Format Selection. tab, expand Fill, and then do one of the following: To vary the colors of data markers in a single-series chart, select the Vary colors by point check box.
Also you can set option:
{plotOptions: {column: {colorByPoint: true}}}
for more information read docs
You can also set the color individually for each point/bar if you change the data array to be configuration objects instead of numbers.
data: [ {y: 34.4, color: 'red'}, // this point is red 21.8, // default blue {y: 20.1, color: '#aaff99'}, // this will be greenish 20] // default blue
Example on jsfiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With