Is it possible to determine the minimum and maximum x and y values of the data series that is displayed in the zoomed mode? When I zoom in on a section of a Fastline chart display I need to be able to calculate some summary data just on the zoomed dataset but I can't find out what region of the full data set is displayed.
Thanks for any assistance.
how to retrieve zoomed to series
-
- Newbie
- Posts: 6
- Joined: Wed Apr 16, 2008 12:00 am
- Location: Australia
- Contact:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Innervations,
Yes, you can do something like this:
Yes, you can do something like this:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Styles.Points points1;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
points1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
points1.FillSampleValues();
tChart1.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(tChart1_AfterDraw);
}
void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
double min = points1.MaxYValue();
double max = points1.MinYValue();
for (int i = points1.FirstVisibleIndex; i <= points1.LastVisibleIndex; i++)
{
double tmp = points1.YValues[i];
if ((tmp < min) && (tmp >= points1.GetVertAxis.Minimum))
{
min = tmp;
}
if ((tmp > max) && (tmp <= points1.GetVertAxis.Maximum))
{
max = tmp;
}
}
label1.Text = "Min: " + min.ToString() + ", Max: " + max.ToString();
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |