Hi,
Could you please send me some sample or explain to me that how do I zoom in/out the chart in a selected area?
Thanks
Kevin
Kevin,
You can accomplish this by adding a box primitive and handling mouse events. Take a look at this forum post which includes a code sample:
http://es.infragistics.com/community/forums/p/12681/228651.aspx#228651
I hope this helps. By the way, this feature is available out of the box with the XAML DataChart in Wpf.
Let me know if you have further questions.
I still don't quite understand about how to adjust the scale. say for example I have a composite chart I selected an area that only contains one point, after selecting the point I would like to zoom into the point and see only one point on the chart after zooming in. However I don't know how to adjust the scale.
Could you please give me some pointers and explain a bit more about the scrollscale? does it has a boundary between -1 and 1?
Let me know how you make out.
Thanks Mike,
I actually have found out the range of both scroll and scale are between 0 to 1 after my last post. What I am going to do is to draw a rectangle on a composite chart (financial chart) to select a specific area that I want to look into then after selection the chart will automatically zoom into the selected area. The sample that you gave me can almost achieve this, however the position is not quite as the area that I selected, so I think it must be due to the calculation of the scroll is not correct. And I am still working on it now.
Hello Kevin,
Both the Scale and Scroll properties may only have a value between 1.0 and 0.0. For more details about these properties please visit the following documentation page. http://help.infragistics.com/Doc/WinForms/Current/CLR4.0/?page=Chart_Scrolling_and_Scaling_Charts.html
May I ask if you can clarify your requirement? It appears that you want to have automatic scrolling when a user zooms on a particular point after pressing the 'plus' and/or 'minus' buttons? Also, what chart type are you working with?
Now I think the biggest problem that I have is I cannot work out the correct ScrollScale.Scroll. Could you please explain a bit more to me that how should I calculate the ScrollScale.Scroll after Zooming?