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

How To get Value when zooming in chart

3 Answers 66 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
JBA
Top achievements
Rank 1
JBA asked on 18 Apr 2012, 04:40 PM

Hi,

I'm trying to use chart Zoom event in Asp.net. How can I obtain x-y values from Chart Zoom event args ?

First of all I  bind a data to my chart after user zooms, according to the zoom args I want to bind another data source to chart because of performance issue. How can I manage my plan ?

tnx.

3 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 23 Apr 2012, 08:04 AM
Hi Javad,

Extracting the selected x and y values is not possible with out-of-the-box means. However, I think that you will be able to manually calculate these values in the Zoom event:
void radChart1_Zoom(object sender, ChartZoomEventArgs e)
{
 floatxScrollOffset = this.radChart1.ClientSettings.XScrollOffset;
 floatyScrollOffset = this.radChart1.ClientSettings.YScrollOffset;
 
 floatxScale = this.radChart1.ClientSettings.XScale;
 floatyScale = this.radChart1.ClientSettings.YScale;
}
 
I hope that the above suggestion is of help.

Greetings,
Petar Marchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
JBA
Top achievements
Rank 1
answered on 23 Apr 2012, 11:55 PM
i need to get value of xAxis, yAxis data on chart.
for ex: when user zoom in value (7,6), we give (2 , 1.3) in zooming event.

0
Petar Marchev
Telerik team
answered on 26 Apr 2012, 11:10 AM
Hello Javad,

I am not sure what is your question here.

It is not possible for me to give a general solution for this, as it depends on how you have set up the series mappings. However, I believe that extracting the selected x and y values is possible and it is SeriesMapping-specific.

For instance, if you know that you x values range from 50 to 150 and in the zoom event handler the xScale is 2.0 and the xScrollOffset is 0.25 - then the selected x range is [75, 125].  

Kind regards,
Petar Marchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Chart (Obsolete)
Asked by
JBA
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
JBA
Top achievements
Rank 1
Share this question
or