Page 1 of 1

X Axis Label at an angle with multiline text

Posted: Tue Aug 03, 2004 4:02 pm
by 9079969
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?

Posted: Wed Aug 04, 2004 9:50 am
by Pep
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