How to set the Scatter chart's Marker style using Aspose Cells jar

Hi Team,

For a Scatter chart I need to set the "MarkerStyleType".I use Apose Cells 8.3.1 jar.The sample code below is not supported with the aspose cells jar.

chart.getNSeries().get(0).setMarkerStyle(MarkerStyleType.Triangle);

I cant really use the aspose slides jar.Please help me out to set the "marker style type" using the aspose cells jar.Kindly find the attachment for a sample chart of this scenario.

Thanks,
Suresh.

Hi Suresh,


Thank you for contacting Aspose support.

Please note, in Aspose.Cells APIs the class that handles the marker styles for the chart is ChartMarkerType. Please check the following piece of code that set the marker style of all three series in your provided chart to triangle.

Java

Workbook book = new Workbook(“D:/attachment+chart.XLSX”);
Chart chart = book.getWorksheets().get(0).getCharts().get(0);
chart.getNSeries().get(0).getMarker().setMarkerStyle(ChartMarkerType.TRIANGLE);
chart.getNSeries().get(1).getMarker().setMarkerStyle(ChartMarkerType.TRIANGLE);
chart.getNSeries().get(2).getMarker().setMarkerStyle(ChartMarkerType.TRIANGLE);
book.save(“D:/output.xlsx”, SaveFormat.XLSX)