Package org.apache.poi.ss.usermodel.charts

Examples of org.apache.poi.ss.usermodel.charts.ScatterChartData


        Chart chart = drawing.createChart(anchor);

        ChartAxis bottomAxis = chart.getChartAxisFactory().createValueAxis(AxisPosition.BOTTOM);
        ChartAxis leftAxis = chart.getChartAxisFactory().createValueAxis(AxisPosition.LEFT);

        ScatterChartData scatterChartData =
                chart.getChartDataFactory().createScatterChartData();

        ChartDataSource<String> xs = DataSources.fromStringCellRange(sheet, CellRangeAddress.valueOf("A1:J1"));
        ChartDataSource<Number> ys = DataSources.fromNumericCellRange(sheet, CellRangeAddress.valueOf("A2:J2"));
        ScatterChartSeries series = scatterChartData.addSerie(xs, ys);

        assertNotNull(series);
        assertEquals(1, scatterChartData.getSeries().size());
        assertTrue(scatterChartData.getSeries().contains(series));

        chart.plot(scatterChartData, bottomAxis, leftAxis);
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.ss.usermodel.charts.ScatterChartData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.