Splunk Enterprise

help on average line in bar chart

jip31
Motivator

hi

 

I want to display an average line in my bar chart

So I am doing this but instad a line it's a third bar chart which is displayed

how to add a line average instead a bar line

 

| timechart span=2h max(debut) as "Début de session", max(fin) as "Fin de session" 
| eventstats avg("Début de session") as Average 
| eval Average=round(Average,0)

 Thanks

Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You need to format the chart, specifically Chart Overlay

ITWhisperer_0-1632989221197.png

 

0 Karma

jip31
Motivator

thanks it works

last question, I try to color the average line like the color of the field related to the avaerage but I dont reach...

 <option name="charting.fieldColors">{"Average":EC240C, "Fin de session": EC240C}</option>

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Your average is from "Début de session" not "Fin de session" - is that why?

0 Karma

jip31
Motivator

In my dash, I have 2 fields "Début de session" and "Fin de session" and I am doing 2 average, avg_deb and avg_fin

But I dont succeed to use the same color for avg_deb like for "Début de session" and same thing for avg_fin with "Fin de session"

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

What part isn't working? Is it only colouring the average lines or none of them?

0 Karma

jip31
Motivator

i dont succeed to colour the average lines

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...