Hi Jens,
Well, DataLabels is a class and not the collection, we will fix its description in the JavaDoc soon.
Commonly you may use DataLabels to specify the whole series options e.g
DataLabels dataLabels = series.getDataLabels();
dataLabels.setCategoryNameShown(true);
dataLabels.setValueShown(true);
dataLabels.setSeriesShown(true);
dataLabels.setNumber(14);
If you need to set format a specific datalabel, you got to get the particular chart point of the data label.
And, if you want to set datalabels for all the points of a series, you can get the DataLabels of the series and set it straight away.
For a particular data point in the series to be formatted, see the code:
//Set the second point in a series to red colored
series.getChartPoints().getChartPoint(1).getArea().setForeGroundColor(Color.RED);
and don’t forget to make the area visible first:
series.getChartPoints().getChartPoint(1).getArea().setVisible(true);
Thank you.
Hi,
Hi,
Please see the document on how to set FillFormat for your reference:
http://www.aspose.com/documentation/java-components/aspose.cells-for-java/manipulating-designer-charts.html
Using fill format options you may set Texture, Pattern or Gradient effects where as foreground color only sets simple colors.
Thank you.