Hide Comments
Hide Comments

Comments (0)

Creates a new graph chart value as a child of the current graph chart value. The AddChild method creates the new graph chart value, initializes its Caption to the ACaption parameter and its Level property to the current graph chart value's Level + 1, and then creates a link from the current node to the new node.

The new graph chart value is returned by the method.

noteNote

The new graph chart value is considered a "child" only in that its Level is 1 more than the current chart value and there is a link from the current chart value to the new chart value. It is not an enforced relationship. The new graph chart value, as well as the old one, are managed by the RSGraphCharts.TRSGraphChartValues collection. You can change and delete links to sever this "parent-child" relationship.

Namespace: RSGraphCharts

expandingSyntax

Delphi

public
  function AddChild(const ACaption: String = ''): TRSGraphChartValue; virtual;
 

Parameters

ACaption

Type: String

Return Value

Type: TRSGraphChartValue

expandingExamples

The following code creates a graph chart value and initializes its Level. Then, it creates two children (e.g., Level+1) of the first graph chart value:

Delphi

var
    StartUp, Research, Development: TRSGraphChartValue;
 begin
      Startup := RSGraphChart1.Values.Add(0, 'Startup');
      Startup.Level := 0;
      // create the children
      Research := Startup.AddChild('Research');
      Development := Startup.AddChild('Development');
      // create a link between the two children
      Research.Links.Add.Value := Development;
 end;

expandingSee Also

Comments (0)

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