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 2471

Summary: Legend.ResizeChart not rendering Legend when Legend.CustomPosition is false
Product: .NET TeeChart Reporter: christopher ireland <chris>
Component: LegendAssignee: 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 2021-10-21 02:30:53 EDT
To reproduce this problem, use code such as this:

  public partial class Form1 : Form
  {
    public Form1()
    {
      InitializeComponent();
      InitalizeChart(tChart1);
    }

    private void InitalizeChart(TChart chart)
    {
      chart.Series.Add(typeof(Bar)).FillSampleValues();
    }

    private void custom_checkbox_CheckedChanged(object sender, EventArgs e)
    {
      tChart1.Legend.CustomPosition = custom_checkbox.Checked;
    }

    private void resize_checkbox_CheckedChanged(object sender, EventArgs e)
    {
      tChart1.Legend.ResizeChart = resize_checkbox.Checked;
    }
  }
}

When the CustomPosition is set to true and then back to false, setting ResizeChart to true does not render the Legend. This behavior can be seen in this screenvideo:
http://steema.com/files/public/support/simplescreenrecorder-2021-10-21_08.20.25.mp4