Hide Comments
Hide Comments

Comments (0)

The TRSCustomChartPanel component provides the panel or the canvas which is the visual parent of the charts (and where they are drawn) and where the user interacts with the charts (zooming, panning, selecting). The TRSCustomChartPanel component is the base class for the FMX.RS.ChartPanel.TRSChartPanel component. It provides the ability to significantly customize the look and feel of objects that are drawn with a chart: axes, legend, shadow, gradients, foreground and background, etc.

Panel Itself
Background (the surface or layer behind all chart panel elements)
Gradient (Drawn behind the chart panel elements and obscures the Background)
Header (the area above where the charts are drawn)
Footer (the area below where the charts are drawn)
BottomAxis
TopAxis
LeftAxis
RightAxis
ChartBackground
Charts
Legend (the text box that labels the charts or their values)
Foreground (the surface or layer in front of all chart panel elements)

In addition, the ChartShadow defines the attributes of the shadow that all chart elements can optionally cast.Except for the panel and the charts, each element of the chart descends, either directly or indirectly, from the TRSChartGraphic class, which provides common properties and methods of the elements of the chart. You can control which elements are drawn by setting each element's Visible property.
 

Namespace: FMX.RS.ChartPanel

expandingInheritance Hierarchy

TPanel
  FMX.RS.ChartPanel.TRSCustomChartPanel
    FMX.RS.ChartPanel.TRSChartPanel
 

expandingSyntax

Delphi

type 
  TRSCustomChartPanel = class(TPanel) 
  end;  
 

expandingConstructors

 

Name

Description

public constructor

Create(TComponent)

Initializes a new instance of the TRSCustomChartPanel class.

public destructor

Destroy

Represents the destructor of the TRSCustomChartPanel class.

Top

expandingProperties

 

Name

Description

public property

Background

The Background property is the surface or layer behind all chart panel elements. Set the properties of the Background property to change the visual aspect of the background.

A chart layer is similar to layers in Adobe Photoshop. The TRSChartPanel component displays itself using layers: there is a     Background layer that is painted first followed by a     Gradient layer which is painted on top (and can obscure) the background layer. Then, the     ChartBackground layer and the     Charts and related graphical elements are displayed (e.g.,     Header,     Footer,     Legend, axes). Finally, the TRSChartPanel paints a     Foreground layer on top of everything. The FMX.RS.ChartPanel.TRSChartLayer class provides the graphical properties for the Background and Foreground layers.
 

public property

BottomAxis

Provides the properties and behavior of the top (horizontal) chart axis for a TRSCustomChartPanel component. The FMX.RS.ChartPanel.TRSChartAxis class is responsible for managing the display of an axis (e.g., grid lines, labels, title) and for managing the range of chart values on an axis and converting between axis values and pixel values.

The TRSCustomChartPanel component uses the TRSChartAxis class for its four axes:     BottomAxis,     LeftAxis,     RightAxis, and     TopAxis. A FMX.RS.ChartPanel.TRSCustomChart component also keeps a reference to the horizontal and vertical axis that apply to its chart values (see     HorizontalAxis and     VerticalAxis properties).

The most important properties of the chart axis class are the     Minimum and     Maximum properties, which specify the range of the axis, and the     ZoomMinimum and     ZoomMaximum properties, which specify the zoomed range (e.g., visible range) of the axis. The     Options property controls the display of the axis and well as controlling whether the axis automatically updates its Minimum and Maximum range values based on the Charts, and their values, assigned to the axis. The most important methods of the axis are the AxisToPixel and     PixelToAxis methods, which are responsible for converting between the actual values of the axis and their location on a Canvas.
 

public property

Canvas

Represents property Canvas.

public property

ChartBackground

The ChartBackground property is the surface or layer behind all charts, e.g. the     ChartRect area. Set the properties of the ChartBackground property to change the visual aspect of the chart background.

A chart layer is similar to layers in Adobe Photoshop. The TRSChartPanel component displays itself using layers: there is a     Background layer that is painted first followed by a     Gradient layer which is painted on top (and can obscure) the background layer. Then, the     ChartBackground layer and the     Charts and related graphical elements are displayed (e.g.,     Header,     Footer,     Legend, axes). Finally, the TRSChartPanel paints a     Foreground layer on top of everything. The FMX.RS.ChartPanel.TRSChartLayer class provides the graphical properties for the Background and Foreground layers.
 

public property

ChartColorList

Defines the color list to use when new charts are created. When a chart is created and a color is not specified, the object will get a new color based on the next color in the list. If the list is at the end, the new color will be the first color in the list.

Set the ChartColorList property directly to define your own custom color scheme. Set the ChartColorScheme property to use one of the predefined color lists.

public property

ChartColorScheme

Defines the color scheme to use when new charts are created. When a chart is created and a color is not specified, the object will get a new color based on the next color in the color scheme.

Setting the ChartColorScheme property sets the     ChartColorList property. Set the ChartColorList property directly to define your own custom color scheme.

public property

ChartRect

Specifies the size (in pixels) of the area of the panel that contains the actual charts, e.g., where the charts are drawn. This is the area of the panel that does not include the   Header,   Footer, axes, etc. Read ChartRect to find the size of the chart area of the chart panel. The ChartRect will change in response to what elements of the chart panel are visible and their size.
 

public property

Charts

Contains the list of charts associated with the chart panel, e.g., their Panel property is set to the chart panel.

noteNote

The order of the charts in the list matters. The chart at Index 0 is drawn first, and then every chart is drawn over it.

public property

ChartShadow

Controls the visibility as well as the size and direction of the shadows drawn for the charts in the chart panel. The ChartShadow property is used by the Charts for specifying how they cast a shadow. Change the Size and Direction properties to control the direction and "length" of the shadow. Change the Brush and Pen to change the appearance of the shadow. Finally, use the   Visible property to turn chart shadows on or off.
 

protected property

DrawAreas

Represents property DrawAreas.

public property

Font

Specifies the attributes of text written on or in the control.
 
To change to a new font, specify a new TFont object. To modify a font, change the value of the Family, Size, or Style of the TFont object
 

public property

Footer

Controls the appearance of the footer of the chart panel, e.g., the area at the bottom of the chart panel. Change the properties of the footer to change the   Text drawn at the bottom of the chart as well as the footer background. Use the   Visible property to hide or show the footer.
 

public property

Foreground

The Foreground property is the surface or layer in front of all chart panel elements. Set the properties of the Foreground property to change the visual aspect of the background. Note that the Foreground can obscure either partially or completely the other elements of a chart panel.

A chart layer is similar to layers in Adobe Photoshop. The TRSChartPanel component displays itself using layers: there is a     Background layer that is painted first followed by a     Gradient layer which is painted on top (and can obscure) the background layer. Then, the     ChartBackground layer and the     Charts and related graphical elements are displayed (e.g.,     Header,     Footer,     Legend, axes). Finally, the TRSChartPanel paints a     Foreground layer on top of everything. The FMX.RS.ChartPanel.TRSChartLayer class provides the graphical properties for the Background and Foreground layers.
 

public property

Gradient

Provides the chart panel the ability to draw a gradient as the background of the chart panel. If the Gradient is Visible, it completely covers the   Background of the chart panel.
 

protected property

GradientBuffer

Represents property GradientBuffer.

public property

Header

Controls the appearance of the header of the chart panel, e.g., the area at the top of the chart panel. Change the properties of the header to change the   Text drawn at the top of the chart as well as the header background. Use the   Visible property to hide or show the header.
 

protected property

HintWindow

Represents property HintWindow.

public property

LeftAxis

Provides the properties and behavior of the left (vertical) chart axis for a TRSCustomChartPanel component. The FMX.RS.ChartPanel.TRSChartAxis class is responsible for managing the display of an axis (e.g., grid lines, labels, title) and for managing the range of chart values on an axis and converting between axis values and pixel values.

The TRSCustomChartPanel component uses the TRSChartAxis class for its four axes:     BottomAxis,     LeftAxis,     RightAxis, and     TopAxis. A FMX.RS.ChartPanel.TRSCustomChart component also keeps a reference to the horizontal and vertical axis that apply to its chart values (see     HorizontalAxis and     VerticalAxis properties).

The most important properties of the chart axis class are the     Minimum and     Maximum properties, which specify the range of the axis, and the     ZoomMinimum and     ZoomMaximum properties, which specify the zoomed range (e.g., visible range) of the axis. The     Options property controls the display of the axis and well as controlling whether the axis automatically updates its Minimum and Maximum range values based on the Charts, and their values, assigned to the axis. The most important methods of the axis are the AxisToPixel and     PixelToAxis methods, which are responsible for converting between the actual values of the axis and their location on a Canvas.
 

public property

Legend

Controls the appearance of the built-in legend of a chart panel. The legend is the box in chart graphics where the points of a chart are labeled or all the charts being displayed are labeled. The Legend has properties including     BoxSize,     Lines, and     LegendStyle. Use the     Visible property to hide or show the Legend.

Usually, the legend dynamically chooses and updates the Lines property to determine what to show. By using the     OnGetLegendStrings event, you can add lines to the top of the legend. By using the     Fixed property, you can update the Lines and the legend will not overwrite them.

alert_noteTip

Use the stand-alone legend controls (TRSLegendListBox and TRSChartLegendBox) for more control and visual appeal than the built-in legend.

