Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 756 - Multiple Legends demo doesn't work well from v2014.10
Summary: Multiple Legends demo doesn't work well from v2014.10
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Legend (show other bugs)
Version: 140220
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-30 06:15 EDT by yeray alonso
Modified: 2015-04-30 09:24 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2014-04-30 06:15:59 EDT
Lots of changes were made in the Legend drawing between v2013.09 and v2014.10.
These changes make the example at "All features\Welcome\Miscellaneous\Legend\Multiple Legends" in the features demo to draw a strange Legend Rectangle for the second legend. See the image the customer attached in the forums.

I've seen this is because the ShapeBounds needs to be recalculated after assigning a new Series to the legend.

This could be related to http://bugs.teechart.net/show_bug.cgi?id=755
Comment 1 yeray alonso 2014-04-30 06:17:49 EDT
Can be fixed making TCustomChartLegend.CalcRect public and calling it in the AfterDraw event in the demo, after assigning Series2 and before DrawLegend:

  if CheckBox1.Checked then
  With Chart1.Legend do
  begin
    Top:=125;
    Series:=Series2;
    CalcRect;
    DrawLegend;
    CustomPosition:=False;
    Series:=Series1;
  end;