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

   ### What problem does this feature solve?
   
   Currently, the `FilterTransform` in Apache ECharts supports a rich set of 
conditional expressions including relational and logical operators (lt, gt, eq, 
reg, and, or, not, etc.). However, it does not support a mechanism to check 
whether a data value exists within a specified list—commonly known as an "in" 
operation.
   
   Please add support for an `in` operator in `RelationalExpressionOption`, 
allowing developers to filter values based on membership in a list or array. 
This would greatly enhance the expressiveness and efficiency of data filtering 
within ECharts.
   
    -  Many filtering scenarios require selecting rows where a field matches 
one of several known values.
   -    Current alternatives require verbose or expressions, which are harder 
to write, maintain, and optimize.
   -    The in operator is standard in SQL and many query DSLs, and users 
naturally expect this functionality.
   -    Improves developer ergonomics and code clarity.
   -    Aligns with common querying patterns.
   -    Enhances performance for large datasets by allowing ECharts to optimize 
"in" checks internally.
   
   ### What does the proposed API look like?
   
   ```javascript
   type RelationalExpressionOption = {
     dimension: DimensionName | DimensionIndex;
     parser?: 'time' | 'trim' | 'number';
     in?: DataValue[];  // New operator for array membership
     notIn?: DataValue[]; // Optional complement for exclusion
     // existing operators...
   };
   
   // Usage example:
   transform: {
     type: 'filter',
     config: {
       in: ['Apple', 'Banana', 'Orange'],
       dimension: 'fruit'
     }
   }
   
   ```


-- 
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-unsubscr...@echarts.apache.org.apache.org

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


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

Reply via email to