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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...