You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/10/28 08:57:57 UTC

[GitHub] [incubator-echarts] pissang commented on a change in pull request #10766: pie/funnel legend can use visualMap color.

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_r339453311
 
 

 ##########
 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'm not sure about this. Will this leak the implementation of `legend` component to the series? 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org