Esempio n. 1
0
        private static ExcelStockChart AddStockChartStyle(ExcelWorksheet ws, eStockChartType type, eChartStyle style, string name, int row, int col, ExcelRange range, Action <ExcelStockChart> SetProperties)
        {
            var chart = AddStockChart(ws, type, name, row, col, range, SetProperties);

            chart.Style = style;
            return(chart);
        }
Esempio n. 2
0
        private static ExcelStockChart AddStockChart(ExcelWorksheet ws, eStockChartType type, string name, int row, int col, ExcelRange range, Action <ExcelStockChart> SetProperties)
        {
            var chart = ws.Drawings.AddStockChart(name, type, range);

            chart.SetPosition(row, 0, col, 0);
            chart.To.Column    = col + 12;
            chart.To.ColumnOff = 0;
            chart.To.Row       = row + 18;
            chart.To.RowOff    = 0;

            SetProperties(chart);

            return(chart);
        }
Esempio n. 3
0
        private static void StockChartStyle(ExcelWorksheet ws, eStockChartType chartType, ExcelRange Range)
        {
            //Surface charts don't use chart styling in Excel, but styles can be applied anyway.

            //Stock chart Style 1
            AddStockChartStyleManager(ws, chartType, ePresetChartStyle.StockChartStyle1, "StockChartStyle1", 0, 5, Range,
                                      c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock chart Style 2
            AddStockChartStyleManager(ws, chartType, ePresetChartStyle.StockChartStyle2, "StockChartStyle2", 0, 18, Range,
                                      c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock chart Style 3
            AddStockChartStyleManager(ws, chartType, ePresetChartStyle.StockChartStyle3, "StockChartStyle3", 0, 31, Range,
                                      c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock chart Style 4
            AddStockChartStyleManager(ws, chartType, ePresetChartStyle.StockChartStyle4, "StockChartStyle4", 20, 5, Range,
                                      c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock chart Style 5
            AddStockChartStyleManager(ws, chartType, ePresetChartStyle.StockChartStyle5, "StockChartStyle5", 20, 18, Range,
                                      c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock chart Style 6
            AddStockChartStyleManager(ws, chartType, ePresetChartStyle.StockChartStyle6, "StockChartStyle6", 20, 31, Range,
                                      c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock chart Style 7
            AddStockChartStyleManager(ws, chartType, ePresetChartStyle.StockChartStyle7, "StockChartStyle7", 40, 5, Range,
                                      c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock chart Style 8
            AddStockChartStyleManager(ws, chartType, ePresetChartStyle.StockChartStyle8, "StockChartStyle8", 40, 18, Range,
                                      c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock chart Style 9
            AddStockChartStyleManager(ws, chartType, ePresetChartStyle.StockChartStyle9, "StockChartStyle9", 40, 31, Range,
                                      c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock chart Style 10
            AddStockChartStyleManager(ws, chartType, ePresetChartStyle.StockChartStyle10, "StockChartStyle10", 60, 5, Range,
                                      c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock chart Style 11
            AddStockChartStyleManager(ws, chartType, ePresetChartStyle.StockChartStyle11, "StockChartStyle11", 60, 18, Range,
                                      c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock buildin chart 15
            AddStockChartStyle(ws, chartType, eChartStyle.Style15, "StockChartStyle15", 80, 5, Range,
                               c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock buildin chart 33
            AddStockChartStyle(ws, chartType, eChartStyle.Style33, "StockChartStyle33", 80, 18, Range,
                               c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });

            //Stock buildin chart 48
            AddStockChartStyle(ws, chartType, eChartStyle.Style48, "StockChartStyle48", 80, 31, Range,
                               c =>
            {
                c.Legend.Position = eLegendPosition.Bottom;
            });
        }