Hi,
In our application there are several different Chart types. We want to add a slider (similarly in the screenshot) for each chart to zoom it. Have you got any example at all for this purpose or what is the recommended way to do this?
Thanks,
Best Regards,
Charith
- You must login to post comments
Hi,
The link How to create a Zoom Slider still exist? Am also trying to create a similar feature for my app using scicharts.Can you please provide any link ?
Thanks in Advance,
Chaya
- chayadevi N answered 6 years ago
-
Yes still exists! Updated link: http://support.scichart.com/index.php?/Knowledgebase/Article/View/17208/32/how-to-create-zoom-slider
-
Hi Andrew, Thank you for the immediate response.I wanted to know does the code exists in swift as well? It will be great if its in swift.Please share the same if its there.
- You must login to post comments
Hi,
You could try to call MouseWheelZoomModifier.OnModifierMouseWheel(…) and pass coordinate of chart center inside the parameter. Or do the same with RubberBandXyZoomModifier.OnMouseDown(…)/OnMouseUp(…), in this case you would achieve controllable zooming level, something like(pseudo code):
var zoomModifier = new RubberBandXyZoomModifier{IsXAxisOnly = true}; var zoomStartPoint = new Point{X= Slider.Value*Chart.ActualWidth/100d, Y=0}; var zoomEndPoint = new Point{X= Chart.ActualWidth - zoomStartPoint.X, Y=0}; zoomModifier.OnModifierMouseDown(new Params{zoomStartPoint }); zoomModifier.OnModifierMouseUp(new Params{zoomEndPoint });
Does above make sense for you?
Best regards,
Yuriy
- Yuriy Zadereckiy answered 11 years ago
-
Above proposed solution seems to be bit complicated to implement for all our charts. Isn't there any way to simply bind some properties of the chart to a slider (eg: zoomfactor)? Could you please point any example? If it is difficult to implement slider thing, we can just add a dropdown box with (50%, 100%, 150% ..) if there is any easier approach to implement this. And also, if you are going to implement any better way to do this in near future we can wait until that.
-
Unfortunately, there isn't any way in which you could just bind some properties and zoom chart in and out. But you can easily create your own modifier which will do that :) Just wrap the code from previous post by modifier class. Also, there is IAxis.ZoomBy(..) method, which is used internally by MouseWheelModifier, you could consider using of it for your purpose.
- You must login to post comments
Hi Charith,
We created an article on this topic on our new support site. Please, find it here: How to create a Zoom Slider
If it is still topical, it would be great to receive a feedback from you!
Best regards,
Yuriy
- Yuriy Zadereckiy answered 10 years ago
- last edited 6 years ago
- You must login to post comments
Please login first to submit.