public property

Listeners

Maintains a list of     IChartPanelListeners that are interested in changes to the chart panel. The TRSCustomChartPanel control will call the Listeners' methods as changes (adding, deleting, and modifying charts and chart values) occur in the control.

alert_noteNotes to Implementers

Add your class (that implements the IChartPanelListener interface) to this list in order to receive chart and chart value changes without using the regular events. The TRSLegendListBox and TRSChartFunction classes use this mechanism to listen to the chart panel without tieing up the event handlers (leaving them free for users)

public property

Margins

Specifies the margins, or empty space, for the top, left, right, and bottom of the chart panel. The   Header,   Footer, axes, and all other chart elements are placed inside these margins. Use the Margins property to specifies the chart panel margins in canvas pixels (integer in VCL and single floating point in FMX)
 

protected property

MouseTrackingOn

Represents property MouseTrackingOn.

protected property

MouseTrackingPoint

Represents property MouseTrackingPoint.

public property

OnChange

Occurs when the chart panel changes. Write an OnChange event handler to take action when the chart panel changes.

public property

OnGetLegendStrings

Occurs when the Legend is compiling the strings - the   Lines - that compose the legend. The event occurs before the Legend fills its Lines property. Use the OnGetLegendStrings event to add extra text to the top of the legend.

public property

OnPan

Occurs when the chart panel pans its visual window. The OnPan event occurs after the Pan has actually occurred. Use the OnPan event handler to take action when a pan occurs.

public property

OnUnzoom

Occurs when the chart panel unzooms its visual window. The OnUnzoom event occurs after the UnZoom has actually occurred. Use the OnUnzoom event handler to take action when an unzoom occurs.

public property

OnZoom

Occurs when the chart panel zooms its visual window. The OnZoom event occurs after the Zoom has actually occurred. Use the Onzoom event handler to take action when a zoom occurs

public property

RightAxis

Provides the properties and behavior of the right (vertical) chart axis for a TRSCustomChartPanel component. The FMX.RS.ChartPanel.TRSChartAxis class is responsible for managing the display of an axis (e.g., grid lines, labels, title) and for managing the range of chart values on an axis and converting between axis values and pixel values.

The TRSCustomChartPanel component uses the TRSChartAxis class for its four axes:     BottomAxis,     LeftAxis,     RightAxis, and     TopAxis. A FMX.RS.ChartPanel.TRSCustomChart component also keeps a reference to the horizontal and vertical axis that apply to its chart values (see     HorizontalAxis and     VerticalAxis properties).

The most important properties of the chart axis class are the     Minimum and     Maximum properties, which specify the range of the axis, and the     ZoomMinimum and     ZoomMaximum properties, which specify the zoomed range (e.g., visible range) of the axis. The     Options property controls the display of the axis and well as controlling whether the axis automatically updates its Minimum and Maximum range values based on the Charts, and their values, assigned to the axis. The most important methods of the axis are the AxisToPixel and     PixelToAxis methods, which are responsible for converting between the actual values of the axis and their location on a Canvas.
 

protected property

SelectionBox

Represents property SelectionBox.

public property

SelectionColor

Defines the color to draw a chart value when it is selected. When a chart value's   Selected property is False, the chart value is painted with either the Chart's   Color or the chart value's   Color (depending on chart   Options). However, when a chart value is selected, this property provides the color of the chart value.
 

public property

TopAxis

Provides the properties and behavior of the bottom (horizontal) chart axis for a TRSCustomChartPanel component. The FMX.RS.ChartPanel.TRSChartAxis class is responsible for managing the display of an axis (e.g., grid lines, labels, title) and for managing the range of chart values on an axis and converting between axis values and pixel values.

The TRSCustomChartPanel component uses the TRSChartAxis class for its four axes:     BottomAxis,     LeftAxis,     RightAxis, and     TopAxis. A FMX.RS.ChartPanel.TRSCustomChart component also keeps a reference to the horizontal and vertical axis that apply to its chart values (see     HorizontalAxis and     VerticalAxis properties).

The most important properties of the chart axis class are the     Minimum and     Maximum properties, which specify the range of the axis, and the     ZoomMinimum and     ZoomMaximum properties, which specify the zoomed range (e.g., visible range) of the axis. The     Options property controls the display of the axis and well as controlling whether the axis automatically updates its Minimum and Maximum range values based on the Charts, and their values, assigned to the axis. The most important methods of the axis are the AxisToPixel and     PixelToAxis methods, which are responsible for converting between the actual values of the axis and their location on a Canvas.
 

protected property

UserAction

Represents property UserAction.

public property

UserActions

