fix: transform is undefined (#5905)

This commit is contained in:
黑白配 2022-12-30 11:12:26 +08:00 committed by GitHub
parent a03677616a
commit cecb3430ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -378,14 +378,13 @@ export class Chart extends React.Component<ChartProps> {
if (onChartWillMount) {
await onChartWillMount(echarts);
}
(echarts as any).registerTransform(
(ecStat as any).transform.regression
);
(echarts as any).registerTransform((ecStat as any).transform.histogram);
(echarts as any).registerTransform(
(ecStat as any).transform.clustering
);
if((ecStat as any).transform){
(echarts as any).registerTransform((ecStat as any).transform.regression);
(echarts as any).registerTransform((ecStat as any).transform.histogram);
(echarts as any).registerTransform((ecStat as any).transform.clustering);
}
if (env.loadChartExtends) {
await env.loadChartExtends();