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/04/04 03:07:44 UTC
[incubator-echarts] branch next updated: refact: style will be
created in useStyle.
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/next by this push:
new 5b17078 refact: style will be created in useStyle.
5b17078 is described below
commit 5b1707853f4ec2d3b6cfab67494a946eb30d7e64
Author: pissang <bm...@gmail.com>
AuthorDate: Sat Apr 4 11:07:28 2020 +0800
refact: style will be created in useStyle.
---
src/visual/style.ts | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/visual/style.ts b/src/visual/style.ts
index 06dc192..78f2d56 100644
--- a/src/visual/style.ts
+++ b/src/visual/style.ts
@@ -94,20 +94,15 @@ const seriesStyleTask: StageHandler = {
data.setVisual('drawType', colorKey);
// Only visible series has each data be visual encoded
- if (!ecModel.isSeriesFiltered(seriesModel)) {
- // if (colorCallback) {
+ if (!ecModel.isSeriesFiltered(seriesModel) && colorCallback) {
return {
dataEach(data, idx) {
const dataParams = seriesModel.getDataParams(idx);
const itemStyle = extend({}, globalStyle);
- // FIXME share style may affect other elements when one changes it's style(for example in animation)
- if (colorCallback) {
- itemStyle[colorKey] = colorCallback(dataParams);
- }
+ itemStyle[colorKey] = colorCallback(dataParams);
data.setItemVisual(idx, 'style', itemStyle);
}
};
- // }
}
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org