This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch optimize-style
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/optimize-style by this push:
new 33a8ec7 fix(legend): fix legend color with visual encoded on
style.stroke
33a8ec7 is described below
commit 33a8ec7abf85c60cd8b3db77866f8640fdc36b3f
Author: pissang <[email protected]>
AuthorDate: Thu Jul 23 13:22:43 2020 +0800
fix(legend): fix legend color with visual encoded on style.stroke
---
src/component/legend/LegendView.ts | 2 +-
test/boxplot.html | 7 +------
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/component/legend/LegendView.ts
b/src/component/legend/LegendView.ts
index 8fcd734..e2ed821 100644
--- a/src/component/legend/LegendView.ts
+++ b/src/component/legend/LegendView.ts
@@ -198,7 +198,7 @@ class LegendView extends ComponentView {
if (seriesModel) {
const data = seriesModel.getData();
const style = data.getVisual('style');
- const color = style.fill;
+ const color = style[data.getVisual('drawType')] || style.fill;
const borderColor = style.stroke;
// Using rect symbol defaultly
diff --git a/test/boxplot.html b/test/boxplot.html
index 37e7bd6..ec0a4f0 100644
--- a/test/boxplot.html
+++ b/test/boxplot.html
@@ -125,7 +125,7 @@ under the License.
}
],
legend: {
- data: ['line', 'line2', 'line3']
+ left: 'right'
},
tooltip: {
trigger: 'item',
@@ -215,11 +215,6 @@ under the License.
]
}
- },
- {
- name: 'outlier',
- type: 'scatter',
- data: data.outliers
}
]
});
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]