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

   ### What problem does this feature solve?
   
   ### Use Case & Context
   In physical domain modeling, thermodynamics (e.g., phase diagrams showing 
P-T relationships), and complex multi-threshold business monitoring, data 
visualization needs to show how dynamic parameters interact with 
non-linear/curved decision boundaries.
   
   Currently, standard bar charts (`type: 'bar'`) only support fixed threshold 
lines or simple linear limits. While users can implement custom shapes using 
`type: 'custom'` with raw Canvas rendering (`renderItem`), calculating 
collisions and intersections between moving bar vertices and curved threshold 
lines (e.g., polynomial/spline boundaries) in a 2D parameter space is complex, 
performant-heavy, and difficult to generalize.
   
   ### End User Experience
   With this feature, users could define smooth/curved boundary paths in the 
coordinate system. As bar elements change in position (X-axis) or height 
(Y-axis), the chart would automatically compute boundary intersections and 
trigger real-time state/phase transitions (e.g., solid, liquid, gas, or custom 
status zones) with responsive styling and HiDPI canvas rendering.
   
   ### What does the proposed API look like?
   
   We propose extending the `markLine` / `series` capability to support 
standard curved boundaries or adding a specialized phase/boundary property 
within `type: 'bar'` or `type: 'custom'`:
   
   ```javascript
   option = {
     xAxis: { type: 'value', name: 'Pressure (P)' },
     yAxis: { type: 'value', name: 'Temperature (T)' },
     series: [
       {
         type: 'bar',
         data: [[2.0, 5.5]], // [X Position, Y Height]
         // Proposed API for dynamic curved boundary detection
         boundaryDetection: {
           enabled: true,
           curves: [
             {
               name: 'Sublimation Curve',
               // Function or polynomial points defining the boundary curve
               expr: (x) => Math.pow(x, 2) + 1, 
               states: {
                 above: { itemStyle: { color: '#ff4d4f' }, label: 'Gas' },
                 below: { itemStyle: { color: '#1890ff' }, label: 'Solid' }
               }
             }
           ]
         }
       }
     ]
   };
   ```


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