Search in sources :

Example 1 with CTPrintSettings

use of org.openxmlformats.schemas.drawingml.x2006.chart.CTPrintSettings in project poi by apache.

the class XSSFChart method createChart.

/**
	 * Construct a new CTChartSpace bean.
	 * By default, it's just an empty placeholder for chart objects.
	 *
	 * @return a new CTChartSpace bean
	 */
private void createChart() {
    chartSpace = CTChartSpace.Factory.newInstance();
    chart = chartSpace.addNewChart();
    CTPlotArea plotArea = chart.addNewPlotArea();
    plotArea.addNewLayout();
    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();
}
Also used : CTPrintSettings(org.openxmlformats.schemas.drawingml.x2006.chart.CTPrintSettings) CTPlotArea(org.openxmlformats.schemas.drawingml.x2006.chart.CTPlotArea) CTPageMargins(org.openxmlformats.schemas.drawingml.x2006.chart.CTPageMargins)

Aggregations

CTPageMargins (org.openxmlformats.schemas.drawingml.x2006.chart.CTPageMargins)1 CTPlotArea (org.openxmlformats.schemas.drawingml.x2006.chart.CTPlotArea)1 CTPrintSettings (org.openxmlformats.schemas.drawingml.x2006.chart.CTPrintSettings)1