I could not change the data label of chart in below sources.
I want to change 2 points.
1. label position: Move it slightly upwards
2. delimiter: Change to line break
How can I change this?
Using Lib: Spire.XLS (ver7.11.13)
source(VB.NET):
- Code: Select all
Dim chart As Xls.Chart = sheet.Charts(0) 'This chart is Bar3DStacked
For i As Integer = 0 To chart.Series.Count - 1
Dim cs As Xls.Charts.ChartSerie = chart.Series(i)
Dim cslabel As Xls.Charts.ChartDataLabels = cs.DataPoints.DefaultDataPoint.DataLabels
cslabel.HasValue = True
cslabel.HasSeriesName = True
cslabel.HasCategoryName = False
cslabel.HasLegendKey = False
cslabel.Delimiter = " " 'cannot use char(10), vbCrLf
cslabel.IsYMode = True
cslabel.IsXMode = True
cslabel.Y = 1800 'do not move
cslabel.X = 2000 'do not move
Next
and if I convert this Excel sheet to PDF, can I keep this data label position in PDF?
Thanks