Dashboards & Visualizations

coloring coloumn chart

smolcj
Builder

Hi all,
my search is like index=main | chart count by severity
and i am getting a chart like
count in y axis, error and info in x axis and the color of both columns are blue
i modified the search in view as
index=main | chart count by severity| eval red=if(severity=="ERROR",1,0)|eval green = if(severity=="INFO",1,0)
and charting option to

{"red":0xFF0000,"green":0x00FF00}

but i am getting a wiered chart with top border color as i specified and fill color as count color, also i am not able to drill down it.
please help
Thank you

Tags (2)
0 Karma
1 Solution

lguinn2
Legend

Here is an answer that may help: Change chart bar color based on data value

Note that this technique leverages a side-effect of the stats command; it does not work with the chart command.

View solution in original post

smolcj
Builder

dashboard is in simple xml, it have a dropdown box listing sources and a chart showing the severity

0 Karma

lguinn2
Legend

Here is an answer that may help: Change chart bar color based on data value

Note that this technique leverages a side-effect of the stats command; it does not work with the chart command.

lguinn2
Legend

The automatic drilldown will not work, because the search has eval commands following the stats command:

sourcetype=mysourcetype AND searchstuffforerrors | stats count by host
| eval redCount = if(count>20,count,0)
| eval yellowCount = if(count<=20 AND count>15,count,0)
| eval greenCount = if(count<=15, count, 0)
| fields - count

You should be able to include an explicit drill-down in the XML, starting with Splunk 5.0. Look here for more info on drill-down: http://docs.splunk.com/Documentation/Splunk/5.0/Viz/Dynamicdrilldownindashboardsandforms

smolcj
Builder

is it possible to use an explicit drill down option using
if so /app/search/flashtimeline?q=source=$sources$
here sources is my dropdown box result, how to create a query supporting this drill down
please help

0 Karma

smolcj
Builder

Thanks lguinn, it worked well, but i am not able to drill down from the chart, befor changing the color i was able to . but not now,, why?
"PARSER: Applying intentions failed Unable to drilldown because of post-reporting 'eval' command"
this is the error
please help

0 Karma

jonuwz
Influencer

can you post the complete XML for the dashboard ?

0 Karma

smolcj
Builder

i tried with this option
charting.chart.fieldColors
but no change, drilldown is also not happening

0 Karma

jonuwz
Influencer

pretty sure it should be charting.chart.fieldColors not charting.fieldColors

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...