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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...