Hi,
I have a problem with the font of the bottom axis labels. When I clear the label collection and add them myself, the font for those labels reset to a default font and size and cannot be changed.
Attached to the post there is a project I've built to show the problem.
The issue is found in TeeChart ActiveX Version 8.0.0.6 and 7.0.1.3
I really need to fix that problem, please advise what can I do about it.
Thanks in advance.
Axis labels wont take font changes
Axis labels wont take font changes
- Attachments
-
- ChartAxisLabelBug.zip
- VB project showing the problem.
- (2.47 KiB) Downloaded 501 times
Re: Axis labels wont take font changes
Hi OptUser,
I've reproduced it so I've added it to the defect list to be fixed in future releases (TV52014727). It seems that font changes aren't applied to the axis labels when using custom labels.
I've reproduced it so I've added it to the defect list to be fixed in future releases (TV52014727). It seems that font changes aren't applied to the axis labels when using custom labels.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Axis labels wont take font changes
Hi, thanks your response.
Can you suggest a workaround I can use meanwhile it is being fixed?
I need to define specific values for the bottom axis and the only way I could make it work is clearing the label list.
Can you suggest a workaround I can use meanwhile it is being fixed?
I need to define specific values for the bottom axis and the only way I could make it work is clearing the label list.
Re: Axis labels wont take font changes
Hi OptUser,
Of course, you always can draw text directly to the canvas. Here is an example:
Note that first of all, I've cleared the labels and added custom labels with the text " " to show the grids but not any text.
Of course, you always can draw text directly to the canvas. Here is an example:
Code: Select all
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scLine
TChart1.Series(0).FillSampleValues 25
TChart1.Axis.Bottom.Labels.Clear
Dim i As Integer
For i = 0 To TChart1.Series(0).Count - 1
TChart1.Axis.Bottom.Labels.Add TChart1.Series(0).XValues.Value(i), " "
Next i
End Sub
Private Sub TChart1_OnAfterDraw()
Dim i As Integer
With TChart1.Canvas
.Font.Name = "Tahoma"
.Font.Size = 7
.Font.Bold = True
.Font.Color = vbBlue
For i = 0 To TChart1.Series(0).Count - 1
.RotateLabel TChart1.Series(0).CalcXPos(i) - (.TextHeight("hello") / 2), TChart1.Axis.Bottom.Position + .TextWidth("hello") + TChart1.Axis.Bottom.TickLength, "hello", 90
Next i
End With
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |