javascript - Anychart Chart.animation 打破了 pie3d 图表类型

标签 javascript anychart

我正在运行 7.12.0.1229,根据 Anychart : How to add animation in Pie or funnel chart of AnyChart7.1修复了几个动画问题。

尝试将 pie3d 图表类型与 chart.animation(true, 800); 结合使用时,chart.animation(true);chart.animation({enabled: true,uration:uration}) 图表将不会渲染。

工作示例 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();
});

最佳答案

确实,看起来不太好,谢谢您的报告!我们已将此案例转移到我们的错误跟踪系统,因此我们将深入调查并尽快回复您。至于共同的动画功能,3d图表支持动画:

chart = anychart.bar3d([2, 8, 3, 4, 9]);
chart.animation({enabled: true, duration: 3000});

JSFIDDLE

但如果 3d 饼图不起作用,我们会尽快进行调查。

关于javascript - Anychart Chart.animation 打破了 pie3d 图表类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42202963/

相关文章:

javascript - 任意图表 : How to add animation in Pie or funnel chart of AnyChart7. 1

javascript - 在 Anychart 图表中设置最大和最小 xScale 值会导致异常

javascript - 如何在我的网站上将我的按钮居中?

javascript - 如何在Rails中的ajax调用中的js响应中包含html标签

angular - AnyChart 8.1 与 Angular rowclick 事件不返回项目或期间信息

javascript - 无法使极坐标图填充 Anychart 中的整个象限

anychart - 选择点后的事件

javascript - 单击特定区域时,Kendo ui 可排序触发开始事件

javascript - '.toMatchObject' 和 'objectContaining' 有什么区别

javascript - 我怎样才能在javascript中部分匹配这2个字符串