Splunk Search

How to format a graph to use a different color for each weekday

jbrenner
Path Finder

I am using the timechart command to create a graph with one bar for each day in the month, and I would like each day of the week to display in the same color, so I can easily identify week-over-week changes.
For example, Mondays would be blue, Tuesdays would be green, etc.
Is this possible?

Thanks in advance!
Jonathan

0 Karma

somesoni2
Revered Legend

What's your current query??

0 Karma

jbrenner
Path Finder

index=my_index earliest=-1mon "Order Submitted" |

timechart count(IP) as SuccessfulOrders

0 Karma

somesoni2
Revered Legend

Color of bars (or columns or line) are differentiated based on series (column being charted0. Since you've single column being charted, they all of same color. You can try this workaround (create a series for each day of week, so you get 7 series and 7 different bar color, you will lose SuccessfulOrders from legend if that's ok with you)

index=my_index earliest=-1mon "Order Submitted" 
| eval dayOfWeek=strftime(_time,"%A") | 
timechart count(IP) as SuccessfulOrders by dayOfWeek
0 Karma
Get Updates on the Splunk Community!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...