How to Changing the Background-Color of Chart in Splunk?
Visualizing data in Splunk-Dashboard, column charts, pie charts, bar charts, etc. are used. Furthermore, the background of all panels seems white via default. With this post, you will be shown how you can change the background hue of a chart at Splunk. We’ve formed a sample dashboard known as Background Color and it’s really simple to implement.
Here we’ve formed a panel that has a column chart. The query is behind the panel is
Below we’ve shown the way to vary the background hue of charts in Splunk. Thus, you need to edit the source code of the dashboard. You will the Edit option at the top-right corner of a dashboard. Click at Edit.
As seen the Source-option is at the top-left corner on this page. Click at Source which will allow you to edit source code.
Charting.field colors we’ve changed the color of columns in this chart. Here the status & count are 2 existing field-name in this column chart. You’ll see how to Add-Custom-Colors in these Charts at Splunk for extra details. We’ve utilized charting.backgroundColor to vary the background hue of the column chart. Moreover, you’ve to state the hexadecimal code of colors to vary the background hue of a chart. You will also select any hexadecimal-color code as your wish. We’ve used charting.fontColor to vary the hues colors of fonts & also utilized charting.foregroundColor in changing the foreground hue of chart lines.
After adding options in the source code click on “Save” for changes to take effect.
As seen, we’ve created a cool dashboard that has a custom background hue at the column chart. Furthermore, you will also vary the background hue of a pie chart, bar chart, etc. similarly.