Page 1 of 1

Position

Posted: Tue Jan 10, 2006 10:09 am
by 8123141
How can I find out the last visible x-value (position) of a series in the
tChart_BeforeDrawSeries-method?

Posted: Tue Jan 10, 2006 10:17 am
by narcis
Hi dotnetjunkee,

You can do something like:

Code: Select all

		private void tChart1_BeforeDrawSeries(object sender, Steema.TeeChart.Drawing.Graphics3D g)
		{
			tChart1.Header.Text="Point Index: " + line1.LastVisibleIndex.ToString() + 
													", X Value: " + line1.XValues[line1.LastVisibleIndex].ToString();
		}

Posted: Tue Jan 10, 2006 12:03 pm
by 8123141
No, I meant when I'm zooming in. In other words, the x-position at the right hand-side of the zoom window.
narcis wrote:Hi dotnetjunkee,

You can do something like:

Code: Select all

		private void tChart1_BeforeDrawSeries(object sender, Steema.TeeChart.Drawing.Graphics3D g)
		{
			tChart1.Header.Text="Point Index: " + line1.LastVisibleIndex.ToString() + 
													", X Value: " + line1.XValues[line1.LastVisibleIndex].ToString();
		}

Posted: Tue Jan 10, 2006 2:09 pm
by narcis
Hi dotnetjunkee,

Ok, then you can use tChart's zoomed event as here:

Code: Select all

		private void tChart1_Zoomed(object sender, System.EventArgs e)
		{
			tChart1.Header.Text="Maximum X Visible Value: " + tChart1.Axes.Bottom.Maximum.ToString();
		}