Show/Hide Toolbars

RiverSoftAVG Products Help

Defines one point/pie/bar/etc in a chart. A chart is made up of a collection of values ( RSChartPanel.TRSChartValues), where each TRSChartValue descendant defines the information for one point, one pie slice, one shape, etc for the chart. The TRSChartValue class defines the base value class and common properties to all values, including Caption, Color , and  Values.


To copy one value to another:

Create the new value, either by using the class constructor or the Add method of the collection

Use the        Assign method to copy properties from the old value to the newly created value. Note, that all TRSChartValue descendants can be assigned to each other. The assign method will only copy methods that are shared by the values.

alert_noteNotes to Inheritors

The following steps will describe what and why you need to do to create a descendant class. However, please see the source code in the RSCharts unit for specific examples.

First, you need to decide how many dimensions you need for your descendant class. The TRSChartValue class provides access to the X, Y, and Z dimension for a value (The RSCharts|TRS2DChartValue class exposes the Y dimension. Likewise, the RSCharts|TRS3DChartValue class exposes the Z dimension). To provide automatic support of these dimensions, the TRSChartValue class stores all three dimensions in the Values property, which provides access to protected array field ( RSChartConsts|TRSChartValueTypeArray ). Descendant classes can redefine the size of this protected array field to hold any other RSChartConsts|TRSChartValueType (double) properties.

Add any other properties you need

Override the        Assign method to copy the properties (you don't need to do it for the Values property.

Override the RSChartPanel.TRSChartValues collection

Finally, create your descendant chart class and override the protected        CreateChartValues method to create your new value collection class.

Namespace: RSChartPanel

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb