Highcharts - How to remove start and end padding from area chart

Fiddle - http://jsfiddle.net/vKLPP/

I want to remove the empty space on both sides (see red lines).

2W7IdBE.png

I tried various options like minpadding, margin etc, but none of them work.

startOnTick: true, minpadding:0 
+4
source share
2 answers

for this there is no need to go with categories or datetime of the x axis just change the data

in this format

: [, [x1, y1], [x2, y2], [x3, y3], [x4, y4], [x5, y5]]

ex:

  data: [[1750,106], [1800,107], [1850,111], [1900,133], [1950,221], [1999,767], [2050,1766]] 

update your js script please check http://jsfiddle.net/vKLPP/1/

hope it will be useful

+2
source

According to the documentation, minPadding / maxPadding does not work with categories. Therefore, you should use ie datetime xAxis and determine the correct tickInterval / pointInterval.

-1
source

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


All Articles