Tools / TExtraLegendTool broken in TeeChart pro v2014

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
dsn
Newbie
Newbie
Posts: 4
Joined: Wed Apr 03, 2013 12:00 am

Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by dsn » Tue Apr 29, 2014 10:19 am

Hi,

I've been unable to use the TExtraLegendTool recently, regardless of the legend options, the extra legend does not show anywhere on the chart.
After a while, i've realised that the TeeChart Pro demo 2014 exhibits the same behavior.
I might be mistaken, but it looks like a regression no ?
See attached screenshots.
Don't hesitate to contact me for further information,

(Note : i've source code access, if the fix is simple enough, i'll be really interested in a patch to fix this)
Thanks in advance for your help,

Regards,
Attachments
extra_legend_2014.png
current behavior
extra_legend_2014.png (165.73 KiB) Viewed 17967 times
extra_legend_2010.jpg
Expected behavior
extra_legend_2010.jpg (299.71 KiB) Viewed 17885 times

dsn
Newbie
Newbie
Posts: 4
Joined: Wed Apr 03, 2013 12:00 am

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by dsn » Tue Apr 29, 2014 11:40 am

I forget to mention the version i'm using : TeeChart pro v2014.10.140220.
Thanks in advance,
Regards,

dsn
Newbie
Newbie
Posts: 4
Joined: Wed Apr 03, 2013 12:00 am

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by dsn » Tue Apr 29, 2014 12:26 pm

multiple_legend_2014.jpg
current behavior
multiple_legend_2014.jpg (273.08 KiB) Viewed 17851 times
multiple_legend_2010.jpg
expected behavior
multiple_legend_2010.jpg (233.92 KiB) Viewed 17838 times
On a side (and probably unrelated note), there seems to be a slight glitch in the legend-canvas drawing stuff
in the latest demo of Multiple Legend in the demo of Tee9New_win32.exe
(GDI+ selection/deselection does not impact the resulting output)

Bottom line is, getting multiple legend is a tricky business in version 2014.10.140220 (VCL)
Thanks in advance for your help,

Regards,

Yeray
Site Admin
Site Admin
Posts: 9532
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by Yeray » Wed Apr 30, 2014 10:19 am

Hello,
dsn wrote:I've been unable to use the TExtraLegendTool recently, regardless of the legend options, the extra legend does not show anywhere on the chart.
After a while, i've realised that the TeeChart Pro demo 2014 exhibits the same behavior.
I might be mistaken, but it looks like a regression no ?
I've reproduced the problem so I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=755
Feel free to add your mail to the ticket CC list to be automatically notified when an update on it arrives.
dsn wrote:On a side (and probably unrelated note), there seems to be a slight glitch in the legend-canvas drawing stuff
in the latest demo of Multiple Legend in the demo of Tee9New_win32.exe
(GDI+ selection/deselection does not impact the resulting output)
I've also reproduced this and added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=756
dsn wrote:Bottom line is, getting multiple legend is a tricky business in version 2014.10.140220 (VCL)
As you'll see, I've found a possible fix for the second. Feel free to implement the change in your sources.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Bert B.
Newbie
Newbie
Posts: 8
Joined: Wed Mar 02, 2011 12:00 am

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by Bert B. » Wed Apr 29, 2015 2:42 pm

This hasn't been fixed already?
Please note that this issue is exactly 1 year old, which is unacceptable in my opinion.

Yeray
Site Admin
Site Admin
Posts: 9532
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by Yeray » Thu May 07, 2015 2:34 pm

Hello Bert,

Excuse us for the delayed reply here.
We closed both tickets as "fixed" a week ago:
http://bugs.teechart.net/show_bug.cgi?id=755
http://bugs.teechart.net/show_bug.cgi?id=756

Since you own the sources, you can apply the changes to them and recompile them.
The change is quite simple actually:

- At Chart.pas, move CalcRect from the private section on TCustomChartLegend class to the protected section.
- At TeeExtraLegendTool.pas, call TLegendAccess(Legend).CalcRect before Legend.DrawLegend:

Code: Select all

procedure TExtraLegendTool.ChartEvent(AEvent: TChartToolEvent);
begin
  inherited;
  if (AEvent=cteAfterDraw) then
  begin
    if Assigned(ParentChart) and Assigned(Series) then
    begin
      Legend.Series:=Series; // call getter
      if Legend.Visible then
      begin
        TLegendAccess(Legend).CalcRect;
        Legend.DrawLegend;
      end;
    end;
  end;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Bert B.
Newbie
Newbie
Posts: 8
Joined: Wed Mar 02, 2011 12:00 am

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by Bert B. » Fri May 08, 2015 8:20 am

Hello Yeray,

The fix works fine, thanks.
I am still using version 2014.12.140923 and had to change the TCustomChartLegend class. This class has been renamed since then?

Bert

Yeray
Site Admin
Site Admin
Posts: 9532
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by Yeray » Fri May 08, 2015 3:13 pm

Hi Bert,
Bert B. wrote:I am still using version 2014.12.140923 and had to change the TCustomChartLegend class. This class has been renamed since then?
TCustomChartLegend class is defined in Chart.pas unit in the actual sources and also in v2014.12. I'm not sure to understand your doubt.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Bert B.
Newbie
Newbie
Posts: 8
Joined: Wed Mar 02, 2011 12:00 am

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by Bert B. » Mon May 11, 2015 6:37 am

Hello Yeray,

You wrote about a change in the TCustomLegend class but I had to change the TCustomChartLegend class.

Bert

Yeray
Site Admin
Site Admin
Posts: 9532
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by Yeray » Mon May 11, 2015 7:51 am

Hi Bert,
Bert B. wrote: You wrote about a change in the TCustomLegend class but I had to change the TCustomChartLegend class.
I'm sorry, I missed the "Chart" part in the TCustomChartLegend.
I'll edit the post above to correct it.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

cvita
Newbie
Newbie
Posts: 2
Joined: Fri Jun 26, 2015 12:00 am
Contact:

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by cvita » Mon Jun 29, 2015 3:00 pm

We do suffer from this issue, too. We need to create a Chart showing a CustomLegend which diesn't show. Unfortunately we do not have the sources.
So my question: when this issue will be fixed for public?
Thanks in advance!
Klaus

Yeray
Site Admin
Site Admin
Posts: 9532
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by Yeray » Tue Jun 30, 2015 8:17 am

Hi Klaus,
cvita wrote:when this issue will be fixed for public?
The next maintenance release should include these fixes. However, I'm afraid I can't tell you when the it will be published.
We'll prepare a test installer and we'll send you a mail with the link to it asap.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Yeray
Site Admin
Site Admin
Posts: 9532
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by Yeray » Tue Jun 30, 2015 8:38 am

Hi Klaus,
Yeray wrote:We'll prepare a test installer and we'll send you a mail with the link to it asap.
Could you please tell us what IDE are you interested in?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

cvita
Newbie
Newbie
Posts: 2
Joined: Fri Jun 26, 2015 12:00 am
Contact:

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by cvita » Tue Jun 30, 2015 9:37 am

Hello Yeray!
It would be really great to have this fix ASAP. Thanks for the offer!
We use currently Delphi XE5.
Regards and thanks again,
Klaus

Yeray
Site Admin
Site Admin
Posts: 9532
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Tools / TExtraLegendTool broken in TeeChart pro v2014

Post by Yeray » Tue Jun 30, 2015 10:39 am

Hi Klaus,

I've just sent it to the mail account you have registered in this forum.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply