I use the following code to add in some labels to the chart
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
When I add a title though the labels overlap the title.
Using;
TChart.Axis.Bottom.Labels.Font.Size = 20
Does not change the font size of the labels, but will move the bottom axis up and down, so how should I be adding the labels so that they automatically do not overlap?
Thanks
Dominic
Label Font Size issue...
Hi Dominic,
TChart.Axis.Bottom.Labels.Size = 50
But, as you're using custom labels (and not automatic) in case the labels overlap you will have to find a trick to solve it (like change the angle,...).
Another thing you can do is to use the default axis labels and then use the OnGetAxisLabel event to change the LabelText.
This can be solved increasin the Size of the Axis labels :When I add a title though the labels overlap the title.
TChart.Axis.Bottom.Labels.Size = 50
To increase the font size of the Custom labels you must use similar code to the followingTChart.Axis.Bottom.Labels.Font.Size = 20
Does not change the font size of the labels, but will move the bottom axis up and down, so how should I be adding the labels so that they automatically do not overlap?
Code: Select all
For i = 0 To TChart.Axis.Bottom.Labels.Count - 1
TChart.Axis.Bottom.Labels.Item(i).Font.Size = 20
Next i
Another thing you can do is to use the default axis labels and then use the OnGetAxisLabel event to change the LabelText.
Pep Jorge
http://support.steema.com
http://support.steema.com