property Node.Key as String
Specifies the node's key.

TypeDescription
String A string expression that identifies the key of the node.
A node can be identified by its index or by its key. Use the Add method to assign a key to a node. Adding two nodes with the same key fails. Use the Item property to access an item by its key. Use the Root property to get the root node. Use the Key property to assign a new key to your root node like in the following VB sample:
With ChartView1.Root
    .Key = "newKeyForRoot"
End With

Assigning a new key for a node fails if the new key is already assigned to another node, or if it is empty.

The following C++ sample assigns a new key for the root node:

m_chartview.GetRoot().SetKey("newrootkey");

The following VB.NET sample assigns a new key for the root node:

With AxChartView1
    .Root.Key = "newrootkey"
End With

The following C# sample assigns a new key for the root node:

axChartView1.Root.Key = "newrootkey";

The following VFP sample assigns a new key for the root node:

With thisform.ChartView1
	.Root.Key = "newrootkey"
EndWith