You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/06/10 11:08:32 UTC
[incubator-echarts] branch label-enhancement updated:
fix(visualMap): fix error when target series not exists.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch label-enhancement
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/label-enhancement by this push:
new 678a33b fix(visualMap): fix error when target series not exists.
678a33b is described below
commit 678a33b9ddfaca2a86cdf549f4ab9b98fab796b6
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Jun 10 19:08:12 2020 +0800
fix(visualMap): fix error when target series not exists.
---
src/component/visualMap/VisualMapModel.ts | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/component/visualMap/VisualMapModel.ts b/src/component/visualMap/VisualMapModel.ts
index 605e8dd..3d93748 100644
--- a/src/component/visualMap/VisualMapModel.ts
+++ b/src/component/visualMap/VisualMapModel.ts
@@ -261,7 +261,10 @@ class VisualMapModel<Opts extends VisualMapOption = VisualMapOption> extends Com
context?: Ctx
) {
zrUtil.each(this.getTargetSeriesIndices(), function (seriesIndex) {
- callback.call(context, this.ecModel.getSeriesByIndex(seriesIndex));
+ const seriesModel = this.ecModel.getSeriesByIndex(seriesIndex);
+ if (seriesModel) {
+ callback.call(context, seriesModel);
+ }
}, this);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org