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 934 - Area series Legend symbol not following point color
Summary: Area series Legend symbol not following point color
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks: 1060
  Show dependency treegraph
 
Reported: 2014-09-25 03:57 EDT by christopher ireland
Modified: 2014-12-24 04:57 EST (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description christopher ireland 2014-09-25 03:57:51 EDT
Problem can be seen in the following code:

    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;

      Area area = new Area(tChart1.Chart);

      area.Add(1, 5, Color.Red);
      area.Add(2, 1, Color.Blue);
      area.Add(3, 4, Color.Yellow);
      area.Add(4, 2, Color.Green);

      area.Stairs = true;
    }

Workaround is to override PrepareLegendCanvas, where the problem lies, e.g.

  public class MyArea : Area
  {
    public MyArea(Chart c) : base(c) { }

    protected override void PrepareLegendCanvas(Graphics3D g, int valueIndex, ref Color backColor, ref ChartBrush aBrush)
    {
    }
  }