# 3D Chart Labels Programming Considerations

## Content



A [Chart3DLabel](/componentone/api/win/online-chart3d/dotnet-framework-api/C1.Win.C1Chart3D.4.8/C1.Win.C1Chart3D.Chart3DLabel.html) object defines an independent rectangular region that can be attached to a chart. The [Chart3DLabels](/componentone/api/win/online-chart3d/dotnet-framework-api/C1.Win.C1Chart3D.4.8/C1.Win.C1Chart3D.Chart3DLabels.html) collection contains all the chart labels defined for a particular chart.

Specify the index number in the Chart3DLabels collection in order to access a ChartLabel individually:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
C1Chart3D1.ChartLabels(0).Text = "This is the first label in the collection"
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
C1Chart3D1.ChartLabels[0].Text = "This is the first label in the collection";
```

DOC-DETAILS-TAG-CLOSE

To create a Chart3DLabel object, call the [AddNewLabel](/componentone/api/win/online-chart3d/dotnet-framework-api/C1.Win.C1Chart3D.4.8/C1.Win.C1Chart3D.Chart3DLabels.AddNewLabel.html) method:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
Dim label As Chart3DLabel
label = C1Chart3D1.ChartLabels.AddNewLabel()
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
Chart3DLabel label;
label = C1Chart3D1.ChartLabels.AddNewLabel();
```

DOC-DETAILS-TAG-CLOSE

The **Remove** method removes a Chart3DLabel from the collection:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
C1Chart3D1.ChartLabels.Remove(label)
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
C1Chart3D1.ChartLabels.Remove(label);
```

DOC-DETAILS-TAG-CLOSE

## See Also

[Customizing 3D Chart Labels](/componentone/docs/win/online-chart3d/3dlabels/customizing3dchartla)