TAChart: Remove workarounds for non-working event assignments

git-svn-id: trunk@29990 -
This commit is contained in:
ask 2011-03-23 07:16:40 +00:00
parent 5546c5b445
commit 1afefeed3c
12 changed files with 6 additions and 30 deletions

View File

@ -47,6 +47,7 @@ object Form1: TForm1
Marks.Source = lcsMarks
Marks.Style = smsLabel
TickLength = 0
OnMarkToText = ChartCustomMarksAxisList1MarkToText
end>
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue

View File

@ -76,9 +76,6 @@ var
ls: TLineSeries;
tr: TChartAxisTransformations;
begin
//FIXME
ChartCustomMarks.BottomAxis.OnMarkToText :=
@ChartCustomMarksAxisList1MarkToText;
for i := 1 to 5 do begin
ls := TLineSeries.Create(Self);
ChartAxisGroup.AddSeries(ls);

View File

@ -409,6 +409,7 @@ object Form1: TForm1
left = 352
top = 236
object catUserUserDefinedAxisTransform1: TUserDefinedAxisTransform
OnAxisToGraph = catUserUserDefinedAxisTransform1AxisToGraph
end
end
object ChartToolset1: TChartToolset

View File

@ -148,8 +148,6 @@ begin
x := i / 50 * (XMax - XMin) + XMin;
clsLogPoints.AddXY(x + Random - 0.5, MyFunc(x) + Random - 0.5);
end;
catUserUserDefinedAxisTransform1.OnAxisToGraph :=
@catUserUserDefinedAxisTransform1AxisToGraph;
FillIndependentSource;
end;

View File

@ -6,7 +6,6 @@ object Form1: TForm1
Caption = 'Form1'
ClientHeight = 240
ClientWidth = 320
OnCreate = FormCreate
LCLVersion = '0.9.31'
object Chart1: TChart
Left = 0
@ -35,6 +34,7 @@ object Form1: TForm1
object Chart1BarSeries1: TBarSeries
BarBrush.Color = clRed
Source = RandomChartSource1
OnBeforeDrawBar = Chart1BarSeries1BeforeDrawBar
end
end
object RandomChartSource1: TRandomChartSource

View File

@ -23,7 +23,6 @@ type
const ARect: TRect; var ADoDefaultDrawing: Boolean);
procedure Chart1BeforeDrawBackWall(ASender: TChart; ACanvas: TCanvas;
const ARect: TRect; var ADoDefaultDrawing: Boolean);
procedure FormCreate(Sender: TObject);
end;
var
@ -58,13 +57,5 @@ begin
ADoDefaultDrawing := false;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
// Workaround for issue #18418
Chart1.OnBeforeDrawBackground := @Chart1BeforeDrawBackground;
Chart1.OnBeforeDrawBackWall := @Chart1BeforeDrawBackWall;
Chart1BarSeries1.OnBeforeDrawBar := @Chart1BarSeries1BeforeDrawBar;
end;
end.

View File

@ -6,7 +6,6 @@ object Form1: TForm1
Caption = 'Form1'
ClientHeight = 390
ClientWidth = 510
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '0.9.31'
object Chart1: TChart
@ -56,6 +55,7 @@ object Form1: TForm1
Source = ListChartSource2
end
object Chart1FuncSeries1: TFuncSeries
Legend.OnDraw = Chart1FuncSeries1DrawLegend
Legend.UserItemsCount = 2
Extent.XMax = 5
Extent.UseXMin = True

View File

@ -36,7 +36,6 @@ type
procedure Chart1FuncSeries1Calculate(const AX: Double; out AY: Double);
procedure Chart1FuncSeries1DrawLegend(
ACanvas: TCanvas; const ARect: TRect; AIndex: Integer; var AText: String);
procedure FormCreate(Sender: TObject);
procedure rgAlignmentClick(Sender: TObject);
procedure seMarginXChange(Sender: TObject);
procedure seMarginYChange(Sender: TObject);
@ -82,11 +81,6 @@ begin
Round(Sin(x / w * 2 * Pi) * (ARect.Bottom - ARect.Top) / 2) + y0);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1FuncSeries1.Legend.OnDraw := @Chart1FuncSeries1DrawLegend;
end;
procedure TForm1.rgAlignmentClick(Sender: TObject);
begin
with Chart1.Legend do

View File

@ -6,7 +6,6 @@ object Form1: TForm1
Caption = 'Form1'
ClientHeight = 351
ClientWidth = 479
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '0.9.31'
object Chart1: TChart
@ -35,6 +34,7 @@ object Form1: TForm1
'TAChart'
)
Toolset = ChartToolset1
OnExtentChanged = Chart1ExtentChanged
Align = alClient
ParentColor = False
object Chart1LineSeries1: TLineSeries

View File

@ -28,7 +28,6 @@ type
StatusBar1: TStatusBar;
procedure cbMiniMapChange(Sender: TObject);
procedure Chart1ExtentChanged(ASender: TChart);
procedure FormCreate(Sender: TObject);
end;
var
@ -52,10 +51,5 @@ begin
Format('(%.3g;%.3g) - (%.3g;%.3g)', [a.X, a.Y, b.X, b.Y]);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.OnExtentChanged := @Chart1ExtentChanged;
end;
end.

View File

@ -36,6 +36,7 @@ object Form1: TForm1
end
object Chart1FuncSeries1: TFuncSeries
ZPosition = 1
OnCalculate = Chart1FuncSeries1Calculate
Pen.Color = clRed
Pen.Width = 2
end

View File

@ -52,7 +52,6 @@ begin
RandSeed := 103489;
for i := 1 to 10 do
Chart1BarSeries1.AddXY(i, i * i / 2 + Random(6) + 1 + Random);
Chart1FuncSeries1.OnCalculate := @Chart1FuncSeries1Calculate;
SaveDialog1.InitialDir := ExtractFilePath(Application.ExeName);
end;