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.
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...