Requirements |
|
RadControls version | 2010.2.713.40 |
.NET version | 4.0 |
Visual Studio version | 2010 |
programming language | C# |
browser support |
all browsers supported by RadControls |
PROJECT DESCRIPTION
RadChart has built-in support for zooming and scrolling. However, "the zooming precision in some scenarios seems to be a bit off" as discussed in this forum thread. When it happens, it is very confusing for end users.
To prevent the scenarios from happening, I turned on scrolling but turned off zooming. I put a range-enabled RadSlider underneath the chart to control zooming. It is pretty straightforward to set the chart's scale while a user drags the slider's handles, because the slider has several client- and server-events you can hook your code. It is challenging, however, to synchronize the slide's drag handles' positions when a user scrolls the chart, because the chart doesn't expose any scrolling events.
The attached demo project uses a hack to capture a RadChart's scrolling event. Therefore, I am able to synchronize the slider's drag handles' positions with the chart's scrolling offset.