Hide Comments
Hide Comments

Comments (0)

Provides a stand-alone legend paintbox-like component for a FMX.RS.ChartPanel.TRSChartPanel or FMX.RS.ChartPanel.TRSCustomChart. This legend may be placed anywhere a normal control can be placed in your form.

Use the Panel property to select the TRSChartPanel to display charts or chart values from. The Chart property can be used to select the specific chart to display its values. The    Legend property controls what is displayed in the legend.

The TRSLegendListBox component implements the FMX.RS.ChartPanel.IChartPanelListener interface
 

Namespace: FMX.RS.ChartLegends

expandingInheritance Hierarchy

TPaintBox
  FMX.RS.ChartLegends.TRSChartLegendBox
 

expandingSyntax

Delphi

type
  TRSChartLegendBox = class(TPaintBox, IChartPanelListener)
  end; 
 

expandingConstructors

 

Name

Description

public constructor

Create(TComponent)

Initializes a new instance of the TRSChartLegendBox class.

public destructor

Destroy

Represents the destructor of the TRSChartLegendBox class.

Top

expandingProperties

 

Name

Description

published property

Chart

Specifies the chart that the legend should display values from. Note that this property will be set automatically to the active chart of a chart panel if the   Panel property is set.

published property

Legend

Defines the properties of the legend to display

protected property

NeedsUpdate

Represents property NeedsUpdate.

published property

Panel

Specifies the TRSChartPanel that the legend should display charts and/or values for. Set the Panel property if you want the legend to display a legend similar to the Legend of the TRSChartPanel. In this case, the legend will display all the chart names if there is more than one chart attached to the panel. However, if there is only one chart attached to the panel, the legend would display the chart's values. To only display one chart's values, leave the Panel property blank and set the   Chart property.

Top

expandingMethods

 

Name

Description

protected method

ChartAdded(TRSCustomChart)

Called when chart is added to panel

protected method

ChartChanged(TRSCustomChart)

Called when a chart or a chart value has changed

protected method

ChartDeleted(TRSCustomChart)

Called when chart is deleted/removed from panel

protected method

GetLegendStrings(TObject,TStrings)

Represents method GetLegendStrings(TObject,TStrings).

public method

Invalidate

Represents method Invalidate.

protected method

LegendChanged(TObject)

Represents method LegendChanged(TObject).

protected method

Notification(TComponent,TOperation)

Represents method Notification(TComponent,TOperation).

protected method

Paint

Represents method Paint.

protected method

PanelChange

Called when the panel has changed and everything needs to be refreshed

protected method

SelectionChanged(TObject)

Called when FMX.RS.ChartPanel.TRSChartValue.Selected property has changed

protected method

ValueChanged(TRSCustomChart,TRSChartValue)

Called when a chart value has changed.

The Value = nil when ALL values have been changed

protected method

VisibleChanged(TObject)

Called when FMX.RS.ChartPanel.TRSCustomChart.Visible property or the TRSChartValue.Visible property has changed

Top

expandingRemarks

More than one TRSChartLegendBox may be used at a time.

expandingExamples

To display a list of all the charts of a chart panel:

Drop a FMX.RS.ChartPanel.TRSChartPanel and charts on a form
Drop a FMX.RS.ChartLegends.TRSChartLegendBox component on a form
Set the Panel property of the TRSChartLegendBox to the TRSChartPanel
Change the  LegendStyle to lsChartNames. If you leave the LegendStyle as lsAutomatic, the legend will display all the chart names if there is more than one chart attached to the panel. However, if there is only one chart attached to the panel, the legend would display the chart's values. Use lsChartNames to force the legend to always display only the charts attached to the chart panel.

To display one chart's values:

Drop a chart on a form. Note that the chart does not have to be visible or attached to a chart panel to display the values of the chart in the legend.
Drop a FMX.RS.ChartLegends.TRSChartLegendBox component on a form
Set the Chart property of the TRSChartLegendBox to the chart
 
expandingSee Also

Comments (0)

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