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

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


    protected void addToChart(CTScatterChart ctScatterChart) {
      CTScatterSer scatterSer = ctScatterChart.addNewSer();
      scatterSer.addNewIdx().setVal(this.id);
      scatterSer.addNewOrder().setVal(this.order);

      CTAxDataSource xVal = scatterSer.addNewXVal();
      CTNumRef numRef = xVal.addNewNumRef();
      numRef.setF(xAddress.formatAsString(xSheet.getSheetName(), true));

      CTNumDataSource yVal = scatterSer.addNewYVal();
      numRef = yVal.addNewNumRef();
      numRef.setF(yAddress.formatAsString(ySheet.getSheetName(), true));
View Full Code Here


  /**
   * Create a new SpreadsheetML chart legend
   */
  public XSSFChartLegend(XSSFChart chart) {
    CTChart ctChart = chart.getCTChart();
    this.legend = (ctChart.isSetLegend()) ?
      ctChart.getLegend() :
      ctChart.addNewLegend();
  }
View Full Code Here

  /**
   * Create a new SpreadsheetML chart legend
   */
  public XSSFChartLegend(XSSFChart chart) {
    CTChart ctChart = chart.getCTChart();
    this.legend = (ctChart.isSetLegend()) ?
      ctChart.getLegend() :
      ctChart.addNewLegend();

    setDefaults();
  }
View Full Code Here

  /**
   * Create a new SpreadsheetML chart legend
   */
  public XSSFChartLegend(XSSFChart chart) {
    CTChart ctChart = chart.getCTChart();
    this.legend = (ctChart.isSetLegend()) ?
      ctChart.getLegend() :
      ctChart.addNewLegend();
  }
View Full Code Here

        // embedded Excel workbook that holds the chart data
        POIXMLDocumentPart xlsPart = chart.getRelations().get(0);
        XSSFWorkbook wb = new XSSFWorkbook();
        XSSFSheet sheet = wb.createSheet();

        CTChart ctChart = chart.getCTChart();
        CTPlotArea plotArea = ctChart.getPlotArea();

        CTPieChart pieChart = plotArea.getPieChartArray(0);
        //Pie Chart Series
        CTPieSer ser = pieChart.getSerArray(0);
View Full Code Here

  /**
   * Create a new SpreadsheetML chart legend
   */
  public XSSFChartLegend(XSSFChart chart) {
    CTChart ctChart = chart.getCTChart();
    this.legend = (ctChart.isSetLegend()) ?
      ctChart.getLegend() :
      ctChart.addNewLegend();
  }
View Full Code Here

   */
  private void createChart() {
    chartSpace = CTChartSpace.Factory.newInstance();
    chart = chartSpace.addNewChart();
    CTPlotArea plotArea = chart.addNewPlotArea();
    CTLayout layout = plotArea.addNewLayout();
    CTManualLayout manualLayout = layout.addNewManualLayout();
    manualLayout.addNewLayoutTarget().setVal(STLayoutTarget.INNER);
    manualLayout.addNewXMode().setVal(STLayoutMode.EDGE);
    manualLayout.addNewYMode().setVal(STLayoutMode.EDGE);
    manualLayout.addNewX().setVal(0);
    manualLayout.addNewY().setVal(0);
View Full Code Here

      scaling.addNewLogBase().setVal(logBase);
    }
  }

  public double getLogBase() {
    CTLogBase logBase = getCTScaling().getLogBase();
    if (logBase != null) {
      return logBase.getVal();
    }
    return 0.0;
  }
View Full Code Here

  private void createChart() {
    chartSpace = CTChartSpace.Factory.newInstance();
    chart = chartSpace.addNewChart();
    CTPlotArea plotArea = chart.addNewPlotArea();
    CTLayout layout = plotArea.addNewLayout();
    CTManualLayout manualLayout = layout.addNewManualLayout();
    manualLayout.addNewLayoutTarget().setVal(STLayoutTarget.INNER);
    manualLayout.addNewXMode().setVal(STLayoutMode.EDGE);
    manualLayout.addNewYMode().setVal(STLayoutMode.EDGE);
    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();
View Full Code Here

      CTAxDataSource xVal = scatterSer.addNewXVal();
      CTNumRef numRef = xVal.addNewNumRef();
      numRef.setF(xAddress.formatAsString(xSheet.getSheetName(), true));

      CTNumDataSource yVal = scatterSer.addNewYVal();
      numRef = yVal.addNewNumRef();
      numRef.setF(yAddress.formatAsString(ySheet.getSheetName(), true));
    }
View Full Code Here

TOP

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

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.