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.
Unfortunately, activation email could not send to your email. Please try again.

User selection part of chart. Min and Max values of axis X.

Thread ID:





76996 Oct 6,2008 04:33 AM Oct 11,2008 02:24 AM Windows Forms 1
Tags: Chart
Asked On October 6, 2008 04:33 AM

How can I get to know the min max values of axis X when user selects some part of chart area?

I need these values to do zoom. I don`t want use built-in zoom (because some problems).

Manohari [Syncfusion]
Replied On October 11, 2008 02:24 AM

Hi Poland,

Thanks for your interest in Syncfusion Products.

It is possible to get the Min And Max value of the Selected Range by handling the ChartRegionMouseDown, ChartRegionMouseUp and ChartRegionMouseMove events and by using the GetValueByPOint menthod of ChartArea.

Sample Code:

System.Drawing.Point startPoint = new System.Drawing.Point();
System.Drawing.Point endPoint = new System.Drawing.Point();

ChartPoint start= this.chartControl1.ChartArea.GetValueByPoint(startPoint);
ChartPoint end=this.chartControl1.ChartArea.GetValueByPoint(endPoint);

I have attached a sample that illustrates the same in this link below.


Kinly let us know if this meets your requirement.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.