Highcharts在setdata之后加载动画 [英] Highcharts loading animation after setdata

查看:312
本文介绍了Highcharts在setdata之后加载动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这一切都正常工作,但我想使用加载图表,并使用.setData来更新图表中的数据。动画(线图从左到右自动绘制)每次重置数据时都会触发。有没有办法调用这个动画?

解决方案

您可以删除实际系列,然后添加新系列。初始动画与所有其他动画不同(剪辑路径是动画,而不是系列本身)。



请参阅示例: http://jsfiddle.net/UTC6e/2/

  chart.series [0 ]。去掉(); 
chart.addSeries({数据:[229.2,144.0,176.0,135.6,148.5,216.4,194.1,95.6,54.4,29.9,71.5,106.4]});


I am using Highcharts graphs and I am using .setData to update the data in the graph.

This is all working fine but I would like to use the loading animation (where the line chart draws itself from left to right) to be triggered every time I reset the data. Is there a way to call this animation?

解决方案

You can remove actual series, and add new one. Initial animation is different from all others (clip path is animated, not series itself).

See example: http://jsfiddle.net/UTC6e/2/

    chart.series[0].remove();
    chart.addSeries({data:[229.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4]} );

这篇关于Highcharts在setdata之后加载动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