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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...