Provides a stand-alone legend 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
LegendStyle property controls what is displayed in the legend. The TRSLegendListBox component implements the RSChartPanel.IChartPanelListener interface.
Namespace: RSChartLegends
TCheckListBox
RSChartLegends.TRSLegendListBox
|
|
Name
|
Description
|
|
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.
|
|
EnableSelection
|
Controls whether the legend will allow you to select chart values from the legend. In other words, as you click items in the legend, do the chart's values get Selected or not? Set EnableSelection to true if you want the user to be able to select chart values.
Note that if EnableSelection is true, MultiSelect is automatically true as the legend must display the selected chart values. Set EnableSelection to false if you want the legend to ignore user clicks on items.
|
|
LegendStyle
|
Controls the text style of the legend, e.g., what are the labels of the chart. (See TRSLegendStyle for more information). The legend uses the LegendStyle to determine what items to display in the chart. If the LegendStyle is lsAutomatic, the legend shows the Captions of the TRSCustomCharts (if the Panel is not nil and there is more than one chart attached to the panel) or the Captions of the TRSChartValues (if Panel is nil or there is only one chart attached to the Panel).
|
|
LegendTextStyle
|
Defines the format for the labels in the legend. See TRSLegendTextStyle for more information.
|
|
NeedsUpdate
|
Represents property NeedsUpdate.
|
|
Options
|
Specifies the options for the legend box or glyph
|
|
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.
|
|
ShowCheckBoxes
|
Controls whether the legend shows check boxes for the visibility of the chart or chart values. Set ShowCheckBoxes to true if you want the legend to show check boxes. The check boxes will be checked for all visible charts or chart values. The user can then check or uncheck the boxes to control the visibility of the chart or values. Set ShowCheckBoxes to false to hide the check boxes and prevent the user from changing chart or value visibilities.
|
|
Style
|
Represents property Style.
|
Top
|
|
Name
|
Description
|
|
ChartAdded(TRSCustomChart)
|
Called when chart is added to panel
|
|
ChartChanged(TRSCustomChart)
|
Called when a chart or a chart value has changed
|
|
ChartDeleted(TRSCustomChart)
|
Called when chart is deleted/removed from panel
|
|
Click
|
Represents method Click.
|
|
ClickCheck
|
Represents method ClickCheck.
|
|
CM_Invalidate(TWMPaint)
|
Represents method CM_Invalidate(TWMPaint).
|
|
DrawCheck(TRect,TCheckBoxState,Boolean)
|
Represents method DrawCheck(TRect,TCheckBoxState,Boolean).
|
|
DrawItem(Integer,TRect,TOwnerDrawState)
|
Represents method DrawItem(Integer,TRect,TOwnerDrawState).
|
|
Notification(TComponent,TOperation)
|
Represents method Notification(TComponent,TOperation).
|
|
PanelChange
|
Called when the panel has changed and everything needs to be refreshed
|
|
RebuildLegend
|
Rebuilds the items of the legend. Call this method to force the legend list box to update. Usually, you should never need to call this method because the legend ensures its items are updated before painting itself. In rare cases, however, you may want to force the legend to update itself immediately and not wait until painting itself.
The legend fills its Items property based on the values in the Chart and/or Panel properties. The Objects of the Items: TStrings contains the associated RSChartPanel.TRSCustomChart or RSChartPanel.TRSChartValue object.
|
|
SelectionChanged(TObject)
|
Called when RSChartPanel.TRSChartValue.Selected property has changed
|
|
ValueChanged(TRSCustomChart,TRSChartValue)
|
Called when a chart value has changed.
The Value = nil when ALL values have been changed
|
|
VisibleChanged(TObject)
|
Called when RSChartPanel.TRSCustomChart.Visible property or the TRSChartValue.Visible property has changed
|
Top
|
Unlike the chart panel legend ( RSChartPanel.TRSChartLegend ), the legend list box displays all values or charts in the legend and is not concatenated to fit within the panel. The TRSLegendListBox component displays checkmarks for all visible charts or values. Uncheck a chart or value to hide it, check a chart or value to display it. The TRSLegendListBox component can also be used to select (
Selected property) specific values of a chart. More than one TRSLegendListBox may be used at a time.
|
To display a list of all the charts of a chart panel:
• Drop a RSChartPanel.TRSChartPanel and charts on a form • Drop a RSChartLegends.TRSLegendListBox component on a form • Set the Panel property of the TRSLegendListBox 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.TRSLegendListBox component on a form • Set the Chart property of the TRSLegendListBox to the chart
|
|