Using the RiverSoftAVG Charting Component Suite (RCCS) is incredibly easy, with most options available at design-time, including adding and editing values to a chart. The following steps detail how to use the charting components:
To get started with the RCCS, select a chart from Delphi's Tool Palette. By default, the charts are located on a "RS Charts" tab.
RCCS Charts are full controls. Charts are TGraphicControl descendants for VCL and TControl descendants for FMX. Display charts on a chart panel (with integrated axes, legend, header, footers, etc) or stand-alone (allowing use of FMX effects, drag and drop, mouse events, embedding with other controls, etc). As a stand-alone control, you drag and drop the chart control to anywhere on the form you would like it. You can select a chart visually on the form and resize it too. |
To edit a chart, select it in the form designer. The properties for the chart appear in the Object Inspector. The Object Inspector allows you to set properties of the chart and immediately see the changes to your chart. |
The Values property is the most important property of a chart type and allows you to define the chart values at design-time or run-time. Click the ellipsis button (...) for the Values property of the chart (or select the Values property in the Structure pane). Add Chart Values at Design Time using Delphi's built-in Collection Editor This action displays Delphi's Collection Editor for the TRSChartValues collection. Use the collection editor to add, delete, or select chart values (TRSChartValue). When a chart value is selected, you can edit its properties such as Caption, Value, and Color. |
Optionally, you can attach a chart to a chart panel (TRSChartPanel). A TRSChartPanel allows you to group charts; edit axes, header, footer, the built-in legend, and layers; and allows the user to zoom, pan, and select charts. Drag and drop a TRSChartPanel control onto the form.
Set the Panel property of the chart to the TRSChartPanel you want the chart displayed inside or nil for stand-alone use. When you set the Panel property of a chart, it also changes the Parent of the Chart to the TRSChartPanel, which will move the chart inside the chart panel. At design-time, you will see two displays of the chart: as a control and inside the chart panel. Note that more than one chart can share the same chart panel. |