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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...