Dashboards & Visualizations

[Help] Splunk Field Colors

Zyon
Engager

Hi,
I wanted to display the fields of column chart in different colors according to their occurrence, however the colors are not being displayed.

My search:

source="source.log" INBOUND | fields SRC | fields - _* | top 5 SRC | rangemap field=count green=20000-30000 default=gray

My XML:

<?xml version='1.0' encoding='utf-8'?>
<dashboard>
  <label>Test0</label>
  <row>
    <chart>
      <searchString>source="source.log" INBOUND | fields SRC | fields - _* | top 5 SRC | rangemap field=count green=20000-30000 default=gray </searchString>
      <title>Test0</title>
      <option name="charting.chart">column</option>
      <option name="charting.chart.stackMode">stacked</option>
      <option name="classField">range</option>
    </chart>
  </row>
</dashboard>

Thanks!

Tags (1)
0 Karma
1 Solution

HiroshiSatoh
Champion

"classField"でchartの色を変えることは私もできなかった。スタック棒グラフで"range"毎に集計した結果を表示する方法ではダメか?

I was not able to change the color of the chart in "classField". Do not do it in a way that displays the results aggregated to each "range" in the stack bar chart?

|eval green=if(range=="green",count,0) | eval gray=if(range!="green",count,0) | fields - count,range

View solution in original post

0 Karma

HiroshiSatoh
Champion

"classField"でchartの色を変えることは私もできなかった。スタック棒グラフで"range"毎に集計した結果を表示する方法ではダメか?

I was not able to change the color of the chart in "classField". Do not do it in a way that displays the results aggregated to each "range" in the stack bar chart?

|eval green=if(range=="green",count,0) | eval gray=if(range!="green",count,0) | fields - count,range

0 Karma

Zyon
Engager

Thank You, it solved my problem.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...