- Home
- Forum
- ASP.NET Web Forms (Classic)
- Problem with the chartarea
Problem with the chartarea
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!
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!
SIGN IN To post a reply.
3 Replies
JB
Jaffersathick B
Syncfusion Team
September 20, 2010 11:35 AM UTC
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:
Let me know if it helps.
Regards,
Jaffer
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
BL
Benoit Lecue
September 21, 2010 08:19 AM UTC
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 !
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 !
VK
Vijayabharathi K
Syncfusion Team
September 22, 2010 10:36 AM UTC
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
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
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
BL Benoit Lecue
- Sep 17, 2010 01:03 PM UTC
- Sep 22, 2010 10:36 AM UTC