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 603

Summary: OnGetAxisLabel even handler causes wrong height of horizontal axis title
Product: VCL TeeChart Reporter: trubetskov
Component: AxisAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: blocker CC: david, sandra
Priority: ---    
Version: 140220   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: Delphi XE project demonstrating this problem. See comments in the code and Chart_bug1.png

Description trubetskov 2014-02-26 04:23:26 EST
Created attachment 101 [details]
Delphi XE project demonstrating this problem. See comments in the code and Chart_bug1.png

OnGetAxisLabel even handler causes wrong height of horizontal axis title - there is an obvious problem in a new code in the TChartAxis.InternalCalcSize function.

I attached an example reproducing this problem. If you remove empty even handler - plotting reverts to normal.
Comment 1 david berneda 2014-02-28 06:36:58 EST
Fixed. There was an oversight, sorry. 
New code at InternalCalcSize should be:

    if Assigned(ParentChart.FOnGetAxisLabel) then
       tmpHeight:=Horizontal  // <---- FIXED BUG 
    else
       tmpHeight:=( Horizontal and ((tmpAngle=0) or (tmpAngle=180))) or
                  ( (not Horizontal) and ((tmpAngle=90) or (tmpAngle=270)));