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 743

Summary: A 2D Chart with Axes.Bottom.Axis.Width=0 and Frame.Visible=False seems to calculate a ChartRect one pixel too large in height, only in GDI+
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: ChartAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: enhancement    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=3&t=14874
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: chart rect too large

Description yeray alonso 2014-04-24 11:17:11 EDT
Created attachment 188 [details]
chart rect too large

A 2D Chart with Axes.Bottom.Axis.Width=0 and Frame.Visible=False seems to calculate a ChartRect one pixel too large in height, only in GDI+

Here the code to reproduce it:

uses Series, TeCanvas;

var Chart1: TChart;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1:=TChart.Create(Self);
  Chart1.Parent:=Self;
  Chart1.Align:=alClient;
  Chart1.ColorPaletteIndex:=13;

  with Chart1 do
  begin
    View3D:=False;
    Axes.Bottom.Axis.Width:=0;
    Frame.Visible:=False;

    with AddSeries(TBarSeries) as TBarSeries do
    begin
      FillSampleValues;
      BarPen.Visible:=False;
    end;

    OnAfterDraw:=ChartAfterDraw;
  end;
end;

procedure TForm1.ChartAfterDraw(Sender: TObject);
begin
  with Chart1.Canvas do
  begin
    Brush.Style:=bsClear;
    Pen.Style:=psSolid;
    Pen.Color:=clRed;
    with Chart1.ChartRect do
      Rectangle(Rect(Left, Top, Right-((Right-Left)div 2), Bottom));
  end;
end;

See the images attached.
It didn't happen in v2013.08 and below.