This is a migrated thread and some comments may be shown as answers.

ScatterPoint Chart, Zoom

1 Answer 85 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 04 Oct 2011, 06:52 AM
Hi,
We have scatter plot in our client/server application where the data is aggregated on the server.
We use the scatterplot with different colored series, to product a weigthed scatterplot, where the color corresponds to the number of points with the given x-y values. (where the x and y are ranges of values instead of individual points)

When zooming/scrolling we would like to implement custom logic instead of the default zoom/sort. (to actually go back to the server and recalculate a more precice set)

During design we ran into 2 issues.
1. When Zomming on both X and Y Axis using the normal zoom function you would not get the exact zoom you would expect.

We then changed to the application to only Zoom on the X-Axis, with both Autogenerates and non autogenerated X-Axis.
We tried implementing the ZoomSettings_OnPropertyChanged, but we are unable to recalculate the actual values.
ChartArea.AxisX.ActualMinValue + (ChartArea.AxisX.ActualRange * ChartArea.ZoomScrollSettingsX.RangeStart)
ChartArea.AxisX.ActualMinValue + (ChartArea.AxisX.ActualRange * ChartArea.ZoomScrollSettingsX.RangeEnd)
Do not match the visual selection of the Zoom. We have an Amount Range on the XAxis, ranging from -2 mil, to 8 mil, selecting -0.5 mil to 1 mil, gives +1.2 mil to 1.4 mil give or take.
We even sometimes got a RangeEnd greater then 1 ?

2. Since we do our own zooming, is there a way to cancel the Client Zoom,
resetting the RangeStart&RangeEnd to 1 fires off the OnPropertyChanged Event again.

I think we are overlooking sometimes, so your help would be appriciated.

Regards,
Marinus

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 04 Oct 2011, 08:13 AM
Hi Marc,

We believe the inaccuracy you get when zooming is caused by the axes auto range. Generally in zooming and scrolling scenarios the best approach would be to set the AutoRange property to false and set a manual axis range for each axis that you zoom in/out on in order to get the best possible results.

Please, find attached a sample application, which we have created to simulate a scenaraio similar to yours. Setting a manual range for both axes yields a fairly accurate zooming on our side. Please, have a look at it and let us know if you still experience the same issues. In case you do, it'd be very helpful for us if you're able to modify the attached application so that the problem is reproducible for our develoeprs to debug and provide further support.

Kind regards,
Nikolay
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
Marc
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or