Splunk Search

How do I customize the bar colors for my dashboard bar chart?

hqw
Path Finder

alt text

Hi all,

May i know if there is any way to change the colors of the bars in this screenshot? I want the grey part to display on the bottom, and the orange part should be on top. Can I do this by modifying the Simple XML?

Thanks in advance

1 Solution

rsennett_splunk
Splunk Employee
Splunk Employee

Yes, you can deliberately assign colors to series (in order) rather than letting Splunk make the assignements:

http://docs.splunk.com/Documentation/Splunk/6.2.4/Viz/Chartcustomization

With Splunk... the answer is always "YES!". It just might require more regex than you're prepared for!

View solution in original post

rsennett_splunk
Splunk Employee
Splunk Employee

Yes, you can deliberately assign colors to series (in order) rather than letting Splunk make the assignements:

http://docs.splunk.com/Documentation/Splunk/6.2.4/Viz/Chartcustomization

With Splunk... the answer is always "YES!". It just might require more regex than you're prepared for!

hqw
Path Finder

Hi there,

Actually my question is not about assign colour, colour doesn't matter. These two colour stand for different things A and B, my question is how to switch the location of A and B. Currently A is on the top, what i want is to display it on the bottom.

The issue has been fixed by rename A and B. I supposed it is due to the order of first letter of A and B.

Thanks for your support and kindness.

0 Karma

gcato
Contributor

Output order is important and can be controlled using the 'table' command to switch A and B.

rsennett_splunk
Splunk Employee
Splunk Employee

Yes, Agreed. We can leave this one, since the question asked about changing the colors. 🙂

hqw: It would be wonderful if you created another question asking about changing the appearance order of series. Show your search and the result here, and then answer it yourself, showing your solution and the new image... you might add the bit about color order too (the colors are in an indexed array, so the order matters, although you can name them specifically too. You'll get Karma points and people like @gcato can put there variations up there too!

With Splunk... the answer is always "YES!". It just might require more regex than you're prepared for!
Get Updates on the Splunk Community!

Introducing a Smarter Way to Discover Apps on Splunkbase

We’re excited to announce the launch of a foundational enhancement to Splunkbase: App Tiering. Because we’ve ...

How to Send Splunk Observability Alerts to Webex teams in Minutes

As a Developer Evangelist at Splunk, my team and I are constantly tinkering with technology to explore its ...

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...