use of org.openxmlformats.schemas.drawingml.x2006.chart.CTAreaSer in project ocvn by devgateway.
the class XSSFAreaChartData method createNewSerie.
@Override
protected CustomChartSeries createNewSerie(final int id, final int order, final ChartDataSource<?> categories, final ChartDataSource<? extends Number> values) {
return new AbstractSeries(id, order, categories, values) {
@Override
public void addToChart(final XmlObject ctChart) {
final CTAreaChart ctAreaChart = (CTAreaChart) ctChart;
final CTAreaSer ctAreaSer = ctAreaChart.addNewSer();
ctAreaSer.addNewIdx().setVal(this.id);
ctAreaSer.addNewOrder().setVal(this.order);
final CTAxDataSource catDS = ctAreaSer.addNewCat();
XSSFChartUtil.buildAxDataSource(catDS, this.categories);
final CTNumDataSource valueDS = ctAreaSer.addNewVal();
XSSFChartUtil.buildNumDataSource(valueDS, this.values);
if (isTitleSet()) {
ctAreaSer.setTx(getCTSerTx());
}
}
};
}
use of org.openxmlformats.schemas.drawingml.x2006.chart.CTAreaSer in project oc-explorer by devgateway.
the class XSSFAreaChartData method createNewSerie.
@Override
protected CustomChartSeries createNewSerie(final int id, final int order, final ChartDataSource<?> categories, final ChartDataSource<? extends Number> values) {
return new AbstractSeries(id, order, categories, values) {
@Override
public void addToChart(final XmlObject ctChart) {
final CTAreaChart ctAreaChart = (CTAreaChart) ctChart;
final CTAreaSer ctAreaSer = ctAreaChart.addNewSer();
ctAreaSer.addNewIdx().setVal(this.id);
ctAreaSer.addNewOrder().setVal(this.order);
final CTAxDataSource catDS = ctAreaSer.addNewCat();
XSSFChartUtil.buildAxDataSource(catDS, this.categories);
final CTNumDataSource valueDS = ctAreaSer.addNewVal();
XSSFChartUtil.buildNumDataSource(valueDS, this.values);
if (isTitleSet()) {
ctAreaSer.setTx(getCTSerTx());
}
}
};
}
Aggregations