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

   ### What problem does this feature solve?
   
   
   Hello:
   
   We are trying to using ECharts in JointJS, which is a drawing framework:
   
   <img width="1136" alt="image" 
src="https://user-images.githubusercontent.com/33852855/233522421-5c3dfcbb-ea5a-4fc1-81fe-bdc741b5a2cb.png";>
   
   JointJS uses MVC mode and each element (i.e. the box behind or under the 
rectangular chart in the case) is a view layer and can be dragged and dropped 
in the papar.
   
   So, when I try to add a "brush" to the rectangle chart, the selection action 
drags the view:
   
   ![brush in 
jointjs](https://user-images.githubusercontent.com/33852855/233524503-d1a91e2f-81d7-4df0-a821-97c06a64b0d1.gif)
   
   It seems like the selection action disables the chart layer and acts on the 
box(the view layer of JointJS) and triggers the drag and drop of the view 
element (the box).
   
   So, if I get a callback when the `brush` button is clicked (i.e. the chart 
is ready to be selected), I can disable the drag and drop action check of 
JointJS and resume it in the `brushend` event.
   
   I think the need for this callback will make sense when placing ECharts in 
any drawing library like JointJS since users can use the brush to draw some 
line the chart like  #[this 
issue](https://github.com/apache/echarts/issues/18536)
   
   
   ### What does the proposed API look like?
   
     brush: {
       toolbox: ['rect', 'clear'],
       brushType: 'rect',
       transformable: false,
       removeOnClick: false,
       onBrush: function () {}
     },


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