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!

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