2014-10-06 68 views
1

是否可以通过显示画线的方式(通过连接项目符号或从左至右依次绘制线)在AmCharts中创建折线图?AmCharts折线图动画

我与startDurationstartEffectsequencedAnimation性能周围播放,但所有的选择似乎动画整条生产线作为一个整体,无论是从顶部滑动下来或退回其在进入。它比没有动画效果更好,并且非常适合列/条形图,但对于折线图来说,它看起来有点奇怪和不自然。

Here is the relevant documentation for AmCharts

回答

0

是的,你可以用它绘制的方式来制作你的amchart。 你做到这一点与CSS:

#chartdiv{ 
width  : 100%; 
height  : 500px; 
} 

.amcharts-graph-g1 { //g1 is the id of your graph 
    stroke-dasharray: 500%; 
    -webkit-animation: am-draw 5s; 
    animation: am-draw 5s; 
} 

@keyframes am-draw { 
    0% { 
     stroke-dashoffset: 500%; 
    } 
    100% { 
     stroke-dashoffset: 0%; 
    } 
} 

退房此链接:https://www.amcharts.com/demos/css-animations/