Dashboards & Visualizations

Can you change the colors in bar graph results and make them constant?

pavanae
Builder

I have a bar graph as below

alt text

Now how can change my current colors to display like below constantly, like every time I want to see only the below colors.
alt text

The following is my current html code. Now exactly where should I have to specify the above three color names.
option name="charting.axisLabelsX.majorLabelStyle.overflowMode" ellipsisNone
option name="charting.axisLabelsX.majorLabelStyle.rotation" 0
option name="charting.axisTitleX.visibility">collapsed
option name="charting.axisTitleY.visibility">visible
option name="charting.axisTitleY2.visibility">visible
option name="charting.axisX.scale">linear
option name="charting.axisY.scale">linear
option name="charting.axisY2.enabled">0
option name="charting.axisY2.scale">inherit
option name="charting.chart">bar
option name="charting.chart.bubbleMaximumSize">50
option name="charting.chart.bubbleMinimumSize">10
option name="charting.chart.bubbleSizeBy">area
option name="charting.chart.nullValueMode">gaps
option name="charting.chart.showDataLabels">none
option name="charting.chart.sliceCollapsingThreshold">0.01
option name="charting.chart.stackMode">stacked
option name="charting.chart.style">shiny
option name="charting.drilldown">all
option name="charting.layout.splitSeries">0
option name="charting.layout.splitSeries.allowIndependentYRanges">0
option name="charting.legend.labelStyle.overflowMode">ellipsisEnd
option name="charting.legend.placement">top

0 Karma
1 Solution

niketn
Legend

@pavanae for us to help you better you would need to also provide the series names being plotted in the bar chart or in other words the names of the legend.

There are two options you have:
1) If you know the series names use <option name="charting.fieldColors">{"yourField1": 0x425b3c, "yourField2": 0x5b3c53, "yourField3": 0xc98b06}</option>

2) If your series names can change (but count remains fixed), you can use <option name="charting.seriesColors">{0x425b3c, 0x5b3c53,0xc98b06}</option>.

Please try out and confirm. Refer to documentation for detais: https://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartConfigurationReference#General_chart_pr...

Just FYI, what you have shared is Simple XML dashbaord, not HTML.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@pavanae for us to help you better you would need to also provide the series names being plotted in the bar chart or in other words the names of the legend.

There are two options you have:
1) If you know the series names use <option name="charting.fieldColors">{"yourField1": 0x425b3c, "yourField2": 0x5b3c53, "yourField3": 0xc98b06}</option>

2) If your series names can change (but count remains fixed), you can use <option name="charting.seriesColors">{0x425b3c, 0x5b3c53,0xc98b06}</option>.

Please try out and confirm. Refer to documentation for detais: https://docs.splunk.com/Documentation/Splunk/latest/Viz/ChartConfigurationReference#General_chart_pr...

Just FYI, what you have shared is Simple XML dashbaord, not HTML.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
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, ...