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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...