![](/img/trans.png)
[英]Anychart : How to add animation in Pie or funnel chart of AnyChart7.1
[英]Anychart chart.animation breaks pie3d chart type
我正在运行7.12.0.1229,其中根据Anychart:如何在AnyChart7.1的饼图或漏斗图中添加动画,修复了几个动画问题。
尝试将pie3d
的图表类型与chart.animation(true, 800);
结合使用时chart.animation(true, 800);
, chart.animation(true);
或chart.animation({enabled: true, duration: duration})
图表将不会呈现。
anychart.onDocumentReady(function() {
//dataset
var data = anychart.data.set([
["$0-$50,000", 68],
["$50,000-$100,000", 13],
["$100,000-$150,000", 6],
["$150,000-$250,000", 6],
["$250,000 - plus", 7]
])
var chart = anychart.pie3d(data);
//adjust legend
var legend = chart.legend();
legend.enabled(true);
legend.position("left");
legend.align("center");
legend.itemsLayout("vertical");
//create title
var title = chart.title();
title.text("Pop Out");
title.enabled(true);
//inner radius makes this a doughnut chart instead of pie
chart.innerRadius("30%");
//define the container
chart.container("container");
// chart.animiation breaks pie3d chart type
// chart.animation(true, 800);
//set delay to recall draw ch art to
chart.draw();
});
anychart.onDocumentReady(function() {
//dataset
var data = anychart.data.set([
["$0-$50,000", 68],
["$50,000-$100,000", 13],
["$100,000-$150,000", 6],
["$150,000-$250,000", 6],
["$250,000 - plus", 7]
])
var chart = anychart.pie3d(data);
//adjust legend
var legend = chart.legend();
legend.enabled(true);
legend.position("left");
legend.align("center");
legend.itemsLayout("vertical");
//create title
var title = chart.title();
title.text("Pop Out");
title.enabled(true);
//inner radius makes this a doughnut chart instead of pie
chart.innerRadius("30%");
//define the container
chart.container("container");
// chart.animiation breaks pie3d chart type
chart.animation(true, 800);
//set delay to recall draw ch art to
chart.draw();
});
确实,它看起来不太好,谢谢您的举报! 我们将此案例转移到了我们的错误跟踪系统,因此我们将对其进行深入研究并尽快与您联系。 至于常见的动画功能,3d图表支持动画:
chart = anychart.bar3d([2, 8, 3, 4, 9]);
chart.animation({enabled: true, duration: 3000});
但是,如果3D派不起作用,我们将尽快进行调查。
似乎3D图表尚不支持动画。 因此,要么使图表成为带有动画的2d饼图,要么使3D图表没有动画。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.