You must be logged in to post your query.
Home › Forums › Chart Support › Line plot hangs with two single-point series
Tagged: chart line hang crash
If I try to plot two line plots, which each have only a single point, and whose X values are very close together, but not identical, render() hangs my browser. If I move the X values somewhat further apart, I can see that the issue is that it’s rendering an absurd number of X-axis labels — there are so many that they overlap into a black smear with values that are a bit further apart. Here’s an example of a data set that hangs my browser:
[ {“name”: “A”, “type”:”line”, “dataPoints”:[{“x”:0.1003, “y”:1}]}, {“name”: “B”, “type”:”line”, “dataPoints”:[{“x”:0.1005, “y”:2}]} ]
And just removing a 0 from those X values is enough to make it return, but render a mess in the X axis labels:
[ {“name”: “A”, “type”:”line”, “dataPoints”:[{“x”:0.103, “y”:1}]}, {“name”: “B”, “type”:”line”, “dataPoints”:[{“x”:0.105, “y”:2}]} ]
I tested both of these data sets in the “Try Editing The Code” example on the canvasjs.com front page, and it breaks there for me.
@jjurack,
Sorry for the inconvenience caused. We will be improving this behaviour in the future versions. Meanwhile, setting the minimum and maximum properties of the X axis seems to be working fine. Please take a look at this code snippet,
axisX : { minimum: 0.100, maximum: 0.1010 }
Kindly refer to this JSFiddle for an example on the same.
— Adithya Menon Team CanvasJS
@adithya-menon,
That work-around is working well for me, thank you for your help!
You must be logged in to reply to this topic. Login/Register