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

   ### What problem does this feature solve?
   
   This would help: 
   
   1. Allowing categories to not be bound by a single value from the node
   
   If we want to define 2 or more legends that target different properties on 
the same graph, supporting a filter function instead of a specific predefined 
`category` field would allow us to select a specific field from the node for 
each category thus allowing more flexibility.
   
   2. Allowing categories to target composite values
   
   Using a filter function, we could build categories that depend on 2 or more 
properties of the node instead of being limited to 1. 
   
   ### What does the proposed API look like?
   
   Something like this should work, and can also be implemented in a way that 
it is backwards compatible with the current API: 
   
   ```ts
   const categories = [
     {
       name: 'Main',
       filterFn: (node: any) => {
         return node.isMain
       },
     },
     {
       name: 'Error',
       filterFn: (node: any) => {
         return node.isError ?? false
       },
     },
   ]
   ```


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