Dashboards & Visualizations

How can I have different chart column bar colors when comparing hourly events for multiple dates?

christopheryu
Communicator

I have the search below that produces the result I wanted (hourly average count per day for the past four days)

search | timechart span=1h count | eval weekday=strftime(_time,"%A") | eval hour=strftime(_time,"%H") | stats avg(count) by hour weekday

The chart shows four columns representing each date for first hour (00) then another four columns for the next hour (01) and so on. However, all the columns only have one color so it is hard to distinguish each date. Is there a way to have different colors per date?

0 Karma
1 Solution

woodcock
Esteemed Legend

Change from stats to chart like this:

index=main | timechart span=1h count | eval weekday=strftime(_time,"%A") | eval hour=strftime(_time,"%H") | chart avg(count) by hour weekday

View solution in original post

woodcock
Esteemed Legend

Change from stats to chart like this:

index=main | timechart span=1h count | eval weekday=strftime(_time,"%A") | eval hour=strftime(_time,"%H") | chart avg(count) by hour weekday

christopheryu
Communicator

Thank you!

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...