Chartjs-Chart.js how to make chart only show the most recent data

0👍

You should get the last 10 values from the database like this

SELECT * FROM big_table ORDER BY A DESC LIMIT 10

And call update (https://www.chartjs.org/docs/latest/developers/updates.html)

chart.update()

Leave a comment