I am currently trying to implement Highcharts JS in my application, using months as x-axis categories.
However, I have gaps in my data and I want the chart to automatically connect spaces.
For example, if I do not have data for March, I want February and April to be connected to a linear line.
Using the highcharts demo, I edited the data to demonstrate what is currently happening by default:
http://jsfiddle.net/kf26t/1/
data: [7.0, 10.0, null, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
As you can see, there was a gap between February and April.
I decided to remove months without data from the categories, but then this will give a distorted result, since February and April will be at equal distances from each other in April and May, which will not give an accurate idea.
If I remove 4 months, this inaccurate view is exaggerated:
http://jsfiddle.net/kf26t/2/
categories: ['Jan', 'Feb', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
The only solution I can think of is to calculate the average between months, but I don't want to display the average.
Is there a built-in way to fill these gaps in Highchart JS? If not, is there a clearer solution to what I have proposed?
Alternatively, is there a way to split the x axis based on the value? So, if there is no March month, February and April appear at a distance of 2 months.
This would also be useful when integers are the x axis. For example, if I had "1, 2, 10", I would not want them to be evenly distributed.