diff --git a/src/component/marker/MarkerModel.ts b/src/component/marker/MarkerModel.ts index 6a68558cab..28d29a5768 100644 --- a/src/component/marker/MarkerModel.ts +++ b/src/component/marker/MarkerModel.ts @@ -28,7 +28,9 @@ import { AnimationOptionMixin, Dictionary, CommonTooltipOption, - ScaleDataValue + ScaleDataValue, + CallbackDataParams, + SeriesDataType } from '../../util/types'; import Model from '../../model/Model'; import GlobalModel from '../../model/Global'; @@ -225,6 +227,20 @@ abstract class MarkerModel extends Com this._data = data; } + getDataParams( + dataIndex: number, + dataType?: SeriesDataType + ): CallbackDataParams { + const params = DataFormatMixin.prototype.getDataParams.call(this, dataIndex, dataType); + const hostSeries = this.__hostSeries; + if (hostSeries) { + params.seriesId = hostSeries.id; + params.seriesName = hostSeries.name; + params.seriesType = hostSeries.subType; + } + return params; + } + /** * Create slave marker model from series. */ @@ -246,4 +262,4 @@ abstract class MarkerModel extends Com interface MarkerModel extends DataFormatMixin {} zrUtil.mixin(MarkerModel, DataFormatMixin.prototype); -export default MarkerModel; \ No newline at end of file +export default MarkerModel; diff --git a/test/markPoint.html b/test/markPoint.html index f4ca85f12f..516b03b175 100644 --- a/test/markPoint.html +++ b/test/markPoint.html @@ -23,25 +23,18 @@ + + + + - -
+
+
+