X Axis Label at an angle with multiline text

TeeChart for ActiveX, COM and ASP
Post Reply
Cinimod
Newbie
Newbie
Posts: 2
Joined: Thu Nov 27, 2003 5:00 am
Location: UK
Contact:

X Axis Label at an angle with multiline text

Post by Cinimod » Tue Aug 03, 2004 4:02 pm

Using the following code produces nice multiline labels;

TChart.Axis.Bottom.Labels.Clear
TChart.Axis.Bottom.Labels.Add 1, "Testing"
TChart.Axis.Bottom.Labels.Add 3, "Testing" & vbcr & "testing" & vbcr & "testing"
TChart.Axis.Bottom.Labels.Add 2, "Testing" & vbcr & "testing"
TChart.Axis.Bottom.Labels.Angle = 0

However if you then use;
TChart.Axis.Bottom.Labels.Angle = 45

The text is no longer multiline, all text is overlapping on itself, is there any way around this?

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Aug 04, 2004 9:50 am

Hi,

yes, this is not supported (Multiline Labels with different angle). Then only way around this I can think of is to use the canvas techniques to add the text on the canvas.

Code: Select all

Private Sub TChart_OnAfterDraw()
TChart.Canvas.RotateLabel TChart.Axis.Bottom.CalcXPosValue(0), TChart.Axis.Bottom.Position + 20, "text", 45
End Sub

Post Reply