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!

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...