Splunk Search

How to add a color coded legend with text to a pie chart visualization?

ketan_chanana
Engager

Hi,

I need to add colour code wise legend for my Pie chart visualization in a same way that Bar/Column chart has on the right side of the graph. My pie chart has three colours- Red, Green and Amber. Say for Red if i want to add text "XYZ", Is it possible to add ? If yes how to add that? Thanks

0 Karma

darshini2790
Explorer

you can use below options inside chart tag from UI editor which will color code it as Red and Green respectively.
ABC and XYZ wil be field values
for example option name="charting.legend.labels">[ABC,XYZ] and option name="charting.seriesColors">[#52D256,#ff0000]

0 Karma

yannK
Splunk Employee
Splunk Employee

You can apply colors to series in chart, see http://docs.splunk.com/Documentation/Splunk/6.1.3/Viz/Chartcustomization#Chart_colors

and if you wan to add text to series, why not rename the series before generating the chart ?

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 ...