Home › forums › Using CanvasJS › Spline Chart not plotting all the datas from text file
This topic contains 3 replies, has 2 voices, and was last updated by basu 2 years, 9 months ago.
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:
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.
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++))
shuf -i 1-100 -n 1
//Ending tag for shell script
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.
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:
You must be logged in to reply to this topic.