Splunk Search

How to edit my panel to show different colors for each bar in my chart?

garinapavan
Explorer

Hi ,

I have the below code with multiples lines on the bar. I want to see different colors for each bar. I added [0xEBF0F5,0xC2D1E0,0x99B2CC,0x7094B8,0x4775A3] and it is not working. Caan some body let me know what is the issue?

<panel>
      <chart>
        <title> System Invocations</title>
        <search>
          <query>source="/abcd" host=cef  "Attempting to invoke service at"  | stats count by ExternalURI | sort –count |sort - count</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="charting.legend.placement">right</option>
        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
        <option name="charting.layout.splitSeries">0</option>
        <option name="charting.drilldown">all</option>
        <option name="charting.chart.style">shiny</option>
        <option name="charting.chart.stackMode">default</option>
        <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
        <option name="charting.chart.nullValueMode">gaps</option>
        <option name="charting.chart.bubbleSizeBy">area</option>
        <option name="charting.chart.bubbleMinimumSize">10</option>
        <option name="charting.chart.bubbleMaximumSize">50</option>
        <option name="charting.chart">bar</option>
        <option name="charting.axisY2.scale">inherit</option>
        <option name="charting.axisY2.enabled">false</option>
        <option name="charting.axisY.scale">linear</option>
        <option name="charting.axisX.scale">linear</option>
        <option name="charting.axisTitleY2.visibility">visible</option>
        <option name="charting.axisTitleY.visibility">visible</option>
        <option name="charting.axisTitleX.visibility">visible</option>
        <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
        <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
        <option name="charting.axisTitleX.text">Outbound Systems</option>
        <option name="charting.seriesColors">[0xEBF0F5,0xC2D1E0,0x99B2CC,0x7094B8,0x4775A3]</option>
      </chart>
    </panel>
0 Karma
1 Solution

somesoni2
Revered Legend

Change your query to this

source="/abcd" host=cef  "Attempting to invoke service at"  | stats count by ExternalURI  | eval temp=1 | xyseries temp ExternalURI  count | fields - temp

View solution in original post

0 Karma

somesoni2
Revered Legend

Change your query to this

source="/abcd" host=cef  "Attempting to invoke service at"  | stats count by ExternalURI  | eval temp=1 | xyseries temp ExternalURI  count | fields - temp
0 Karma

garinapavan
Explorer

Cool. it worked , but some how one of the bar is missing from presentation and also i see some number beside that . bit weird .

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...