Hide Comments
Hide Comments

Comments (0)

The TRSGraphChart component is a FMX.RS.Charts.TRSShapeChart descendant that provides a visual representation of a graph or network with nodes and links between them, similar to a flow chart or org chart. The Graph Chart connects chart values ( RSGraphCharts|TRSGraphChartValue ) by drawing an arrow representing the link ( RSGraphCharts|TRSGraphChartLink ) between the shapes.

A lot of graph charts, such as org charts and flow charts, are not just scattered about the chart surface. There is a definite organization, e.g., things flow from a top to a bottom (or a left to a right) and many nodes are considered equivalent so they are placed at the same level as other nodes. Each TRSGraphChartValue has a Level property, which is an integer property from 0 to whatever specifying the level of a node. This Level property is used by the Arrange method to divide the chart canvas into a big grid, where each cell in the grid can contain one chart value. One axis of this virtual grid will be the Levels in the chart. The other axis will be all the nodes/values at that level.

GraphChartExample

Namespace: FMX.RS.GraphCharts

expandingInheritance Hierarchy

TControl
  FMX.RS.ChartPanel.TRSCustomChart
    FMX.RS.Charts.TRSChart
      FMX.RS.Charts.TRSCustomLineChart
        FMX.RS.Charts.TRSCustomPointChart
          FMX.RS.Charts.TRSCustomShapeChart
            FMX.RS.GraphCharts.TRSGraphChart
 

expandingSyntax

Delphi

type
  TRSGraphChart = class(TRSCustomShapeChart)
  end; 
 

expandingConstructors

 

Name

Description

public constructor

Create(TComponent)

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

Top

expandingProperties

 

Name

Description

published property

Align

Represents property Align. (Inherited from FMX.RS.Charts.TRSChart.)

published property

ArrowPen

Specifies the kind of pen the graph chart uses for drawing the arrows for the links ( RSGraphCharts|TRSGraphChartLink). Set Pen to specify the pen to use for drawing the arrows. The value of Pen is a TRSPen object (TPen in VCL and TStrokeBrush in FMX). Set the properties of the TRSPen object to specify the color, style, width, and mode of the pen.
 

protected property

