Anychart chart.animation ломает тип диаграммы pie3d

Я использую 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();
});

person RainerAtSpirit    schedule 13.02.2017    source источник


Ответы (2)


Действительно, выглядит некрасиво, спасибо за отчет! Мы передали этот случай в нашу систему отслеживания ошибок, поэтому мы углубимся в него и свяжемся с вами как можно скорее. Что касается общей функции анимации, 3D-графики поддерживают анимацию:

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

JSFIDDLE

Но в случае с 3d pie это не работает, мы скоро это проверим.

person AnyChart Support    schedule 14.02.2017

Кажется, анимация пока не поддерживается для 3D-диаграмм. Поэтому либо сделайте диаграмму двухмерной круговой диаграммой с анимацией, либо трехмерной диаграммой без анимации.

person Reinard Truter    schedule 13.02.2017