From 1f6b148e29b70e96910960a7f4cd77a41f499a02 Mon Sep 17 00:00:00 2001 From: Ovilia Date: Mon, 9 Sep 2024 14:50:17 +0800 Subject: [PATCH] feat(custom): use installer for resuable custom series --- src/extension.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/extension.ts b/src/extension.ts index a04ef54e9f..d9794d2c2a 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -41,6 +41,8 @@ import { Constructor } from './util/clazz'; import { SubTypeDefaulter } from './util/component'; import { registerImpl } from './core/impl'; import { registerPainter } from 'zrender/src/zrender'; +import { CustomSeriesRenderItem } from './chart/custom/CustomSeries'; +import { registerCustomSeries } from './chart/custom/customSeriesRegister'; const extensions: (EChartsExtensionInstaller | EChartsExtension)[] = []; @@ -78,6 +80,9 @@ const extensionRegisters = { registerChartView(ChartViewClass: typeof ChartView) { ChartView.registerClass(ChartViewClass); }, + registerCustomSeries(seriesType: string, renderItem: CustomSeriesRenderItem) { + registerCustomSeries(seriesType, renderItem); + }, registerSubTypeDefaulter(componentType: string, defaulter: SubTypeDefaulter) { ComponentModel.registerSubTypeDefaulter(componentType, defaulter); },