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 1322

Summary: Legend CheckBox Click toggles wrong serie
Product: VCL TeeChart Reporter: Bert Kreisel <bert.kreisel>
Component: LegendAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: normal CC: sandra, yeray
Priority: Normal    
Version: unspecified   
Target Milestone: v2016.19   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version: RAD XE5

Description Bert Kreisel 2015-09-25 04:42:22 EDT
1. Add 7 series at least
2. Set title of first series to 'Series1WithMuchLongerTitle'
3. Use Legend CheckBoxes
4. Legend Position = Bottom, Legend HorizJustify=ljNo
5. Resize Chart width so the legend has only one line
6. Try to toggle the second series clicking the checkbox!

You see the third series is toggling!
Comment 1 sandra pazos 2015-09-29 08:27:32 EDT
Hello Bert,

I can't reproduce the problem using the latest TeeChart Pro VCL/FMX 2015 build version, 2015.16.150901. Could you update your version and tell us if it works in your end? 

Thanks in advance,
regards.
Comment 2 Bert Kreisel 2015-09-29 08:40:00 EDT
Hello Sandra,

I'm using TeeChartVCLSOURCE-2015.16.exe. It's not working here. I can't find the latest Version in the ComboBox here in Bugzilla therefore I took 150420 (now unspecified).

Thanks in advance,
regards.
Comment 3 sandra pazos 2015-09-29 11:30:53 EDT
Hello Bert,
Sorry, I have forgotten set HorizJustify to No, for this reason I haven't reproduced the problem. Therefore, the problem only appears when the HorizJustify is set to No. 

Thanks.
Comment 4 sandra pazos 2016-02-02 05:56:44 EST
Update information. 
The problem is reproducible too when is using different title size in ljAutomatic or ljYes and the legend has only one row. The code below shows the problem:
uses Series;
var Series1,Series2,Series3,Series4,Series5, Series6:TLineSeries;
procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D := false;

  Series1 := TLineSeries.Create(Self);
  Series2 := TLineSeries.Create(Self);
  Series3 := TLineSeries.Create(Self);
  Series4 := TLineSeries.Create(Self);
  Series5 := TLineSeries.Create(Self);
  Series6 := TLineSeries.Create(Self);

  Chart1.AddSeries(Series1);
  Chart1.AddSeries(Series2);
  Chart1.AddSeries(Series3);
  Chart1.AddSeries(Series4);
  Chart1.AddSeries(Series5);
  Chart1.AddSeries(Series6);

  Series1.FillSampleValues(10);
  Series2.FillSampleValues(10);
  Series3.FillSampleValues(10);
  Series4.FillSampleValues(10);
  Series5.FillSampleValues(10);
  Series6.FillSampleValues(10);


  Series1.Title:= '1(rot)';
  Series2.Title := '2 (grün)';
  Series3.Title := '3(blau)';
  Series4.Title := '4(gello)';
  Series5.Title := 'OGGO,GU';
  Series6.Title := 'Fehlerflächen';

  Series1.Pointer.Style := psStar;
  Series2.Pointer.Style := psStar;
  Series3.Pointer.Style := psStar;
  Series4.Pointer.Style :=psStar;


  Series1.Pointer.Color := clWhite;
  Series2.Pointer.Color := clWhite;
  Series3.Pointer.Color := clWhite;
  Series4.Pointer.Color := clWhite;

  Series1.Pointer.Visible := true;
  Series2.Pointer.Visible := true;
  Series3.Pointer.Visible := true;
  Series4.Pointer.Visible := true;

  Chart1.Legend.Alignment := laBottom;
  Chart1.Legend.CheckBoxes := true;
  Chart1.Legend.HorizJustify :=ljAutomatic;
  Chart1.Legend.MaxNumRows :=1;
end;
Comment 5 Bert Kreisel 2016-06-03 06:52:02 EDT
works in 2016.18