Add Rotated Labels to the Chart using the Properties Window
In This Topic
To add labels to the C1Chart control using the C1Chart Properties window, complete the following steps:
- Right-click on the C1Chart control and select Properties from the context menu. The Properties window for the C1Chart control will appear in the right pane.
- Expand the ChartLabels and click on the ellipsis button next to LabelsCollection.
- In the Label Collection Editor, click on the Add button to add a new label to the C1Chart control.
- Select DataIndex from the AttachMethod property dropdown listbox. The Attached By Data Index command item gets the DataIndex member of the AttachMethodEnum and sets the value of the Label.AttachMethod property in the Label. It attaches the label to a specific data point on the plot area of the chart.
- Expand the AttachMethodData node. Notice that the Point Index and Series Index properties each have a value associated with it. This is because the DataIndex attachment method attaches the labels by the data point. The GroupIndex value of 0 represents the ChartGroup0, the PointIndex value of 1 represents the second data point on the series, and the SeriesIndex value of 2 represents the third series on the chart.
- Set the Text property to RotatingLabel.
- Set the Connected property to True.
- Set the Offset property to 10.
- Set the RotationOverride property to 60.
The label will rotate clockwise on a 60 degree angle once you create code to handle the animation.
See Also