100pah commented on a change in pull request #10201: fix(geo):  use 
`label.formatter` instead of ` label.normal.formatter`
URL: 
https://github.com/apache/incubator-echarts/pull/10201#discussion_r272293432
 
 

 ##########
 File path: src/coord/geo/GeoModel.js
 ##########
 @@ -148,7 +148,7 @@ var GeoModel = ComponentModel.extend({
      */
     getFormattedLabel: function (name, status) {
         var regionModel = this.getRegionModel(name);
-        var formatter = regionModel.get('label.' + status + '.formatter');
+        var formatter = regionModel.get(['label', status === 'normal' ? '' : 
status, 'formatter'].join('.'));
 
 Review comment:
   I think this fix is almost correct.
   But there is only a problem that 
   if the `status` is 'normal',
   `['label', status === 'normal' ? '' : status, 'formatter'].join('.')` will 
get `'label..formatter'`.

----------------------------------------------------------------
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]

Reply via email to