Page 1 of 1

Custom DataPoint Styles

Posted: Wed Sep 28, 2005 3:27 am
by 8119814
Hi

When we draw curve with TeeChart it is possible to give only standard TeeChart supported data point style. Is there any way of extending the teechart class so that we could define our own custom data point style.

Teechart only supports some standard data point style like rectangle, circle, triangle etc.

We are looking forward to drawing our own data point style.

Please advise.

Thanks

Posted: Wed Sep 28, 2005 10:35 am
by narcis
Hi Annelise,

Yes, this is possible deriving your own custom point series inheriting from Steema.TeeChart.Styles.Points and doing something like:

Code: Select all

		private void Form1_Load(object sender, System.EventArgs e)
		{
			MySeries l = new MySeries(tChart1.Chart);

			l.FillSampleValues(10);			
		}


		public class MySeries : Steema.TeeChart.Styles.Points 
		{ 

			private Graphics3D g;

			public MySeries() : this(null) {} 
			public MySeries(Steema.TeeChart.Chart c) : base(c) 
			{
			 g = c.Graphics3D;
			} 
   
			protected override void Draw()
			{
				base.Draw ();
			}

			public override void DrawValue(int index)
			{ 				
				g.TextOut(base.CalcXPos(index), base.CalcYPos(index), index.ToString());
			}
		}