mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 03:19:17 +02:00
TAChart: Some refinements of datapointtools demo.
git-svn-id: trunk@54326 -
This commit is contained in:
parent
7ada3f4ff8
commit
16a789dcb5
@ -15,7 +15,7 @@ object MainForm: TMainForm
|
|||||||
Width = 637
|
Width = 637
|
||||||
MultiLine = True
|
MultiLine = True
|
||||||
OnChange = TabControlChange
|
OnChange = TabControlChange
|
||||||
TabIndex = 9
|
TabIndex = 0
|
||||||
Tabs.Strings = (
|
Tabs.Strings = (
|
||||||
'Line series'
|
'Line series'
|
||||||
'Bar series'
|
'Bar series'
|
||||||
|
@ -5,9 +5,10 @@ unit main;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, TAGraph, TASeries, TATools, TAStyles, TASources,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
|
||||||
Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls, StdCtrls,
|
ExtCtrls, StdCtrls, Types,
|
||||||
TAChartUtils, TAMultiSeries, TARadialSeries, TAFuncSeries, Types;
|
TAGraph, TASeries, TATools, TAStyles, TASources, TAChartUtils, TAMultiSeries,
|
||||||
|
TARadialSeries, TAFuncSeries, TACustomSeries, TADrawUtils;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -74,9 +75,6 @@ implementation
|
|||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
|
||||||
TACustomSeries;
|
|
||||||
|
|
||||||
{ TMainForm }
|
{ TMainForm }
|
||||||
|
|
||||||
procedure TMainForm.CbCandleStickChange(Sender: TObject);
|
procedure TMainForm.CbCandleStickChange(Sender: TObject);
|
||||||
@ -135,7 +133,7 @@ procedure TMainForm.DataPointDragToolDragXY(ASender: TDataPointDragTool;
|
|||||||
var
|
var
|
||||||
ser: TChartSeries;
|
ser: TChartSeries;
|
||||||
begin
|
begin
|
||||||
if ASender.YIndex > 0 then begin
|
if (ASender.YIndex > 0) and (ASender.Series is TChartSeries) then begin
|
||||||
ser := TChartSeries(ASender.Series);
|
ser := TChartSeries(ASender.Series);
|
||||||
ser.XValue[ASender.PointIndex] := AGraphPoint.X;
|
ser.XValue[ASender.PointIndex] := AGraphPoint.X;
|
||||||
end;
|
end;
|
||||||
@ -317,11 +315,15 @@ begin
|
|||||||
if BarSeries.Active then
|
if BarSeries.Active then
|
||||||
s := s + LineEnding + 'Grab the bars at their upper ends.';
|
s := s + LineEnding + 'Grab the bars at their upper ends.';
|
||||||
end else
|
end else
|
||||||
if FieldSeries.Active then begin
|
if FieldSeries.Active then
|
||||||
s := 'Rotate an arrow by grabbing it at its ends.' + LineEnding +
|
s := 'Rotate an arrow by grabbing it at its ends.' + LineEnding +
|
||||||
'Shift it by grabbing it in the middle.' + LineEnding +
|
'Shift it by grabbing it in the middle.' + LineEnding +
|
||||||
'The checkbox "Drag both x and y" is not operating here.';
|
'The checkbox "Drag both x and y" is not operating here.'
|
||||||
end;
|
else
|
||||||
|
if BubbleSeries.Active then
|
||||||
|
s := 'Grab a bubble at its perimeter to change the radius.' + LineEnding +
|
||||||
|
'Grab it in the center to change its location.' + LineEnding +
|
||||||
|
'Overlapping bubbles may be detected erroneously.';
|
||||||
if s <> '' then
|
if s <> '' then
|
||||||
LblNOTE.Caption := 'NOTE:' + LineEnding + s;
|
LblNOTE.Caption := 'NOTE:' + LineEnding + s;
|
||||||
LblNote.Visible := (s <> '');
|
LblNote.Visible := (s <> '');
|
||||||
|
Loading…
Reference in New Issue
Block a user