I want to use chart.js to plot a real time plot of data being received on the html webapp using websockets with the value received as Y-Axis and reception time (in secs) as X-Axis.
Asked
Active
Viewed 2,862 times
1
-
You should show us some actual code, so that we can help you solve your problem, instead of solving it for you. – asymmetric Dec 08 '15 at 23:56
2 Answers
0
Well, I assume you know HTML/JavaScript/CSS, websockets, etc to use chart.js in your apps.
Here is a related post that might be of help to get you started.... Chart.js number Y-AXIS label format for many decimal places
You just have to get started somewhere, sometime!!!
Good luck.
0
Use the addData
method.
From the documentation at http://www.chartjs.org/docs/#advanced-usage-prototype-methods
.addData( valuesArray, label )
Calling addData(valuesArray, label) on your Chart instance passing an array of values for each dataset, along with a label for those points.
// The values array passed into addData should be one for each dataset in the chart myLineChart.addData([40, 60], "August"); // This new data will now animate at the end of the chart.

potatopeelings
- 40,709
- 7
- 95
- 119