Example #1
0
        private void CreateChart()
        {
            this.chartSpace = new CT_ChartSpace();
            this.chart      = this.chartSpace.AddNewChart();
            this.chart.AddNewPlotArea().AddNewLayout();
            this.chart.AddNewPlotVisOnly().val = 1;
            CT_PrintSettings ctPrintSettings = this.chartSpace.AddNewPrintSettings();

            ctPrintSettings.AddNewHeaderFooter();
            CT_PageMargins ctPageMargins = ctPrintSettings.AddNewPageMargins();

            ctPageMargins.b      = 0.75;
            ctPageMargins.l      = 0.7;
            ctPageMargins.r      = 0.7;
            ctPageMargins.t      = 0.75;
            ctPageMargins.header = 0.3;
            ctPageMargins.footer = 0.3;
            ctPrintSettings.AddNewPageSetup();
        }
Example #2
0
        /**
         * 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();
        }