Hide Comments
Hide Comments

Comments (0)

Provides a stand-alone legend paintbox-like component for a RSChartPanel.TRSChartPanel or RSChartPanel.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 RSChartPanel.IChartPanelListener interface
 

Namespace: RSChartLegends

expandingInheritance Hierarchy

TPaintBox
  RSChartLegends.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).

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 RSChartPanel.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 RSChartPanel.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 RSChartPanel.TRSChartPanel and charts on a form
Drop a RSChartLegends.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 RSChartLegends.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