开发者

How can I do a padding between my highest x-value and the plot's right gap in Highcharts?

开发者 https://www.devze.com 2023-03-21 23:55 出处:网络
I need to delete the margins between my l开发者_运维百科ines and plot gap. I decided to use the startOnTick and endOnTick property but in this case line\'s points in the gap are not seen or seen only

I need to delete the margins between my l开发者_运维百科ines and plot gap.

How can I do a padding between my highest x-value and the plot's right gap in Highcharts?

I decided to use the startOnTick and endOnTick property but in this case line's points in the gap are not seen or seen only part of them.

How can I do a padding between my highest x-value and the plot's right gap in Highcharts?

Please, help if you know how, of course)))


You can set maxPadding and minPadding within chart options provided to the constructor.

Or you can use setExtremes(min, max) after instantiate the chart for dynamic values.

var myChart = new Highchart.chart(options),
extremes = myChart.xAxis[0].getExtremes(),
minPadding = 20,
maxPadding = 20;
myChart.xAxis[0].setExtremes(extremes.dataMin - minPadding, extremes.dataMax + maxPadding);
0

精彩评论

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

关注公众号