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 1912

Summary: Series.Transparency returns value as 100 when null values are added
Product: .NET TeeChart Reporter: Sunil Ramesh <sunil.ramesh>
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: critical CC: chris
Priority: ---    
Version: TeeChart for .Net 4.1.2016.05125   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: sample to simulate this issue

Description Sunil Ramesh 2017-09-01 01:34:44 EDT

    
Comment 1 Sunil Ramesh 2017-09-01 01:37:41 EDT
It is actually about the Transparency property returning 0 when called first time and 100 when called second time and there after. The same happens to many chart types and elements that have Transparency property.

Note: this happens only when null values exist.

Run the below snippet and see the value of the 2nd message box.

         Donut donut = new Donut();
         tChart1.Series.Add(donut);
         donut.Add(2d);
         donut.Add(3d);
         donut.Add(new double?());        //add null

         //check the transparency value, first time, it will be 0
         MessageBox.Show(string.Format("Transparency is correct: {0}", donut.Transparency));

         //check the transparency value again, it will be now 100
         MessageBox.Show(string.Format("Transparency is wrong: {0}", donut.Transparency));
Comment 2 Sunil Ramesh 2017-09-01 01:39:23 EDT
It is actually about the Transparency property returning 0 when called first time and 100 when called second time and there after. The same happens to many chart types and elements that have Transparency property.

Note: this happens only when null values exist.

Run the below snippet and see the value of the 2nd message box.

         Donut donut = new Donut();
         tChart1.Series.Add(donut);
         donut.Add(2d);
         donut.Add(3d);
         donut.Add(new double?());        //add null

         //check the transparency value, first time, it will be 0
         MessageBox.Show(string.Format("Transparency is correct: {0}", donut.Transparency));

         //check the transparency value again, it will be now 100
         MessageBox.Show(string.Format("Transparency is wrong: {0}", donut.Transparency));
Comment 3 christopher ireland 2017-09-05 06:12:37 EDT
The transparency property returns 0 on both calls when using the latest version of TeeChart.dll. Which version are you using?
Comment 4 Sunil Ramesh 2017-09-06 01:21:11 EDT
Created attachment 779 [details]
sample to simulate this issue

I m using v4.1.2017.2143.

And yes, I have just noticied that it only happens when we open message boxes or other dialogs. 

You need to test the same snippet inclduing the message boxes, only then you can simulate. I have attached a sample "Ide.Zip".