lazarus/components/tachart/demo/axis/main.lfm

890 lines
26 KiB
Plaintext

object Form1: TForm1
Left = 343
Height = 413
Top = 184
Width = 566
Caption = 'TAChart axis demo'
ClientHeight = 413
ClientWidth = 566
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '2.3.0.0'
object PageControl1: TPageControl
Left = 0
Height = 413
Top = 0
Width = 566
ActivePage = tsCustomMarks
Align = alClient
TabIndex = 0
TabOrder = 0
Options = [nboKeyboardTabSwitch]
object tsCustomMarks: TTabSheet
Caption = 'Customized marks'
ClientHeight = 385
ClientWidth = 558
object ChartCustomMarks: TChart
Left = 0
Height = 385
Top = 0
Width = 558
AxisList = <
item
TickLength = 0
Marks.Distance = 0
Marks.Format = '$%0:.9g'
Marks.Frame.Style = psSolid
Marks.LabelBrush.Color = clMoneyGreen
Marks.Source = lcsMarks
Marks.Style = smsCustom
Minors = <>
Title.LabelFont.Orientation = 900
Title.LabelBrush.Style = bsClear
end
item
Grid.Visible = False
TickLength = 0
Alignment = calBottom
AxisPen.Color = clGreen
AxisPen.Width = 3
AxisPen.Visible = True
Marks.LabelFont.Style = [fsBold]
Marks.Format = '%2:s'
Marks.LabelBrush.Style = bsClear
Marks.Source = lcsMarks
Marks.Style = smsLabel
Minors = <
item
Grid.Visible = False
Intervals.Count = 2
Intervals.MinLength = 5
Intervals.Options = [aipUseCount]
TickColor = clGreen
TickLength = 10
Marks.LabelBrush.Style = bsClear
end>
Title.LabelBrush.Style = bsClear
OnMarkToText = ChartCustomMarksAxisList1MarkToText
end>
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
Frame.Visible = False
Margins.Left = 10
Margins.Top = 10
Margins.Right = 10
Margins.Bottom = 0
MarginsExternal.Left = 0
Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue
Title.Text.Strings = (
'TAChart'
)
Align = alClient
object ChartCustomMarksBarSeries1: TBarSeries
BarBrush.Color = clGreen
BarPen.Color = clLime
BarPen.Width = 2
Marks.Frame.Visible = False
Marks.LabelBrush.Style = bsClear
Source = lcsMarks
end
end
end
object tsAxisGroup: TTabSheet
Caption = 'Axis groups'
ClientHeight = 385
ClientWidth = 558
object ChartAxisGroup: TChart
Left = 0
Height = 385
Top = 0
Width = 558
AxisList = <
item
Grid.Visible = False
TickLength = 0
Group = 2
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Orientation = 900
Title.LabelBrush.Style = bsClear
end
item
Alignment = calBottom
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelBrush.Style = bsClear
end>
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue
Title.Text.Strings = (
'TAChart'
)
Align = alClient
end
end
object tsSubmarks: TTabSheet
Caption = 'Submarks'
ClientHeight = 385
ClientWidth = 558
object ChartSubmarks: TChart
Left = 0
Height = 385
Top = 0
Width = 558
AxisList = <
item
Grid.Color = clSilver
Grid.Style = psSolid
TickLength = 6
Group = 1
Marks.LabelBrush.Style = bsClear
Marks.Source = udcsMain
Minors = <>
Title.LabelFont.Orientation = 900
Title.LabelBrush.Style = bsClear
end
item
Grid.Color = clSilver
Grid.Style = psSolid
Intervals.MaxLength = 100
Intervals.MinLength = 30
Intervals.NiceSteps = '0.2|0.25|0.5|1.0'
TickLength = 6
Alignment = calBottom
Group = 2
Marks.Distance = 25
Marks.LabelFont.Style = [fsBold]
Marks.LabelBrush.Style = bsClear
Minors = <
item
Grid.Color = clSilver
Grid.Cosmetic = False
Intervals.MinLength = 5
Intervals.Options = [aipUseCount, aipUseMinLength]
Marks.Distance = 4
Marks.LabelFont.Height = -9
Marks.LabelFont.Orientation = 900
Marks.Format = '%0:.9g'
Marks.LabelBrush.Style = bsClear
Marks.Style = smsValue
end>
Title.LabelBrush.Style = bsClear
end
item
Grid.Visible = False
TickLength = 2
Group = 1
Marks.LabelBrush.Style = bsClear
Marks.Source = udcsSub
Marks.Style = smsNone
Minors = <>
Title.LabelBrush.Style = bsClear
end>
BackColor = clWhite
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue
Title.Text.Strings = (
'TAChart'
)
Align = alClient
object ChartSubmarksLineSeries1: TLineSeries
Source = udcsGraph
end
end
end
object tsDateTime: TTabSheet
Caption = 'Date and time'
ClientHeight = 385
ClientWidth = 558
object ChartDateTime: TChart
Left = 0
Height = 350
Top = 0
Width = 558
AxisList = <
item
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Orientation = 900
Title.LabelBrush.Style = bsClear
end
item
Alignment = calBottom
Marks.Format = '%2:s'
Marks.LabelBrush.Style = bsClear
Marks.OverlapPolicy = opHideNeighbour
Marks.Source = DateTimeIntervalChartSource1
Marks.Style = smsLabel
Minors = <>
Title.LabelBrush.Style = bsClear
end>
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue
Title.Text.Strings = (
'The series contain data points for every hour in 10 years'
'Left/right-click to zoom and see various labels on the bottom axis'
)
Title.Visible = True
Toolset = ChartToolsetDateTime
Align = alClient
object ChartDateTimeLineSeries1: TLineSeries
Source = rcsDates
end
end
object Panel1: TPanel
AnchorSideTop.Side = asrCenter
Left = 0
Height = 35
Top = 350
Width = 558
Align = alBottom
AutoSize = True
BevelOuter = bvNone
ClientHeight = 35
ClientWidth = 558
TabOrder = 1
object CbSuppressPrevUnit: TCheckBox
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Panel1
AnchorSideTop.Side = asrCenter
Left = 8
Height = 19
Top = 8
Width = 137
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Bottom = 8
Caption = 'Suppress previous unit'
Checked = True
OnChange = CbSuppressPrevUnitChange
State = cbChecked
TabOrder = 0
end
object CbAlternateFormat: TCheckBox
AnchorSideLeft.Control = CbSuppressPrevUnit
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Panel1
AnchorSideTop.Side = asrCenter
Left = 161
Height = 19
Top = 8
Width = 143
BorderSpacing.Left = 16
Caption = 'Alternate format strings'
OnChange = CbAlternateFormatChange
TabOrder = 1
end
object Label1: TLabel
AnchorSideLeft.Control = CbAlternateFormat
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Panel1
AnchorSideTop.Side = asrCenter
Left = 328
Height = 15
Top = 10
Width = 34
BorderSpacing.Left = 24
Caption = 'Label1'
end
end
end
object tsIntervals: TTabSheet
Caption = 'Intervals'
ClientHeight = 385
ClientWidth = 558
object ChartIntervals: TChart
Left = 0
Height = 385
Top = 0
Width = 558
AxisList = <
item
Grid.Visible = False
Intervals.NiceSteps = '0.25|1.0'
TickColor = clMaroon
TickLength = 3
AxisPen.Color = clMaroon
AxisPen.Visible = True
Marks.LabelFont.Color = clMaroon
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Color = clMaroon
Title.LabelFont.Orientation = 900
Title.Visible = True
Title.Caption = 'NiceSteps = 0.25'
Title.LabelBrush.Style = bsClear
end
item
Grid.Visible = False
Intervals.MinLength = 20
Intervals.NiceSteps = '0.3|0.6'
Alignment = calBottom
AxisPen.Visible = True
Marks.Format = '%0:.6g'
Marks.LabelBrush.Style = bsClear
Marks.Range.Max = 0.6
Marks.Range.Min = -0.3
Marks.Range.UseMax = True
Marks.Range.UseMin = True
Marks.Style = smsCustom
Minors = <>
Title.Visible = True
Title.Caption = 'Marks.Range = -0.3 .. 0.6'
Title.LabelBrush.Style = bsClear
end
item
Grid.Visible = False
Intervals.Count = 10
Intervals.MinLength = 4
Intervals.Options = [aipUseCount, aipUseMaxLength, aipUseMinLength, aipUseNiceSteps]
TickColor = clGreen
TickLength = 3
AxisPen.Color = clGreen
AxisPen.Visible = True
Margin = 8
Marks.LabelFont.Color = clGreen
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Color = clGreen
Title.LabelFont.Orientation = 900
Title.Visible = True
Title.Caption = 'MinLength = 4'
Title.LabelBrush.Style = bsClear
end
item
Grid.Visible = False
Intervals.MaxLength = 200
Intervals.Options = [aipUseCount, aipUseMaxLength, aipUseMinLength, aipUseNiceSteps]
TickColor = clNavy
TickLength = 3
AxisPen.Color = clNavy
AxisPen.Visible = True
Margin = 8
Marks.LabelFont.Color = clNavy
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Color = clNavy
Title.LabelFont.Orientation = 900
Title.Visible = True
Title.Caption = 'MaxLength = 200'
Title.LabelBrush.Style = bsClear
end
item
Grid.Visible = False
Intervals.Options = [aipUseMaxLength, aipUseMinLength]
TickLength = 3
AxisPen.Visible = True
Margin = 8
Marks.Format = '%0:.4g'
Marks.LabelBrush.Style = bsClear
Marks.Style = smsCustom
Minors = <>
Title.LabelFont.Orientation = 900
Title.Visible = True
Title.Caption = 'No nice steps'
Title.LabelBrush.Style = bsClear
end>
BackColor = clSilver
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
Frame.Visible = False
Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue
Title.Text.Strings = (
'TAChart'
)
Align = alClient
end
end
object tsPosition: TTabSheet
Caption = 'Position'
ClientHeight = 385
ClientWidth = 558
object ChartPosition: TChart
Left = 0
Height = 385
Top = 0
Width = 389
AxisList = <
item
Grid.Visible = False
Intervals.Tolerance = 1
AxisPen.Visible = True
Marks.LabelBrush.Style = bsClear
Minors = <>
Position = 50
Title.LabelBrush.Style = bsClear
end
item
Grid.Visible = False
Intervals.Tolerance = 1
Alignment = calBottom
AxisPen.Visible = True
Marks.LabelBrush.Style = bsClear
Minors = <>
Position = 50
Title.LabelBrush.Style = bsClear
end
item
Grid.Color = clGray
Intervals.Tolerance = 1
Visible = False
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Orientation = 900
Title.LabelBrush.Style = bsClear
end
item
Grid.Color = clGray
Intervals.Tolerance = 1
Visible = False
Alignment = calBottom
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelBrush.Style = bsClear
end>
BackColor = clWhite
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue
Title.Text.Strings = (
'TAChart'
)
Align = alClient
Color = clDefault
object ChartPositionFuncSeries1: TFuncSeries
Extent.UseXMax = True
Extent.UseXMin = True
Extent.UseYMax = True
Extent.UseYMin = True
Extent.XMax = 100
Extent.XMin = -100
Extent.YMax = 30
Extent.YMin = -30
Pen.Color = clTeal
Pen.Width = 2
OnCalculate = ChartPositionFuncSeries1Calculate
end
end
object pnlPosition: TPanel
Left = 389
Height = 385
Top = 0
Width = 169
Align = alRight
BevelOuter = bvNone
ClientHeight = 385
ClientWidth = 169
TabOrder = 1
object gbPositionX: TGroupBox
Left = 0
Height = 124
Top = 0
Width = 163
Align = alTop
AutoSize = True
BorderSpacing.Right = 6
Caption = ' X axis '
ClientHeight = 104
ClientWidth = 159
TabOrder = 0
object seXPosition: TSpinEdit
AnchorSideLeft.Control = lblPositionX
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = gbPositionX
AnchorSideRight.Control = gbPositionX
AnchorSideRight.Side = asrBottom
Left = 62
Height = 23
Top = 0
Width = 89
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 8
BorderSpacing.Right = 8
OnChange = seXPositionChange
TabOrder = 0
Value = 50
end
object lblPositionX: TLabel
AnchorSideLeft.Control = gbPositionX
AnchorSideTop.Control = seXPosition
AnchorSideTop.Side = asrCenter
Left = 8
Height = 15
Top = 4
Width = 46
BorderSpacing.Left = 8
Caption = 'Position:'
end
object cbStaticX: TCheckBox
AnchorSideLeft.Control = lblPositionX
AnchorSideTop.Control = cbUnitsX
AnchorSideTop.Side = asrBottom
Left = 8
Height = 19
Top = 54
Width = 101
BorderSpacing.Top = 4
Caption = 'Show static axis'
OnChange = cbStaticXChange
TabOrder = 1
end
object rbPositionBottom: TRadioButton
AnchorSideLeft.Control = lblPositionX
AnchorSideTop.Control = cbStaticX
AnchorSideTop.Side = asrBottom
Left = 8
Height = 19
Top = 77
Width = 58
BorderSpacing.Top = 4
BorderSpacing.Bottom = 8
Caption = 'Bottom'
Checked = True
OnChange = rbPositionBottomChange
TabOrder = 3
TabStop = True
end
object rbPositionTop: TRadioButton
AnchorSideLeft.Control = rbPositionBottom
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = rbPositionBottom
Left = 74
Height = 19
Top = 77
Width = 38
BorderSpacing.Left = 8
Caption = 'Top'
TabOrder = 2
end
object lblUnitsX: TLabel
AnchorSideLeft.Control = lblPositionX
AnchorSideTop.Control = cbUnitsX
AnchorSideTop.Side = asrCenter
Left = 8
Height = 15
Top = 31
Width = 30
Caption = 'Units:'
end
object cbUnitsX: TComboBox
AnchorSideLeft.Control = seXPosition
AnchorSideTop.Control = seXPosition
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = seXPosition
AnchorSideRight.Side = asrBottom
Left = 62
Height = 23
Top = 27
Width = 89
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 4
ItemHeight = 15
ItemIndex = 0
Items.Strings = (
'percent'
'axis'
'graph'
'pixel'
)
OnChange = cbUnitsXChange
Style = csDropDownList
TabOrder = 4
Text = 'percent'
end
end
object gbPositionY: TGroupBox
Left = 0
Height = 124
Top = 132
Width = 163
Align = alTop
AutoSize = True
BorderSpacing.Top = 8
BorderSpacing.Right = 6
Caption = ' Y axis '
ClientHeight = 104
ClientWidth = 159
TabOrder = 1
object lblPositionY: TLabel
AnchorSideLeft.Control = gbPositionY
AnchorSideTop.Control = seYPosition
AnchorSideTop.Side = asrCenter
Left = 8
Height = 15
Top = 4
Width = 46
BorderSpacing.Left = 8
Caption = 'Position:'
end
object cbStaticY: TCheckBox
AnchorSideLeft.Control = lblPositionY
AnchorSideTop.Control = cbUnitsY
AnchorSideTop.Side = asrBottom
Left = 8
Height = 19
Top = 54
Width = 101
BorderSpacing.Top = 4
Caption = 'Show static axis'
OnChange = cbStaticYChange
TabOrder = 0
end
object seYPosition: TSpinEdit
AnchorSideLeft.Control = lblPositionY
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = gbPositionY
AnchorSideRight.Control = gbPositionY
AnchorSideRight.Side = asrBottom
Left = 62
Height = 23
Top = 0
Width = 89
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 8
BorderSpacing.Right = 8
OnChange = seYPositionChange
TabOrder = 1
Value = 50
end
object rbPositionRight: TRadioButton
AnchorSideLeft.Control = rbPositionLeft
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = rbPositionLeft
Left = 62
Height = 19
Top = 77
Width = 46
BorderSpacing.Left = 16
Caption = 'Right'
TabOrder = 2
end
object rbPositionLeft: TRadioButton
AnchorSideLeft.Control = lblPositionY
AnchorSideTop.Control = cbStaticY
AnchorSideTop.Side = asrBottom
Left = 8
Height = 19
Top = 77
Width = 38
BorderSpacing.Top = 4
BorderSpacing.Bottom = 8
Caption = 'Left'
Checked = True
OnChange = rbPositionLeftChange
TabOrder = 3
TabStop = True
end
object cbUnitsY: TComboBox
AnchorSideLeft.Control = seYPosition
AnchorSideTop.Control = seYPosition
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = seYPosition
AnchorSideRight.Side = asrBottom
Left = 62
Height = 23
Top = 27
Width = 89
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 4
ItemHeight = 15
ItemIndex = 0
Items.Strings = (
'percent'
'graph'
'pixel'
)
OnChange = cbUnitsYChange
Style = csDropDownList
TabOrder = 4
Text = 'percent'
end
object lblUnitsY: TLabel
AnchorSideLeft.Control = lblPositionY
AnchorSideTop.Control = cbUnitsY
AnchorSideTop.Side = asrCenter
Left = 8
Height = 15
Top = 31
Width = 30
Caption = 'Units:'
end
end
end
end
object TabSheet1: TTabSheet
Caption = 'Rotated'
ClientHeight = 385
ClientWidth = 558
object ChartRotated: TChart
Left = 0
Height = 349
Top = 0
Width = 558
AxisList = <
item
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Orientation = 900
Title.LabelBrush.Style = bsClear
end
item
Alignment = calBottom
Marks.Format = '%2:s'
Marks.LabelBrush.Style = bsClear
Marks.Source = lcsRotatedSeries
Marks.Style = smsLabel
Minors = <>
Title.LabelBrush.Style = bsClear
end>
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue
Title.Text.Strings = (
'TAChart'
)
Align = alClient
Color = clDefault
object ChartRotatedBarSeries: TBarSeries
BarBrush.Color = clRed
Source = lcsRotatedSeries
Styles = ChartStyles1
end
end
object Panel2: TPanel
Left = 0
Height = 36
Top = 349
Width = 558
Align = alBottom
AutoSize = True
BevelOuter = bvNone
ClientHeight = 36
ClientWidth = 558
TabOrder = 1
object cbRotated: TCheckBox
AnchorSideLeft.Control = Panel2
AnchorSideTop.Control = Panel2
AnchorSideTop.Side = asrCenter
Left = 8
Height = 19
Top = 9
Width = 59
BorderSpacing.Around = 8
Caption = 'Rotated'
OnChange = cbRotatedChange
TabOrder = 0
end
end
end
end
object lcsMarks: TListChartSource
DataPoints.Strings = (
'1|18000|?|January'
'2|35000|?|February'
'3|31000|?|March'
'4|26000|?|April'
'5|37000|?|May'
'6|22000|?|June'
)
Left = 216
Top = 164
end
object rcsDates: TRandomChartSource
RandSeed = 1079653020
YMax = 50
YMin = 5
Left = 216
Top = 216
end
object DateTimeIntervalChartSource1: TDateTimeIntervalChartSource
Params.Count = 10
Params.MaxLength = 150
Params.MinLength = 20
Params.Options = [aipUseCount, aipUseMaxLength, aipUseMinLength, aipUseNiceSteps]
OnDateTimeStepChange = DateTimeIntervalChartSource1DateTimeStepChange
Left = 256
Top = 296
end
object ChartToolsetDateTime: TChartToolset
Left = 448
Top = 296
object ChartToolset1ZoomIn: TZoomClickTool
Shift = [ssLeft]
ZoomFactor = 4
ZoomRatio = 0.25
end
object ChartToolset1ZoomOut: TZoomClickTool
Shift = [ssRight]
ZoomFactor = 0.25
ZoomRatio = 4
end
end
object udcsMain: TUserDefinedChartSource
OnGetChartDataItem = udcsMainGetChartDataItem
PointsNumber = 10
Left = 344
Top = 72
end
object udcsSub: TUserDefinedChartSource
OnGetChartDataItem = udcsSubGetChartDataItem
PointsNumber = 50
Left = 344
Top = 116
end
object udcsGraph: TUserDefinedChartSource
OnGetChartDataItem = udcsGraphGetChartDataItem
PointsNumber = 100
Left = 352
Top = 184
end
object csStripes: TChartStyles
Styles = <
item
Brush.Color = 16631498
UsePen = False
end
item
Brush.Color = 12319483
UsePen = False
end>
Left = 304
Top = 176
end
object lcsRotatedSeries: TListChartSource
DataPoints.Strings = (
'1|104|53|62|?|A'
'2|243|47|51|?|B'
'3|405|51|26|?|C'
'4|156|68|28|?|D'
'5|364|16|35|?|E'
)
YCount = 3
Left = 468
Top = 35
end
object ChartStyles1: TChartStyles
Styles = <
item
Brush.Color = clRed
end
item
Brush.Color = clYellow
end
item
Brush.Color = clGreen
end>
Left = 468
Top = 88
end
end