Hi,
I am facing problem with series name in legend. There are 60+ series in my chart. There are two problems:
• All series are not shown in legend.
• Wrong legends are being displayed. The names shown in the legend are jumbled. Correct names are however seen in TeeChart editor.
During diagnosis, I have found that if my chart has up to 20 series then there is no problem in displaying series name in legend, but if series is more than 20 then name displayed in legend become wrong.
For the first problem, as per my understanding we can use legend scroll bar tool. However, it is resulting in crash when scrolling.
Is there a limitation on number of series, for which legend displays correctly?
Any solution for this would be highly appreciated.
Thanks in advance.
Regards,
Amol
Series name issue display in legend
Re: Series name issue display in legend
Hi Amol,
Could you please modify the code so we can reproduce the problem here?
Thanks in advance.
Have you tried using the LegendScrollBar tool?Amol wrote:• All series are not shown in legend.
I'm trying to reproduce this with the code below but I see the correct texts in the legend.Amol wrote:• Wrong legends are being displayed. The names shown in the legend are jumbled. Correct names are however seen in TeeChart editor.
During diagnosis, I have found that if my chart has up to 20 series then there is no problem in displaying series name in legend, but if series is more than 20 then name displayed in legend become wrong.
For the first problem, as per my understanding we can use legend scroll bar tool. However, it is resulting in crash when scrolling.
Is there a limitation on number of series, for which legend displays correctly?
Could you please modify the code so we can reproduce the problem here?
Code: Select all
Private Sub Form_Load()
TeeCommander1.ChartLink = TChart1.ChartLink
TChart1.Aspect.View3D = False
Dim i As Integer
For i = 0 To 60
TChart1.AddSeries scFastLine
TChart1.Series(i).FillSampleValues
TChart1.Series(i).Title = "My Series " + Str$(i)
Next i
TChart1.Tools.Add tcLegendScrollBar
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Series name issue display in legend
Hi Yeray,
Thanks for your comments.
You are right; the code snippet that you have given doesn’t give problem. On further diagnosis we noticed that the legend names in your example are relatively smaller, while the ones that we are using are slightly bigger. If we use bigger legend names due to which all legends don’t come in legend display area, then legend jumbling occurs. If we use legend scroll bar tool, then all legends appear but jumbling still exists and also on scrolling it results in a crash. Please note that we have to keep the legend at bottom as this is part of our requirement.
For your reference we are uploading a sample project written in VC++ using TeeChart ActiveX Pro v 7.
Thanks & Regards
Amol
Thanks for your comments.
You are right; the code snippet that you have given doesn’t give problem. On further diagnosis we noticed that the legend names in your example are relatively smaller, while the ones that we are using are slightly bigger. If we use bigger legend names due to which all legends don’t come in legend display area, then legend jumbling occurs. If we use legend scroll bar tool, then all legends appear but jumbling still exists and also on scrolling it results in a crash. Please note that we have to keep the legend at bottom as this is part of our requirement.
For your reference we are uploading a sample project written in VC++ using TeeChart ActiveX Pro v 7.
Thanks & Regards
Amol
- Attachments
-
- teechartExample.rar
- Demo Project
- (356.03 KiB) Downloaded 934 times
Re: Series name issue display in legend
Hello,
The project you have attached give me problems when trying to execute it.
However, I've translated the relevant code from it to VB6 and it seems to work fine for me here:
This is what I get when I run the VB6 application above with TeeChart 7.0.1.6:
That looks correct to me. Isn't it?
However, if I use the legend scrollbar, I get the following error:
I can't reproduce the error with the actual TeeChart version. Have you tried it?
The project you have attached give me problems when trying to execute it.
However, I've translated the relevant code from it to VB6 and it seems to work fine for me here:
Code: Select all
TChart1.RemoveAllSeries
TChart1.Aspect.View3D = False
Dim seriesctr, datactr As Integer
For seriesctr = 0 To 60 - 1
TChart1.AddSeries scLine
For datactr = 2 To 1000 - 1
TChart1.Series(seriesctr).AddXY datactr, datactr + datactr, "", clTeeColor
Next datactr
TChart1.Series(seriesctr).Title = "my Series but this should be correct" + Str$(seriesctr)
TChart1.Series(seriesctr).Active = True
Next seriesctr
TChart1.Tools.Add tcLegendScrollBar
TChart1.Legend.Alignment = laBottom
TChart1.Legend.Symbol.Width = 5
TChart1.Legend.CheckBoxes = True
However, if I use the legend scrollbar, I get the following error:
Is this the error you are also finding?Access violation at address 06754838 in module 'TeeChart7.ocx'. Read of address 00000030.
I can't reproduce the error with the actual TeeChart version. Have you tried it?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |