Splunk Dev

splunkjs charts with legend maximumWidth property has no effect

bhawkins1
Communicator

Hello,

I'm instantiating some ChartViews using splunkjs. I've got the following properties specified:

"charting.axisLabelsX.majorLabelStyle.rotation" = "-90";
"charting.axisTitleX.text"                      = "Time";
"charting.axisTitleX.visibility"                = "collapsed";
"charting.axisTitleY.text"                      = "Subscriber";
"charting.chart"                                = "area";
"charting.chart.nullValueMode"                  = "connect";
"charting.chart.stackMode"                      = "stacked";
"charting.legend.labelStyle.overflowMode"       = "ellipsisEnd";
"charting.legend.labelStyle.minimumWidth"       = "1000";
"charting.legend.labelStyle.maximumWidth"       = "1000";

Most of these work. Sadly, the changes to legend width have no effect.

Is there any work-around for this? I'd like to have two charts that are above/below, to have their legends lined up.

0 Karma

rjthibod
Champion

Those options do not appear to be supported. I have both the SplunkJS code for versions 1.1 and 1.4, and those properties are not present. I think they were supported in the old FlashCharts or AdvancedXML components, but those are deprecated.

bhawkins1
Communicator

Thanks. The second part of my question looks for a work-around. I don't think I can really hack this in since the charts/legends are pure SVG.

Any suggestions would be appreciated.

0 Karma

rjthibod
Champion

You are probably correct. The highcharts/svg stuff is not really friendly to such hacks in my experience. You could try to work something out to dig into the CSS hierarchy and set some kind of width parameter, but that would be pretty brittle.

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 ...