You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "SebasQuirogaUCP (via GitHub)" <gi...@apache.org> on 2023/06/28 15:35:18 UTC

[GitHub] [echarts] SebasQuirogaUCP opened a new issue, #18821: Morphing between Map and Bar - MapOption.series.data object with customizable "value" and "name"

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: commits-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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