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!

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...