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 45

Summary: AreaLines Pen always visible
Product: .NET TeeChart Reporter: marc meumann <marc>
Component: ChartAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED WONTFIX    
Severity: minor CC: chris
Priority: ---    
Version: TeeChart for .NET 4.1.2013.07300   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description marc meumann 2013-10-22 05:23:30 EDT
Add AreaSeries to Chart, set transparency to (eg.) 70% and then set AreaLines visible false. The AreaLines continue to plot. They can be hidden if you set the AreaLines pen transparency to 100%, but simple use of the 'Visible' property should be suffcient to control that.
Comment 1 christopher ireland 2014-01-14 10:20:44 EST
This seems to be an issue with the C# GDI version and rounding. The following code reproduces the problem:

    private void InitializeChart()
    {
      tChart1.Legend.Visible = false;
      tChart1.Axes.Visible = false;
      tChart1.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
      tChart1.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
      tChart1.Walls.Visible = false;

      tChart1.AfterDraw +=tChart1_AfterDraw;

      tChart1.Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; //makes little difference

    }

    void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
    {
      Color color = Color.FromArgb(100, Color.LightBlue);
      Rectangle rect1 = Utils.FromLTRB(100, 100, 300, 300);
      Rectangle rect2 = Utils.FromLTRB(300, 100, 500, 300);

      g.Brush.Color = color;
      g.Pen.Visible = false;

      //rect1.Width -= 1; //try modifying this value

      g.Plane(rect1.Location, new Point(rect1.Right, rect1.Top), new Point(rect1.Right, rect1.Bottom), new Point(rect1.Left, rect1.Bottom), 0);
      g.Plane(rect2.Location, new Point(rect2.Right, rect2.Top), new Point(rect2.Right, rect2.Bottom), new Point(rect2.Left, rect2.Bottom), 0);

      //g.Rectangle(rect1); //with rectangles the problem is not so obvious
      //g.Rectangle(rect2);
    }

The equivalent code in WPF paints correctly:

    private void InitializeChart()
    {
      tChart1.Legend.Visible = false;
      tChart1.Axes.Visible = false;
      tChart1.Panel.Bevel.Inner = Steema.TeeChart.WPF.Drawing.BevelStyles.None;
      tChart1.Panel.Bevel.Outer = Steema.TeeChart.WPF.Drawing.BevelStyles.None;
      tChart1.Walls.Visible = false;

      tChart1.AfterDraw += tChart1_AfterDraw;
    }

    void tChart1_AfterDraw(object sender, Steema.TeeChart.WPF.Drawing.Graphics3D g)
    {
      Color color = Color.FromArgb(100, Colors.LightBlue.R, Colors.LightBlue.G, Colors.LightBlue.B);
      Rect rect1 = Utils.FromLTRB(100, 100, 300, 300);
      Rect rect2 = Utils.FromLTRB(300, 100, 500, 300);

      g.Brush.Color = color;
      g.Pen.Visible = false;

      //rect1.Width -= 1; //try modifying this value

      g.Plane(rect1.Location, new Point(rect1.Right, rect1.Top), new Point(rect1.Right, rect1.Bottom), new Point(rect1.Left, rect1.Bottom), 0);
      g.Plane(rect2.Location, new Point(rect2.Right, rect2.Top), new Point(rect2.Right, rect2.Bottom), new Point(rect2.Left, rect2.Bottom), 0);

      //g.Rectangle(rect1); //with rectangles the problem is not so obvious
      //g.Rectangle(rect2);
    }