Home forums Report Bugs Line Graph Point Connection Bug

This topic contains 21 replies, has 4 voices, and was last updated by  Suyash Singh 8 months, 3 weeks ago.

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

    saul_romero
    Member

    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

    saul_romero
    Member

    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 9 months ago by  saul_romero. Reason: Fix link
    #14401

    Suyash Singh
    Moderator

    @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 jsfiddle.

    __

    Suyash Singh
    Team CanvasJS

    • This reply was modified 9 months ago by  Suyash Singh. Reason: indent
    #14407

    saul_romero
    Member

    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

    Suyash Singh
    Moderator

    @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.

    Suyash Singh
    Team CanvasJS

    #14415

    saul_romero
    Member

    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

    Suyash Singh
    Moderator

    @saul_romero,

    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.

    __
    Suyash Singh
    Team CanvasJS

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

You must be logged in to reply to this topic.