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 1625

Summary: Scrolling GradientRelative=false Area chart produces erroneous gradient
Product: .NET TeeChart Reporter: christopher ireland <chris>
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: normal    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description christopher ireland 2016-09-08 05:11:36 EDT
Code to reproduce (scroll the chart upwards):

    Random random = new Random();
    private void InitializeChart()
    {
      tChart1.CurrentTheme = ThemeType.Opera;
      tChart1.Aspect.View3D = false;

      Area area = new Area();
      area.Color = Color.GreenYellow;
      area.AreaBrush.Gradient.StartColor = Color.GreenYellow;
      area.AreaBrush.Gradient.MiddleColor = Color.BlueViolet;
      area.AreaBrush.Gradient.EndColor = Color.Crimson;
      area.AreaBrush.Gradient.UseMiddle = true;
      area.AreaBrush.Gradient.Visible = true;
      area.AreaBrush.Gradient.Transparency = 20;
      area.GradientRelative = false;
      area.LinePen.Visible = false;
      area.AreaLines.Visible = false;
      //area.Origin = 0;
      //area.UseOrigin = true;

      var x = 0d;
      for (int i = 0; i <= 30; i++)
      {
        x = random.NextDouble() * 10 + x;
        double y = random.NextDouble();
        bool flag = random.NextDouble() < 0.5;
        y = flag ? y : y * -1;
        area.Add(x, y);
      }

      tChart1.Series.Add(area);
    }