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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...