score:1
Accepted answer
This is because you are pushing 20 data points in onRefresh()
every second, but only one data point out of 20 points is new and the rest are already inserted ones. This plugin doesn't dedup the data even if the same data with the same timestamp exists, so you see the line iterating the same points over and over.
A workaround would be to store the latest timestamp in your array when it is inserted, and to filter out the older data in the next onRefresh
call so that only new data is pushed to chart.data.datasets[0].data
.
Source: stackoverflow.com
Related Query
- chart.js streaming data plugin data format or config error
- Chartjs - data format for bar chart with multi-level x-axes
- Unexpected error when attempting to update chart data in Chart.js, in a Vue app
- Chart.js - Line Chart format data to Lacs/Crores
- ERROR Error: ng-charts configuration error, data or datasets field are required to render chart line
- How do I destroy/update Chart Data in this chart.js code example?
- Reproduce Error in Chartjs v2 Polar chart not plotting all supplied data
- getting additional value fields from data source for dx.chartjs doughnut chart
- unable to pass data from views to js file having chart js codes, shows unexpected syntax error
- Chart.js returns a console error and does not display the chart when using variables as data input
- Created an onclick function to remove data from a line chart in ChartsJs, but getting "Cannot read property 'data' of undefined" error
- Chartjs Bar Chart showing old data when hovering
- Chartjs random colors for each part of pie chart with data dynamically from database
- ChartJS - Draw chart with label by month, data by day
- Chartjs v2 - format tooltip for multiple data sets (bar and line)
- line chart with {x, y} point data displays only 2 values
- Chart JS data labels getting cut
- chart js tooltip how to control the data that show
- vue-chartjs reactive data error
- Chart.js Timeseries chart - formatting and missing data values
- Chart JS show multiple data points for the same label
- Add all data in the tooltip of Chart JS
- How to display data labels outside in pie chart with lines in ionic
- ng2-charts customize data and whole html content of tooltip displayed when hovering on bar chart
- Show data dynamically in line chart - ChartJS
- How to access labels array using chart plugin (Chart.pluginService.register) in Chartjs 2.x?
- ChartJS: Draw vertical line at data point on chart on mouseover
- Chart js data to start at zero
- Chart Js Show the old data on mouse hover
- ChartJs line chart - display permanent icon above some data points with text on hover
More Query from same tag
- How can I achieve something like this image with chart.js(react-chartjs-2)?
- Show nested objects in Chart.js
- Horizontal Bar-Chart - angular-chart.js
- How to render Chart.js 2.x tooltips on top of everything
- How to remove colored label square
- Horizontal bar with multiple sections in ChartJs
- How we can set our own colors for each label in charts
- zeroLineColor and zeroLineWidth not working for the x-axis in Chartjs
- Chart.JS, date issues when upgrading to v3
- Chart.js time scale graph - xAxis labelling
- How to use computed property with data from JSON in data object for time axis in Vue using Chart.js
- Chart.js – Line Chart Tooltip Labels
- Implementing Charts.js in Laravel 5.1
- [Vue warn]: Error in mounted hook: "TypeError: this.$refs.canvas is undefined"
- Background color of the chart area in chartjs not working
- Line chart disable interpolation
- add labels dynamically in Charts.js
- Custom script tag in index.html is removed on each build in Ionic 2 RC.0
- Set an array to be displayed at Chart js
- Object.values not seperated by parentheses / Chartjs only displays first element of array
- Synchronous XMLHttpRequest when loading charts.js in to a div
- Chart.js : straight lines and curves lines in the same graph
- Chartjs with streaming plugin: update y-range
- Draw chart.js as svg
- Page break in Angular with Chartjs and tables
- In ChartJS how do I change the color of a label in the legend?
- How do I customize y-axis labels and randomly pick the value from the data range for x-axis in Chart js
- How to create range based ticks in chart js? (like in attached image)
- Chart.js stepSize not working with min
- Chart.js pie chart not showing in Google Chrome canvas