We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Chart Expander

Hello,

I'd like to implement an "expander" feature - e.g. Selection zooming that would display the zoomed area in a separate window/chart.

From the top of my head, I'm assuming that I could bind the mouse events on the chart to create a selection rectangle, get the data points, and push them into a new series in a separate chart. Would this be the way to go, or is there any better solution?

Thank you,
T.D.

PS: I realize I created 2 posts with 2 separate issues, but I did not want to group them into one to stay on topic. If I should not have done this, I apologize.

6 Replies

DA Devi Aruna Maharasi Murugan Syncfusion Team October 3, 2016 12:32 PM UTC

Hi Thanh, 
  
Thanks for contacting Syncfusion Support. 
  
We can achieve your requirement with SelectionZoomingEnd event of SfChart. We have prepared a demo sample based on requirement and it can be downloaded from below link, 
  
Sample: ZoomingChart 
  
Please refer our UG documentation link to know more about SelectionZoomingEnd event, 
  
  
Regards, 
Devi 






TT Thanh Tomas Dang October 5, 2016 06:27 AM UTC

Hello Devi,

thank you for the solution and the example! I'd like to ask - is it possible to "consume" the zooming event on the original chart? I'd like to zoom the newly opened chart only and leave the original as it is.

Thank you,
Thanh


TT Thanh Tomas Dang October 6, 2016 07:29 AM UTC

To add to my last post: I've realized you can "remove" the zoom factor and position by setting those to 1/0, so I can reset the zooming like that.

A quite different question though: Am I able to draw an annotation in the same position as the ZoomRect of the SelectionZoomEndEventArgs? I've tried converting the various properties of the ZoomRect using Primary/Seconday axis CoefficientToValue/ValueToCoefficient, but none seem to give me the desired numbers.

The documentation also mentions using the actual chart's PointToValue method, but I cannot access that right now due to using MVVM bindings - is there an easy way of doing that?


Thank you again,
Thanh 


DA Devi Aruna Maharasi Murugan Syncfusion Team October 6, 2016 01:14 PM UTC

Hi Thanh, 
  
Thanks for your update. 
  
We are able to draw annotation in zoom rect position by calculating the point with PointToValue method of chart. We have prepared a demo sample based on your requirement and it can be downloaded from below link, 
  
  
Regards, 
Devi 





TT Thanh Tomas Dang October 7, 2016 08:49 AM UTC

Hi Devi,

thank you, this is what I needed!

Thanh


DA Devi Aruna Maharasi Murugan Syncfusion Team October 10, 2016 03:45 AM UTC

Hi Thanh, 
  
Thanks for your update. 
  
Please contact us, if you need any further assistance. 
  
Regards, 
Devi 


Loader.
Up arrow icon