Home Forums Report Bugs Line Graph Point Connection Bug

Line Graph Point Connection Bug

Viewing 7 posts - 16 through 22 (of 22 total)
  • #14309

    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.
    Best regards!

    #14396

    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 : Good format. but I can´t do it well I have the next result:My example. 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
    Best regards!!

    • This reply was modified 4 years, 7 months ago by saul_romero. Reason: Fix link
    #14401

    @saul_romero,

    The legendText was showing NaN because the JSON you were using didn’t had valuey in the last object.
    {"valuex":"2017-02-20 17:44:36"}
    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 updated JSFiddle.

    __

    Suyash Singh
    Team CanvasJS

    • This reply was modified 4 years, 7 months ago by Suyash Singh. Reason: indent
    • This reply was modified 6 months, 1 week ago by Vishwas R.
    #14407

    Thanks @Suyash singh,
    My chart have the correct format chart 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[0].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.

    #14412

    @saul_romero,

    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.
    Live Chart with Data from External JSON

    Suyash Singh
    Team CanvasJS

    #14415

    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.

    #14420

    @saul_romero,

    Updating legend text dynamically seems to be working fine. Please take a look at this updated JSFiddle.

    If you are still facing issue, can you kindly create a JSFiddle reproducing the issue you are facing and share it with us so that we can understand the scenario better and help you out?

    __
    Suyash Singh
    Team CanvasJS

Viewing 7 posts - 16 through 22 (of 22 total)

You must be logged in to reply to this topic.