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

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).


1 Reply

MA Manohari Syncfusion Team October 11, 2008 06:24 AM UTC

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.

http://websamples.syncfusion.com/samples/Chart.Windows/F76996/Sample1.htm

Kinly let us know if this meets your requirement.

Regards,
Manohari.R


Loader.
Up arrow icon