简体   繁体   English

图表JS无动画折线图

[英]Chart JS no animation line chart

I'm struggling against ChartJS. 我正在努力反对ChartJS。 I have to update my datas sometime so I use the method update() like said in the doc. 我必须在某个时候更新我的数据,所以我要使用doc中所说的update()方法。

But when I update my chart, I don't have the animation. 但是,当我更新图表时,没有动画。 I'm using Firefox 60.1 on Linux , maybe this can cause the problem but I don't think cause when I go on the official chartjs site I can see everything and working well. 我在Linux上使用Firefox 60.1 ,也许这可能会引起问题,但是我认为在我进入Chart Chart官方网站时我看不到一切并且运行良好。

This Fiddle-pie works well I have an animation and this Fiddle-Line doesn't work : No animation. 这个Fiddle-pie很好,我有一个动画,而这个Fiddle-Line不起作用:没有动画。

Is there a difference in use of those 2 graphs ? 使用这两个图有区别吗?

Thanks for your help. 谢谢你的帮助。

我刚刚在这里更新了您问题的js小提琴链接。js小提琴只是添加了backgroundColor: ["rgb(40, 37, 89)", "rgb(54, 162, 235)", "rgb(75, 192, 192)", "rgb(8, 197, 94)", "rgb(255, 99, 132)"],在您的代码中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM