How to set up a legend with a certain height in highstock?

I need a legend with a height of 450 pixels at any time, regardless of how many series in the diagram I use

                $('.highcharts-legend rect').attr('height','475');

but this is not effective, I need something like the add-on option in the legend, but only padding Bottom, how can I do this, thanks

This example is ok http://jsfiddle.net/DZLdt/ I just want to do something like height: 475 in legends configurations

+4
source share
2 answers

Highcharts provides maxLimit for legendHeight.

legend: { maxHeight: 475 }

, , maxHeight. .

API ref: http://api.highcharts.com/highstock#legend.maxHeight

, .

+2

, , . , , rect, , svg . , svg, script , , svg.

$('.highcharts-container svg').height(heightToIncludeTheIncrease);

, . , , rect.

0

Source: https://habr.com/ru/post/1530302/


All Articles