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 - Area gradient is not drawn correctly
Summary: Area gradient is not drawn correctly
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: .NET 5.0 (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- major
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-12 15:09 EDT by Brian Kohrs
Modified: 2021-07-21 09:31 EDT (History)
1 user (show)

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


Attachments
example of incorrect drawing of the gradient (65.13 KB, image/png)
2021-07-12 15:09 EDT, Brian Kohrs
Details

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