chart.js load totally new data

前端 未结 20 1447
有刺的猬
有刺的猬 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:37

    The only solution I can find so far for myself is to re-initialize the chart from scratch:

    var myLineChart = new Chart(ctx).Line(data, options);
    

    However this seems a bit hokey to me. Any better, more standard solution anybody?

提交回复
热议问题