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

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


    Workbook wb = new XSSFWorkbook();
    Sheet sheet = wb.createSheet();
    Drawing drawing = sheet.createDrawingPatriarch();
    ClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 1, 1, 10, 30);
    Chart chart = drawing.createChart(anchor);
    ChartLegend legend = chart.getOrCreateLegend();
    return legend.getManualLayout();
  }
View Full Code Here


    Workbook wb = new XSSFWorkbook();
    Sheet sheet = wb.createSheet();
    Drawing drawing = sheet.createDrawingPatriarch();
    ClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 1, 1, 10, 30);
    Chart chart = drawing.createChart(anchor);
    ChartLegend legend = chart.getOrCreateLegend();

    legend.setPosition(LegendPosition.TOP_RIGHT);
    assertEquals(LegendPosition.TOP_RIGHT, legend.getPosition());
  }
View Full Code Here

        Workbook wb = new XSSFWorkbook();
        Sheet sheet = wb.createSheet();
        Drawing drawing = sheet.createDrawingPatriarch();
        ClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 1, 1, 10, 30);
        Chart chart = drawing.createChart(anchor);
        ChartLegend legend = chart.getOrCreateLegend();

        // Act

        // Assert
        assertFalse(legend.isOverlay());
    }
View Full Code Here

        Workbook wb = new XSSFWorkbook();
    Sheet sheet = wb.createSheet();
    Drawing drawing = sheet.createDrawingPatriarch();
    ClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 1, 1, 10, 30);
    Chart chart = drawing.createChart(anchor);
    ChartLegend legend = chart.getOrCreateLegend();

        // Act
    legend.setOverlay(true);

        // Assert
        assertTrue(legend.isOverlay());
  }
View Full Code Here

    Workbook wb = new XSSFWorkbook();
    Sheet sheet = wb.createSheet();
    Drawing drawing = sheet.createDrawingPatriarch();
    ClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 1, 1, 10, 30);
    Chart chart = drawing.createChart(anchor);
    ChartLegend legend = chart.getOrCreateLegend();
    return legend.getManualLayout();
  }
View Full Code Here

    Workbook wb = new XSSFWorkbook();
    Sheet sheet = wb.createSheet();
    Drawing drawing = sheet.createDrawingPatriarch();
    ClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 1, 1, 10, 30);
    Chart chart = drawing.createChart(anchor);
    ChartLegend legend = chart.getOrCreateLegend();

    legend.setPosition(LegendPosition.TOP_RIGHT);
    assertEquals(LegendPosition.TOP_RIGHT, legend.getPosition());
  }
View Full Code Here

        Drawing drawing = sheet.createDrawingPatriarch();
        ClientAnchor anchor = drawing.createAnchor(0, 0, 0, 0, 0, 5, 10, 15);

        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);
View Full Code Here

TOP

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

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.