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 75 - AxisBreakTool Editor add incorrectly the breaks
Summary: AxisBreakTool Editor add incorrectly the breaks
Status: CONFIRMED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Editors (show other bugs)
Version: TeeChart for .NET 4.1.2013.07300
Hardware: PC Windows
: --- major
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-06 08:55 EST by sandra pazos
Modified: 2013-11-14 07:50 EST (History)
1 user (show)

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 sandra pazos 2013-11-06 08:55:20 EST
When you work with editor in design-time and you add a new AxesBreaksTool with its breaks, appears a NullReferenceException in the AxisBreak class. I have made many test and I think the problem is caused by the order that Editor added the default  properties and the new AxisBreak tool is created to assign an existent Axisbreak tool in the code. 
To reproduce the problem exactly, see next piece of code:

Code is added for AxisBreak editor:

 // axisBreaksTool1
      //
      this.axisBreaksTool1.Axis = this.tChart1.Axes.Bottom;
      axisBreak1.EndValue = 0D;
      axisBreak1.StartValue = 0D;
      new Steema.TeeChart.Tools.AxisBreaks().Add(axisBreak1);
      //


Previous code causes the NullReferenceException.

On the other hand, I have made modifications in the code and the NullReferenceExeception disappears: 

      this.axisBreaksTool1.Axis = this.tChart1.Axes.Bottom;
      this.axisBreaksTool1.Breaks.Add(axisBreak1);
      axisBreak1.EndValue = 0D;
      axisBreak1.StartValue = 0D;

My opinion is that the Editor should assign the break to the existing AxisBreakTool and respects the order tools is created and assigned.
Comment 1 christopher ireland 2013-11-14 07:50:54 EST
Editor problem, not tool problem.