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 - Series.Transparency returns value as 100 when null values are added
Summary: Series.Transparency returns value as 100 when null values are added
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: TeeChart for .Net 4.1.2016.05125
Hardware: PC Windows
: --- critical
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-01 01:34 EDT by Sunil Ramesh
Modified: 2018-04-23 10:14 EDT (History)
1 user (show)

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


Attachments
sample to simulate this issue (44.03 KB, application/x-zip-compressed)
2017-09-06 01:21 EDT, Sunil Ramesh
Details

Note You need to log in before you can comment on or make changes to this bug.
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".