Hi
We are using TeeChart 5.0.5.0 and have problems with long labels disappearing on the bottom axis in a barchart.
We've tried to put it on multiple lines, but the labels will then be clipped by the boundaries of the chart. Is there a automatic function to syllabify a label to the width of the bar while not pushing the text out of the activex control?
Example (VB6):
Private Sub TChart1_OnDblClick()
Dim l As Long
With TChart1
.RemoveAllSeries
.AddSeries scBar
.Series(0).Marks.Visible = False
For l = 1 To 5
.Series(0).Add l * 100, "Long Labeltext for bar no " & l, vbRed
Next l
End With
End Sub
Labels in Barchart Bottom axis
Hi,
there's not an automatic way to do this, the only way is to do it manually, using the OnGetAxisLabel event to divide the axis label. One way could be making use of the TeeSplitInLines method :
there's not an automatic way to do this, the only way is to do it manually, using the OnGetAxisLabel event to divide the axis label. One way could be making use of the TeeSplitInLines method :
Code: Select all
Private Sub Form_Load()
TeeCommander1.Chart = TChart1
With TChart1
.AddSeries scBar
For i = 0 To 10
.Series(0).AddXY i, Rnd * 100, "Current Listing" & i, clTeeColor
Next i
.Panel.MarginBottom = 10
End With
End Sub
Private Sub TChart1_OnGetAxisLabel(ByVal Axis As Long, ByVal SeriesIndex As
Long, ByVal ValueIndex As Long, LabelText As String)
With TChart1
If Axis = atBottom Then
.Axis.Bottom.Labels.TeeSplitInLines LabelText, " "
End If
End With
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi OW,
I can think of two options here:
1. Using another "line separator" like 2 blank spaces or another character you want:
2. You can increase the chart's panel bottom margin.
I can think of two options here:
1. Using another "line separator" like 2 blank spaces or another character you want:
Code: Select all
Private Sub Form_Load()
With TChart1
.AddSeries scBar
For i = 0 To 10
.Series(0).AddXY i, Rnd * 100, "My Current Listing" & i, clTeeColor
Next i
.Panel.MarginBottom = 10
End With
End Sub
Private Sub TChart1_OnGetAxisLabel(ByVal Axis As Long, ByVal SeriesIndex As Long, ByVal ValueIndex As Long, LabelText As String)
With TChart1
If Axis = atBottom Then
.Axis.Bottom.Labels.TeeSplitInLines LabelText, " "
End If
End With
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hello,
I've inherited a project that uses the TeeChart graph. It is all strictly asp with vbscripting. I'm having an issue with the bar graph multilines. I'm trying to use the TeeSplitinLines routine, but all the examples are showing to place it in a VB function. Where do I need to put this in an asp page?
I've inherited a project that uses the TeeChart graph. It is all strictly asp with vbscripting. I'm having an issue with the bar graph multilines. I'm trying to use the TeeSplitinLines routine, but all the examples are showing to place it in a VB function. Where do I need to put this in an asp page?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi JimmyG,
Please see the ASP Server Examples included with TeeChart's installtion. They are available at TeeChart's program group. Full sources are included as well.
Please see the ASP Server Examples included with TeeChart's installtion. They are available at TeeChart's program group. Full sources are included as well.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |