You must be logged in to post your query.
Home › Forums › Chart Support › how to avoid to starting lines from value 0
Tagged: NULL values
Hello, in my dataPoints sometimes I use to put some “null” values when I’ve no data for a certain point, but when canvasjs encounter this “null” value it seems to convert it to zero and the line starts from Y=0
Eg if I’ve these 3 datapoints (1,null), (2,5), (3,6) the rendering enging will show 2 segments, the first one from (1,0) to (2,5) and the second one from (2,5) to (3,6). Is there a way to avoid showing the first segment? I would that canvasjs skips all lines having null values as Y coordinate.
@blacktek,
Adding a null dataPoint in the begining seems to be working fine and is not considered as zero. Please take a look at this jsfiddle. If you are still facing the issue, kindly create a jsfiddle reproducing the issue so that we can look at it and help you out.
___________ Indranil Deo, Team CanvasJS
you’re correct; I made a cast to float for all the Y values in another part of the code and this was traslating null to 0.
thank you
You must be logged in to reply to this topic. Login/Register