Dashboards & Visualizations

How to set values y-axis for a stacked color bar graph

nyasharashad59
Explorer

Good day

I have managed to create a graph with 2 y axis values FUP which is color and AP which is the number of stacked bars. What i would want is When Ap =0 it highlights four stacked bars , when AP = 100 then 3 stacked bars, when

AP0 = 4 bars
AP100=3 bars
AP150=2 bars
AP200=1 bar

I have used the script below but it is giving me the inverse of what i want. FUP is the color which will fill the AP bars. Attached screenshot

      <query>index=sandvine sourcetype=sql subscriber_name="$subscriberid$"
      |eval chartcolor=case(subscriber_fup=200,"Red",subscriber_fup=150,"Orange",subscriber_fup=100,"Yellow",subscriber_fup=0,"Green")
      | eval chartbars=round(subscriber_ap/50)
      |timechart span=1h max(chartbars) by chartcolor</query>
      <earliest>$time_range.earliest$</earliest>
      <latest>$time_range.latest$</latest>![alt text][1]
0 Karma

DalJeanis
Legend
   | eval chartbars=if(subscriber_ap=0,4,5-round(subscriber_ap/50))
0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...