Home Forums Chart Support Spline Chart not plotting all the datas from text file

Spline Chart not plotting all the datas from text file

Viewing 4 posts - 1 through 4 (of 4 total)
  • #9840

    Hi,
    I am generating a 20 random number(from 1 to 100) using shell script and storing in a text file after an interval of 1 second.
    CanvasJS reads an input text file using jquery. I need to plot a real time graph from the above text file. Canvasjs is plotting a graph but few points are not getting plotted. Code path is:
    http://jsfiddle.net/basu/fz9580gd/20/

    #9844

    Basu,

    Can you kindly provide the content/format of data your file contains, so that we can look into it and help you in this regard.

    #9845

    Hi Vishwas,

    The content of data in the file is a simple integer ranging from 1 to 100. These numbers are generated by running a shell script:
    //Starting tag for shell script
    for(( i=1;i<=300; i++))
    do
    shuf -i 1-100 -n 1
    sleep 1
    done
    //Ending tag for shell script

    In the Javascript code
    http://jsfiddle.net/basu/fz9580gd/20/
    I am calling an update script function after an interval of 2 seconds. On increasing the interval time to 4 or 5 seconds, the number of missing points in the graph reduces.

    #9846

    The problem has been fixed by putting one more condition in for loop in html file where the value extracted from the text file should be non zero. The updated code path is:
    http://jsfiddle.net/fz9580gd/22/

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

You must be logged in to reply to this topic.