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 1923

Summary: call to TChart.Draw() throws unhandled exception when axis label shapes are visible
Product: .NET TeeChart Reporter: christopher ireland <chris>
Component: AxesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description christopher ireland 2017-09-25 07:01:46 EDT
System.NullReferenceException thrown with the following code:

    private void InitializeChart()
    {
      Bar series = new Bar(tChart1.Chart);
      tChart1.Legend.Visible = false;

      for (int i = 0; i < 3; i++)
      {
        if(i == 2)
          series.Add(i, "Quite Long Category threethreethree");
        else 
          series.Add(i, "Quite Long Category " + i.ToString());
      }

      int degrees = 10;
      tChart1.Axes.Bottom.Labels.Angle = degrees;
      tChart1.Axes.Bottom.Title.Text = $"X-Axis labels with Angle of {degrees} degrees";

      tChart1.Axes.Bottom.Labels.Transparent = false;

      tChart1.Draw();
    }