Defect TV52012275 in 8.02 - fix proposal

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Miket
Newbie
Newbie
Posts: 23
Joined: Thu Apr 15, 2004 4:00 am
Location: Russia, Moscow
Contact:

Defect TV52012275 in 8.02 - fix proposal

Post by Miket » Thu Nov 22, 2007 9:46 am

First of all, I need to confirm that the defect TV52012275 still exists in the version 8.02. This is connected with MinimumRound and MaximumRound properties and the way how Axis rectange is calculated (see CalcRoundScales function). You may be interested to read my posts in the private beta test group and my post dated Jul 02, 2007 in this forum.

Today I found rather simple solution to resolve this issue without modifying Steema code. It may be useful for many customers of TeeChart.

In order to solve weird rescaling problem with MinimumRound and MaximumRound override DoOnBeforeDrawChart in your inherited class (or use OnBeforeFrawChart event handler):

Code: Select all

procedure TMyChart.DoOnBeforeDrawChart;
  var
    i: Integer;
begin
  inherited;
  for i:=0 to Pred(Axes.Count) do
    Axes[i].IAxisSize := 0;
end;


The idea behind this code is simple. With zero IAxisSize function CalcRoundScales will not recalculate IMinimum and IMaximum values twice in repeated paint events, thus scaling will be consistent. It is especially important with charts with alClient alignment, when any resize of parent form causes repaint of the chart.

Regards,
Michael

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 22, 2007 10:39 am

Hi Michael,

Thanks for the information. As you said, this may be helpful to other TeeChart users even it's a workaround for certain circumstances.

TV52012275 is still present in v8.02.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply