diff --git a/src/component/marker/MarkLineView.ts b/src/component/marker/MarkLineView.ts index 2c6d5e53e9..e853705809 100644 --- a/src/component/marker/MarkLineView.ts +++ b/src/component/marker/MarkLineView.ts @@ -386,7 +386,9 @@ class MarkLineView extends MarkerView { getECData(el).dataModel = mlModel; el.traverse(function (child) { - getECData(child).dataModel = mlModel; + const ecData = getECData(child); + ecData.dataModel = mlModel; + ecData.dataType = 'marker'; }); }); diff --git a/src/model/Series.ts b/src/model/Series.ts index 94e630fc17..dbc7d47e24 100644 --- a/src/model/Series.ts +++ b/src/model/Series.ts @@ -516,6 +516,11 @@ class SeriesModel extends ComponentMode // PENGING If selectedMode is null ? select(innerDataIndices: number[], dataType?: SeriesDataType): void { + // discard the marker series select event at now. + // TODO support marker(markerArea, markLine, etc) series select event. + if (dataType === 'marker') { + return; + }; this._innerSelect(this.getData(dataType), innerDataIndices); } diff --git a/src/util/types.ts b/src/util/types.ts index 1d085c198f..2d70ea92bb 100644 --- a/src/util/types.ts +++ b/src/util/types.ts @@ -479,7 +479,7 @@ export type SeriesLayoutBy = typeof SERIES_LAYOUT_BY_COLUMN | typeof SERIES_LAYO // Like `sourceHeader: 2`, means line 0 and line 1 are header, data start from line 2. export type OptionSourceHeader = boolean | 'auto' | number; -export type SeriesDataType = 'main' | 'node' | 'edge'; +export type SeriesDataType = 'main' | 'node' | 'edge' | 'marker'; // -------------------------------------------- diff --git a/test/markLine.html b/test/markLine.html index 3ad4b44d4d..799bf72029 100644 --- a/test/markLine.html +++ b/test/markLine.html @@ -22,7 +22,9 @@ + +
+
+ + + - \ No newline at end of file +