Search in sources :

Example 1 with CTBubbleSer

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());
            }
        }
    };
}
Also used : CTBubbleSer(org.openxmlformats.schemas.drawingml.x2006.chart.CTBubbleSer) CTNumDataSource(org.openxmlformats.schemas.drawingml.x2006.chart.CTNumDataSource) XmlObject(org.apache.xmlbeans.XmlObject) CTBubbleChart(org.openxmlformats.schemas.drawingml.x2006.chart.CTBubbleChart) CTAxDataSource(org.openxmlformats.schemas.drawingml.x2006.chart.CTAxDataSource)

Example 2 with CTBubbleSer

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());
            }
        }
    };
}
Also used : CTBubbleSer(org.openxmlformats.schemas.drawingml.x2006.chart.CTBubbleSer) CTNumDataSource(org.openxmlformats.schemas.drawingml.x2006.chart.CTNumDataSource) XmlObject(org.apache.xmlbeans.XmlObject) CTBubbleChart(org.openxmlformats.schemas.drawingml.x2006.chart.CTBubbleChart) CTAxDataSource(org.openxmlformats.schemas.drawingml.x2006.chart.CTAxDataSource)

Aggregations

XmlObject (org.apache.xmlbeans.XmlObject)2 CTAxDataSource (org.openxmlformats.schemas.drawingml.x2006.chart.CTAxDataSource)2 CTBubbleChart (org.openxmlformats.schemas.drawingml.x2006.chart.CTBubbleChart)2 CTBubbleSer (org.openxmlformats.schemas.drawingml.x2006.chart.CTBubbleSer)2 CTNumDataSource (org.openxmlformats.schemas.drawingml.x2006.chart.CTNumDataSource)2