问题描述
我有一个关于highcharts的问题,我正在生成一个图表,有时候后端有时会返回null。
Json:
{series:[{id:548,data:[null,1287.5,null,186.7777,null,null ,name:示例}],categories:[May 04,May 05,May 06,May 07,May 08,May 09 5月10日]}
我得到这样的图
我认为这完全没问题。这个要求改变了,客户不喜欢这样看,他希望有一条线喜欢这两点。我告诉他,这会给中间的日期带来虚假数据的印象,他说他想获得数据,但中间没有任何一点。
这是可能的吗?,我无法在文档上找到类似的东西。在这种情况下,由于数据的性质,将0而不是null是不可能的。 https://api.highcharts.com/highcharts/plotOptions.series.connectNullsrel =nofollow noreferrer> API 。
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
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.
Simply set connectNulls: true
, see API.
这篇关于高数据点空数据点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!