use of org.openxmlformats.schemas.drawingml.x2006.chart.CTBubbleSer in project ocvn by devgateway.
the class XSSFBubbleChartData 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 CTBubbleChart ctBubbleChart = (CTBubbleChart) ctChart;
final CTBubbleSer bubbleSer = ctBubbleChart.addNewSer();
bubbleSer.addNewIdx().setVal(this.id);
bubbleSer.addNewOrder().setVal(this.order);
final CTAxDataSource catDS = bubbleSer.addNewXVal();
XSSFChartUtil.buildAxDataSource(catDS, this.categories);
final CTNumDataSource valueDS = bubbleSer.addNewBubbleSize();
XSSFChartUtil.buildNumDataSource(valueDS, this.values);
if (isTitleSet()) {
bubbleSer.setTx(getCTSerTx());
}
}
};
}
use of org.openxmlformats.schemas.drawingml.x2006.chart.CTBubbleSer in project oc-explorer by devgateway.
the class XSSFBubbleChartData 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 CTBubbleChart ctBubbleChart = (CTBubbleChart) ctChart;
final CTBubbleSer bubbleSer = ctBubbleChart.addNewSer();
bubbleSer.addNewIdx().setVal(this.id);
bubbleSer.addNewOrder().setVal(this.order);
final CTAxDataSource catDS = bubbleSer.addNewXVal();
XSSFChartUtil.buildAxDataSource(catDS, this.categories);
final CTNumDataSource valueDS = bubbleSer.addNewBubbleSize();
XSSFChartUtil.buildNumDataSource(valueDS, this.values);
if (isTitleSet()) {
bubbleSer.setTx(getCTSerTx());
}
}
};
}
Aggregations