fix: 处理饼图动画错误的计算

This commit is contained in:
奔跑的面条 2025-06-16 14:16:29 +08:00
parent f883fec1f6
commit 8bb65e57f4
2 changed files with 7 additions and 3 deletions

View File

@ -209,7 +209,11 @@ const createOrUpdateChart = (
return true return true
} else if (chart) { } else if (chart) {
const spec = transformHandler[chartProps.category || '']?.(chartProps) const spec = transformHandler[chartProps.category || '']?.(chartProps)
chart.updateSpec({ ...spec, data: toRaw(chartProps.dataset), dataset: undefined }) chart.updateSpec({ ...spec, data: toRaw(chartProps.dataset), dataset: undefined }, false, undefined, {
change: false,
reMake: false,
reAnimate: true
})
return true return true
} }
return false return false

View File

@ -129,7 +129,7 @@ const animationHandle = (value: boolean) => {
effects: { effects: {
channel: { channel: {
outerRadius: { outerRadius: {
to: props.optionData.outerRadius * 100 + 0.1 to: props.optionData.outerRadius * 100 + 10
} }
}, },
easing: 'linear' easing: 'linear'
@ -140,7 +140,7 @@ const animationHandle = (value: boolean) => {
effects: { effects: {
channel: { channel: {
outerRadius: { outerRadius: {
to: props.optionData.outerRadius * 100 + 0.1 to: props.optionData.outerRadius * 100 + 10
} }
}, },
easing: 'linear' easing: 'linear'