Difference between revisions of "TAChart Chart"

From Free Pascal wiki
Jump to navigationJump to search
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The Chart is the component from where you control much of the behaviour of your diagrams.
+
!! Under Construction... !!
 +
 
 +
The Chart is the component from where you control much of the behavior of your diagrams.
  
<br>
 
 
* [[#Methods_Public_id|'''Public Methods''']]
 
* [[#Methods_Public_id|'''Public Methods''']]
Clone <br>
+
*:Clone  
SaveToImage <br>
+
*:SaveToImage  
GetFullExtent <br>
+
*:GetFullExtent  
GetLegendItems <br>
+
*:GetLegendItems
GraphToImage <br>
+
*:GraphToImage
ImageToGraph <br>
+
*:ImageToGraph  
XGraphToImage <br>
+
*:XGraphToImage  
XImageToGraph <br>
+
*:XImageToGraph  
YGraphToImage <br>
+
*:YGraphToImage  
YImageToGraph <br>
+
*:YImageToGraph  
 
 
 
# [[#IsPointInViewPort_id|'''IsPointInViewPort <F>''']]
 
# [[#IsPointInViewPort_id|'''IsPointInViewPort <F>''']]
 
# [[#EraseBackground_id|'''EraseBackground <P>''']]
 
# [[#EraseBackground_id|'''EraseBackground <P>''']]
Line 22: Line 22:
 
# [[#DrawLineVert_id|'''Procedure DrawLineVert''']]
 
# [[#DrawLineVert_id|'''Procedure DrawLineVert''']]
 
# [[#DrawOnCanvas_id|'''Procedure DrawOnCanvas''']]
 
# [[#DrawOnCanvas_id|'''Procedure DrawOnCanvas''']]
AddSeries <br>
+
#:AddSeries
DeleteSeries <br>
+
#:DeleteSeries
RemoveSeries <br>
+
#:RemoveSeries
ClearSeries <br>
+
#:ClearSeries
CopyToClipboardBitmap <br>
+
#:CopyToClipboardBitmap
DisableRedrawing <br>
+
#:DisableRedrawing  
Draw <br>
+
#:Draw
DrawLegendOn <br>
+
#:DrawLegendOn
EnableRedrawing <br>
+
#:EnableRedrawing
PaintOnAuxCanvas <br>
+
#:PaintOnAuxCanvas
PaintOnCanvas <br>
+
#:PaintOnCanvas
Prepare <br>
+
#:Prepare
SaveToBitmapFile <br>
+
#:SaveToBitmapFile
SaveToFile <br>
+
#:SaveToFile
StyleChanged <br>
+
#:StyleChanged
ZoomFull <br>
+
#:ZoomFull
 
 
 
# [[#Properties_id|'''Properties''']]
 
# [[#Properties_id|'''Properties''']]
 
* [[#Published_prop_id|'''Published''']]
 
* [[#Published_prop_id|'''Published''']]
Drawer <br>
+
*: Align
AutoFocus <br>
+
*: Anchors
AllowZoom <br>
+
*: BorderSpacing
AntialiasingMode <br>
+
*: Color
AxisList <br>
+
*: DoubleBuffered
AxisVisible <br>
+
*: DragCursor
BackColor <br>
+
*: DragMode
BottomAxis <br>
+
*: Enabled
Depth <br>
+
*: ParentColor
ExpandPercentage <br>
+
*: ParentShowHint
Extent <br>
+
*: PopupMenu
ExtentSizeLimit <br>
+
*: ShowHint
Foot <br>
+
*: Visible
Frame <br>
+
*: Drawer
GUIConnector <br>
+
*: AutoFocus
LeftAxis <br>
+
*: AllowZoom
Legend <br>
+
*: AntialiasingMode
Margins <br>
+
*: AxisList
MarginsExternal <br>
+
*: AxisVisible
Proportional <br>
+
*: BackColor
ReticuleMode <br>
+
*: BottomAxis
Series <br>
+
*: Depth
Title <br>
+
*: ExpandPercentage
Toolset <br>
+
*: Extent
 
+
*: ExtentSizeLimit
 
+
*: Foot
<br>
+
*: Frame
<br>
+
*: GUIConnector
<br>
+
*: LeftAxis
 
+
*: Legend
 +
*: Margins
 +
*: MarginsExternal
 +
*: Proportional
 +
*: ReticuleMode
 +
*: Series
 +
*: Title
 +
*: Toolset
 
* [[#Unpublished_prop_id|'''Unpublished''']]
 
* [[#Unpublished_prop_id|'''Unpublished''']]
 
ActiveToolIndex <br>
 
ActiveToolIndex <br>
Line 90: Line 96:
 
YGraphMax <br>
 
YGraphMax <br>
 
YGraphMin <br>
 
YGraphMin <br>
 
 
 
# [[#Events_id|'''Events''']]
 
# [[#Events_id|'''Events''']]
 +
OnAfterDraw <br>
 +
OnAfterDrawBackground <br>
 +
OnAfterDrawBackWall <br>
 +
OnAfterPaint <br>
 +
OnBeforeDrawBackground <br>
 +
OnBeforeDrawBackWall <br>
 +
OnDrawReticule <br>
 +
OnExtentChanged <br>
 +
OnExtentChanging <br>
 +
OnClick <br>
 +
OnDblClick <br>
 +
OnDragDrop <br>
 +
OnDragOver <br>
 +
OnEndDrag <br>
 +
OnMouseDown <br>
 +
OnMouseMove <br>
 +
OnMouseUp <br>
 +
OnStartDrag <br>
  
  
<br>
 
 
* [[#Methods_Public_id|'''Public Methods''']]
 
* [[#Methods_Public_id|'''Public Methods''']]
 
** [[#Functions_id|'''Functions''']]
 
** [[#Functions_id|'''Functions''']]
Line 111: Line 132:
 
** [[#Unpublished_prop_id|'''Published''']]
 
** [[#Unpublished_prop_id|'''Published''']]
 
* [[#Events_id|'''Events''']]
 
* [[#Events_id|'''Events''']]
 
 
<br><br><br>
 
  
 
   public // Helpers for series drawing
 
   public // Helpers for series drawing
    procedure DrawLineHoriz(ADrawer: IChartDrawer; AY: Integer);
 
    procedure DrawLineVert(ADrawer: IChartDrawer; AX: Integer);
 
    procedure DrawOnCanvas(Rect: TRect; ACanvas: TCanvas); deprecated;
 
    function IsPointInViewPort(const AP: TDoublePoint): Boolean;
 
 
  public
 
    property Drawer: IChartDrawer read FConnectorData.FDrawer;
 
 
  public // Coordinate conversion
 
    function GraphToImage(const AGraphPoint: TDoublePoint): TPoint;
 
    function ImageToGraph(const APoint: TPoint): TDoublePoint; overload;
 
    function ImageToGraph(const AX, AY: Integer): TDoublePoint; overload;
 
    function XGraphToImage(AX: Double): Integer; inline;
 
    function XImageToGraph(AX: Integer): Double; inline;
 
    function YGraphToImage(AY: Double): Integer; inline;
 
    function YImageToGraph(AY: Integer): Double; inline;
 
 
 
  published
 
 
  published
 
    property OnAfterDraw: TDrawEvent read FOnAfterDraw write SetOnAfterDraw;
 
    property OnAfterDrawBackground: TChartAfterDrawEvent
 
      read FOnAfterDrawBackground write SetOnAfterDrawBackground;
 
    property OnAfterDrawBackWall: TChartAfterDrawEvent
 
      read FOnAfterDrawBackWall write SetOnAfterDrawBackWall;
 
    property OnAfterPaint: TChartEvent read FOnAfterPaint write FOnAfterPaint;
 
    property OnBeforeDrawBackground: TChartBeforeDrawEvent
 
      read FOnBeforeDrawBackground write SetOnBeforeDrawBackground;
 
    property OnBeforeDrawBackWall: TChartBeforeDrawEvent
 
      read FOnBeforeDrawBackWall write SetOnBeforeDrawBackWall;
 
    property OnDrawReticule: TDrawReticuleEvent
 
      read FOnDrawReticule write SetOnDrawReticule;
 
    property OnExtentChanged: TChartEvent
 
      read FOnExtentChanged write FOnExtentChanged;
 
    property OnExtentChanging: TChartEvent
 
      read FOnExtentChanging write FOnExtentChanging;
 
 
  published
 
    property Align;
 
    property Anchors;
 
    property BorderSpacing;
 
    property Color default clBtnFace;
 
    property DoubleBuffered;
 
    property DragCursor;
 
    property DragMode;
 
    property Enabled;
 
    property ParentColor;
 
    property ParentShowHint;
 
    property PopupMenu;
 
    property ShowHint;
 
    property Visible;
 
  
  published
+
[[Category:Old or unknown pages]]
    property OnClick;
 
    property OnDblClick;
 
    property OnDragDrop;
 
    property OnDragOver;
 
    property OnEndDrag;
 
    property OnMouseDown;
 
    property OnMouseMove;
 
    property OnMouseUp;
 
    property OnStartDrag;
 

Latest revision as of 11:58, 2 February 2017

!! Under Construction... !!

The Chart is the component from where you control much of the behavior of your diagrams.

  • Public Methods
    Clone
    SaveToImage
    GetFullExtent
    GetLegendItems
    GraphToImage
    ImageToGraph
    XGraphToImage
    XImageToGraph
    YGraphToImage
    YImageToGraph
  1. IsPointInViewPort <F>
  2. EraseBackground

  3. Procedure GetChildren
  4. Procedure Paint
  5. Procedure SetChildOrder
  6. Procedure DrawLineHoriz
  7. Procedure DrawLineVert
  8. Procedure DrawOnCanvas
    AddSeries
    DeleteSeries
    RemoveSeries
    ClearSeries
    CopyToClipboardBitmap
    DisableRedrawing
    Draw
    DrawLegendOn
    EnableRedrawing
    PaintOnAuxCanvas
    PaintOnCanvas
    Prepare
    SaveToBitmapFile
    SaveToFile
    StyleChanged
    ZoomFull
  9. Properties
  • Published
    Align
    Anchors
    BorderSpacing
    Color
    DoubleBuffered
    DragCursor
    DragMode
    Enabled
    ParentColor
    ParentShowHint
    PopupMenu
    ShowHint
    Visible
    Drawer
    AutoFocus
    AllowZoom
    AntialiasingMode
    AxisList
    AxisVisible
    BackColor
    BottomAxis
    Depth
    ExpandPercentage
    Extent
    ExtentSizeLimit
    Foot
    Frame
    GUIConnector
    LeftAxis
    Legend
    Margins
    MarginsExternal
    Proportional
    ReticuleMode
    Series
    Title
    Toolset
  • Unpublished

ActiveToolIndex
Broadcaster
ChartHeight
ChartWidth
ClipRect
CurrentExtent
ExtentBroadcaster
IsZoomed
LogicalExtent
OnChartPaint
PrevLogicalExtent
RenderingParams
ReticulePos
SeriesCount
XGraphMax
XGraphMin
YGraphMax
YGraphMin

  1. Events

OnAfterDraw
OnAfterDrawBackground
OnAfterDrawBackWall
OnAfterPaint
OnBeforeDrawBackground
OnBeforeDrawBackWall
OnDrawReticule
OnExtentChanged
OnExtentChanging
OnClick
OnDblClick
OnDragDrop
OnDragOver
OnEndDrag
OnMouseDown
OnMouseMove
OnMouseUp
OnStartDrag


 public // Helpers for series drawing