0

I've got a slight issue with the high charts on my website. Most of the charts on the page are divided into 8 sections on the x axis. However, 2 of the charts are, as you can see, divided into 12 sections. I'd like to make these 2 charts divide into 8 sections.

Here's the web page: http://newton-poppleford-weather.co.uk/trends.htm

Please let me know if you require any code.

Thanks,

William

  • It is because you have provided 12 months of data. Can you make 12 months of data into 8 months? No. Unless you collate/trim data, it won't be possible in humane way. – kawadhiya21 Feb 01 '17 at 16:56
  • Understood, but is showing 8 points of that data on the x axis possible? – William Grimsley Feb 01 '17 at 17:05
  • There are 2 ways it could be achieved. 1. Fetch 8 months data from server. 2. Trim array data getting into highcharts using this link http://stackoverflow.com/questions/953071/how-to-easily-truncate-an-array-with-javascript – kawadhiya21 Feb 01 '17 at 17:08
  • How about something like `xAxis: { tickInterval: 1000 * 3600 * 24 * 10.5 }`? – Halvor Holsten Strand Feb 01 '17 at 19:48
  • You can have whatever number of ticks that you want on the axis, by specifying things like `tickInterval`, or `tickAmount`, or providing your own list with `tickPositions`, or a full blown positioning callback with `tickPositioner`. References here: http://api.highcharts.com/highcharts/xAxis – jlbriggs Feb 01 '17 at 20:49

0 Answers0