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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...