Alejandra
Alejandra

Reputation: 726

highcharts with null data points

I have a question regarding highcharts, I'm generating a graph and sometimes the backend returns null for some days.

Json: {"series":[{"id":548,"data":[null,1287.5,null,186.7777,null,null,null],"name":"Example"}],"categories":["May 04","May 05","May 06","May 07","May 08","May 09","May 10"]}

Im getting a graph like this enter image description here

Which I think is completely fine. The requirement changed and the customer doesn't like to see it like this, he wants to have the two points liked by a line. I told him that it will give the impression of false data for the date in the middle, he said that he wants data but no point in the middle.

Is this possible?, I couldn't fine anything like that on the documentation. In this case to put 0 instead of null is not possible because of the nature of the data.

Upvotes: 4

Views: 11675

Answers (1)

Paweł Fus
Paweł Fus

Reputation: 45079

Simply set connectNulls: true, see API.

Upvotes: 16

Related Questions