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!

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...