开发者

How do you change the height value when more items are added to highcharts dynamically?

开发者 https://www.devze.com 2023-04-11 17:23 出处:网络
I have the following problem - if i increase the amount of items in highcharts piechart the legend items get cut off as the height is a set amount - how can i change the heigh开发者_开发百科t if more

I have the following problem - if i increase the amount of items in highcharts piechart the legend items get cut off as the height is a set amount - how can i change the heigh开发者_开发百科t if more items are added - here is the current example: http://jsfiddle.net/zidski/34fUV/10/


//amusing data array contains number of legends, I know it's nested inside something else

var height = //get containers original height

var new_height = height + (data.length * 10);

$("#highcharts-0").css("{height:"+new_height+"}");
0

精彩评论

暂无评论...
验证码 换一张
取 消