We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Regarding Single click Zoom in

Hi All,

I want to normal view from the Zoom view with single click.

Please reply me as soon as possible.

Thanks and Regards
K.Sathishkumar

9 Replies

AD Administrator Syncfusion Team March 15, 2007 09:59 PM UTC

Hi Sathishkumar,

Thank you for using Syncfusion products.

You can get normal view from the Zoom view with single click. Please call the following code snippet in click event.

[ C# ]

this.chartControl1.ZoomFactorX = 1;
this.chartControl1.ZoomFactorY = 1;

Please let me know if you have any queries.

Regards,
Rajesh


SK Sathishkumar Kaliavaradhan March 16, 2007 02:59 AM UTC

Hi Rajesh,

The code is not working, means i put in mouse click event but control doesn't coming into the normal view from zooming view.

Please test it in your pc then tell me how do i solve ?

Thanks and Regards
K.Sathishkumar


SK Sathishkumar Kaliavaradhan March 16, 2007 03:02 AM UTC

Hi Rajesh,

i forgot to tell you, i am using syncfusion version 4.4.0.51

Please reply as soon as possible.

Waiting for your reply...

Thanks and Regards
K.Sathishkumar


RR Ramya R Syncfusion Team March 16, 2007 10:47 AM UTC

Hi Satishkumar,

ZoomingIn using the mouse and ZoomingOut in a single click is not possible since while ZoomIn is performed using the mouse it is done by pressing the leftmouse button, covering a area and then releasing the leftmouse button which is equivalent to a mouse click. So both ZoomingIn and ZoomingOut in a mouseclick will result in the normal view.

Instead you can use the chartControl1_MouseDoubleClick event to ZoomOut as shown in the code snippet below,

private void chartControl1_MouseDoubleClick(object sender, MouseEventArgs e)
{
this.chartControl1.PrimaryXAxis.ZoomFactor = 1;
this.chartControl1.PrimaryYAxis.ZoomFactor = 1;
this.chartControl1.GetVScrollBar(this.chartControl1.PrimaryYAxis).Visible = false;
this.chartControl1.GetHScrollBar(this.chartControl1.PrimaryXAxis).Visible = false;
}

Or

You can ZoomIn using the "+" key and ZoomOut using the above code snippet under the chartControl1_MouseClick event.

Let me know whether this helps you.

Thanks & Regards,
Ramya.


SK Sathishkumar Kaliavaradhan March 16, 2007 11:27 AM UTC

Hi Ramya,

whatever code given in previous update it removing horizontal zooming scrollbar but not vertical zooming scroll bar.Vertical zooming scrollbar was still there.

Please check the code once again reply me or
can you please send me a sample

Thanks and Regards
K.Sathishkumar


RR Ramya R Syncfusion Team March 19, 2007 04:13 AM UTC

Hi Satishkumar,

I was not able to reproduce the condition that you have mentioned here.

Using the code snippet in my previous update I was able to ZoomOut when double clicking the mouse over the ChartControl.

Kindly take a look at the attached sample.

In this sample, the ZoomIn can be done using mouse and the ZoomOut(ZoomOut to normal view) completely can be done by double clicking the mouse over the ChartControl.

You can download the sample from the below Webpage link,
http://websamples.syncfusion.com/samples/Chart.Windows/F57988/main.htm

Could you please modify this sample to reproduce the condition that you have mentioned here and send it back to us, so that it would help us in meeting your requirement exactly?

Thanks & Regards,
Ramya.


SK Sathishkumar Kaliavaradhan March 20, 2007 06:36 AM UTC

Hi Ramya,

Thanks so much for your answer...

It is working for me also now actully problem in my case is more then one axis in chart control so that i have to make all the axis visiable is false.

Thanks and Regards
K.Sathishkumar


RR Ramya R Syncfusion Team March 20, 2007 11:46 AM UTC

Hi Satishkumar,

If your intention is to ZoomOut(Normal View) completely with the chart containing both series of primaryYaxis and series of Custom axes then it can be done as shown in the code snippet below,

private void chartControl1_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (this.chartControl1.EnableXZooming)
{
this.chartControl1.PrimaryXAxis.ZoomFactor = 1;
this.chartControl1.GetHScrollBar(this.chartControl1.PrimaryXAxis).Visible = false;
}

foreach (ChartAxis axis in this.chartControl1.Axes)
{

if (this.chartControl1.EnableYZooming)
{
axis.ZoomFactor = 1;
this.chartControl1.GetVScrollBar(axis).Visible = false;
}
}
}

Let me know whether this helps you.

Thanks & Regards,
Ramya.


SK Sathishkumar Kaliavaradhan March 20, 2007 12:15 PM UTC

Hi Ramya,

i solved it this problem already,i am just told you the reason why it is not working for me.

Anyhave thanks once again

Thanks and Regards
K.Sathishkumar

Loader.
Live Chat Icon For mobile
Up arrow icon