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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...