SebasQuirogaUCP opened a new issue, #18821:
URL: https://github.com/apache/echarts/issues/18821

   ### What problem does this feature solve?
   
   By default, the mapOption object in the example 
[https://echarts.apache.org/examples/en/editor.html?c=map-bar-morph](url) 
expects a data object of type Array<{name: string, value: number}>. That makes 
the user to utilize  browser-compute-resources  unnecessarily to model the 
incoming data ( coming from an API for example) renaming attributes to satisfy 
this constraint.
   
   Exploring the repo, it looks like EChart is looking particularly only for 
"name" and "value" attributes on the data to render in the Map chart.
   I consider these two parameters should be customizable, allowing the user to 
specify his prefered attributes names used by Map chart as names and values.
   
   ### What does the proposed API look like?
   
   `
   const data = [{ customName: "Columbia", customValue: 1000 }]
   
   const mapOption = {
       series: [
         {
           id: 'population',
           type: 'map',
           roam: true,
           map: 'USA',
           animationDurationUpdate: 1000,
           universalTransition: true,
          **defaultName: "customeName",
         defaultValue: "customValue",**
         data: data
         }
       ]
     };
   `


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to