I'm using a line chart to display two series of data. Each series could have skipped values(they initialized with null values). In the result I got a line with breaks. The problem is how to display a continious line in case of skipped values (lower chart on image). I've searched through all questions tagged with "zingchart", read documentation and examples on zingchart.com" but I couldn't found anything that solves my problem. Here is the image of two charts (upper - what I get, lower - what I need): https://i.sstatic.net/ZyX5I.jpg
How to display continous line chart (via Zing Chart) with skipped values?
Asked Answered
EDIT - Updated based off comment
In that case, you'd switch from a one dimensional array to a two dimensional array like this:
values = [
[X, Y]
]
where X corresponds so the X scale value and Y corresponds to the Y scale value.
Here's a demo: http://demos.zingchart.com/view/R93HI801
You can read more about our data values here: http://www.zingchart.com/docs/reference/data-format-by-chart-type/
I'm on the ZingChart team. Let me know if you have any other questions.
Patrick, as I've pointed out in the question I have already initialized some values with null. The problem in this case I get breaked line chart in places where values are null. But I need continious line chart. Please, see the image link from the question. Is it possible for ZingChart to display continious line for points which have null values? –
Supportable
Sorry Dimitriy, I misunderstood. In that case, your values array would be an array of arrays like this:
[ [1,1], [3,2], [4,3], [7,9] ]
where the 0th index of each subarray is the X coordinate and the 1st index of each subarray is the Y coordinate. Here's another demo: demos.zingchart.com/view/R93HI801 –
Richburg @Dimitriy - No problem! If the solution answers your question, please accept it so others can see it. –
Richburg
© 2022 - 2024 — McMap. All rights reserved.