refactor: preserve compatibility

This commit is contained in:
xiaoluoHe 2023-11-06 17:59:00 +08:00 committed by Weixing Zhang
parent ac66a2c3d0
commit 29c2e60fe3

View File

@ -443,9 +443,9 @@ export class BasePieSeries<T extends IBasePieSeriesSpec> extends PolarSeries<T>
const prevMarkElement = [...markElements].reverse().find(e => e.data[0]?.[DEFAULT_DATA_INDEX] < dataIndex);
if (outState.includes(state)) {
return prevMarkElement.getNextGraphicAttributes()?.endAngle;
return prevMarkElement?.getNextGraphicAttributes()?.endAngle;
}
return prevMarkElement.getGraphicAttribute('endAngle', true);
return prevMarkElement?.getGraphicAttribute('endAngle', true);
}
};
const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<PieAppearPreset>)?.preset;