...
Wiki Markup |
---|
{introducedin:4.5.1 |
...
Description |
---|
Excerpt |
---|
Sets or returns where the data label should be placed relative to its data point |
Signature | ||||||
---|---|---|---|---|---|---|
C# | C# | }
{description}
{excerpt}Sets or returns where the data label should be placed relative to its data point{excerpt}
{signature:C#}
public DataLabelPlacementType DataLabelPlacement{ get; set; }
| ||||
Signature | ||||||
{signature}{signature:vb.net | vb.net | }
Public Property DataLabelPlacement() As DataLabelPlacementType
| ||||
Remarks | ||||||
csharp | csharp | Set the position of each SeriesDataLabel using the DataLabelPlacementType enum. Web only | | A complete table of valid combinations are available on on the SoftArtisans documentation | A complete table of valid combinations are available on on the SoftArtisans documentation | |
Wiki Markup | ||||||
Example | ||||||
Code Block | ||||||
{web-only}
If the X or Y property of the DataLabel are set, then the DataLabelPlacement is also set to 'MovedByUser'.
{remarks}
{example}
{code:csharp}
//--- Create chart
Chart chart = ws.Charts.CreateChart(ChartType.Column.Stacked, ws.CreateAnchor(10, 0, 0, 0));
//--- Create data series
Series series = chart.SeriesCollection.CreateSeries("A1:A10");
//--- Set the data label position for the first SeriesDataLabel to OutsideEnd
series[0].Label.DataLabelPlacement = DataLabelPlacementType.OutsideEnd;
| ||||||
Code Block | ||||||
vbnet | vbnet | {code} {code:vbnet} '--- Create chart Dim chart As Chart = ws.Charts.CreateChart(ChartType.Column.Stacked, ws.CreateAnchor(10, 0, 0, 0)) '--- Create data series Dim series As Series = chart.SeriesCollection.CreateSeries("A1:A10") '--- Set the data label position for the first SeriesDataLabel to OutsideEnd series(0).Label.DataLabelPlacement = DataLabelPlacementType.OutsideEnd {code} \{example} |
...
{scrollbar} |