Home › forums › Report Bugs › Line Graph Point Connection Bug
Tagged: bug, connection, Line, points
This topic contains 21 replies, has 4 voices, and was last updated by Suyash Singh 2 years, 1 month ago.
Thank you very much @Suyash Singh and @vishwas R, now my chart is running perfect.
Soon I will share you the last result but now thanks so much with this issue.
Hi again!!,All is working good for my ECG chart thank you for your help.
Now I´m trying to show the information that I have in the chart for example : but I can´t do it well I have the next result: I have the date in a long format and my requirement is like the example.
I share you the code that I use to try to do it : jsfiddle
The legendText was showing NaN because the JSON you were using didn’t had valuey in the last object.
Also the legendText had a redundant 0 in front of it, because value (a number) was concatenated to a string deltaX.
value = value + deltaX;
You will need to initialize value as an empty string. To format the the legend text you can use CanvasJS.formatDate() with "YYYY-MM-DD hh:mm:ss:fff" valueFormatString.Please check this jsfiddle.
Thanks @Suyash singh,
My chart have the correct format but now my chart is static doesn’t accept new data, I´m using the same code so this function should works, I fixed that deleting the next code: ` dataLength = result.length;sortDataPoints(data, ‘x’);value = value + deltaX; value2 = value2 + deltaY;valor = CanvasJS.formatDate(new Date(value), “YYYY-MM-DD hh:mm:ss:fff”) + ” HR :”+ value2 + ” 25mm/s 10mm/mv”;chart.options.data.legendText = valor;
But how you suppose it’s necessary to show the legend text with the values coming, If you know how I can do this works again I will be very grateful.
You are getting a static chart because the JSON provided is static. For making the chart dynamic please have a look at this tutorial on creating live Updating Charts from JSON.
Thanks for the tutorial @suyash Singh but my Json is dynamic here is an Example I load data from my database but when I add the code for the legend text this not load nothing.
Please check this latest jsFiddle. If you aren’t looking for something like this, can you please create a jsfiddle so that we can understand the issue in your code and help you in a better way.
You must be logged in to reply to this topic.