Page 1 of 2
TeeChart 8 - Legend symbols & labels not matching up
Posted: Wed Oct 17, 2007 4:18 pm
by 10046296
I have a chart which has 30+ different TBarSeries on it but the legend only has space to display 24 of the series names. The legend is displaying in Legend Style = Series Names, and Checkboxes enabled.
The problem I have is the first series is displaying the correct symbol colour for the first series but the label displayed is incorrect, showing the label of the series that is exactly the number of variables that aren't being displayed away.
To give a clear example of what I mean... if a chart has 8 series and there is only space for 6 to be shown in the legend it displays the symbol colours for the series 1-6 matched up with the labels for series 3-8, so you end up seeing with the following combinations:
Series 1 Colour - Series 3 Label
Series 2 Colour - Series 4 Label
Series 3 Colour - Series 5 Label
Series 4 Colour - Series 6 Label
Series 5 Colour - Series 7 Label
Series 6 Colour - Series 8 Label
Can anyone help me on this or is this a bug within the legend of TeeChart itself?
Also is there a way to be able to scroll along the legend so that all series can be displayed?
Many thanks
Drew
Posted: Thu Oct 18, 2007 9:18 am
by narcis
Hi Drew,
Can anyone help me on this or is this a bug within the legend of TeeChart itself?
I'm not able to reproduce the problem here using the code below and v8.01 from September 2007. Are you using latest version? If so, could you please modify the code below or send us a simple example project we can run "as-is" to reproduce the problem here?
You can post your files at news://
www.steema.net/steema.public.attachments newsgroup or at our
upload page.
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
for i:=0 to 50 do
begin
Chart1.AddSeries(TLineSeries.Create(self));
Chart1[i].Title:='MySeries ' + IntToStr(i);
Chart1[i].FillSampleValues();
end;
end;
Also is there a way to be able to scroll along the legend so that all series can be displayed?
Yes, you can use TLegendScrollBar tool. You'll find an example at
All Features\Welcome!\Miscellaneous\Legend\Legend ScrollBar in the new features demo, available at TeeChart's program group.
Thanks in advance!
Posted: Thu Oct 18, 2007 9:51 am
by 10046296
Uploaded using the upload page as you requested. Basically you can see the bug when you change the size of the form to reduce the size of the legend.
The reason I am plotting series with one value and nulls for all other values is I need the user to be able to deselect series so that they can view smaller values of the selected series and this was the only way I could see in doing it.
Many Thanks
Drew
Posted: Thu Oct 18, 2007 10:08 am
by 10046296
I've just added a LegendScrollBar charttool to the chart I've just sent you and when I scroll to the end of the LegendScrollBar I get an EAccessViolation error message. I use EurekaLog and this is the relevant part of the output that was generated:
EurekaLog 6.0.8
Application:
-------------------------------------------------------
1.1 Start Date : Thu, 18 Oct 2007 11:02:52 +0100
1.2 Name/Description: TeeChartLegendBug.exe
1.3 Version Number :
1.4 Parameters :
1.5 Compilation Date: Thu, 18 Oct 2007 11:00:45 +0100
1.6 Up Time : 2 seconds
Exception:
-----------------------------------------------------------------------------------------------------------------------
2.1 Date : Thu, 18 Oct 2007 11:02:54 +0100
2.2 Address : 004052A4
2.3 Module Name : TeeChartLegendBug.exe
2.4 Module Version:
2.5 Type : EAccessViolation
2.6 Message : Access violation at address 004052A4 in module 'TeeChartLegendBug.exe'. Read of address 100FAB08.
2.7 ID : 9CF1
2.8 Count : 1
2.9 Status : New
2.10 Note :
Active Controls:
---------------------------
4.1 Form Class : TForm2
4.2 Form Text : Form2
4.3 Control Class: TForm2
4.4 Control Text : Form2
Computer:
--------------------------------------------------------------------------
5.1 Name : SBC1
5.2 Total Memory : 2046 Mb
5.3 Free Memory : 794 Mb
5.4 Total Disk : 74.44 Gb
5.5 Free Disk : 30.12 Gb
5.6 System Up Time: 1 hour, 58 minutes, 2 seconds
5.7 Processor : Genuine Intel(R) CPU T2600 @ 2.16GHz
5.8 Display Mode : 1680 x 1050, 32 bit
5.9 Display DPI : 96
5.10 Video Card : NVIDIA Quadro NVS 120M (driver 8.4.6.9 - RAM 512 MB)
5.11 Printer :
Operating System:
------------------------------------
6.1 Type : Microsoft Windows XP
6.2 Build # : 2600
6.3 Update : Service Pack 2
6.4 Language: English
6.5 Charset : 0
Call Stack Information:
------------------------------------------------------------
|Address |Module |Unit|Class|Procedure/Method |Line|
------------------------------------------------------------
|Running Thread: ID=148; Priority=0; Class=; [Main] |
|----------------------------------------------------------|
|77F16E7C|GDI32.dll | | |DeleteDC | |
|77F16E6F|GDI32.dll | | |DeleteDC | |
|7E4196C2|USER32.dll| | |DispatchMessageA | |
|7E4196B8|USER32.dll| | |DispatchMessageA | |
|7C90E64C|ntdll.dll | | |NtSetInformationThread| |
------------------------------------------------------------
Assembler Information:
--------------------------------------------------------
; System._LStrAsg
; ----------------
004052A0 test edx, edx
004052A2 jz System._LStrAsg
004052A4 mov ecx, [edx-$08] ; <-- EXCEPTION
004052A7 inc ecx
004052A8 jnle System._LStrAsg
004052AA push eax
004052AB push edx
004052AC mov eax, [edx-$04]
004052AF call System._NewAnsiString
004052B4 mov edx, eax
004052B6 pop eax
004052B7 push edx
004052B8 mov ecx, [eax-$04]
Registers:
-----------------------------
EAX: 0012F970 EDI: 0012F970
EBX: FFFFFFFE ESI: 00000001
ECX: 00C1A170 ESP: 0012F938
EDX: 100FAB10 EIP: 004052A4
Posted: Thu Oct 18, 2007 10:27 am
by narcis
Hi Drew,
Thanks for the example project. I've been able to reproduce the issue here and this happens when legend's position is set to top or bottom. I've added this defect (TV52012533) to our bug list to be fixed for future releases.
Posted: Thu Oct 18, 2007 10:31 am
by 10046296
Thanks Narcis!
Any suggestions on why I get an EAccessViolation error when I add a LegendScrollBar charttool to the chart in the app I sent you over? I'm guessing this maybe related to the legends position too?
Drew
Posted: Thu Oct 18, 2007 10:54 am
by narcis
Hi Drew,
I'm afraid this is also related to the previous issue as a wrong legend text index is trying to be displayed.
Posted: Thu Oct 18, 2007 10:56 am
by 10046296
OK, I'll move the legend to the right as a temporary solution until the bugs fixed.
Many thanks
Drew
bug fixed?
Posted: Thu May 08, 2008 8:25 am
by 9530384
narcis wrote:Hi Drew,
Thanks for the example project. I've been able to reproduce the issue here and this happens when legend's position is set to top or bottom. I've added this defect (TV52012533) to our bug list to be fixed for future releases.
Hi Narcis.
I came over the same problem with TeeChart Pro v7.0.1.3 ActiveX. Is this issue already fixed and if so is there a v7 release available or would I need to upgrade to v8 and at what costs?
I also reported another bug long ago (TV52011611). Is this one fixed and in which release?
thank you,
Harry
Posted: Thu May 08, 2008 11:14 am
by narcis
Hi Harry,
TV52012533 hasn't been fixed yet so there's no v7 nor v8 release with the fix. However, it's most unlikely that, when it's fixed, it will be included in v7.
For v7 to v8 upgrading options please have a look
here.
Regarding TV52011611, It works fine for me here using both TeeChart Pro v7.0.1.4 ActiveX and TeeChart Pro v8.0.0.3 ActiveX.
Posted: Thu May 08, 2008 11:19 am
by narcis
Hi Harry,
Sorry, I must have done some version crossing. I checked TV52011611 again using v7.0.1.4 ActiveX and doesn't work. The issue was fixed in v8. Code to reproduce the issue:
Code: Select all
Private Sub Form_Load()
For i = 0 To 2
TChart1.AddSeries scLine
TChart1.Series(i).FillSampleValues 10
Next
TChart1.Legend.Alignment = laTop
TChart1.Legend.CheckBoxes = True
TChart1.Axis.Bottom.Labels.Visible = False
End Sub
Posted: Thu May 08, 2008 11:50 am
by 9530384
narcis wrote:Hi Harry,
TV52012533 hasn't been fixed yet so there's no v7 nor v8 release with the fix. However, it's most unlikely that, when it's fixed, it will be included in v7.
So is there any timeplan on this issue? I think it should be a bug of high priority because this way the TChart displays wrong data which isnt tolerable for sensitive data!
I wonder what quality assurance you have if such a known bug still isnt fixed after over 1/2 year! With our customers this definitly wouldnt work.
Harry
Posted: Thu May 22, 2008 7:49 am
by narcis
Hello everyone,
Just wanted to let you know that we have fixed this issue for next v8 maintenance release which is due to be out shortly.
Please be aware at this forum or subscribe to our
RSS feed for its release announcement.
Maintenance Release Date?
Posted: Thu Jun 05, 2008 12:41 pm
by 10046296
Narcis,
Good news about it being fixed. Any anticipated date of next maintenance release? I've got a client complaining about incorrect labelling due to this error and would like to give him an idea of when he can expect a resolution of the problem.
It appears it also throws out the index when calling:
AIndex:= Chart.SeriesList.IndexOf(Series);
in the ClickSeries event handler and then calling:
Label.Caption:= Chart.Series[AIndex].Title;
in a subsequent display procedure when there are more than 20 different series on the chart.
Many Thanks!
Drew
Posted: Thu Jun 05, 2008 1:18 pm
by narcis
Hi Drew,
The release of next version will be very soon. If you let us know the IDE you are using I can send you the URL to download a release candidate for TeeChart Pro v8.03 VCL.