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 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763
|
object Form1: TForm1
Left = 559
Height = 434
Top = 158
Width = 533
Caption = 'TAChart axis transformation demo'
ClientHeight = 434
ClientWidth = 533
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '2.1.0.0'
object PageControl1: TPageControl
Left = 0
Height = 434
Top = 0
Width = 533
ActivePage = tsUser
Align = alClient
TabIndex = 4
TabOrder = 0
object tsLinear: TTabSheet
Caption = 'Linear'
ClientHeight = 406
ClientWidth = 525
object ChartT: TChart
Left = 0
Height = 379
Top = 0
Width = 525
AxisList = <
item
Grid.Visible = False
TickColor = clRed
Marks.LabelFont.Color = clRed
Marks.AtDataOnly = True
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Color = clRed
Title.LabelFont.Orientation = 900
Title.Visible = True
Title.Caption = 'Summer temperature, °C'
Title.LabelBrush.Style = bsClear
Transformations = catTAuto
end
item
Intervals.MaxLength = 100
Intervals.MinLength = 20
Alignment = calBottom
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.Visible = True
Title.Caption = 'Year'
Title.LabelBrush.Style = bsClear
end
item
Grid.Visible = False
TickColor = clBlue
Alignment = calRight
Marks.Distance = 4
Marks.LabelFont.Color = clBlue
Marks.AtDataOnly = True
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Color = clBlue
Title.LabelFont.Orientation = 900
Title.Visible = True
Title.Caption = 'Winter temperature, °F'
Title.LabelBrush.Style = bsClear
Transformations = catT
end>
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
object ChartTSummer: TLineSeries
AxisIndexY = 0
LinePen.Color = clRed
LinePen.Width = 2
Source = rcsTSummer
end
object ChartTWinterLine: TLineSeries
AxisIndexY = 2
LinePen.Color = clBlue
LinePen.Width = 2
Source = rcsTWinter
end
object ChartTWinterBar: TBarSeries
AxisIndexY = 2
BarBrush.Color = clBlue
BarBrush.Style = bsDiagCross
Source = rcsTWinter
end
end
object pnlAutoControls: TPanel
Left = 0
Height = 27
Top = 379
Width = 525
Align = alBottom
AutoSize = True
BevelOuter = bvNone
ClientHeight = 27
ClientWidth = 525
TabOrder = 1
object cbAuto: TCheckBox
AnchorSideLeft.Control = pnlAutoControls
AnchorSideTop.Control = pnlAutoControls
Left = 4
Height = 19
Top = 4
Width = 75
BorderSpacing.Left = 4
BorderSpacing.Top = 4
BorderSpacing.Bottom = 4
Caption = 'Auto scale'
OnChange = cbAutoChange
TabOrder = 0
end
end
end
object tsIndependent: TTabSheet
Caption = 'Independent scale'
ClientHeight = 406
ClientWidth = 525
object ChartIndependent: TChart
Left = 0
Height = 351
Top = 0
Width = 525
AxisList = <
item
Grid.Visible = False
Intervals.Tolerance = 1
TickColor = clNavy
Marks.LabelFont.Color = clNavy
Marks.LabelFont.Style = [fsBold]
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Orientation = 900
Title.LabelBrush.Style = bsClear
Transformations = catIndependent1
end
item
Grid.Visible = False
Alignment = calBottom
Marks.Visible = False
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelBrush.Style = bsClear
end
item
Grid.Visible = False
Intervals.Tolerance = 1
TickColor = clGreen
Alignment = calRight
Marks.LabelFont.Color = clGreen
Marks.LabelFont.Style = [fsBold]
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelBrush.Style = bsClear
Transformations = catIndependent2
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 ChartIndependentLineSeries1: TLineSeries
AxisIndexY = 0
LinePen.Color = clNavy
LinePen.Width = 2
end
object ChartIndependentLineSeries2: TLineSeries
AxisIndexY = 2
LinePen.Color = clGreen
LinePen.Width = 2
end
end
object pnlIndependentControls: TPanel
Left = 4
Height = 47
Top = 355
Width = 517
Align = alBottom
AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 47
ClientWidth = 517
TabOrder = 1
object fseIndependent1: TFloatSpinEdit
AnchorSideLeft.Control = lblIndependentScale1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = rgSyncAxisMarks
AnchorSideTop.Side = asrCenter
Left = 63
Height = 23
Top = 12
Width = 70
BorderSpacing.Left = 8
Increment = 0.1
MaxValue = 10
MinValue = 0.1
OnChange = fseIndependent1Change
TabOrder = 0
Value = 1
end
object fseIndependent2: TFloatSpinEdit
AnchorSideLeft.Control = lblIndependentScale2
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = rgSyncAxisMarks
AnchorSideTop.Side = asrCenter
Left = 196
Height = 23
Top = 12
Width = 70
BorderSpacing.Left = 8
Increment = 0.1
MaxValue = 10
MinValue = 0.1
OnChange = fseIndependent2Change
TabOrder = 1
Value = 1
end
object lblIndependentScale1: TLabel
AnchorSideLeft.Control = pnlIndependentControls
AnchorSideTop.Control = fseIndependent1
AnchorSideTop.Side = asrCenter
Left = 16
Height = 15
Top = 16
Width = 39
BorderSpacing.Left = 16
Caption = 'Scale 1'
Font.Color = clNavy
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object lblIndependentScale2: TLabel
AnchorSideLeft.Control = fseIndependent1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = fseIndependent2
AnchorSideTop.Side = asrCenter
Left = 149
Height = 15
Top = 16
Width = 39
BorderSpacing.Left = 16
Caption = 'Scale 2'
Font.Color = clGreen
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object rgSyncAxisMarks: TRadioGroup
AnchorSideRight.Side = asrBottom
Left = 336
Height = 47
Top = 0
Width = 181
Align = alRight
AutoFill = True
AutoSize = True
BorderSpacing.InnerBorder = 4
Caption = ' Synchronize marks '
ChildSizing.LeftRightSpacing = 6
ChildSizing.HorizontalSpacing = 10
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 3
ClientHeight = 27
ClientWidth = 177
Columns = 3
ItemIndex = 1
Items.Strings = (
'Left'
'None'
'Right'
)
OnClick = rgSyncAxisMarksClick
TabOrder = 2
end
end
end
object tsLog: TTabSheet
Caption = 'Logarithm'
ClientHeight = 406
ClientWidth = 525
object ChartLog: TChart
Left = 0
Height = 375
Top = 0
Width = 525
AxisList = <
item
Intervals.Count = 10
Intervals.Options = [aipGraphCoords, aipUseCount, aipUseMinLength, aipUseNiceSteps]
Intervals.Tolerance = 5
Marks.LabelBrush.Style = bsClear
Marks.Stripes = csStripes
Minors = <
item
Grid.Visible = False
Intervals.Count = 9
Intervals.MinLength = 5
Intervals.Options = [aipUseCount, aipUseMaxLength, aipUseMinLength, aipUseNiceSteps]
Marks.LabelBrush.Style = bsClear
end>
Title.LabelFont.Orientation = 900
Title.Visible = True
Title.Caption = 'Left'
Title.LabelBrush.Style = bsClear
Transformations = catLog
end
item
Grid.Visible = False
Alignment = calBottom
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.Distance = 0
Title.Visible = True
Title.Caption = 'Bottom'
Title.LabelBrush.Style = bsClear
end
item
Grid.Visible = False
Alignment = calRight
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Orientation = 900
Title.Visible = True
Title.Caption = 'Right 1'
Title.LabelBrush.Style = bsClear
end
item
Grid.Visible = False
Alignment = calTop
Arrow.Inverted = True
Inverted = True
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.Caption = 'Top'
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
object clsLogPoints: TLineSeries
AxisIndexY = 0
LineType = ltNone
Pointer.Brush.Color = clMaroon
Pointer.Visible = True
ShowPoints = True
end
object cfsLog: TFuncSeries
Extent.UseXMax = True
Extent.UseXMin = True
Extent.XMax = 3
Extent.XMin = -1
AxisIndexY = 0
OnCalculate = ChartLogFuncSeries1Calculate
end
end
object pnlLogControls: TPanel
Left = 4
Height = 23
Top = 379
Width = 517
Align = alBottom
AutoSize = True
BorderSpacing.Around = 4
BevelOuter = bvNone
ClientHeight = 23
ClientWidth = 517
TabOrder = 1
object cbLog: TCheckBox
AnchorSideLeft.Control = pnlLogControls
AnchorSideTop.Control = seTolerance
AnchorSideTop.Side = asrCenter
Left = 0
Height = 19
Top = 2
Width = 69
Caption = 'Log scale'
Checked = True
OnChange = cbLogChange
State = cbChecked
TabOrder = 0
end
object seTolerance: TSpinEdit
AnchorSideLeft.Control = lblTolerance
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = pnlLogControls
Left = 144
Height = 23
Top = 0
Width = 50
BorderSpacing.Left = 8
OnChange = seToleranceChange
TabOrder = 1
end
object lblTolerance: TLabel
AnchorSideLeft.Control = cbLog
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = seTolerance
AnchorSideTop.Side = asrCenter
Left = 85
Height = 15
Top = 4
Width = 51
BorderSpacing.Left = 16
Caption = 'Tolerance'
ParentColor = False
end
end
end
object tsCumulNormDistr: TTabSheet
Caption = 'Normal distribution'
ClientHeight = 406
ClientWidth = 525
object ChartCumulNormDistr: TChart
Left = 0
Height = 340
Top = 66
Width = 525
AxisList = <
item
Grid.Color = clSilver
Grid.Visible = False
Intervals.Count = 30
Intervals.Options = [aipUseCount, aipUseNiceSteps]
Intervals.Tolerance = 1
Marks.LabelBrush.Style = bsClear
Marks.OverlapPolicy = opHideNeighbour
Minors = <>
Title.LabelFont.Orientation = 900
Title.LabelFont.Style = [fsBold]
Title.Visible = True
Title.Caption = 'Cumulative probability'
Title.LabelBrush.Style = bsClear
Transformations = catCumulNormDistr
end
item
Grid.Color = clSilver
Grid.Visible = False
Alignment = calBottom
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Style = [fsBold]
Title.Visible = True
Title.Caption = 'Random number'
Title.LabelBrush.Style = bsClear
end>
BackColor = clWhite
Extent.XMax = 3
Extent.XMin = -3
Extent.YMax = 3
Extent.YMin = -3
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
MarginsExternal.Left = 8
MarginsExternal.Right = 12
MarginsExternal.Bottom = 8
Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue
Title.Text.Strings = (
'TAChart'
)
Align = alClient
object ChartCumulNormDistrLineSeries1: TLineSeries
AxisIndexX = 1
AxisIndexY = 0
Pointer.Brush.Color = clBlue
Pointer.HorizSize = 2
Pointer.Pen.Color = clBlue
Pointer.Style = psCircle
Pointer.VertSize = 2
Pointer.Visible = True
ShowPoints = True
end
end
object pnCumulNormDistr: TPanel
Left = 0
Height = 66
Top = 0
Width = 525
Align = alTop
AutoSize = True
BevelOuter = bvNone
ClientHeight = 66
ClientWidth = 525
TabOrder = 1
object rgRandDistr: TRadioGroup
Left = 4
Height = 58
Top = 4
Width = 175
Align = alLeft
AutoFill = True
AutoSize = True
BorderSpacing.Left = 4
BorderSpacing.Top = 4
BorderSpacing.Bottom = 4
Caption = ' Random number generation '
ChildSizing.LeftRightSpacing = 12
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 38
ClientWidth = 171
ItemIndex = 1
Items.Strings = (
'uniform distribution'
'normal distribution'
)
OnClick = rgRandDistrClick
ParentFont = False
TabOrder = 0
end
object cbPercent: TCheckBox
AnchorSideLeft.Control = lblDataCount
AnchorSideTop.Control = edDataCount
AnchorSideTop.Side = asrBottom
Left = 195
Height = 19
Top = 39
Width = 60
BorderSpacing.Top = 8
Caption = 'Percent'
OnChange = cbPercentChange
TabOrder = 1
end
object cbUseAxisTransform: TCheckBox
AnchorSideLeft.Control = edDataCount
AnchorSideTop.Control = cbPercent
Left = 264
Height = 19
Top = 39
Width = 118
BorderSpacing.Bottom = 4
Caption = 'Use AxisTransform'
OnChange = cbUseAxisTransformChange
TabOrder = 2
end
object edDataCount: TSpinEdit
AnchorSideLeft.Control = lblDataCount
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = pnCumulNormDistr
Left = 264
Height = 23
Top = 8
Width = 82
BorderSpacing.Left = 8
BorderSpacing.Top = 8
Increment = 50
MaxValue = 1000000
OnChange = edDataCountChange
TabOrder = 3
Value = 300
end
object lblDataCount: TLabel
AnchorSideLeft.Control = rgRandDistr
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = edDataCount
AnchorSideTop.Side = asrCenter
Left = 195
Height = 15
Top = 12
Width = 61
BorderSpacing.Left = 16
Caption = 'Data count:'
ParentColor = False
end
end
end
object tsUser: TTabSheet
Caption = 'User defined'
ClientHeight = 406
ClientWidth = 525
object ChartUser: TChart
Left = 0
Height = 406
Top = 0
Width = 525
AxisList = <
item
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelFont.Orientation = 900
Title.LabelBrush.Style = bsClear
end
item
Grid.Visible = False
Intervals.Count = 20
Intervals.MinLength = 20
Intervals.NiceSteps = '0.2|0.25|0.4|0.5|1.0'
Intervals.Options = [aipGraphCoords, aipUseCount, aipUseMaxLength, aipUseMinLength, aipUseNiceSteps]
Alignment = calBottom
Marks.LabelBrush.Style = bsClear
Minors = <>
Title.LabelBrush.Style = bsClear
Transformations = catUser
end>
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue
Title.Text.Strings = (
'Drag purple line to locally zoom in various axis segments'
)
Title.Visible = True
Toolset = ChartToolset1
Align = alClient
object ChartUserLineSeries1: TLineSeries
AxisIndexX = 1
Source = rcsUser
end
object ChartUserConstantLine1: TConstantLine
AxisIndex = 1
LineStyle = lsVertical
Pen.Color = clFuchsia
Pen.Width = 2
Position = 20
end
end
end
end
object catLog: TChartAxisTransformations
left = 216
top = 60
object ChartAxisTransformations1LinearAxisTransform2: TLinearAxisTransform
Scale = 2
end
object ChartAxisTransformations1LogarithmAxisTransform1: TLogarithmAxisTransform
Base = 10
end
end
object catT: TChartAxisTransformations
left = 352
top = 60
object catTFahrToCel: TLinearAxisTransform
Offset = -17.777777777
Scale = 0.5555555555
end
object catTAutoScaleAxisTransform1: TAutoScaleAxisTransform
Enabled = False
end
end
object rcsTSummer: TRandomChartSource
PointsNumber = 20
RandSeed = 114536250
XMax = 2009
XMin = 1990
YMax = 25
YMin = 0
left = 87
top = 106
end
object rcsTWinter: TRandomChartSource
PointsNumber = 20
RandSeed = 23453245
XMax = 2009
XMin = 1990
YMax = 20
YMin = -15
left = 87
top = 156
end
object catTAuto: TChartAxisTransformations
left = 352
top = 112
object catTAutoAutoScaleAxisTransform1: TAutoScaleAxisTransform
Enabled = False
end
end
object csStripes: TChartStyles
Styles = <
item
Brush.Color = 16631498
UsePen = False
end
item
Brush.Color = 12319483
UsePen = False
end>
left = 352
top = 176
end
object rcsUser: TRandomChartSource
PointsNumber = 100
RandSeed = 1999979507
XMax = 50
XMin = 0
YMax = 20
YMin = 10
left = 87
top = 208
end
object catUser: TChartAxisTransformations
left = 352
top = 236
object catUserUserDefinedAxisTransform1: TUserDefinedAxisTransform
OnAxisToGraph = catUserUserDefinedAxisTransform1AxisToGraph
end
end
object ChartToolset1: TChartToolset
left = 216
top = 116
object ChartToolset1DataPointDragTool1: TDataPointDragTool
Shift = [ssLeft]
AffectedSeries = '1'
end
end
object catIndependent1: TChartAxisTransformations
left = 220
top = 176
object catIndependent1Zoom: TLinearAxisTransform
end
end
object catIndependent2: TChartAxisTransformations
left = 220
top = 236
object catIndependent2Zoom: TLinearAxisTransform
end
end
object AxLabelSource: TListChartSource
left = 311
top = 305
end
object catCumulNormDistr: TChartAxisTransformations
left = 310
top = 305
object catCumulNormDistrLinearAxisTransform1: TLinearAxisTransform
Enabled = False
Scale = 0.01
end
object catCumulNormDistrCumulNormDistrAxisTransform1: TCumulNormDistrAxisTransform
Enabled = False
end
end
end
|