How can I do a padding between my highest x-value and the plot's right gap in Highcharts?
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 part of them.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);
精彩评论