MAJOR XY Series Marks BUG!!
-
- Newbie
- Posts: 48
- Joined: Tue Aug 03, 2010 12:00 am
MAJOR XY Series Marks BUG!!
I've just updated to XE4 and the latest version of TChart (2013.08.130521 32 bit). I have a couple of applications which use x-y charts with labels for each point. These have stopped working correctly. The point labels are not longer displayed. Instead the Y values are displayed. This "breaks" my application.
I've uploaded a test project which demonstates the problem. It should deplay all the letters of the alphabet from A to Z at random point. IT doesn't. Some Y-values are show instead.
You can download the Delphi XE4 app here:
https://dl.dropboxusercontent.com/u/112 ... roblem.zip
I hope this can be fixed ASAP!!
Thanks,
Steve
I've uploaded a test project which demonstates the problem. It should deplay all the letters of the alphabet from A to Z at random point. IT doesn't. Some Y-values are show instead.
You can download the Delphi XE4 app here:
https://dl.dropboxusercontent.com/u/112 ... roblem.zip
I hope this can be fixed ASAP!!
Thanks,
Steve
- Attachments
-
- LabelProblem.zip
- (82.14 KiB) Downloaded 616 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: MAJOR XY Series Marks BUG!!
Hi Steve,
Thanks for reporting. We could reproduce the issue here in XE4. It works fine in other Delphi versions. Anyway, I have added it (TV52016639) to the defect list to be investigated and fixed for next releases.
Thanks for reporting. We could reproduce the issue here in XE4. It works fine in other Delphi versions. Anyway, I have added it (TV52016639) to the defect list to be investigated and fixed for next releases.
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 |
-
- Newbie
- Posts: 48
- Joined: Tue Aug 03, 2010 12:00 am
Re: MAJOR XY Series Marks BUG!!
This is a major issue for me. Can you send the source code changes once the corrections have been made?
Thanks,
Steve
Thanks,
Steve
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: MAJOR XY Series Marks BUG!!
Hi Steve,
Ok, I'll add a note on the bug description to send them when fixed.
Ok, I'll add a note on the bug description to send them when fixed.
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 |
-
- Newbie
- Posts: 48
- Joined: Tue Aug 03, 2010 12:00 am
Re: MAJOR XY Series Marks BUG!!
Thanks Narcis,
Note that I cannot go back to an earlier version. This is the only version for XE4 and it's a breaking change. So can I kindly ask it's fixed ASAP.
Thanks,
Steve
Note that I cannot go back to an earlier version. This is the only version for XE4 and it's a breaking change. So can I kindly ask it's fixed ASAP.
Thanks,
Steve
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: MAJOR XY Series Marks BUG!!
Hi Steve,
A workaround is using the OnGetMarkText creating the labels again:
A workaround is using the OnGetMarkText creating the labels again:
Code: Select all
procedure TForm1.Series1GetMarkText(Sender: TChartSeries; ValueIndex: Integer;
var MarkText: string);
begin
MarkText:=Chr(Ord('A') + ValueIndex);
end;
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 |
-
- Newbie
- Posts: 48
- Joined: Tue Aug 03, 2010 12:00 am
Re: MAJOR XY Series Marks BUG!!
That works for the simple demo. However I need to access the Label text and this seems to get scrambled. If you add the following to the demo and associate it with Series1:
It unfortunately still doesn't work
So it is a serious error!!
Thanks,
Steve
Code: Select all
procedure TForm1.Series1GetMarkText(Sender: TChartSeries; ValueIndex: Integer; var MarkText: string);
begin
MarkText := Series1.Labels[ValueIndex];
end;
So it is a serious error!!
Thanks,
Steve
Re: MAJOR XY Series Marks BUG!!
Hi Steve,
Could you please tell us how are you exactly accessing the label text? Maybe we can suggest some workaround while the problem persists.Steve Maughan wrote: However I need to access the Label text and this seems to get scrambled
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 48
- Joined: Tue Aug 03, 2010 12:00 am
Re: MAJOR XY Series Marks BUG!!
Hi Yeray,
I've attached an updated demo of the error. I access the labels in the GetMarkText event and the error still persists.
Can this be sorted out soon? I can't believe I'm the only user with the problem as it's basic functionality which has been broken.
Thanks,
Steve
I've attached an updated demo of the error. I access the labels in the GetMarkText event and the error still persists.
Can this be sorted out soon? I can't believe I'm the only user with the problem as it's basic functionality which has been broken.
Thanks,
Steve
- Attachments
-
- LabelProblem2.zip
- (82.22 KiB) Downloaded 645 times
Re: MAJOR XY Series Marks BUG!!
Hi Steve,
Extending the workaround Narcís suggested above, you could store your labels in an array, and use it instead of Labels[ValueIndex]:
Extending the workaround Narcís suggested above, you could store your labels in an array, and use it instead of Labels[ValueIndex]:
Code: Select all
var myLabels: array of String;
procedure TForm1.FormCreate(Sender: TObject);
var
i: integer;
x, y: double;
s: string;
begin
Chart1.BottomAxis.LabelStyle := talValue;
Chart1.BottomAxis.LabelsFont.Style := [];
Chart1.BottomAxis.AutomaticMinimum := false;
Chart1.BottomAxis.Minimum := 0;
Series1.Clear;
Series1.Marks.Visible := true;
Series1.Marks.Style := smsLabel;
Series1.OnGetMarkText := Series1GetMarkText;
SetLength(myLabels, 26);
for i := 0 to 25 do
begin
x := Random(100);
y := Random(100);
s := Chr(Ord('A') + i); // <-- Each Point has the Label A to Z
Series1.AddXY(x, y, s);
myLabels[i]:=s;
end;
end;
procedure TForm1.Series1GetMarkText(Sender: TChartSeries; ValueIndex: Integer; var MarkText: string);
begin
MarkText := myLabels[ValueIndex];
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: MAJOR XY Series Marks BUG!!
Hi Steve,
We also have fixed the issue at TeEngine.pas. This only happens with XE4 due to series labels being Array of String instead of TList. The solution is implementing InternalInsert nested method in TLabelsList.InsertLabel method like this:
We also have fixed the issue at TeEngine.pas. This only happens with XE4 due to series labels being Array of String instead of TList. The solution is implementing InternalInsert nested method in TLabelsList.InsertLabel method like this:
Code: Select all
Procedure InternalInsert{$IFNDEF D18}(const P:PString){$ENDIF};
{$IFDEF D18}
var t : Integer;
{$ENDIF}
begin
{$IFDEF D18}
SetLength(List, Max(Count,ValueIndex)+1);
while Count<ValueIndex-1 do
List[Count-1]:='';
for t:=Count-1 downto ValueIndex+1 do
List[t]:=List[t-1];
List[ValueIndex]:=ALabel;
{$ELSE}
while Count<ValueIndex do
Add(nil);
Insert(ValueIndex,P);
{$ENDIF}
end;
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 |
-
- Newbie
- Posts: 48
- Joined: Tue Aug 03, 2010 12:00 am
Re: MAJOR XY Series Marks BUG!!
Great!
Can you send me the updated TeEngine.pas file?
Thanks,
Steve
Can you send me the updated TeEngine.pas file?
Thanks,
Steve
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: MAJOR XY Series Marks BUG!!
Hi Steve,
Sure. I just sent it to your forums contact email address.
Sure. I just sent it to your forums contact email address.
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 |
-
- Newbie
- Posts: 48
- Joined: Tue Aug 03, 2010 12:00 am
Re: MAJOR XY Series Marks BUG!!
Hi Narcis,
Works!! Many thanks,
Steve
Works!! Many thanks,
Steve