mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-22 23:01:35 +02:00
TAChart: Fix TDateTimeIntervalChartSource.SuppressPrevUnit not updating chart if changed.
git-svn-id: trunk@52776 -
This commit is contained in:
parent
a3af6a18b4
commit
04209d1c09
@ -8,24 +8,24 @@ object Form1: TForm1
|
||||
ClientWidth = 533
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.7'
|
||||
object PageControl1: TPageControl
|
||||
Left = 0
|
||||
Height = 430
|
||||
Top = 0
|
||||
Width = 533
|
||||
ActivePage = tsCustomMarks
|
||||
ActivePage = tsDateTime
|
||||
Align = alClient
|
||||
TabIndex = 0
|
||||
TabIndex = 3
|
||||
TabOrder = 0
|
||||
Options = [nboKeyboardTabSwitch]
|
||||
object tsCustomMarks: TTabSheet
|
||||
Caption = 'Customized marks'
|
||||
ClientHeight = 404
|
||||
ClientHeight = 402
|
||||
ClientWidth = 525
|
||||
object ChartCustomMarks: TChart
|
||||
Left = 0
|
||||
Height = 404
|
||||
Height = 402
|
||||
Top = 0
|
||||
Width = 525
|
||||
AxisList = <
|
||||
@ -78,7 +78,6 @@ object Form1: TForm1
|
||||
'TAChart'
|
||||
)
|
||||
Align = alClient
|
||||
ParentColor = False
|
||||
object ChartCustomMarksBarSeries1: TBarSeries
|
||||
Marks.Frame.Visible = False
|
||||
Marks.LabelBrush.Style = bsClear
|
||||
@ -118,7 +117,6 @@ object Form1: TForm1
|
||||
'TAChart'
|
||||
)
|
||||
Align = alClient
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object tsSubmarks: TTabSheet
|
||||
@ -177,7 +175,6 @@ object Form1: TForm1
|
||||
'TAChart'
|
||||
)
|
||||
Align = alClient
|
||||
ParentColor = False
|
||||
object ChartSubmarksLineSeries1: TLineSeries
|
||||
Source = udcsGraph
|
||||
end
|
||||
@ -185,11 +182,11 @@ object Form1: TForm1
|
||||
end
|
||||
object tsDateTime: TTabSheet
|
||||
Caption = 'Date and time'
|
||||
ClientHeight = 404
|
||||
ClientHeight = 402
|
||||
ClientWidth = 525
|
||||
object ChartDateTime: TChart
|
||||
Left = 0
|
||||
Height = 404
|
||||
Height = 368
|
||||
Top = 0
|
||||
Width = 525
|
||||
AxisList = <
|
||||
@ -216,11 +213,32 @@ object Form1: TForm1
|
||||
Title.Visible = True
|
||||
Toolset = ChartToolsetDateTime
|
||||
Align = alClient
|
||||
ParentColor = False
|
||||
object ChartDateTimeLineSeries1: TLineSeries
|
||||
Source = rcsDates
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 34
|
||||
Top = 368
|
||||
Width = 525
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 34
|
||||
ClientWidth = 525
|
||||
TabOrder = 1
|
||||
object CbSuppressPrevUnit: TCheckBox
|
||||
Left = 11
|
||||
Height = 19
|
||||
Top = 8
|
||||
Width = 139
|
||||
Caption = 'Suppress previous unit'
|
||||
Checked = True
|
||||
OnChange = CbSuppressPrevUnitChange
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
object tsIntervals: TTabSheet
|
||||
Caption = 'Intervals'
|
||||
@ -318,7 +336,6 @@ object Form1: TForm1
|
||||
'TAChart'
|
||||
)
|
||||
Align = alClient
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object tsPosition: TTabSheet
|
||||
@ -372,7 +389,6 @@ object Form1: TForm1
|
||||
)
|
||||
Align = alClient
|
||||
Color = clWhite
|
||||
ParentColor = False
|
||||
object ChartPositionFuncSeries1: TFuncSeries
|
||||
Extent.UseXMax = True
|
||||
Extent.UseXMin = True
|
||||
@ -403,7 +419,7 @@ object Form1: TForm1
|
||||
Width = 128
|
||||
Align = alTop
|
||||
Caption = ' X axis '
|
||||
ClientHeight = 103
|
||||
ClientHeight = 101
|
||||
ClientWidth = 124
|
||||
TabOrder = 0
|
||||
object seXPosition: TSpinEdit
|
||||
@ -461,10 +477,10 @@ object Form1: TForm1
|
||||
end
|
||||
object cbUnitsX: TComboBox
|
||||
Left = 54
|
||||
Height = 21
|
||||
Height = 23
|
||||
Top = 29
|
||||
Width = 60
|
||||
ItemHeight = 13
|
||||
ItemHeight = 15
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'percent'
|
||||
@ -485,7 +501,7 @@ object Form1: TForm1
|
||||
Width = 128
|
||||
Align = alTop
|
||||
Caption = ' Y axis '
|
||||
ClientHeight = 106
|
||||
ClientHeight = 104
|
||||
ClientWidth = 124
|
||||
TabOrder = 1
|
||||
object lblPositionY: TLabel
|
||||
@ -535,10 +551,10 @@ object Form1: TForm1
|
||||
end
|
||||
object cbUnitsY: TComboBox
|
||||
Left = 54
|
||||
Height = 21
|
||||
Height = 23
|
||||
Top = 29
|
||||
Width = 60
|
||||
ItemHeight = 13
|
||||
ItemHeight = 15
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'percent'
|
||||
|
@ -35,6 +35,7 @@ type
|
||||
ChartToolsetDateTime: TChartToolset;
|
||||
cbStaticX: TCheckBox;
|
||||
cbUnitsX: TComboBox;
|
||||
CbSuppressPrevUnit: TCheckBox;
|
||||
csStripes: TChartStyles;
|
||||
DateTimeIntervalChartSource1: TDateTimeIntervalChartSource;
|
||||
gbPositionX: TGroupBox;
|
||||
@ -45,6 +46,7 @@ type
|
||||
lblUnitsY: TLabel;
|
||||
lcsMarks: TListChartSource;
|
||||
PageControl1: TPageControl;
|
||||
Panel1: TPanel;
|
||||
pnlPosition: TPanel;
|
||||
rbPositionBottom: TRadioButton;
|
||||
rbPositionLeft: TRadioButton;
|
||||
@ -64,6 +66,7 @@ type
|
||||
udcsSub: TUserDefinedChartSource;
|
||||
procedure cbStaticXChange(Sender: TObject);
|
||||
procedure cbStaticYChange(Sender: TObject);
|
||||
procedure CbSuppressPrevUnitChange(Sender: TObject);
|
||||
procedure cbUnitsXChange(Sender: TObject);
|
||||
procedure cbUnitsYChange(Sender: TObject);
|
||||
procedure ChartCustomMarksAxisList1MarkToText(var AText: String; AMark: Double);
|
||||
@ -104,6 +107,11 @@ begin
|
||||
ChartPosition.AxisList[2].Visible := cbStaticY.Checked;
|
||||
end;
|
||||
|
||||
procedure TForm1.CbSuppressPrevUnitChange(Sender: TObject);
|
||||
begin
|
||||
DateTimeIntervalChartSource1.SuppressPrevUnit := CbSuppressPrevUnit.Checked;
|
||||
end;
|
||||
|
||||
procedure TForm1.cbUnitsXChange(Sender: TObject);
|
||||
begin
|
||||
ChartPosition.AxisList[1].PositionUnits := TChartUnits(cbUnitsX.ItemIndex);
|
||||
|
@ -123,8 +123,8 @@ type
|
||||
TBasicChartSource = class(TComponent)
|
||||
strict private
|
||||
FBroadcaster: TBroadcaster;
|
||||
FUpdateCount: Integer;
|
||||
strict protected
|
||||
FUpdateCount: Integer;
|
||||
procedure Notify;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
@ -156,7 +156,6 @@ type
|
||||
strict protected
|
||||
FExtent: TDoubleRect;
|
||||
FExtentIsValid: Boolean;
|
||||
FUpdateCount: Integer;
|
||||
FValuesTotal: Double;
|
||||
FValuesTotalIsValid: Boolean;
|
||||
FXCount: Cardinal;
|
||||
|
@ -375,9 +375,9 @@ end;
|
||||
procedure TDateTimeIntervalChartSource.SetSuppressPrevUnit(AValue: Boolean);
|
||||
begin
|
||||
if FSuppressPrevUnit = AValue then exit;
|
||||
BeginUpdate;
|
||||
FSuppressPrevUnit := AValue;
|
||||
InvalidateCaches;
|
||||
Notify;
|
||||
EndUpdate;
|
||||
end;
|
||||
|
||||
procedure TDateTimeIntervalChartSource.ValuesInRange(
|
||||
|
Loading…
Reference in New Issue
Block a user