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!

Stay Connected: Your Guide to July Tech Talks, Office Hours, and Webinars!

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...

Updated Data Type Articles, Anniversary Celebrations, and More on Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

A Prelude to .conf25: Your Guide to Splunk University

Heading to Boston this September for .conf25? Get a jumpstart by arriving a few days early for Splunk ...