Examples of LineChartData


Examples of com.salas.bb.utils.uif.charts.LineChartData

            int i = 0;
            for (ReadStats stat : stats)
            {
                if (i++ == max) break;

                LineChartData data = new LineChartData(stat.getCounts());
                LineChart chart = new LineChart(data, config);

                builder.appendRelatedComponentsGapRow(2);
                builder.appendRow("max(p;20px)");
                builder.append(new JLabel(itemIcon));
View Full Code Here

Examples of com.salas.bb.utils.uif.charts.LineChartData

        hours[0] = Strings.message("report.midnight");
        hours[12] = Strings.message("report.noon");

        LineChartConfig config = new LineChartConfig();
        config.setIndexLabelStep(4);
        LineChartData dataByHour = new LineChartData(readByHourTotal, hours);
        LineChart chartByHour = new LineChart(dataByHour, config);

        LineChartData dataByHourReset = new LineChartData(readByHourReset, hours);
        LineChart chartByHourReset = new LineChart(dataByHourReset, config);

        // Initialize the panel itself
        setBackground(config.getBackgroundColor());
View Full Code Here

Examples of com.salas.bb.utils.uif.charts.LineChartData

        String[] days = new String[7];
        DateFormatSymbols dfs = new DateFormatSymbols();
        for (int i = 0; i < 7; i++) days[i] = dfs.getWeekdays()[Calendar.SUNDAY + i];

        LineChartConfig config = new LineChartConfig();
        LineChartData dataByDay = new LineChartData(readByDayTotal, days);
        LineChart chartByDay = new LineChart(dataByDay, config);

        LineChartData dataByDayReset = new LineChartData(readByDayReset, days);
        LineChart chartByDayReset = new LineChart(dataByDayReset, config);

        // Initialize the panel itself
        setBackground(config.getBackgroundColor());
View Full Code Here

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

        Chart chart = drawing.createChart(anchor);

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

        LineChartData lineChartData =
                chart.getChartDataFactory().createLineChartData();

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

        assertNotNull(serie);
        assertEquals(1, lineChartData.getSeries().size());
        assertTrue(lineChartData.getSeries().contains(serie));

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

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

        Chart chart = drawing.createChart(anchor);

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

        LineChartData lineChartData =
                chart.getChartDataFactory().createLineChartData();

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

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

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

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

        Chart chart = drawing.createChart(anchor);
        ChartLegend legend = chart.getOrCreateLegend();
        legend.setPosition(LegendPosition.TOP_RIGHT);

        LineChartData data = chart.getChartDataFactory().createLineChartData();

        // Use a category axis for the bottom axis.
        ChartAxis bottomAxis = chart.getChartAxisFactory().createCategoryAxis(AxisPosition.BOTTOM);
        ValueAxis leftAxis = chart.getChartAxisFactory().createValueAxis(AxisPosition.LEFT);
        leftAxis.setCrosses(AxisCrosses.AUTO_ZERO);

        ChartDataSource<Number> xs = DataSources.fromNumericCellRange(sheet, new CellRangeAddress(0, 0, 0, NUM_OF_COLUMNS - 1));
        ChartDataSource<Number> ys1 = DataSources.fromNumericCellRange(sheet, new CellRangeAddress(1, 1, 0, NUM_OF_COLUMNS - 1));
        ChartDataSource<Number> ys2 = DataSources.fromNumericCellRange(sheet, new CellRangeAddress(2, 2, 0, NUM_OF_COLUMNS - 1));


        data.addSeries(xs, ys1);
        data.addSeries(xs, ys2);

        chart.plot(data, bottomAxis, leftAxis);

        // Write the output to a file
        FileOutputStream fileOut = new FileOutputStream("ooxml-line-chart.xlsx");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.