Converting to version 14.3.0

Hi,


I am porting my ASPOSE slides app from version 8 to version 14 and I’ve run into a few issues, must stuff I could figure out.

1.

Dim oChartSeries As ChartSeries
oChartSeries = oGraph.ChartData.Series(0)
iNumDataRows = oChartSeries.XValues.Count

Causes: Error 41 ‘XValues’ is not a member of ‘Aspose.Slides.Charts.ChartSeries’.

2.
strValue = oChartSeries.Values(iRows).Value

Error 35 ‘Values’ is not a member of ‘Aspose.Slides.Charts.ChartSeries’.

3.

Dim label As New DataLabel(oChartSeries)
label.TextFrame.Text = strValue

'lbl.TextFrame.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.

’ Dim porFormat As PortionFormat = label.TextFrame.Paragraphs(0).ParagraphFormat.DefaultPortionFormat
Dim par As Paragraph
Dim Portionlbl As Portion
Dim porFormat As PortionFormat

For Each par In label.TextFrame.Paragraphs

Portionlbl = par.Portions(0)
porFormat = Portionlbl.PortionFormat

porFormat.FontBold = NullableBool.False

porFormat.FillFormat.FillType = FillType.Solid
porFormat.FillFormat.SolidFillColor.Color = Color.White
porFormat.FontHeight = sglFontSize


Next



label.Id = iRows
oChartSeries.Labels.Add(label)

Two errors:
Error 38 ‘Id’ is not a member of ‘Aspose.Slides.Charts.DataLabel’.
Error 39 ‘Add’ is not a member of ‘Aspose.Slides.Charts.IDataLabelCollection’.

4. label.ShowCategoryName = True
Error 47 ‘ShowCategoryName’ is not a member of ‘Aspose.Slides.Charts.DataLabel’.


Hi Andrew,

andrew.coan:

Causes: Error 41 ‘XValues’ is not a member of ‘Aspose.Slides.Charts.ChartSeries’.

You can use oChartSeries.DataPoints.Count in the new unified API.

andrew.coan:

Error 35 ‘Values’ is not a member of ‘Aspose.Slides.Charts.ChartSeries’.

Please use oChartSeries.DataPoints[iRows].Value.Data to get the Value.

andrew.coan:

Two errors:

Error 38 ‘Id’ is not a member of ‘Aspose.Slides.Charts.DataLabel’.

Error 39 ‘Add’ is not a member of ‘Aspose.Slides.Charts.IDataLabelCollection’.

IDataLabel.Id property is obsolete. Now you can check the “index” in oChartSeries.Labels[index] collection. Use the following sample code to add the datalabel.

Dim label As IDataLabel = series.DataPoints(0).Label
label.DataLabelFormat.ShowCategoryName = True

andrew.coan:

Error 47 ‘ShowCategoryName’ is not a member of ‘Aspose.Slides.Charts.DataLabel’.

Please use label.DataLabelFormat.ShowCategoryName = True to show the category name.

Please feel free to contact support in case you need any further assistance.

Thanks & Regards,

That’s fantastic - thank you very much for your help; problems solved!

Hi Andrew,

Thank you for the feedback.

We are pleased to know that your issue has been resolved.
Please feel free to contact support in case you need any further assistance.

Thanks & Regards,