BizCharts How to change the 'DonutChart' animation style and speed

slwdgvem  于 2022-11-02  发布在  其他
关注(0)|答案(1)|浏览(208)

BizCharts Version: 4.0.14
Platform:
Mini Showcase(like screenshots):
forck and create a demo: https://bizcharts.net/product/BizCharts4/demo/306

`import React from "react";
import { DonutChart } from "bizcharts";

export default () => {
const data = [
{
type: 'Agree',
value: 27,
},
{
type: 'Neutral',
value: 25,
},
{
type: 'Strongly Agree',
value: 18,
},
{
type: 'Disagree',
value: 15,
},
{
type: 'Strongly Disagree',
value: 10,
},
{
type: 'Barely Disagree',
value: 5,
},
];

return (
    <>
        <DonutChart
            data={data || []}
            forceFit
            height={320}
            radius={0.8}
            padding="auto"
            angleField="value"
            colorField="type"
            pieStyle={{ stroke: "white", lineWidth: 2 }}
            statistic={{visible: false}}
            tooltip={{visible: true}}
           animation={{
                appear:{duration:1000},
            }}
        />
    </>
);

}

`

相关问题