100pah commented on PR #20703:
URL: https://github.com/apache/echarts/pull/20703#issuecomment-3342253434

   I think the basic requirement is reasonable. A visualMap component should be 
able to control multiple series, and the dimension for each series should be 
able to configured.
   
   But I'm afraid the current proposed API is not intuitive and seems hard to 
understand.
   I also believe that complicated default value strategies (e.g., if no 
seriesIndex provided, then xxx) should not be introduced unless necessary, as 
it may cause unexpected behavior and confuse users.
   
   For this requirement, in my opinion, the API can be design as:
   
   ```js
   option =  {
       visualMap: {   
           // Introduce a new option `target`.
           // When `target` is provided, `visualMap.seriesIndex`, 
`visualMap.seriesId`, `visualMap.dimension`
           // are ignored.
           target: [{
               seriesIndex: 3,
               dimension: 2,
           }, {
               seriesId: 'xxx', // either seriesId or seriesIndex
               dimension: 1,
           },
           ...
           ]
       }
   };
   ```
   


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