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 2452

Summary: Area gradient is not drawn correctly
Product: .NET TeeChart Reporter: Brian Kohrs <bkohrs>
Component: .NET 5.0Assignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: major CC: chris
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: example of incorrect drawing of the gradient

Description Brian Kohrs 2021-07-12 15:09:02 EDT
Created attachment 973 [details]
example of incorrect drawing of the gradient

If you set an area series to have a gradient, it does not draw it correctly.

Using a .NET 5 console application with the latest Steema.TeeChart.NET NuGet package (4.2021.6.23), the following code will demonstrate the issue. Regardless of what you set the gradient settings, it always draws the same. What it draws does not seem to match any of the available options.

            var chart = new TChart();
            var area = new CustomArea();
            area.Add(1, 1);
            area.Add(2, 2);
            area.Add(3, 5);
            area.AreaBrush.Gradient.Visible = true;
            area.AreaBrush.Gradient.Direction = LinearGradientMode.Vertical;
            chart.Series.Add(area);
            chart.Export.Image.PNG.Width = 800;
            chart.Export.Image.PNG.Height = 600;
            chart.Export.Image.PNG.Save("test.png");

I've attached an example image of what I get when executing this code.