Hi,
Is it possible to apply different font properties for multiple lines of the chart header?
Thanks.
Chart header properties
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Agrilink,
I'm afraid this is not possible. To achieve that you'll have to custom draw on TeeChart's canvas specifing the font settings for each string you draw. To custom draw on the canvas you should use the AfterDraw event:
I'm afraid this is not possible. To achieve that you'll have to custom draw on TeeChart's canvas specifing the font settings for each string you draw. To custom draw on the canvas you should use the AfterDraw event:
Code: Select all
...
tChart1.Header.Visible = false;
tChart1.Panel.MarginTop = 15;
...
void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
int x = tChart1.Left + (tChart1.Right - tChart1.Left) / 2;
int y = tChart1.Top + 5;
g.Font.Color = Color.Red;
g.TextOut(x, y, "Title line 1");
g.Font.Color = Color.Blue;
g.TextOut(x, y+10, "Title line 1");
}
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 |