Page 1 of 1
Chart header properties
Posted: Wed Apr 26, 2006 3:14 am
by 9640166
Hi,
Is it possible to apply different font properties for multiple lines of the chart header?
Thanks.
Posted: Wed Apr 26, 2006 8:20 am
by narcis
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:
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");
}