Page 1 of 1

COM Exception when setting .Series(x).asShape.XO

Posted: Thu Feb 12, 2004 7:45 am
by 6926650
We are trying TeeChart6 in a .NET application, and get this COM exception, also when trying to set the pen color - any help??

Posted: Thu Feb 12, 2004 10:56 am
by Pep
Hi,

it works fine here using the latest TeeChart Pro v6.04 and the follwoing code :

Code: Select all

		private void Form1_Load(object sender, System.EventArgs e)
		{
			axTChart1.AddSeries(TeeChart.ESeriesClass.scShape);
			axTChart1.Series(0).asShape.X0 = 10;
			axTChart1.Series(0).asShape.X1 = 20;
			axTChart1.Series(0).asShape.Y0 = 2;
			axTChart1.Series(0).asShape.Y1 = 5;
			axTChart1.Series(0).asShape.Pen.Color = Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red));
		}
Could you test if it works for you ?