AxesHints

 (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

published property

Brush

Represents property Brush. (Inherited from FMX.RS.Charts.TRSChart.)

published property

Caption

Represents property Caption. (Inherited from FMX.RS.Charts.TRSChart.)

published property

ClipChildren

Represents property ClipChildren. (Inherited from FMX.RS.Charts.TRSChart.)

published property

ClipParent

Represents property ClipParent. (Inherited from FMX.RS.Charts.TRSChart.)

protected property

CloseLine

Specifies if the line should be a closed loop (Inherited from FMX.RS.Charts.TRSCustomLineChart.)

published property

Color

Represents property Color. (Inherited from FMX.RS.Charts.TRSChart.)

public property

ColorList

Defines the color list to use when new chart values are created. When a chart value 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 ColorList property directly to define your own custom color scheme. Set the ColorScheme property to use one of the predefined color lists.

noteNote

The new color list will be applied to the existing chart values.

published property

ColorScheme

Represents property ColorScheme. (Inherited from FMX.RS.Charts.TRSChart.)

published property

Cursor

Represents property Cursor. (Inherited from FMX.RS.Charts.TRSChart.)

published property

DefaultShape

Represents property DefaultShape.

published property

Enabled

Represents property Enabled. (Inherited from FMX.RS.Charts.TRSChart.)

public property

FirstIndex

The FirstIndex and the     LastIndex properties define the indices of the Values that are currently being drawn in the chart.

Usually, these properties are equivalent to 0 for the FirstIndex and Values.Count-1 for the LastIndex. However, when the TRSChartPanel component has been zoomed, these properties reflect the point just before the first point in the zoomed area and the point just after the last point in the zoomed area (this ensures the visual aspect of the chart by allowing, for example, lines to be drawn into and out of the zoomed area. The FirstIndex and LastIndex properties provide more efficient access to only the values that are currently being drawn.

noteNote

For charts that don't have an easy visual ordering (such as a shape chart where depending on sizes things can overlap), the FirstIndex and LastIndex will be the entire Values collection.

protected property

FixedSizePoints

Represents property FixedSizePoints. (Inherited from FMX.RS.Charts.TRSCustomPointChart.)

published property

Font

Represents property Font. (Inherited from FMX.RS.Charts.TRSChart.)

public property

FontFill

Specifies the brush, including color, to use for filling text (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

published property

GraphOptions

Defines the specific graph options for the chart

published property

Group

Represents property Group. (Inherited from FMX.RS.Charts.TRSChart.)

public property

GroupIndex

Use the GroupIndex property to specify the ordering of the charts in a group at design time (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

published property

GroupStyle

Represents property GroupStyle. (Inherited from FMX.RS.Charts.TRSChart.)

published property

Height

Represents property Height. (Inherited from FMX.RS.Charts.TRSChart.)

published property

HitTest

Represents property HitTest. (Inherited from FMX.RS.Charts.TRSChart.)

published property

HorizAxis

Represents property HorizAxis. (Inherited from FMX.RS.Charts.TRSChart.)

published property

HorizontalAxis

Represents property HorizontalAxis. (Inherited from FMX.RS.Charts.TRSChart.)

public property

LastIndex

The FirstIndex and the     LastIndex properties define the indices of the Values that are currently being drawn in the chart.

Usually, these properties are equivalent to 0 for the FirstIndex and Values.Count-1 for the LastIndex. However, when the TRSChartPanel component has been zoomed, these properties reflect the point just before the first point in the zoomed area and the point just after the last point in the zoomed area (this ensures the visual aspect of the chart by allowing, for example, lines to be drawn into and out of the zoomed area. The FirstIndex and LastIndex properties provide more efficient access to only the values that are currently being drawn.

noteNote

For charts that don't have an easy visual ordering (such as a shape chart where depending on sizes things can overlap), the FirstIndex and LastIndex will be the entire Values collection.

published property

LevelGapPercent

Specifies the gap between levels as a percentage of the maximum size of graph nodes (width and height)

public property

LineChartElements

Defines the basic chart elements that should be drawn by the line chart. Include the chart elements you want the line chart to draw. (Inherited from FMX.RS.Charts.TRSCustomLineChart.)

public property

LineStyle

Controls how the FMX.RS.Charts.TRSCustomLineChart component connects 2 points ( FMX.RS.Charts.TRS2DChartValue). Use the LineStyle property to change the connecting lines between the values. (Inherited from FMX.RS.Charts.TRSCustomLineChart.)

public property

Listeners

Tracks the FMX.RS.ChartPanel.IChartPanelListeners which are listening for changes to this chart. The TRSCustomChart class uses this list to automatically notify listeners when the chart or its values change.

Add a class to this list in order for it to receive change events from the chart.

protected property

LocalHorizontalAxis

Represents property LocalHorizontalAxis. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected property

LocalVerticalAxis

Represents property LocalVerticalAxis. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

published property

Margins

Represents property Margins. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OffsetVertical

Represents property OffsetVertical. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnChange

Represents property OnChange. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnClick

Represents property OnClick. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnCustomDrawValue

Represents property OnCustomDrawValue.

published property

OnDblClick

Represents property OnDblClick. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnDragDrop

Represents property OnDragDrop. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnDragEnd

Represents property OnDragEnd. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnDragEnter

Represents property OnDragEnter. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnDragLeave

Represents property OnDragLeave. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnDragOver

Represents property OnDragOver. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnDraw

Represents property OnDraw. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnDrawing

Represents property OnDrawing. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnMouseDown

Represents property OnMouseDown. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnMouseEnter

Represents property OnMouseEnter. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnMouseLeave

Represents property OnMouseLeave. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnMouseMove

Represents property OnMouseMove. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnMouseUp

Represents property OnMouseUp. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnMouseWheel

Represents property OnMouseWheel. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnResize

Represents property OnResize. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnValueChange

Represents property OnValueChange. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnValueSelectionChange

Represents property OnValueSelectionChange. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnValueVisibleChange

Represents property OnValueVisibleChange. (Inherited from FMX.RS.Charts.TRSChart.)

published property

OnVisibleChange

Represents property OnVisibleChange. (Inherited from FMX.RS.Charts.TRSChart.)

published property

Opacity

Represents property Opacity. (Inherited from FMX.RS.Charts.TRSChart.)

protected property

Options

Represents property Options. (Inherited from FMX.RS.Charts.TRSCustomShapeChart.)

published property

Orientation

Specifies the orientation of a graph chart, e.g., the direction in which the links/nodes go. The orientation is optional and you may place and connect graph chart values whatever way you wish. However, when you call the  Arrange method, the graph chart uses the Orientation and the Level of the graph chart values to automatically place the graph nodes.
 

published property

Padding

Represents property Padding. (Inherited from FMX.RS.Charts.TRSChart.)

published property

Panel

Represents property Panel. (Inherited from FMX.RS.Charts.TRSChart.)

public property

PanelColorScheme

Specifies which color scheme to use when new chart values are created with default color values. If Panel is not nil and this property is True, then the chart panel's   ChartColorScheme is used. Otherwise, the   ColorScheme is used (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

published property

ParentFont

Represents property ParentFont. (Inherited from FMX.RS.Charts.TRSChart.)

published property

ParentSelectionColor

Represents property ParentSelectionColor. (Inherited from FMX.RS.Charts.TRSChart.)

published property

Pen

Represents property Pen. (Inherited from FMX.RS.Charts.TRSChart.)

protected property

PointsInfo

Specifies the appearance of all points in a point chart. It defines the Width and Height and the Style of the points. Use the PointsInfo property to specify the points you want drawn. (Inherited from FMX.RS.Charts.TRSCustomPointChart.)

published property

PopupMenu

Represents property PopupMenu. (Inherited from FMX.RS.Charts.TRSChart.)

published property

Position

Represents property Position. (Inherited from FMX.RS.Charts.TRSChart.)

published property

Preview

Represents property Preview. (Inherited from FMX.RS.Charts.TRSChart.)

published property

RotationAngle

Represents property RotationAngle. (Inherited from FMX.RS.Charts.TRSChart.)

published property

RotationCenter

Represents property RotationCenter. (Inherited from FMX.RS.Charts.TRSChart.)

published property

Scale

Represents property Scale. (Inherited from FMX.RS.Charts.TRSChart.)

published property

SelectionColor

Represents property SelectionColor. (Inherited from FMX.RS.Charts.TRSChart.)

published property

ShowHint

Represents property ShowHint. (Inherited from FMX.RS.Charts.TRSChart.)

protected property

State

Represents property State. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

published property

ValueLabelFormat

Represents property ValueLabelFormat. (Inherited from FMX.RS.Charts.TRSChart.)

published property

ValueLabelStyle

Represents property ValueLabelStyle. (Inherited from FMX.RS.Charts.TRSChart.)

published property

Values

Contains all the graph nodes in the graph chart. Each node ( RSGraphCharts|TRSGraphChartValue ) defines its Level and outward Links, as well as its own shape (Style), size (Width and Height), Color, Caption, etc. When a graph chart value is added to the collection, it is initialized to the DefaultShape. Use the Values collection to add, delete, and modify graph chart values, or nodes, in the chart.

Note that graph nodes are drawn from first to last through the collection, so later nodes are "on top" of earlier nodes.
 

published property

VertAxis

Represents property VertAxis. (Inherited from FMX.RS.Charts.TRSChart.)

published property

VerticalAxis

Represents property VerticalAxis. (Inherited from FMX.RS.Charts.TRSChart.)

published property

Visible

Represents property Visible. (Inherited from FMX.RS.Charts.TRSChart.)

public property

VisibleCount

Returns the number of TRSChartValue that are visible for the chart (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

published property

Width

Represents property Width. (Inherited from FMX.RS.Charts.TRSChart.)

Top

expandingMethods

 

Name

Description

public method

AfterPaint

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

public method

Arrange

Automatically arranges the graph chart - it is responsible for "pretty-organizing" our chart. The Arrange method ensures that there are no overlapping shapes and tries to avoid links running criss-crossing throughout the chart.

For a lot of graph charts, such as org charts and flow charts, nodes/values are not just scattered about the chart surface. There is a definite organization, e.g., things flow from a top to a bottom (or a left to a right) and many nodes are considered equivalent so they are placed at the same level as other nodes. The Level property of chart values ( RSGraphCharts|TRSGraphChartValue ) is an integer property from 0 to whatever specifying the level of a node. The  Arrange method uses the  Level property to divide the chart canvas into a big grid, where each cell in the grid can contain one chart value. One axis of this virtual grid will be the Levels in the chart. The other axis will be all the nodes/values at that level. The  Orientation property controls in what direction we place the levels.

For example, suppose the Orientation is coTopDown and a graph is made up of the following nodes:
 

Level 0: Startup
Level 1: Research
Level 2: Development
Level 3: Manufacturing, Testing, and Marketing
Level 4: Purchases, Sales













































































































































































































































The grid would look like this:

Example

      -------------------------------------------------       |               |               |               |       |               | Startup       |               | Level 0       |               |               |               |       -------------------------------------------------       |               |               |               |       |               | Research      |               | Level 1       |               |               |               |       -------------------------------------------------       |               |               |               |       |               | Development   |               | Level 2       |               |               |               |       -------------------------------------------------       |               |               |               |       | Manufacturing | Testing       | Marketing     | Level 3       |               |               |               |       -------------------------------------------------               |               |               |               | Purchases     | Sales         | Level 4               |               |               |               ---------------------------------

The Arrange method makes nodes of the same level the same size but different levels can have a different level size.
 



public method

Assign(TPersistent)

Represents method Assign(TPersistent). (Overrides FMX.RS.Charts.TRSCustomPointChart.Assign(TPersistent).)

protected method

AxisChanged(TRSChartAxis)

Represents method AxisChanged(TRSChartAxis). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

BuildPoints(TCanvasRect,Integer,Integer)

Creates an array of points for all the values in the chart and returns the FirstIndex in FI and LastIndex in LI. (Inherited from FMX.RS.Charts.TRSCustomLineChart.)

protected method

Changed

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

protected method

Changed(TRSChartValue)

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

public method

Clone

Creates a "deep" copy of the chart. It constructs a new chart of the correct type and then calls the Assign method to copy its properties to the new copy.

alert_cautionCaution

Note that the new TRSCustomChart has the same owner as the current chart. If there is no owner, you are responsible for freeing the new clone.

protected method

CreateBrush

Represents method CreateBrush. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

CreateChartValues

Creates the FMX.RS.ChartPanel.TRSChartValues class for the   Values property

alert_noteNotes to Inheritors

Override this method to create your TRSChartValues descendant

protected method

CreateFont

Represents method CreateFont. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

CreatePen

Represents method CreatePen. (Overrides FMX.RS.ChartPanel.TRSCustomChart.CreatePen.)

protected method

CreatePointsInfo

Creates the default   PointsInfo object (Overrides FMX.RS.Charts.TRSCustomPointChart.CreatePointsInfo.)

public method

CreatePreviewValues

Creates sample values for illustrating how the chart will look. This function is automatically called at design-time to fill the chart with sample values. It can also be called at run-time to add more values to the chart (i.e., the chart is not cleared first)

noteNote

Set the Preview property to false to have the design-time sample values show up at run-time

protected method

DoUpdateAxisInfo(TRSChartAxis)

Represents method DoUpdateAxisInfo(TRSChartAxis). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

public method

Draw(TCanvas,TCanvasRect)

Overloaded.  Paints the chart to the specified Canvas in the specified location. The Draw method first calls the     OnDrawing event, which signals that it is about to draw and allows users to stop the drawing before it occurs. Then, it calls the protected     InternalDraw method to actually do the drawing. Finally, it calls the OnDraw event to signal the end of drawing of the chart.

Use the Draw method to paint the chart to any canvas and anywhere and with any size on the canvas.

alert_noteNotes to Callers

The Draw Method uses the     HorizontalAxis and     VerticalAxis properties to convert the chart values into pixel coordinates. If you want to use a different axis (but not change the above properties), call the overloaded Draw method.

 (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

public method

Draw(TCanvas,TCanvasRect,TRSChartAxis,TRSChartAxis,Boolean,Boolean)

Overloaded.  Paints the chart to the specified Canvas in the specified location. The Draw Method uses the supplied TRSChartAxis (instead of the     HorizontalAxis and     VerticalAxis properties) to convert the chart values into pixel coordinates.

Unlike the regular Draw method, this method draws the axes as well (useful for when the chart is not connected to a panel).

Use the Draw method to paint the chart to any canvas and anywhere and with any size on the canvas.

protected method

DrawArea(TCanvas,TRS2DChartValue,TCanvasRect,TCanvasPixel,TCanvasPixel,Boolean)

Draws the area under the line for that line segment (Inherited from FMX.RS.Charts.TRSCustomLineChart.)

public method

DrawAxes(TCanvas,TCanvasRect,TRSChartAxis,TRSChartAxis)

Draws the specified axes to the Canvas (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

public method

DrawGlyph(TCanvas,TCanvasRect)

Overloaded. Represents method DrawGlyph(TCanvas,TCanvasRect). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

public method

DrawGlyph(TCanvas,TRSChartValue,TCanvasRect)

Represents method DrawGlyph(TCanvas,TRSChartValue,TCanvasRect). (Overrides FMX.RS.Charts.TRSCustomPointChart.DrawGlyph(TCanvas,TRSChartValue,TCanvasRect).)

protected method

Drawing(TCanvas,TCanvasRect)

Calls the OnDrawing event and returns True if the draw process should continue.

This method is called before the InternalDraw method.

public method

DrawLabel(TCanvas,String,TCanvasPixel,TCanvasPixel,Single)

Overloaded. Draws the text caption centered above the X, Y point without clipping.

noteNote

The Opacity is ignored in VCL

public method

DrawLabel(TCanvas,String,TCanvasRect,Single)

Overloaded. Draws the text caption centered within the rectangle. The text is clipped

noteNote

The Opacity is ignored in VCL

public method

DrawLabel(TCanvas,TRSChartValue,TCanvasPixel,TCanvasPixel)

Overloaded. Draws the text caption centered above the X, Y point without clipping.

noteNote

The Opacity is specified by the FMX.RS.ChartPanel.TRSChartValue.Opacity property

public method

DrawLabel(TCanvas,TRSChartValue,TCanvasRect)

Draws a label for the TRSChartValue on the canvas. The text of the label is controlled by the ValueLabelStyle property.

The label is drawn within the specified rectangle.

noteNote

The Opacity is specified by the FMX.RS.ChartPanel.TRSChartValue.Opacity property

protected method

DrawLine(TCanvas,TCanvasRect,Boolean)

Overloaded. Draws the entire line for the chart. The method calls other methods depending on the LineStyle. (Inherited from FMX.RS.Charts.TRSCustomLineChart.)

protected method

DrawLine(TCanvas,TRS2DChartValue,TCanvasRect,TCanvasPixel,TCanvasPixel,Boolean)

Overloaded. Draws the line for the line segment (from last point value to this point value) (Inherited from FMX.RS.Charts.TRSCustomLineChart.)

protected method

DrawLink(TCanvas,TCanvasRect,TRSGraphChartValue,TRSGraphChartLink)

Draw one link

protected method

DrawLinks(TCanvas,TCanvasRect,TRSGraphChartValue)

Draw all the links from the input TRSGraphChartValue to other nodes

protected method

Drawn(TCanvas,TCanvasRect)

Calls the OnDraw event.

This method is called after the InternalDraw method.

protected method

DrawPoint(TCanvas,TCanvasRect,TRSPointChartValue)

Draws one point at the specified rectangle (Inherited from FMX.RS.Charts.TRSCustomPointChart.)

protected method

DrawShape(TCanvas,TCanvasRect,TRSShapeChartValue)

Draws one shape at the specified rectangle (Overrides FMX.RS.Charts.TRSCustomShapeChart.DrawShape(TCanvas,TCanvasRect,TRSShapeChartValue).)

protected method

DrawSmoothline(TCanvas,TCanvasRect,Boolean)

Draws the smooth line for the entire values collection (i.e., the LineStyle is lsCurveInterpolation or lsCurveApproximation). If the LineStyle is lsCurveInterpolation, it uses the DrawSmoothSegment method for each segment of the line. (Inherited from FMX.RS.Charts.TRSCustomLineChart.)

protected method

DrawSmoothSegment(TCanvas,TRS2DChartValue,TCanvasPoint,TCanvasPoints,Boolean)

Draws a smooth line segment using the SegmentPoints. The Line is assumed to touch all the segment points (i.e., the LineStyle is lsCurveInterpolation) (Inherited from FMX.RS.Charts.TRSCustomLineChart.)

public method

EndUpdate

Re-enables screen repainting and change events. Use EndUpdate to re-enable screen repainting and change events that were turned off with the BeginUpdate method. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

public method

FormatValue(TRSChartValue,TRSLabelTextStyle)

Generates a label for the Value based on the TextStyle (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

public method

GetAdjOffsetVertical

Returns the vertical offset (     OffsetVertical).

If coUseVerticalOffset is not in     Options, this method always returns 0. If coUseVerticalOffset is in Options, the function returns the OffsetVertical value.

public method

GetAxisCaption(TRSChartAxis,Integer,TRSChartValueType)

Returns a label for an axis ( FMX.RS.ChartPanel.TRSChartAxis ) based on the input Value. The Index specifies where to start looking in the chart Values (for optimization purposes) and decrements from there until the closest chart value is found. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

public methodClass member

GetChartType

Returns the chart type enumerated value for this class. Each chart class overrides this class function to return the RSChartConsts|TRSChartType enumerated value (Overrides FMX.RS.Charts.TRSCustomShapeChart.GetChartType.)

protected method

GetColor

Represents method GetColor. (Overrides FMX.RS.ChartPanel.TRSCustomChart.GetColor.)

public method

GetColor(TRSChartValue)

Overloaded. Returns the color of the chart value. The color of the TRSChartValue can change depending on the   Options property as well as any other chart states (e.g., the TRSCandleStickChart class overrides this method to turn the color red or green depending on if the Open value is greater than the Closing Value) (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

public method

GetCumulativeTotal(Integer,Integer,TRSCustomChartClass)

Determine the cumulative value at this index for all charts in the Group. The ValIndex specifies the     TRSChartValue.Values dimension to compare.

Used for stacking charts.

public method

GetCumulativeValue(Integer,Integer,TRSCustomChartClass)

Determine the cumulative value at this index for all charts below (spatially) this chart in the same     Group. The ValIndex specifies the     TRSChartValue.Values dimension to compare.

Used for stacking charts.

protected method

GetGroupDimension

Represents method GetGroupDimension. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

GetPoints(TCanvasPoint,TCanvasPoint,TCanvasRect)

Returns an array of points from StartPoint to EndPoint based on the   LineStyle and   LineChartElements (Inherited from FMX.RS.Charts.TRSCustomLineChart.)

protected method

GetShapeRect(TCanvasRect,TRSShapeChartValue)

Represents method GetShapeRect(TCanvasRect,TRSShapeChartValue). (Inherited from FMX.RS.Charts.TRSCustomShapeChart.)

public method

GetValueColor

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.TRSCustomChart.)

protected method

InitializeChangeEvents

Initialize the OnChange events of structures. Use this method to assign event handlers for structures (e.g., Pen.OnChange := MyChangeMethod).

alert_noteNotes to Inheritors

The constructor calls this method after it calls the InitializeChart method, which is where the structures should be actually created and initialized.

protected method

InitializeChart

Creates and initialize structures and values of chart. This method is the safe place to initialize chart values without change events occurring.

alert_noteNotes to Inheritors

The constructor calls this method. Use this method to actually create and initialize properties. Do not assign event properties in this method (use the InitializeChangeEvents method instead)

protected method

InternalDraw(TCanvas,TCanvasRect)

Overloaded.  Paints the chart graphic to the specified canvas at the specified rectangle. The InternalDraw method is called by the     Draw method.

Descendant classes of TRSCustomChart override the InternalDraw method to actually paint themselves.

alert_noteNotes to Inheritors

The default InternalDraw method implementation assigns the     Brush, Pen , and Font to the Canvas.

protected method

InternalSelect(TCanvasRect,TRSChartSelectionAction)

Selects or deselects chart Values ( FMX.RS.ChartPanel.TRSChartValue ) based on whether they intersect with the selection rectangle (which is in pixel coordinates).

The base method converts the SelectionRect to chart coordinates (based on     HorizontalAxis and     VerticalAxis) and then selects values based on the TRSChartValue.Selectable method

public method

Invalidate

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

public method

IsSelectable(TCanvasRect)

Returns True if any value in the chart intersects with the SelectionRect (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

IsValuesStored

Represents method IsValuesStored. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

public method

IsVisible

Indicates whether the chart is visible. A chart is visible if its Visible property is True and both axes have been assigned. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

LevelChanged(TRSGraphChartValue)

Represents method LevelChanged(TRSGraphChartValue).

protected method

LinksNotify(TRSGraphChartLink,TCollectionNotification)

Represents method LinksNotify(TRSGraphChartLink,TCollectionNotification).

protected method

LinksUpdate(TRSGraphChartLink)

Represents method LinksUpdate(TRSGraphChartLink).

protected method

Loaded

Represents method Loaded. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

MouseHover(TCanvasRect)

Represents method MouseHover(TCanvasRect). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

Notification(TComponent,TOperation)

Represents method Notification(TComponent,TOperation). (Overrides FMX.RS.ChartPanel.TRSCustomChart.Notification(TComponent,TOperation).)

protected method

OrientationChanged

Represents method OrientationChanged.

protected method

Paint

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

protected method

PanelChanged

Represents method PanelChanged. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

SaveCanvasResources(TCanvas,TBrush,TRSPen,TFont)

Represents method SaveCanvasResources(TCanvas,TBrush,TRSPen,TFont). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

public method

Select(TCanvasRect,TRSChartSelectionAction)

Selects or deselects chart Values ( FMX.RS.ChartPanel.TRSChartValue ) based on whether they intersect with the selection rectangle (which is in pixel coordinates).

The base method converts the SelectionRect to chart coordinates (based on     HorizontalAxis and     VerticalAxis) and then selects values based on the TRSChartValue.Selectable method

alert_noteNotes to Inheritors

Descendant classes override the InternalSelect method

protected method

SelectionColorChanged

Represents method SelectionColorChanged. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

SenderChanged(TObject)

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

protected method

SetCanvasResources(TCanvas,TBrush,TRSPen,TFont,Boolean,Boolean)

Overloaded. Represents method SetCanvasResources(TCanvas,TBrush,TRSPen,TFont,Boolean,Boolean). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

SetCanvasResources(TCanvas,TRSChartValue,Boolean,Boolean)

Represents method SetCanvasResources(TCanvas,TRSChartValue,Boolean,Boolean). (Overrides FMX.RS.Charts.TRSCustomPointChart.SetCanvasResources(TCanvas,TRSChartValue,Boolean,Boolean).)

protected method

SetColor(TCanvasColor)

Represents method SetColor(TCanvasColor). (Overrides FMX.RS.ChartPanel.TRSCustomChart.SetColor(TCanvasColor).)

protected method

SetOptions(TChartOptions)

Represents method SetOptions(TChartOptions). (Overrides FMX.RS.ChartPanel.TRSCustomChart.SetOptions(TChartOptions).)

protected method

SetVisible(Boolean)

Represents method SetVisible(Boolean). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

UpdateAxisInfo(TRSChartAxis)

Represents method UpdateAxisInfo(TRSChartAxis). (Overrides FMX.RS.ChartPanel.TRSCustomChart.UpdateAxisInfo(TRSChartAxis).)

protected method

UpdateColorScheme

Updates the values to the current color scheme. If PanelColorScheme is True then uses the Panel's color scheme (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected method

ValueNotify(TRSChartValue,TCollectionNotification)

Represents method ValueNotify(TRSChartValue,TCollectionNotification). (Inherited from FMX.RS.Charts.TRSCustomShapeChart.)

protected method

ValueSelectionChanged(TRSChartValue)

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

protected method

ValueVisibleChanged(TRSChartValue)

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

protected method

VisibleChanged

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

protected method

WantsCaptions(TRSChartAxis)

Returns true if the chart prefers Captions over Values for its labels on the input Axis. This method provides a hint to the TRSChartAxis when LabelStyle is alsAutomatic. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

Top

expandingFields

 

Name

Description

protected field

EnforceSingleOption

Represents field EnforceSingleOption. (Inherited from FMX.RS.Charts.TRSCustomLineChart.)

protected field

FFirstIndex

Represents field FFirstIndex. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected field

FLastIndex

Represents field FLastIndex. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected field

FLineChartElements

Represents field FLineChartElements. (Inherited from FMX.RS.Charts.TRSCustomLineChart.)

protected field

FOptions

Represents field FOptions. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected field

FSuppressAxesChange

Represents field FSuppressAxesChange. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected field

FUpdating

Represents field FUpdating. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

protected field

FVisibleCount

Represents field FVisibleCount. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)

Top

expandingRemarks

In the Create New Chart Types Tutorial, we discuss how we created the graph chart. You should check it out for tips on building charts in general and the graph chart in particular.

expandingExamples

To display a chart, you drop the component on a form and optionally connect its Panel property to the FMX.RS.ChartPanel.TRSChartPanel component where you want it to be displayed. The Values property is the most important property of the chart type and allows you to define the chart values at design-time or run-time. For the Graph Chart, the Values property contains TRSGraphChartValue collection items which define the node of a graph and contains the links (TRSGraphChartLink) from that node to other nodes.
 

To display a graph chart inside a chart panel:
 

Drop a TRSGraphChart 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

To add a node to the chart (at Design-Time):

Select the TRSGraphChart component
 
Click the ellipsis button (...) for the Values property of the chart. This action displays Delphi's Collection Editor for the TRSGraphChartValues collection.
Use the Add button to add nodes (TRSGraphChartValue collection item) to the chart.
 
Edit the properties for the node
After you have added nodes, you can add links between the nodes
 

To add a node to the chart (at Run-Time):

Delphi

var
    StartUp, Research, Manufacturing, Purchases,
    Marketing, Development: TRSGraphChartValue;
 begin
      RSGraphChart1.Values.BeginUpdate;
      try
         Startup := RSGraphChart1.Values.Add(0, 'Startup');
         Startup.Level := 0;
         Research := Startup.AddChild('Research');
         Development := Startup.AddChild('Development');
         Development.Level := 2;
         Research.Links.Add.Value := Development;
         Manufacturing := Development.AddChild('Manufacturing');
         Marketing := Development.AddChild('Marketing');
         Development.AddChild('Testing');
         Purchases := Manufacturing.AddChild('Purchases');
         Marketing.Links.Add.Value := Purchases;
         RSGraphChart1.Arrange;
      finally
         RSGraphChart1.Values.EndUpdate;
      end;
 end;

expandingSee Also

Comments (0)

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