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

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


    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

   */
  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

      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

    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

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

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

        // Series Text
        CTSerTx tx = ser.getTx();
        tx.getStrRef().getStrCache().getPtArray(0).setV(chartTitle);
        sheet.createRow(0).createCell(1).setCellValue(chartTitle);
        String titleRef = new CellReference(sheet.getSheetName(), 0, 1, true, true).formatAsString();
        tx.getStrRef().setF(titleRef);


        // Category Axis Data
        CTAxDataSource cat = ser.getCat();
        CTStrData strData = cat.getStrRef().getStrCache();

        // Values
        CTNumDataSource val = ser.getVal();
        CTNumData numData = val.getNumRef().getNumCache();

        strData.setPtArray(null)// unset old axis text
        numData.setPtArray(null)// unset old values
View Full Code Here

   * @return a new CTChartSpace bean
   */
  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);
View Full Code Here

TOP

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

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.