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
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...