Dashboards & Visualizations

How to Add legends to a dashboard visualisations?

POR160893
Builder

Hi,

I have a dashboard as follows:

POR160893_0-1655643439259.png

 



And the stakeholder wants a legend as follows added to the dashboard:

POR160893_1-1655643887735.png

 



How can this be achieved?
Thanks,

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

My apologies.  Pie charts don't support the charting.legend.placement setting.  I believe users have to hover over a segment to see what it represents.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Normally, we'd just edit the dashboard and turn on legends in the desired panels.  This app, however, has disabled the Edit button.  All is not lost, however.  If you have access to the file system, you can edit the Simple XML directly. 

Begin by copying the file from $SPLUNK_HOME/etc/apps/<this app>/default/data/ui/views to $SPLUNK_HOME/etc/apps/<this app>/local/data/ui/views.

Edit the copy and look for <option name="charting.legend.placement">none</option> and replace it with <option name="charting.legend.placement">right</option>

NOTE: Once this change is made, it will override the dashboard in the default directory.  That means any updates in future versions of this app will not be seen by users until you repeat this process or delete the local copy of the dashboard.

---
If this reply helps you, Karma would be appreciated.

POR160893
Builder

Hey,

I have added the legend option onto one of my pie charts now:

POR160893_0-1655727387374.png

 



But I see no legend still:

POR160893_1-1655727412476.png

 



Why would this be?


Thanks,
Patrick

0 Karma

richgalloway
SplunkTrust
SplunkTrust

My apologies.  Pie charts don't support the charting.legend.placement setting.  I believe users have to hover over a segment to see what it represents.

---
If this reply helps you, Karma would be appreciated.

POR160893
Builder

Hi,

 

I do not have permissions to re-enable the edit mode of this app or access to the  file system.

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

You may want to contact your Splunk admin for assistance.

Another option is to clone the dashboard.  Once you're the owner you should have the ability to make changes.  Cloning may require permissions you don't have, however, so admin help may be needed.

---
If this reply helps you, Karma would be appreciated.
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 ...