1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673
|
object Form1: TForm1
Left = 343
Height = 430
Top = 184
Width = 533
Caption = 'TAChart axis demo'
ClientHeight = 430
ClientWidth = 533
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '1.7'
object PageControl1: TPageControl
Left = 0
Height = 430
Top = 0
Width = 533
ActivePage = tsCustomMarks
Align = alClient
TabIndex = 0
TabOrder = 0
Options = [nboKeyboardTabSwitch]
object tsCustomMarks: TTabSheet
Caption = 'Customized marks'
ClientHeight = 402
ClientWidth = 525
object ChartCustomMarks: TChart
Left = 0
Height = 402
Top = 0
Width = 525
AxisList = <
item
TickLength = 0
Marks.Distance = 0
Marks.Format = '$%0:.9g'
Marks.Frame.Style = psSolid
Marks.LabelBrush.Color = clMoneyGreen
Marks.LabelBrush.Style = bsSolid
Marks.Source = lcsMarks
Marks.Style = smsCustom
Minors = <>
Title.LabelFont.Orientation = 900
end
item
Grid.Visible = False
TickLength = 0
Alignment = calBottom
AxisPen.Color = clGreen
AxisPen.Width = 3
AxisPen.Visible = True
Marks.LabelFont.Height = -13
Marks.LabelFont.Style = [fsBold]
Marks.Format = '%2:s'
Marks.Source = lcsMarks
Marks.Style = smsLabel
Minors = <
item
Grid.Visible = False
Intervals.Count = 2
Intervals.MinLength = 5
Intervals.Options = [aipUseCount]
TickColor = clGreen
TickLength = 10
end>
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
Marks.Frame.Visible = False
Marks.LabelBrush.Style = bsClear
BarBrush.Color = clGreen
BarPen.Color = clLime
BarPen.Width = 2
Source = lcsMarks
end
end
end
object tsAxisGroup: TTabSheet
Caption = 'Axis groups'
ClientHeight = 404
ClientWidth = 525
object ChartAxisGroup: TChart
Left = 0
Height = 404
Top = 0
Width = 525
AxisList = <
item
Grid.Visible = False
TickLength = 0
Group = 2
Minors = <>
Title.LabelFont.Orientation = 900
end
item
Alignment = calBottom
Minors = <>
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 = 404
ClientWidth = 525
object ChartSubmarks: TChart
Left = 0
Height = 404
Top = 0
Width = 525
AxisList = <
item
TickLength = 6
Group = 1
Marks.Source = udcsMain
Minors = <>
Title.LabelFont.Orientation = 900
end
item
Intervals.MaxLength = 100
Intervals.MinLength = 30
Intervals.NiceSteps = '0.2|0.25|0.5|1.0'
TickLength = 6
Alignment = calBottom
Group = 2
Marks.LabelFont.Style = [fsBold]
Minors = <
item
Grid.Color = clGray
Grid.Cosmetic = False
Intervals.Count = 10
Intervals.MinLength = 5
Intervals.Options = [aipUseCount, aipUseMinLength]
Marks.Distance = 4
Marks.LabelFont.Height = -9
Marks.LabelFont.Orientation = 900
Marks.Format = '%0:.9g'
Marks.Style = smsValue
end>
end
item
Grid.Visible = False
TickLength = 2
Group = 1
Marks.Source = udcsSub
Marks.Style = smsNone
Minors = <>
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 = 402
ClientWidth = 525
object ChartDateTime: TChart
Left = 0
Height = 368
Top = 0
Width = 525
AxisList = <
item
Minors = <>
Title.LabelFont.Orientation = 900
end
item
Alignment = calBottom
Marks.Format = '%2:s'
Marks.OverlapPolicy = opHideNeighbour
Marks.Source = DateTimeIntervalChartSource1
Marks.Style = smsLabel
Minors = <>
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
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
object CbAlternateFormat: TCheckBox
Left = 195
Height = 19
Top = 8
Width = 145
Caption = 'Alternate format strings'
OnChange = CbAlternateFormatChange
TabOrder = 1
end
object Label1: TLabel
Left = 393
Height = 15
Top = 10
Width = 34
Caption = 'Label1'
ParentColor = False
end
end
end
object tsIntervals: TTabSheet
Caption = 'Intervals'
ClientHeight = 404
ClientWidth = 525
object ChartIntervals: TChart
Left = 0
Height = 404
Top = 0
Width = 525
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
Minors = <>
Title.LabelFont.Color = clMaroon
Title.LabelFont.Orientation = 900
Title.Visible = True
Title.Caption = 'NiceSteps = 0.25'
end
item
Grid.Visible = False
Intervals.MinLength = 20
Intervals.NiceSteps = '0.3|0.6'
Alignment = calBottom
AxisPen.Visible = True
Marks.Format = '%0:.6g'
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'
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
Minors = <>
Title.LabelFont.Color = clGreen
Title.LabelFont.Orientation = 900
Title.Visible = True
Title.Caption = 'MinLength = 4'
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
Minors = <>
Title.LabelFont.Color = clNavy
Title.LabelFont.Orientation = 900
Title.Visible = True
Title.Caption = 'MaxLength = 200'
end
item
Grid.Visible = False
Intervals.Options = [aipUseMaxLength, aipUseMinLength]
TickLength = 3
AxisPen.Visible = True
Margin = 8
Marks.Format = '%0:.4g'
Marks.Style = smsCustom
Minors = <>
Title.LabelFont.Orientation = 900
Title.Visible = True
Title.Caption = 'No nice steps'
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 = 404
ClientWidth = 525
object ChartPosition: TChart
Left = 0
Height = 404
Top = 0
Width = 395
AxisList = <
item
Grid.Visible = False
Intervals.Tolerance = 1
AxisPen.Visible = True
Marks.LabelBrush.Style = bsSolid
Minors = <>
Position = 50
end
item
Grid.Visible = False
Intervals.Tolerance = 1
Alignment = calBottom
AxisPen.Visible = True
Marks.LabelBrush.Style = bsSolid
Minors = <>
Position = 50
end
item
Grid.Color = clGray
Intervals.Tolerance = 1
Visible = False
Minors = <>
Title.LabelFont.Orientation = 900
end
item
Grid.Color = clGray
Intervals.Tolerance = 1
Visible = False
Alignment = calBottom
Minors = <>
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 = clWhite
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
OnCalculate = ChartPositionFuncSeries1Calculate
Pen.Color = clTeal
Pen.Width = 2
end
end
object pnlPosition: TPanel
Left = 395
Height = 404
Top = 0
Width = 130
Align = alRight
ClientHeight = 404
ClientWidth = 130
TabOrder = 1
object gbPositionX: TGroupBox
Left = 1
Height = 121
Top = 1
Width = 128
Align = alTop
Caption = ' X axis '
ClientHeight = 101
ClientWidth = 124
TabOrder = 0
object seXPosition: TSpinEdit
Left = 57
Height = 21
Top = 1
Width = 58
OnChange = seXPositionChange
TabOrder = 0
Value = 50
end
object lblPositionX: TLabel
Left = 6
Height = 13
Top = 5
Width = 41
Caption = 'Position:'
ParentColor = False
end
object cbStaticX: TCheckBox
Left = 6
Height = 17
Top = 53
Width = 97
Caption = 'Show static axis'
OnChange = cbStaticXChange
TabOrder = 1
end
object rbPositionBottom: TRadioButton
Left = 6
Height = 17
Top = 77
Width = 54
Caption = 'Bottom'
Checked = True
OnChange = rbPositionBottomChange
TabOrder = 3
TabStop = True
end
object rbPositionTop: TRadioButton
Left = 70
Height = 17
Top = 77
Width = 38
Caption = 'Top'
TabOrder = 2
end
object lblUnitsX: TLabel
Left = 6
Height = 13
Top = 33
Width = 28
Caption = 'Units:'
ParentColor = False
end
object cbUnitsX: TComboBox
Left = 54
Height = 23
Top = 29
Width = 60
ItemHeight = 15
ItemIndex = 0
Items.Strings = (
'percent'
'axis'
'graph'
'pixel'
)
OnChange = cbUnitsXChange
Style = csDropDownList
TabOrder = 4
Text = 'percent'
end
end
object gbPositionY: TGroupBox
Left = 1
Height = 124
Top = 122
Width = 128
Align = alTop
Caption = ' Y axis '
ClientHeight = 104
ClientWidth = 124
TabOrder = 1
object lblPositionY: TLabel
Left = 6
Height = 13
Top = 4
Width = 41
Caption = 'Position:'
ParentColor = False
end
object cbStaticY: TCheckBox
Left = 6
Height = 17
Top = 56
Width = 97
Caption = 'Show static axis'
OnChange = cbStaticYChange
TabOrder = 0
end
object seYPosition: TSpinEdit
Left = 57
Height = 21
Top = 0
Width = 58
OnChange = seYPositionChange
TabOrder = 1
Value = 50
end
object rbPositionRight: TRadioButton
Left = 70
Height = 17
Top = 84
Width = 45
Caption = 'Right'
TabOrder = 2
end
object rbPositionLeft: TRadioButton
Left = 6
Height = 17
Top = 84
Width = 39
Caption = 'Left'
Checked = True
OnChange = rbPositionLeftChange
TabOrder = 3
TabStop = True
end
object cbUnitsY: TComboBox
Left = 54
Height = 23
Top = 29
Width = 60
ItemHeight = 15
ItemIndex = 0
Items.Strings = (
'percent'
'graph'
'pixel'
)
OnChange = cbUnitsYChange
Style = csDropDownList
TabOrder = 4
Text = 'percent'
end
object lblUnitsY: TLabel
Left = 6
Height = 13
Top = 33
Width = 28
Caption = 'Units:'
ParentColor = False
end
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
XMax = 0
XMin = 0
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 = 352
top = 232
end
object ChartToolsetDateTime: TChartToolset
left = 440
top = 232
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 = 440
top = 60
end
object udcsSub: TUserDefinedChartSource
OnGetChartDataItem = udcsSubGetChartDataItem
PointsNumber = 50
left = 440
top = 116
end
object udcsGraph: TUserDefinedChartSource
OnGetChartDataItem = udcsGraphGetChartDataItem
PointsNumber = 100
left = 440
top = 172
end
object csStripes: TChartStyles
Styles = <
item
Brush.Color = 16631498
UsePen = False
end
item
Brush.Color = 12319483
UsePen = False
end>
left = 352
top = 176
end
end
|