Custom DataPoint Styles

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Glenn F. Henriksen
Newbie
Newbie
Posts: 52
Joined: Tue Mar 04, 2003 5:00 am

Custom DataPoint Styles

Post by Glenn F. Henriksen » Wed Sep 28, 2005 3:27 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Sep 28, 2005 10:35 am

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());
			}
		}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply