chart.js load totally new data

前端 未结 20 1413
有刺的猬
有刺的猬 2020-11-28 21:12

The API for chart.js allows one to edit points of the datasets loaded into it, for example:

.update( )

Calling update() on

20条回答
  •  死守一世寂寞
    2020-11-28 21:33

    You need to clean old data. No need to re initialize:

    for (i in myChartLine.datasets[0].points)
        myChartLine.removeData();
    

提交回复
热议问题