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.

Problem with the chartarea

Thread ID:

Created:

Updated:

Platform:

Replies:

96517 Sep 17,2010 09:03 AM Sep 22,2010 06:36 AM ASP.NET Web Forms (Classic) 3
loading
Tags: Chart
Benoit Lecue
Asked On September 17, 2010 09:03 AM

Hi everybody,

It's been a while that i'm looking for how to do something. I explain myself. I want to get the min value and the max value of the axis X and the axis Y. I have to get this values in order to export them in an Excel file.

These values have to be different if we have zoom on a part ..

Somebody has the solution?

Thanks you!


Jaffersathick B [Syncfusion]
Replied On September 20, 2010 07:35 AM

Hi Benoit,

Thank you for using Syncfusion products.

We suggest you to use the Max and Min property of the visible range in chart axis to get the maximum and minimum value displayed in the chart area.

Please refer the following code snippet:

[CS]

double max = this.chartControl1.PrimaryXAxis.VisibleRange.Max;
double min = this.chartControl1.PrimaryXAxis.VisibleRange.Min;



Let me know if it helps.

Regards,
Jaffer



Benoit Lecue
Replied On September 21, 2010 04:19 AM

Thank you but actually, i found the solution this weekend :)

But now i have a new problem!

I have the range of the axis X. I would like to get the points in the series which are in this range.

Ex : the range of axis X is : 20-40
I'd like to get the points : i(20
Can i make that ?

Thanks a lot !



Vijayabharathi K [Syncfusion]
Replied On September 22, 2010 06:36 AM

Hi Benoit,

Thank for your update.

Yes. It is possible to filter particular set of data points in the Chart Series. We suggest you to use filtering a particular set of data points using IsEmpty property or Grouping Engine. You can find more information about Grouping Engine in the online documentation link from below.

http://help.syncfusion.com/ug_83/User%20Interface/Windows%20Forms/Chart/Documents/howtofilterparticularsetofdatapointsinthechartseries.htm

Kindly find the code snippet below to using IsEmpty Property to filtering a particular set of data points.

[C#]

private void chartLoad()
{

ChartSeries series = new ChartSeries("Series");
series.Type = ChartSeriesType.Line;

this.chartControl1.PrimaryXAxis.RangeType = ChartAxisRangeType.Set;
this.chartControl1.PrimaryXAxis.Range = new MinMaxInfo(20, 40, 2);

series.Points.Add(15, 40);
series.Points.Add(12, 50);
series.Points.Add(22, 60);
series.Points.Add(50, 70);
series.Points.Add(29, 50);
for (int i = 0; i < series.Points.Count; i++)
{
if (this.chartControl1.PrimaryXAxis.VisibleRange.Max < series.Points[i].X || this.chartControl1.PrimaryXAxis.VisibleRange.Min > series.Points[i].X)
{
series.Points[i].IsEmpty = true;
}
}
chartControl1.Series.Add(series);

}

Please let us know if you have any concerns.

Regards,
Vijayabharathi K





CONFIRMATION

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.

;