Home forums Using CanvasJS graphs for ime duration

This topic contains 3 replies, has 2 voices, and was last updated by  Priyanka M S 10 hours, 56 minutes ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21793

    pkhan
    Member

    Hi, is there any way/example, where I can draw graphs using canvasjs for certain intervals. I have a csv file, which gets updated every minute. I need to read content from that csv draw graphs for intervals like ” display graphs for the last 10 minute’s data” or for the “last day data” etc.

    csv example:
    DateTime SizeCurrent sizelast
    13-06-2018 00:00 10 80
    13-06-2018 00:00 10 80
    13-06-2018 00:01 90 65
    13-06-2018 00:01 90 65
    13-06-2018 00:02 100 60

    Thanks
    Parwez Khan

    #21803

    Priyanka M S
    Member

    @pkhan,

    Please take a look at this jsfiddle.

    __
    Priyanka M S
    Team CanvasJS

    #21823

    pkhan
    Member

    Thanks Priyanka for quick help, how can I test it with more data(I want to test this example with my real csv file, which contains thousands of lines). Can I test it locally ?

    Also, can I use this as area chart ?

    Thanks for the help.

    #21834

    Priyanka M S
    Member

    @pkhan,

    Can I test it locally ?

    You can test it locally by making an ajax request to your local file. Since you will be running the program directly from the file system, ajax request would get blocked due to browser security/ Cross-Origin requests. So please run the same via a local server like Apache, Nginx, IIS, etc and it should work fine.

    can I use this as area chart ?

    Yes. You can use the above provide code with any Chart types with axes.

    __
    Priyanka M S
    Team CanvasJS

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.