Dashboards & Visualizations

How can i restrict colors for PIE visualization !!

rakesh_498115
Motivator

Hi

i am using three pie chart visualzations in my dashboard.Now in these pie visualzations i am getting random colors for each of the visualzations.How can restrict these colors to be unique for the entire dashboard i.e in all the three pie visualzations i need the color which i am interested..

Thanx

Tags (2)
1 Solution

Gilberto_Castil
Splunk Employee
Splunk Employee

There is a specific way to add charting colours and it depends on the way your chart is configured.

With the simple XML you will use something like this:

<chart>

<searchName> my search </searchName>

<option name="charting.chart">pie</option>

<option name="charting.seriesColors">[0x263E7B,0x9EB1DE,0x65718E]</option>

</chart>

With the advanced XML, you can use something like this:

<module name="HiddenChartFormatter">

<param name="chart">pie</param>

<param name="charting.seriesColors">[0x263E7B,0x9EB1DE,0x65718E,0xAFBDDE]</param>
<module name="FlashChart">

The documentation is here.

View solution in original post

Gilberto_Castil
Splunk Employee
Splunk Employee

There is a specific way to add charting colours and it depends on the way your chart is configured.

With the simple XML you will use something like this:

<chart>

<searchName> my search </searchName>

<option name="charting.chart">pie</option>

<option name="charting.seriesColors">[0x263E7B,0x9EB1DE,0x65718E]</option>

</chart>

With the advanced XML, you can use something like this:

<module name="HiddenChartFormatter">

<param name="chart">pie</param>

<param name="charting.seriesColors">[0x263E7B,0x9EB1DE,0x65718E,0xAFBDDE]</param>
<module name="FlashChart">

The documentation is here.

Gilberto_Castil
Splunk Employee
Splunk Employee

If you look at the results in tabular format, you will have three rows:

accepted count percent
rejected count percent
exception count percent

Or something like that...

As far as I understand, the charting porition will assign the colour based on the row assignment such that:

accepted count percent -> 0x263E7B
rejected count percent -> 0x9EB1DE
exception count percent -> 0x65718E

I have not tested that but my spidey sense tells me so... :).

BTW: You can extropolate a colour scheme at http://colorschemedesigner.com/. And if you can, please donate to keep them online.

0 Karma

rakesh_498115
Motivator

Tats cool..Ok..can i restrict these colors for specfic values .

i.e assume i am using three colors as you mentioned above
0x263E7B,0x9EB1DE,0x65718E and i have three values for my pie chart Accepted,Rejected and Exception.

Always Accepted count should be given 0x263E7B color and Rejected with 0x9EB1DE color and Exception with 0x65718E color for all the three pie charts in my dashboard...

How can i acheive this ??

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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