Hi,
In this way I add the series to the “line” chart and modify its properties:
////////////////////////////////////
Chart chart = charts.addChart(com.aspose.cells.ChartType.LINE, startRow, startCol, endRow, endCol);
String range = myrange;
NSeries series = chart.getNSeries();
series.add(range, true);
ASeries aSeries = series.get(n);
aSeries.setName(title);//ok
aSeries.setMarkerSize(markerSize);//ok
aSeries.setMarkerStyle(markerType);/ok
aSeries.setMarkerForegroundColor(color);//ok
///////////////////////////////////
Everything related to serie itself and marker works ok.
but I can not set width and color of line itself.
Regards,
Hi,
Well, you may use Line.setWeight/setWeightPt to set the width of the line (of a Series) and use Line.setColor() to set the color of the Line (of a Series). See the sample code below:
//Change the line color and weight of the first data series.
chart.getNSeries().get(0).getLine().setColor(Color.getGreen());
chart.getNSeries().get(0).getLine().setWeight(WeightType.MEDIUM_LINE);
It happens that ASeries class doesn’t have getLine() at all.
Only getHiLoLine() and getLeaderLine() etc.
Regards,
Hi,
Please use the latest major version: Aspose.Cells for Java 7.0.1
Also, the series class name is now Series and not ASeries
It seems the naming in aspose-cells-7.0.1.jar has been changed massively. For example ASeries is not exists, getCell()->get() etc…
I use currently aspose-cells-2.5.4.11.jar. Can you suggest any document describing the changes between the versions.
Regards,
Hi,
Please check the release notes for v7.0.0:
Check the table under: “Notable Changes for the Existing Users”.
For complete reference, see the Aspose.Cells for Java docs:
API Reference:
Thank you.