Defines the actions that the user may take with the chart panel. Use the UserActions to enable or disable actions that the user may take with the chart panel. The   UserPan,   UserSelect, and   UserZoom properties define how the user interacts with the chart panel.
 

public property

UserPan

Defines the mouse and keyboard action the user must perform in order to   Pan the chart panel. Note that this property only defines the action the user must take. The   UserActions property actually enables or disables the action.
 

public property

UserProportional

Defines the mouse and keyboard action the user must perform in order to constrain the aspect ratio when zooming the chart panel, i.e., the zoomed rectangle is proportional to the   ChartRect.
 

public property

UserSelect

Defines the mouse and keyboard action the user must perform in order to select chart values in the chart panel. Note that this property only defines the action the user must take. The   UserActions property actually enables or disables the action.
 

public property

UserZoom

Defines the mouse and keyboard action the user must perform in order to   Zoom the chart panel. Note that this property only defines the action the user must take. The   UserActions property actually enables or disables the action.
 

Top

expandingMethods

 

Name

Description

public method

AfterPaint

Represents method AfterPaint.

public methodClass member

AxesPointToPoint(TRSPoint,TRSChartAxis,TRSChartAxis)

Converts axes coordinate to canvas coordinates using the specified X and Y axes. The AxesPointToPoint uses the TRSChartAxis AxisToPixel method. Unlike the AxisToPixel method which converts only the x value or y value, the AxesPointToPoint method converts a point to the canvas coordinates.

public methodClass member

AxesRectToRect(TRSRect,TRSChartAxis,TRSChartAxis)

Converts axes coordinates to canvas rectangle coordinates using the specified X and Y axes. The AxesRectToRect method uses the TRSChartAxis AxisToPixel method. Unlike the AxisToPixel method which converts only the x value or y value, the AxesRectToRect method converts an entire chart rectangle to canvas rectangle coordinates.
 

protected method

Changed

Overloaded. Represents method Changed.

protected method

Changed(TRSCustomChart)

Overloaded. Represents method Changed(TRSCustomChart).

protected method

ChartAdded(TRSCustomChart)

Represents method ChartAdded(TRSCustomChart).

protected method

ChartDeleted(TRSCustomChart)

Represents method ChartDeleted(TRSCustomChart).

protected method

ChartListNotify(TObject,TRSCustomChart,TRSListNotification)

Represents method ChartListNotify(TObject,TRSCustomChart,TRSListNotification).

protected method

CreateAxis(TRSChartAxisLocation)

Represents method CreateAxis(TRSChartAxisLocation).

protected method

CreateGradient

Represents method CreateGradient.

protected method

CreateHeader(String,Boolean)

Represents method CreateHeader(String,Boolean).

protected method

CreateLayer(Boolean)

Represents method CreateLayer(Boolean).

protected method

CreateLegend

Represents method CreateLegend.

protected method

CreateShadow

Represents method CreateShadow.

protected method

DoMouseLeave

Represents method DoMouseLeave.

public method

Draw(TCanvas,TCanvasRect)

Overloaded.  Paints the chart panel, including its     Background,     Header,     Footer,     Charts, etc to the specified canvas and in the specified rectangle. Use the Draw method to paint the chart panel on any canvas you want.

A chart panel is composed of, and draws in the following order, these elements: A chart panel is composed of, and draws in the following order, these elements:

Panel Itself
Background (the surface or layer behind all chart panel elements)
Gradient (Drawn behind the chart panel elements and obscures the Background)
Header (the area above where the charts are drawn)
Footer (the area below where the charts are drawn)
ChartBackground
Legend (the text box that labels the charts or their values)
Foreground (the surface or layer in front of all chart panel elements)

Every element is optional and is controlled by their Visible property.

In addition, the     ChartShadow defines the attributes of the shadow that all chart elements can optionally cast.
 

public method

Draw(TCanvas,TCanvasRect,TChartPanelAreas)

Overloaded. Represents method Draw(TCanvas,TCanvasRect,TChartPanelAreas).

protected method

DrawCharts(TCanvas,TCanvasRect)

Draws all the   charts of the chart panel to the canvas

protected method

Drawing(TCanvas,TCanvasRect)

Represents method Drawing(TCanvas,TCanvasRect).

protected method

DrawMouseTracking(TCanvasPoint)

Represents method DrawMouseTracking(TCanvasPoint).

protected method

Drawn(TCanvas,TCanvasRect)

Represents method Drawn(TCanvas,TCanvasRect).

protected method

DrawSelectionBox(TCanvasRect)

Represents method DrawSelectionBox(TCanvasRect).

protected method

GetAxis(THorizontalAxis)

Overloaded. Represents method GetAxis(THorizontalAxis).

protected method

GetAxis(TVerticalAxis)

