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

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


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


        // set model
        int idx = 0;
        int rownum = 1;
        String ln;
        while((ln = modelReader.readLine()) != null){
            String[] vals = ln.split("\\s+");
            CTNumVal numVal = numData.addNewPt();
            numVal.setIdx(idx);
            numVal.setV(vals[1]);

            CTStrVal sVal = strData.addNewPt();
            sVal.setIdx(idx);
            sVal.setV(vals[0]);

            idx++;
            XSSFRow row = sheet.createRow(rownum++);
            row.createCell(0).setCellValue(vals[0]);
            row.createCell(1).setCellValue(Double.valueOf(vals[1]));
        }
        numData.getPtCount().setVal(idx);
        strData.getPtCount().setVal(idx);

        String numDataRange = new CellRangeAddress(1, rownum-1, 1, 1).formatAsString(sheet.getSheetName(), true);
        val.getNumRef().setF(numDataRange);
        String axisDataRange = new CellRangeAddress(1, rownum-1, 0, 0).formatAsString(sheet.getSheetName(), true);
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

   * @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.CTNumData

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.