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 1288 - SubAxes only position correctly after mousemove across chart
Summary: SubAxes only position correctly after mousemove across chart
Status: RESOLVED NOTABUG
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: unspecified
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-03 07:46 EDT by christopher ireland
Modified: 2016-10-17 11:06 EDT (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 christopher ireland 2015-09-03 07:46:25 EDT
Reproducible using the following code:

procedure TForm1.InitializeChart;
var tmpS : TBarSeries;
    subA : TChartAxis;
begin
   Chart1.View3D:=false;

   tmpS := TBarSeries(Chart1.AddSeries(TBarSeries));
   tmpS.FillSampleValues();


   subA:=Chart1.Axes.Left.SubAxes.Add;
   subA.Increment:=500/3;
end;
Comment 1 marc meumann 2016-10-17 11:06:06 EDT
Axis can only calculate location with respect to Label text width (or height) after the paint has cycled once. For sub Axes we recommend taking the size from the parent axis.

eg.

procedure TForm1.InitializeChart;
var tmpS : TBarSeries;
    subA : TChartAxis;
begin
   Chart1.View3D:=false;

   tmpS := TBarSeries(Chart1.AddSeries(TBarSeries));
   tmpS.FillSampleValues();


   subA:=Chart1.Axes.Left.SubAxes.Add;
   subA.Increment:=500/3;

   subA.LabelsSize := Chart1.Axes.Left.MaxLabelsWidth;  //<- here
end;