我正在运行 7.12.0.1229,根据Anychart:如何在 AnyChart7.1 的饼图或漏斗图中添加动画,修复了几个动画问题。
尝试将图表类型与pie3d
结合使用时 ,chart.animation(true, 800);
图表将无法呈现。chart.animation(true);
chart.animation({enabled: true, duration: duration})
工作示例http://jsfiddle.net/RainerAtSpirit/c2wye9m9/3/
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();
});
破例http://jsfiddle.net/RainerAtSpirit/c2wye9m9/2/
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();
});