Overloaded. Represents method GetAxis(TVerticalAxis).

public method

GetChartColor

Returns a new chart color based on the   ChartColorScheme and   ChartColorList. Every time a chart is created, it is assigned a new color from the current ChartColorList.

protected method

GetLegendStrings(TStrings)

Represents method GetLegendStrings(TStrings).

protected method

InternalDraw(TCanvas,TCanvasRect)

Represents method InternalDraw(TCanvas,TCanvasRect).

public method

Invalidate

Represents method Invalidate.

protected method

MouseDown(TMouseButton,TShiftState,TCanvasPixel,TCanvasPixel)

Represents method MouseDown(TMouseButton,TShiftState,TCanvasPixel,TCanvasPixel).

protected method

MouseMove(TShiftState,TCanvasPixel,TCanvasPixel)

Represents method MouseMove(TShiftState,TCanvasPixel,TCanvasPixel).

protected method

MouseUp(TMouseButton,TShiftState,TCanvasPixel,TCanvasPixel)

Represents method MouseUp(TMouseButton,TShiftState,TCanvasPixel,TCanvasPixel).

protected method

Notification(TComponent,TOperation)

Represents method Notification(TComponent,TOperation).

protected method

Paint

Represents method Paint.

public method

Pan(Integer,Integer,Boolean,Boolean)

Overloaded.  Moves the visual window (or the zoomed window) that the chart panel displays. The zoomed area is not changed. By default, the Pan method uses the     BottomAxis and the     LeftAxis to pan. By changing the UseBottomAxis and UseLeftAxis parameters, you can change which axes are used. The MoveX and MoveY parameters, which is based on pixels, are first converted into the equivalent amounts based on chart axis values.

Specifying a positive MoveX amount moves the zoomed window right and a negative amount moves it left. Specifying a positive MoveY amount moves the zoomed window up and a negative amount moves it down.

Use the overloaded Pan method to move the visual window using chart axis values directly.

noteNote

The Pan method does nothing if no chart axis is zoomed (Zooming = False).

public method

Pan(TRSChartValueType,TRSChartValueType,Boolean,Boolean)

Overloaded.  Moves the visual window (or the zoomed window) that the chart panel displays. The zoomed area is not changed. By default, the Pan method uses the     BottomAxis and the     LeftAxis to pan. By changing the UseBottomAxis and UseLeftAxis parameters, you can change which axes are used. The MoveX and MoveY parameters, which are based on chart values, specify the movement amount.

Specifying a positive MoveX amount moves the zoomed window right and a negative amount moves it left. Specifying a positive MoveY amount moves the zoomed window up and a negative amount moves it down.

Use the overloaded Pan method to move the visual window using canvas pixel values.

noteNote

The Pan method does nothing if no chart axis is zoomed (Zooming = False).

public methodClass member

PointToAxesPoint(TCanvasPoint,TRSChartAxis,TRSChartAxis)

Converts a canvas coordinate to axes coordinates using the specified X and Y axes. The PointToAxesPoint uses the TRSChartAxis PixelToAxis method. Unlike the PixelToAxis method which converts only the x value or y value, the PointToAxesPoint method converts a point to the internal point coordinate.

public methodClass member

RectToAxesRect(TCanvasRect,TRSChartAxis,TRSChartAxis)

Converts pixel rectangle coordinates to axes coordinates using the specified X and Y axes. The RectToAxesRect method uses the TRSChartAxis PixelToAxis method. Unlike the PixelToAxis method which converts only the x value or y value, the RectToAxesRect method converts an entire rectangle to the internal rectangle coordinates.

protected method

Resize

Represents method Resize.

public method

ScreenToChart(TCanvasPoint)

Converts the screen coordinates of a specified point on the screen to chart panel coordinates. Use ScreenToChart to convert a point in screen coordinates to local, or chart panel area, coordinates. In chart panel area coordinates (0, 0) corresponds to the upper left corner of the chart panel's client area. In screen coordinates (0, 0) corresponds to the upper left corner of the screen.

public method

Select(TCanvasRect,TRSChartSelectionAction)

Selects or deselects any chart values displayed within the SelectionRect. Use the Select method to select chart values within the SelectionRect.

alert_cautionWarning

Note that the Select method does not work for all chart types

protected method

SelectionColorChanged

Represents method SelectionColorChanged.

protected method

SenderChanged(TObject)

Overloaded. Represents method SenderChanged(TObject).

public method

Unzoom(Boolean,Boolean)

Resets the visual window for the two chart axes to their full visual range (e.g.,   ZoomMinimum =   Minimum and   ZoomMaximum =   Maximum for both the horizontal and vertical axis). Usually, it unzooms the   BottomAxis and the   LeftAxis to change displayed area for charts associated with those axes. Set the UseBottomAxis parameter to False to use the   TopAxis and the UseLeftAxis parameter to False to use the   RightAxis.

