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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...