pissang commented on a change in pull request #10766: pie/funnel legend can use
visualMap color.
URL:
https://github.com/apache/incubator-echarts/pull/10766#discussion_r339508423
##########
File path: src/component/legend/LegendView.js
##########
@@ -191,10 +191,15 @@ export default echarts.extendComponentView({
}
if (seriesModel.legendDataProvider) {
- var data = seriesModel.legendDataProvider();
+ // pie/funnel legend can use visualMap color.
+ var data =
seriesModel.getData();
var idx = data.indexOfName(name);
if (idx < 0) {
- return;
+ var rawData =
seriesModel.legendDataProvider();
+ idx = rawData.indexOfName(name);
+ if (idx < 0) {
+ return;
+ }
}
Review comment:
I think we can modify the `getVisualByName` to
```js
getVisualByName: function (name, visualProperty) {
var data = series.getData();
var idx = data.indexOfName(name);
return data.getItemVisual(name, visualProperty);
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]