Dashboards & Visualizations

How to decrease the size of a legend text or increase the legend width?

zugji
Path Finder

Hi folks

I have the problem that I have to have 3 charts in one row. Furthermore I need to have legend on each of these charts. The description of each line has between 20 and 30 characters. I don't want to truncate the description in the legend. What are the possibilities?

  • Decrease the text of each line description in the legend
  • Increase the width of the legend

Is this possible and how can I do that? I appreciate any help.

Best Regards,
Christian

templets
Path Finder

Although this is an old thread, I thought I'd add my solution. Often I want labels longer than Splunk default, but not always the full length.

First, do as jihor suggested above and set the option to "ellipsisNone", that way whatever you present will show in its entirity.

At/near the end of your search add (if you were using sourcetype as the label and wanted the first 25 characters) use:

| eval sourcetype = if( len( sourcetype ) > 25, substr( sourcetype, 0, 25 ) +"...", sourcetype )

or whatever you want to summarize the label.

0 Karma

jihor
Engager

Set charting.legend.labelStyle.overflowMode to ellipsisNone:
<option name="charting.legend.labelStyle.overflowMode">ellipsisNone</option>
But be aware that when you edit the Dashboard using Splunk UI (not editing the xml directly), on save this will revert back to ellipsisMiddle. This is a bit annoying.

martin_mueller
SplunkTrust
SplunkTrust

Sure.

...
<row>
  <panel>
    <html>
      <p>explanations for chart 1 go here...</p>
    </html>
  </panel>
  <panel>
    <html>
      <p>explanations for chart 2 go here...</p>
    </html>
  </panel>
  <panel>
    <html>
      <p>explanations for chart 3 go here...</p>
    </html>
  </panel>
</row>
...

martin_mueller
SplunkTrust
SplunkTrust

Then your charts are too narrow... have you considered sticking to only naming each series in the chart and providing a detailed description in an HTML box underneath?

0 Karma

zugji
Path Finder

Do you have an example for such a HTML box?

0 Karma

zugji
Path Finder

Unfortunatly that's even worse. I can see only something like this: -... -... -... -... -...

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You can try moving the legend to the bottom of the graph, that might give you more space for longer names.

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...