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
Custom DataPoint Styles
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Annelise,
Yes, this is possible deriving your own custom point series inheriting from Steema.TeeChart.Styles.Points and doing something like:
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 |
Instructions - How to post in this forum |