Examples of ChartLegend


Examples of com.projity.pm.graphic.chart.ChartLegend

    menuManager = null;
    documentFrame = null;
  }

  protected JScrollPane createLeftScrollPane() {
    chartLegend = new ChartLegend(chartInfo);
    chartInfo.setChartLegend(chartLegend);
    JScrollPane result =  new JScrollPane(chartLegend.createContentPanel());
    result.getVerticalScrollBar().setUnitIncrement(20);
    return result;
  }
View Full Code Here

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

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();

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

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();

        // Act

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

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();

        // Act
    legend.setOverlay(true);

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

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

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();

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

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

        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

Examples of org.openfaces.component.chart.ChartLegend

* @author Ekaterina Shliakhovetskaya
*/
class LegendAdapter extends LegendTitle {
    public LegendAdapter(Plot plot, Chart chart) {
        super(plot);
        ChartLegend legend = chart.getLegend();

        setPosition(RectangleEdge.BOTTOM);

        StyleObjectModel cssLegendModel = (legend != null)
                ? legend.getStyleObjectModel()
                : chart.getStyleObjectModel();

        final boolean chartBackgroundPaintDefined = chart.getChartView().getBackgroundPaint() != null;
        if (chartBackgroundPaintDefined) {
            setBackgroundPaint(chart.getChartView().getBackgroundPaint());
        } else {
            setBackgroundPaint(cssLegendModel.getBackground());
        }

        StyleBorderModel border = cssLegendModel.getBorder();

        if (border != null && !border.isNone()) {
            setBorder(new BlockBorder(border.getColor()));
        } else {
            setBorder(new BlockBorder(cssLegendModel.getBackground()));
        }

        setMargin(cssLegendModel.getMargin(0), cssLegendModel.getMargin(1), cssLegendModel.getMargin(2), cssLegendModel.getMargin(3));

        if (legend != null) {
            LegendPosition position = legend.getPosition();
            setPosition(position != null ? position.toRectangleEdge() : RectangleEdge.BOTTOM);
        }

        //from legend labels
        ChartLabels labels = (legend != null) ? legend.getLabels() : null;
        if (labels != null) {
            StyleObjectModel cssLabelsModel = labels.getStyleObjectModel();
            setItemPaint(cssLabelsModel.getColor());
            setItemFont(CSSUtil.getFont(cssLabelsModel));
        } else {
View Full Code Here

Examples of org.openfaces.component.chart.ChartLegend

    private void setupLegendLabels(PiePlot plot, Chart chart, PieChartView chartView) {
        if (!chart.isLegendVisible())
            return;

        ChartLegend legend = chart.getLegend();
        if (legend == null || legend.getLabels() == null)
            return;

        final ChartLabels labels = legend.getLabels();
        if (labels.getText() != null) {
            // simple text = the same string for every item
            plot.setLegendLabelGenerator(new PieSectionLabelGenerator() {
                public String generateSectionLabel(PieDataset pieDataset, Comparable comparable) {
                    return labels.getText();
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.