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 385

Summary: [TF02013158] I found an issue with the scaling of the canvas/axis, when there is e...
Product: .NET TeeChart Reporter: narcís calvet <narcis>
Component: AxesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: major    
Priority: Normal    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description narcís calvet 2013-11-20 11:26:50 EST
I found an issue with the scaling of the canvas/axis, when there is e.g. only one range one of the vertical axes.

The issue if very easy to reproduce. Just create a form with a 2D chart and a fastline. Then insert the following code:

 public Form1()
 {
 InitializeComponent();
 InitializeChart();
 }

 private void InitializeChart()
 {
 tChart1.Aspect.View3D = false;
 Steema.TeeChart.Styles.FastLine fastLine1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);

 fastLine1.Add(new double[] { 0, 1 }, new double[] { 5.540968906854, 5.540968906854 });

 //Workaround
 //tChart1.Axes.Left.Labels.CustomSize = 40;

 //This works
 //fastLine1.Add(new double[] { 0, 1, 2 }, new double[] { 5.540968906854, 5.540968906854, 6.540968906854 });

 tChart1.Axes.Left.Title.Text = "hello!";
 }


You will see that the number is not fully visible:

See dim1.jpg


It gets worse when you set a title for the left axis:

See dim2.jpg


This is also the case for the right axis:

See dim3.jpg

If the range consists of 2 different numbers, everything works fine:


See dim4.jpg

So apparently, the size that is needed for the axis, is not calculated properly when there is only one number for the range. I did not dig into the code to see where this happens, so cannot give a pointer where to look in the code.
I did not investigate further if there are other situations where you can see it (e.g. for bottom axis etc).
Attached a document witht more info on the issue.
This also happens in the VCL version. [created:2008-06-23T15:29:54.000+01:00 reported by:narcis@steema.com reported in version:Build 3.5.3065.19160 (TeeChart for .NET)]
Comment 1 christopher ireland 2013-12-02 10:44:37 EST
This occurs because RoundFirstLabel is default true and there is only one label - ergo, it is rounded.

Fixed in code for this special case (axis minimum = axis maximum).