Package org.openxmlformats.schemas.drawingml.x2006.chart

Examples of org.openxmlformats.schemas.drawingml.x2006.chart.CTPlotArea


      chart.unsetLegend();
    }
  }

  private boolean hasAxis() {
    CTPlotArea ctPlotArea = chart.getPlotArea();
    int totalAxisCount =
      ctPlotArea.sizeOfValAxArray()  +
      ctPlotArea.sizeOfCatAxArray()  +
      ctPlotArea.sizeOfDateAxArray() +
      ctPlotArea.sizeOfSerAxArray();
    return totalAxisCount > 0;
  }
View Full Code Here


        if (!(chart instanceof XSSFChart)) {
            throw new IllegalArgumentException("Chart must be instance of XSSFChart");
        }

        XSSFChart xssfChart = (XSSFChart) chart;
        CTPlotArea plotArea = xssfChart.getCTChart().getPlotArea();
        CTLineChart lineChart = plotArea.addNewLineChart();
        lineChart.addNewVaryColors().setVal(false);

        for (Series s : series) {
            s.addToChart(lineChart);
        }
View Full Code Here

        if (!(chart instanceof XSSFChart)) {
            throw new IllegalArgumentException("Chart must be instance of XSSFChart");
        }

        XSSFChart xssfChart = (XSSFChart) chart;
        CTPlotArea plotArea = xssfChart.getCTChart().getPlotArea();
        CTScatterChart scatterChart = plotArea.addNewScatterChart();
        addStyle(scatterChart);

        for (Series s : series) {
            s.addToChart(scatterChart);
        }
View Full Code Here

  /**
   * Create a new SpreadsheetML manual layout for chart.
   * @param chart a chart to create layout for.
   */
  public XSSFManualLayout(XSSFChart chart) {
    CTPlotArea ctPlotArea = chart.getCTChart().getPlotArea();
    CTLayout ctLayout = ctPlotArea.isSetLayout() ?
      ctPlotArea.getLayout() : ctPlotArea.addNewLayout();

    initLayout(ctLayout);
  }
View Full Code Here

  if (!(chart instanceof XSSFChart)) {
      throw new IllegalArgumentException("Chart must be instance of XSSFChart");
  }

  XSSFChart xssfChart = (XSSFChart) chart;
  CTPlotArea plotArea = xssfChart.getCTChart().getPlotArea();
  CTScatterChart scatterChart = plotArea.addNewScatterChart();
  addStyle(scatterChart);

  for (Serie s : series) {
      s.addToChart(scatterChart);
  }
View Full Code Here

    manualLayout.addNewX().setVal(0);
    manualLayout.addNewY().setVal(0);
    manualLayout.addNewW().setVal(0.65);
    manualLayout.addNewH().setVal(0.8);
    chart.addNewPlotVisOnly().setVal(true);
    CTPrintSettings printSettings = chartSpace.addNewPrintSettings();
    printSettings.addNewHeaderFooter();

    CTPageMargins pageMargins = printSettings.addNewPageMargins();
    pageMargins.setB(0.75);
    pageMargins.setL(0.70);
    pageMargins.setR(0.70);
    pageMargins.setT(0.75);
    pageMargins.setHeader(0.30);
    pageMargins.setFooter(0.30);
    printSettings.addNewPageSetup();
  }
View Full Code Here

  public void setLogBase(double logBase) {
    if (logBase < MIN_LOG_BASE ||
      MAX_LOG_BASE < logBase) {
      throw new IllegalArgumentException("Axis log base must be between 2 and 1000 (inclusive), got: " + logBase);
    }
    CTScaling scaling = getCTScaling();
    if (scaling.isSetLogBase()) {
      scaling.getLogBase().setVal(logBase);
    } else {
      scaling.addNewLogBase().setVal(logBase);
    }
  }
View Full Code Here

  public boolean isSetMinimum() {
    return getCTScaling().isSetMin();
  }

  public void setMinimum(double min) {
    CTScaling scaling = getCTScaling();
    if (scaling.isSetMin()) {
      scaling.getMin().setVal(min);
    } else {
      scaling.addNewMin().setVal(min);
    }
  }
View Full Code Here

      scaling.addNewMin().setVal(min);
    }
  }

  public double getMinimum() {
    CTScaling scaling = getCTScaling();
    if (scaling.isSetMin()) {
      return scaling.getMin().getVal();
    } else {
      return 0.0;
    }
  }
View Full Code Here

  public boolean isSetMaximum() {
    return getCTScaling().isSetMax();
  }

  public void setMaximum(double max) {
    CTScaling scaling = getCTScaling();
    if (scaling.isSetMax()) {
      scaling.getMax().setVal(max);
    } else {
      scaling.addNewMax().setVal(max);
    }
  }
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.drawingml.x2006.chart.CTPlotArea

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.