protected method

UpdateChartColorScheme

Updates the Charts and their values (if Preview is True) to the current color scheme

protected method

UpdateLegend(TRSCustomChart,TRSChartValue)

Represents method UpdateLegend(TRSCustomChart,TRSChartValue).

protected method

ValueChanged(TRSCustomChart,TRSChartValue)

Represents method ValueChanged(TRSCustomChart,TRSChartValue).

protected method

ValueSelectionChanged(TRSCustomChart,TRSChartValue)

Represents method ValueSelectionChanged(TRSCustomChart,TRSChartValue).

protected method

ValueVisibleChanged(TRSCustomChart,TRSChartValue)

Represents method ValueVisibleChanged(TRSCustomChart,TRSChartValue).

protected method

VisibleChanged(TRSCustomChart)

Represents method VisibleChanged(TRSCustomChart).

public method

Zoom(TRSPoint,Single,Single,Boolean,Boolean)

Overloaded.  Zooms the chart panel to desired point in chart coordinates. The magnification of the zoom area is specified by the ZoomX and ZoomY parameters, e.g., ZoomX/ZoomY = 2 means 2x magnification. A value less than or equal to 1 unzooms that axis.

Usually, this method zooms the     BottomAxis and the     LeftAxis to change displayed area for charts associated with those axes. Set the UseBottomAxis parameter to False to use the TopAxis and the UseLeftAxis parameter to False to use the     RightAxis.

Use the     ZoomPixelArea method to zoom the visual window by using a pixel coordinate rectangle of the chart panel's canvas. Use the     Zoom method to zoom the visual window by using a chart value coordinate rectangle directly.
 

public method

Zoom(TRSRect,Boolean,Boolean)

Overloaded.  Zooms the chart panel to the desired rectangle. Usually, it zooms the     BottomAxis and the     LeftAxis to change displayed area for charts associated with those axes. Set the UseBottomAxis parameter to False to use the TopAxis and the UseLeftAxis parameter to False to use the     RightAxis. The Zoom method accepts a chart value coordinate rectangle and zooms the visual window to that rectangle.

Use the ZoomPixelArea method to zoom the visual window by using a pixel coordinate rectangle of the chart panel's canvas.

The Zoom method uses the TRSChartAxis.Zoom method to change the ZoomMinimum and ZoomMaximum properties of the specified horizontal and vertical axes.
 

public method

ZoomPixelArea(TCanvasRect,Boolean,Boolean)

Overloaded.  Zooms the chart panel to the desired rectangle. Usually, it zooms the     BottomAxis and the     LeftAxis to change displayed area for charts associated with those axes. Set the UseBottomAxis parameter to False to use the TopAxis and the UseLeftAxis parameter to False to use the     RightAxis. The ZoomPixelArea method accepts a pixel coordinate rectangle within the chart panel, converts that rectangle to a chart value coordinate rectangle for the desired axes, and zooms the visual window to that rectangle.

Use the Zoom method to zoom the visual window by using a chart value coordinate rectangle directly.

The ZoomPixelArea method uses the FMX.RS.ChartPanel.TRSChartAxis .Zoom method to change the ZoomMinimum and ZoomMaximum properties of the specified horizontal and vertical axes.
 

Top

expandingEvents

 

Name

Description

public event

OnAddChart

Occurs when a chart is added to the chart panel. Write an OnAddChart event handler to respond to new charts.

public event

OnChartChange

Occurs when a chart associated with the chart panel changes. Write an OnChartChange event handler to respond to changes in charts.

public event

OnChartValueChange

Occurs when one of a chart's   Values changes. Write an OnChartValueChange event handler when you want to take action when a chart's value changes.

public event

OnChartValueSelectionChange

Occurs when one of a chart's   Values is selected or deselected. Write an OnChartValueSelectionChange event handler when you want to take action when a chart value's selection changes

public event

OnChartValueVisibleChange

Occurs when one of a chart's   Values visibility changes. Write an OnChartValueVisibleChange event handler when you want to take action when a chart value's Visible property changes.

public event

OnDeleteChart

Occurs when a chart is removed from the chart panel. Write an OnDeleteChart event handler to respond to charts being deleted from the panel (note that the charts are not necessary being freed, just deleted from the chart panel, i.e., their   Panel property is being set to nil).

public event

OnDraw

Ocurs after the chart panel has finished drawing. Write an OnDraw event handler to take specific action after the chart panel has finished drawing. The Canvas parameter points to the canvas where the the chart panel was drawn. The ARect rectangle contains the rectangle coordinates where the the chart panel was drawn.
 

