mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-01 19:03:40 +02:00
TAChart: Series clipping bugfixes and partially implement TSeriesPointer from Luis Rodrigues (issue #8706)
git-svn-id: trunk@10959 -
This commit is contained in:
parent
6b97b84226
commit
9e0cbc1e29
@ -43,7 +43,7 @@ Installation
|
||||
|
||||
Changes
|
||||
-------
|
||||
|
||||
* 17/04/2007 - Series clipping bugfixes and partially implement TSeriesPointer
|
||||
* 12/03/2007 - Bugfixes and implement ShowInLegend
|
||||
* 01/01/2007 - Initial Release
|
||||
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
||||
TAGraph, TASeries, Buttons, StdCtrls;
|
||||
TAGraph, TASeries, Buttons, StdCtrls, TAEngine;
|
||||
|
||||
type
|
||||
|
||||
@ -83,7 +83,7 @@ begin
|
||||
Chart1.AddSerie(p);
|
||||
p.title := 'pie';
|
||||
p.SeriesColor := clRed;
|
||||
p.MarksStyle := taseries.smsLabelPercent;
|
||||
p.MarksStyle := taengine.smsLabelPercent;
|
||||
|
||||
end;
|
||||
|
||||
@ -92,7 +92,7 @@ begin
|
||||
d:= TSerie.Create(Chart1);
|
||||
d.ShowLines := true;
|
||||
d.ShowPoints := true;
|
||||
d.PointStyle := taseries.psRectangle;
|
||||
d.Pointer.Style := psRectangle;
|
||||
d.title := 'line';
|
||||
d.SeriesColor := clRed;
|
||||
Chart1.AddSerie(d);
|
||||
|
@ -76,7 +76,7 @@ type
|
||||
procedure Assign(Source:TPersistent); override;
|
||||
published
|
||||
property Visible: boolean read FVisible write SetVisible;
|
||||
property OnChange: TNotifyEvent read FChanged write FChanged;
|
||||
property OnChange: TNotifyEvent read FChanged write FChanged;
|
||||
end;
|
||||
|
||||
TLegendAlignment=(laLeft,laRight,laTop,laBottom);
|
||||
@ -1384,7 +1384,7 @@ end;
|
||||
|
||||
|
||||
Series.Add(Serie);
|
||||
TChartSeries(Serie).Chart := Self;
|
||||
TChartSeries(Serie).ParentChart := Self;
|
||||
end;
|
||||
|
||||
//procedure TChart.DeleteSerie(Serie:TSerie);
|
||||
@ -1556,6 +1556,7 @@ Clean;
|
||||
DrawAxis;
|
||||
DisplaySeries;
|
||||
DrawTitleFoot;
|
||||
|
||||
if FLegend.Visible then DrawLegend;
|
||||
|
||||
if FShowVerticalReticule then
|
||||
@ -1600,7 +1601,19 @@ procedure TChart.DisplaySeries;
|
||||
var
|
||||
i:Integer;
|
||||
Serie:TChartSeries;
|
||||
Rgn : HRGN;
|
||||
p: array[0..1] of TPoint;
|
||||
begin
|
||||
//set cliping region
|
||||
p[0].x := XImageMin;
|
||||
p[0].y := YImageMax;
|
||||
p[1].x := XImageMax;
|
||||
p[1].y := YImageMin;
|
||||
// LPtoDP(Canvas.Handle, p, 2);
|
||||
|
||||
Rgn := CreateRectRgn(p[0].x, p[0].y, p[1].x, p[1].y);
|
||||
SelectClipRgn (Canvas.Handle, Rgn);
|
||||
|
||||
// Update all series
|
||||
for i:=0 to FSeries.Count-1 do begin
|
||||
Serie:= TChartSeries( Series[i] );
|
||||
@ -2028,7 +2041,7 @@ end;
|
||||
|
||||
{$IFDEF fpc}
|
||||
initialization
|
||||
{$I tagraph.lrs}
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user