Hide Comments
Hide Comments

Comments (0)

The TRSChartPanel component publishes the properties and events of its TRSCustomChartPanel component ancestor. 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). 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
  TRSChartPanel = class(TRSCustomChartPanel)
  end; 
 

expandingConstructors

 

Name

Description

public constructor

Create(TComponent)

Initializes a new instance of the TRSCustomChartPanel class. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

Top

expandingProperties

 

Name

Description

published property

Background

Represents property Background.

published property

BottomAxis

Represents property BottomAxis.

public property

Canvas

Represents property Canvas. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

published property

ChartBackground

Represents property ChartBackground.

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.

published property

ChartColorScheme

Represents property ChartColorScheme.

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.
 (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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.

published property

ChartShadow

Represents property ChartShadow.

protected property

DrawAreas

Represents property DrawAreas. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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
 (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

published property

Footer

Represents property Footer.

published property

Foreground

Represents property Foreground.

published property

Gradient

Represents property Gradient.

protected property

GradientBuffer

Represents property GradientBuffer. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

published property

Header

Represents property Header.

protected property

HintWindow

Represents property HintWindow. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

published property

LeftAxis

Represents property LeftAxis.

published property

Legend

Represents property 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)

published property

Margins

Represents property Margins.

protected property

MouseTrackingOn

Represents property MouseTrackingOn. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected property

MouseTrackingPoint

Represents property MouseTrackingPoint. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

published property

OnAddChart

Represents property OnAddChart.

published property

OnChange

Represents property OnChange.

published property

OnChartChange

Represents property OnChartChange.

published property

OnChartValueChange

Represents property OnChartValueChange.

published property

OnChartValueSelectionChange

Represents property OnChartValueSelectionChange.

published property

OnChartValueVisibleChange

Represents property OnChartValueVisibleChange.

published property

OnDeleteChart

Represents property OnDeleteChart.

published property

OnDraw

Represents property OnDraw.

published property

OnDrawBackground

Represents property OnDrawBackground.

published property

OnDrawBottomAxis

Represents property OnDrawBottomAxis.

published property

OnDrawChartBackground

Represents property OnDrawChartBackground.

published property

OnDrawCharts

Represents property OnDrawCharts.

published property

OnDrawChartShadow

Represents property OnDrawChartShadow.

published property

OnDrawFooter

Represents property OnDrawFooter.

published property

OnDrawForeground

Represents property OnDrawForeground.

published property

OnDrawGradient

Represents property OnDrawGradient.

published property

OnDrawHeader

Represents property OnDrawHeader.

published property

OnDrawing

Represents property OnDrawing.

published property

OnDrawingBackground

Represents property OnDrawingBackground.

published property

OnDrawingBottomAxis

Represents property OnDrawingBottomAxis.

published property

OnDrawingChartBackground

Represents property OnDrawingChartBackground.

published property

OnDrawingCharts

Represents property OnDrawingCharts.

published property

OnDrawingChartShadow

Represents property OnDrawingChartShadow.

published property

OnDrawingFooter

Represents property OnDrawingFooter.

published property

OnDrawingForeground

Represents property OnDrawingForeground.

published property

OnDrawingGradient

Represents property OnDrawingGradient.

published property

OnDrawingHeader

Represents property OnDrawingHeader.

published property

OnDrawingLeftAxis

Represents property OnDrawingLeftAxis.

published property

OnDrawingLegend

Represents property OnDrawingLegend.

published property

OnDrawingRightAxis

Represents property OnDrawingRightAxis.

published property

OnDrawingTopAxis

Represents property OnDrawingTopAxis.

published property

OnDrawLeftAxis

Represents property OnDrawLeftAxis.

published property

OnDrawLegend

Represents property OnDrawLegend.

published property

OnDrawRightAxis

Represents property OnDrawRightAxis.

published property

OnDrawTopAxis

Represents property OnDrawTopAxis.

published property

OnGetLegendStrings

Represents property OnGetLegendStrings.

published property

OnPan

Represents property OnPan.

published property

OnUnzoom

Represents property OnUnzoom.

published property

OnZoom

Represents property OnZoom.

published property

RightAxis

Represents property RightAxis.

protected property

SelectionBox

Represents property SelectionBox. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

published property

SelectionColor

Represents property SelectionColor.

published property

TopAxis

Represents property TopAxis.

protected property

UserAction

Represents property UserAction. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

published property

UserActions

Represents property UserActions.

published property

UserPan

Represents property UserPan.

published property

UserProportional

Represents property UserProportional.

published property

UserSelect

Represents property UserSelect.

published property

UserZoom

Represents property UserZoom.

Top

expandingMethods

 

Name

Description

public method

AfterPaint

Represents method AfterPaint. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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.
 (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

Changed

Overloaded. Represents method Changed. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

Changed(TRSCustomChart)

Overloaded. Represents method Changed(TRSCustomChart). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

ChartAdded(TRSCustomChart)

Represents method ChartAdded(TRSCustomChart). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

ChartDeleted(TRSCustomChart)

Represents method ChartDeleted(TRSCustomChart). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

ChartListNotify(TObject,TRSCustomChart,TRSListNotification)

Represents method ChartListNotify(TObject,TRSCustomChart,TRSListNotification). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

CreateAxis(TRSChartAxisLocation)

Represents method CreateAxis(TRSChartAxisLocation). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

CreateGradient

Represents method CreateGradient. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

CreateHeader(String,Boolean)

Represents method CreateHeader(String,Boolean). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

CreateLayer(Boolean)

Represents method CreateLayer(Boolean). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

CreateLegend

Represents method CreateLegend. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

CreateShadow

Represents method CreateShadow. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

DoMouseLeave

Represents method DoMouseLeave. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

DrawCharts(TCanvas,TCanvasRect)

Draws all the   charts of the chart panel to the canvas (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

Drawing(TCanvas,TCanvasRect)

Represents method Drawing(TCanvas,TCanvasRect). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

DrawMouseTracking(TCanvasPoint)

Represents method DrawMouseTracking(TCanvasPoint). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

Drawn(TCanvas,TCanvasRect)

Represents method Drawn(TCanvas,TCanvasRect). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

DrawSelectionBox(TCanvasRect)

Represents method DrawSelectionBox(TCanvasRect). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

GetAxis(THorizontalAxis)

Overloaded. Represents method GetAxis(THorizontalAxis). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

GetAxis(TVerticalAxis)

Overloaded. Represents method GetAxis(TVerticalAxis). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

GetLegendStrings(TStrings)

Represents method GetLegendStrings(TStrings). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

InternalDraw(TCanvas,TCanvasRect)

Represents method InternalDraw(TCanvas,TCanvasRect). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

public method

Invalidate

Represents method Invalidate. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

MouseDown(TMouseButton,TShiftState,TCanvasPixel,TCanvasPixel)

Represents method MouseDown(TMouseButton,TShiftState,TCanvasPixel,TCanvasPixel). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

MouseMove(TShiftState,TCanvasPixel,TCanvasPixel)

Represents method MouseMove(TShiftState,TCanvasPixel,TCanvasPixel). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

MouseUp(TMouseButton,TShiftState,TCanvasPixel,TCanvasPixel)

Represents method MouseUp(TMouseButton,TShiftState,TCanvasPixel,TCanvasPixel). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

Notification(TComponent,TOperation)

Represents method Notification(TComponent,TOperation). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

Paint

Represents method Paint. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

Resize

Represents method Resize. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

SenderChanged(TObject)

Overloaded. Represents method SenderChanged(TObject). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

UpdateChartColorScheme

Updates the Charts and their values (if Preview is True) to the current color scheme (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

UpdateLegend(TRSCustomChart,TRSChartValue)

Represents method UpdateLegend(TRSCustomChart,TRSChartValue). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

ValueChanged(TRSCustomChart,TRSChartValue)

Represents method ValueChanged(TRSCustomChart,TRSChartValue). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

ValueSelectionChanged(TRSCustomChart,TRSChartValue)

Represents method ValueSelectionChanged(TRSCustomChart,TRSChartValue). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

ValueVisibleChanged(TRSCustomChart,TRSChartValue)

Represents method ValueVisibleChanged(TRSCustomChart,TRSChartValue). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

protected method

VisibleChanged(TRSCustomChart)

Represents method VisibleChanged(TRSCustomChart). (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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

expandingFields

 

Name

Description

protected field

FColorListIndex

Represents field FColorListIndex. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

public field

FGUIChartLayout

Represents field FGUIChartLayout. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

public field

FGUIMouseHorizLine

Represents field FGUIMouseHorizLine. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

public field

FGUIMouseVertLine

Represents field FGUIMouseVertLine. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

public field

FGUISelectionRect

Represents field FGUISelectionRect. (Inherited from FMX.RS.ChartPanel.TRSCustomChartPanel.)

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