The OnDraw event occurs when the     Draw method is called and after all drawing
 

public event

OnDrawBackground

Occurs after the   Background has finished drawing. Write an OnDrawBackground event handler to take specific action after background has finished drawing. The Canvas parameter points to the canvas where the background was drawn. The ARect rectangle contains the rectangle coordinates where the background was drawn.
 

public event

OnDrawBottomAxis

Occurs after the   BottomAxis has finished drawing. Write an OnDrawBottomAxis event handler to take specific action after the BottomAxis has finished drawing. The Canvas parameter points to the canvas where the BottomAxis was drawn. The ARect rectangle contains the rectangle coordinates where the BottomAxis was drawn.

public event

OnDrawChartBackground

Occurs after the   ChartBackground has finished drawing. Write an OnDrawChartBackground event handler to take specific action after ChartBackground has finished drawing. The Canvas parameter points to the canvas where the ChartBackground was drawn. The ARect rectangle contains the rectangle coordinates where the ChartBackground was drawn.
 

public event

OnDrawCharts

Occurs after the   Charts have finished drawing. Write an OnDrawCharts event handler to take specific action after the Charts have finished drawing. The Canvas parameter points to the canvas where the Charts were drawn. The ARect rectangle contains the rectangle coordinates where the Charts were drawn.

public event

OnDrawChartShadow

Occurs after the   ChartShadow has finished drawing. Write an OnDrawChartShadow event handler to take specific action after the ChartShadow has finished drawing. The Canvas parameter points to the canvas where the ChartShadow was drawn. The ARect rectangle contains the rectangle coordinates where the ChartShadow was drawn.

public event

OnDrawFooter

Occurs after the   Footer has finished drawing. Write an OnDrawFooter event handler to take specific action after the Footer has finished drawing. The Canvas parameter points to the canvas where the Footer was drawn. The ARect rectangle contains the rectangle coordinates where the Footer was drawn.

public event

OnDrawForeground

Occurs after the   Foreground has finished drawing. Write an OnDrawForeground event handler to take specific action after the Foreground has finished drawing. The Canvas parameter points to the canvas where the Foreground was drawn. The ARect rectangle contains the rectangle coordinates where the Foreground was drawn.

public event

OnDrawGradient

Occurs after the   Gradient has finished drawing. Write an OnDrawGradient event handler to take specific action after the Gradient has finished drawing. The Canvas parameter points to the canvas where the Gradient was drawn. The ARect rectangle contains the rectangle coordinates where the Gradient was drawn.

public event

OnDrawHeader

Occurs after the   Header has finished drawing. Write an OnDrawHeader event handler to take specific action after the Header has finished drawing. The Canvas parameter points to the canvas where the Header was drawn. The ARect rectangle contains the rectangle coordinates where the Header was drawn.

public event

OnDrawing

Occurs just before the chart panel paints itself. Use the OnDrawing event handler to take action before the chart panel draws. By setting the DoDraw parameter to False, the drawing can be cancelled. The Canvas parameter contains the canvas where the chart panel will be drawn, and the ARect parameter specifies where on the canvas the chart panel will be drawn.

The OnDrawing event occurs when the     Draw method is called or painting occurs but before the drawing actually starts.
 

public event

OnDrawingBackground

Occurs right before the   Background is drawn. Use the OnDrawingBackground event to paint behind the Background before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the Background from drawing. The Canvas parameter contains the canvas where the Background will be drawn, and the ARect parameter specifies where on the canvas the Background will be drawn.

public event

OnDrawingBottomAxis

Occurs right before the   BottomAxis is drawn. Use the OnDrawingBottomAxis event to paint behind the BottomAxis before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the BottomAxis from drawing. The Canvas parameter contains the canvas where the BottomAxis will be drawn, and the ARect parameter specifies where on the canvas the BottomAxis will be drawn.

public event

OnDrawingChartBackground

Occurs right before the   ChartBackground is drawn. Use the OnDrawingChartBackground event to paint behind the ChartBackground before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the ChartBackground from drawing. The Canvas parameter contains the canvas where the ChartBackground will be drawn, and the ARect parameter specifies where on the canvas the ChartBackground will be drawn.

public event

OnDrawingCharts

Occurs right before the   Charts are drawn. Use the OnDrawingCharts event to paint behind the Charts before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the Charts from drawing. The Canvas parameter contains the canvas where the Charts will be drawn, and the ARect parameter specifies where on the canvas the Charts will be drawn.

public event

OnDrawingChartShadow

Occurs right before the   ChartShadow is drawn. Use the OnDrawingChartShadow event to paint behind the ChartShadow before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the ChartShadow from drawing. The Canvas parameter contains the canvas where the ChartShadow will be drawn, and the ARect parameter specifies where on the canvas the ChartShadow will be drawn.

