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 1172

Summary: Setting Series Visible to false raises exception
Product: VCL TeeChart Reporter: Lee M <lee>
Component: ChartAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: blocker CC: david, sandra
Priority: ---    
Version: 150120   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: Project Test
Click the button on the main form and trace the code

Description Lee M 2015-03-13 11:09:27 EDT
Using Delphi XE7 using build January 23, 2015.

I have unit that I have been using for many years. With this latest build, it raises an exception.

On the form I have a TChart and the following series:
    PieSeries1: TPieSeries;
    Series1: TPointSeries;
    Series2: TLineSeries;
    Series3: TBarSeries;
    Series4: TBarSeries;
    Series5: TBarSeries;
    Series6: TBarSeries;
    Series7: TBarSeries;

I have a routine that displays what series I want displayed by setting the visible property:

procedure TfmGraphs.SetupSeries(Const idx : integer);
begin
  Case idx of
    0  : begin//Displays Pie Graph
           Series1.Visible := false;
           Series2.Visible := false;
           Series3.Visible := false;
           Series4.Visible := false;
           Series5.Visible := false;
           Series6.Visible := false;
           Series7.Visible := false;
         end;
    1  : begin//Displays Series Graph
           Series1.Visible    := true;
           Series2.Visible    := true;
           PieSeries1.Visible := false;
           Series3.Visible := false;
           Series4.Visible := false;
           Series5.Visible := false;
           Series6.Visible := false;
           Series7.Visible := false;
         end;
    2  : begin//Displays 1 Bar Graph
           PieSeries1.Visible := false;
           Series1.Visible := false;
           Series2.Visible := false;
           Series4.Visible := false;
           Series5.Visible := false;
           Series6.Visible := false;
           Series7.Visible := false;
         end;
    3  : begin//Displays 5 series of bar graphs
           PieSeries1.Visible := false;
           Series1.Visible := false;
           Series2.Visible := false;
         end;  
  end;
end;

When I call SetupSeries(1) and then fmGraphs.ShowModal it raises an exception.

Thank you,
Lee
Comment 1 sandra pazos 2015-03-17 07:05:54 EDT
Hello Lee, 

Using attached project the problem you are experiencing doesn't occurs. 
Could you tell us if my project works for you? If it works in your end, please attach a simple project where we can reproduce the problem you are experiencing. 

Thanks,
Comment 2 sandra pazos 2015-03-17 07:17:28 EDT
Created attachment 420 [details]
Project Test
Comment 3 Lee M 2015-04-01 10:58:25 EDT
Created attachment 422 [details]
Click the button on the main form and trace the code

There is too a bug.
 
When I run this test project using TeeChart 2014 for Delphi XE7 it runs fine.
 
When I run it using using TeeChart 2015 for Delphi XE7 there is an exception raise.
 
Simply click the button on the main form and trace the code.
 
You will need to change the path where the files are stored in the Project.
 
Lee
Comment 4 sandra pazos 2015-04-13 10:07:22 EDT
Hello Lee, 

Thanks for the project. The problem only occurs if you add the Series in designtime, if you add the Series by code the exception disappears. 

Thanks in advance,
regards.
Comment 5 david berneda 2015-05-11 05:34:41 EDT
Cannot reproduce the problem with latest TeeChart version.