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
SplunkTrust
SplunkTrust

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
SplunkTrust
SplunkTrust

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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...