public event

OnDrawingFooter

Occurs right before the   Footer is drawn. Use the OnDrawingFooter event to paint behind the Footer before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the Footer from drawing. The Canvas parameter contains the canvas where the Footer will be drawn, and the ARect parameter specifies where on the canvas the Footer will be drawn.

public event

OnDrawingForeground

Occurs right before the   Foreground is drawn. Use the OnDrawingForeground event to paint behind the Foreground before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the Foreground from drawing. The Canvas parameter contains the canvas where the Foreground will be drawn, and the ARect parameter specifies where on the canvas the Foreground will be drawn.

public event

OnDrawingGradient

Occurs right before the   Gradient is drawn. Use the OnDrawingGradient event to paint behind the Gradient before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the Gradient from drawing. The Canvas parameter contains the canvas where the Gradient will be drawn, and the ARect parameter specifies where on the canvas the Gradient will be drawn.

public event

OnDrawingHeader

Occurs right before the   Header is drawn. Use the OnDrawingHeader event to paint behind the Header before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the Header from drawing. The Canvas parameter contains the canvas where the Header will be drawn, and the ARect parameter specifies where on the canvas the Header will be drawn.

public event

OnDrawingLeftAxis

Occurs right before the   LeftAxis is drawn. Use the OnDrawingLeftAxis event to paint behind the LeftAxis before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the LeftAxis from drawing. The Canvas parameter contains the canvas where the LeftAxis will be drawn, and the ARect parameter specifies where on the canvas the LeftAxis will be drawn.

public event

OnDrawingLegend

Occurs right before the   Legend is drawn. Use the OnDrawingLegend event to paint behind the Legend before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the Legend from drawing. The Canvas parameter contains the canvas where the Legend will be drawn, and the ARect parameter specifies where on the canvas the Legend will be drawn.

public event

OnDrawingRightAxis

Occurs right before the   RightAxis is drawn. Use the OnDrawingRightAxis event to paint behind the RightAxis before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the RightAxis from drawing. The Canvas parameter contains the canvas where the RightAxis will be drawn, and the ARect parameter specifies where on the canvas the RightAxis will be drawn.

public event

OnDrawingTopAxis

Occurs right before the   TopAxis is drawn. Use the OnDrawingTopAxis event to paint behind the TopAxis before it is drawn over top. By setting the DoDraw parameter to False, you can also prevent the TopAxis from drawing. The Canvas parameter contains the canvas where the TopAxis will be drawn, and the ARect parameter specifies where on the canvas the TopAxis will be drawn.

public event

OnDrawLeftAxis

Occurs after the   LeftAxis has finished drawing. Write an OnDrawLeftAxis event handler to take specific action after the LeftAxis has finished drawing. The Canvas parameter points to the canvas where the LeftAxis was drawn. The ARect rectangle contains the rectangle coordinates where the LeftAxis was drawn.

public event

OnDrawLegend

Occurs after the   Legend has finished drawing. Write an OnDrawLegend event handler to take specific action after the Legend has finished drawing. The Canvas parameter points to the canvas where the Legend was drawn. The ARect rectangle contains the rectangle coordinates where the Legend was drawn.

public event

OnDrawRightAxis

Occurs after the   RightAxis has finished drawing. Write an OnDrawRightAxis event handler to take specific action after the RightAxis has finished drawing. The Canvas parameter points to the canvas where the RightAxis was drawn. The ARect rectangle contains the rectangle coordinates where the RightAxis was drawn.
 

public event

OnDrawTopAxis

Occurs after the   TopAxis has finished drawing. Write an OnDrawTopAxis event handler to take specific action after the TopAxis has finished drawing. The Canvas parameter points to the canvas where the TopAxis was drawn. The ARect rectangle contains the rectangle coordinates where the TopAxis was drawn.
 

Top

expandingFields

 

Name

Description

protected field

FColorListIndex

Represents field FColorListIndex.

public field

FGUIChartLayout

Represents field FGUIChartLayout.

public field

FGUIMouseHorizLine

Represents field FGUIMouseHorizLine.

public field

FGUIMouseVertLine

Represents field FGUIMouseVertLine.

public field

FGUISelectionRect

Represents field FGUISelectionRect.

Top

expandingExamples

To display a chart inside a chart panel:
 
• Drop a TRSChart descendant component on a form
• Drop a TRSChartPanel component where you want the chart to be displayed. (Note, more than one chart can share the same chart panel)
• Connect the Panel property of the chart to the chart panel
 

expandingSee Also

Comments (0)

RiverSoftAVG Charting Component Suite (RCCS) © 2005-2015, Thomas G. Grubb