/** * Create a new SpreadsheetML manual layout for chart. * @param chart a chart to create layout for. */ public XSSFManualLayout(XSSFChart chart) { CT_PlotArea ctPlotArea = chart.GetCTChart().plotArea; CT_Layout ctLayout = ctPlotArea.IsSetLayout() ? ctPlotArea.layout : ctPlotArea.AddNewLayout(); InitLayout(ctLayout); }
/** * Construct a new CTChartSpace bean. * By default, it's just an empty placeholder for chart objects. * * @return a new CTChartSpace bean */ private void CreateChart() { chartSpaceDocument = new ChartSpaceDocument(); chart = chartSpaceDocument.GetChartSpace().AddNewChart(); CT_PlotArea plotArea = chart.AddNewPlotArea(); plotArea.AddNewLayout(); chart.AddNewPlotVisOnly().val = 1; CT_PrintSettings printSettings = chartSpaceDocument.GetChartSpace().AddNewPrintSettings(); printSettings.AddNewHeaderFooter(); CT_PageMargins pageMargins = printSettings.AddNewPageMargins(); pageMargins.b = 0.75; pageMargins.l = 0.70; pageMargins.r = 0.70; pageMargins.t = 0.75; pageMargins.header = 0.30; pageMargins.footer = 0.30; printSettings.AddNewPageSetup(); }
public XSSFManualLayout(XSSFChart chart) { CT_PlotArea plotArea = chart.GetCTChart().plotArea; this.InitLayout(plotArea.IsSetLayout() ? plotArea.layout : plotArea.AddNewLayout()); }