如何设置图表宽度和高度DocX Ceed?

时间:2018-12-11 11:46:36

标签: c# charts docx xceed

如何设置图表大小,线条颜色以及其填充或边距。我找不到任何尝试更改颜色的文档,但没有用,这是我的一些代码。

            // Create the LineChart instance 
            LineChart chart = new LineChart();
            Series series = new Series("Number of violated rules and directives");

            //Set the color
            series.Color = Color.Black;

            // Create a new list of ChartModel
            var chartData = new List<Models.ChartModel>();
            chartData.Add(new ChartModel { date = "02.30", violation = 1000 }); // Insert data into the list 
            chartData.Add(new ChartModel { date = "06.30", violation = 3000 }); // Insert data into the list 
            chartData.Add(new ChartModel { date = "07.30", violation = 100 });  // Insert data into the list 

            series.Bind(chartData, "date", "violation"); // Insert the data into the chart 
            chart.AddSeries(series);                     // Add the series instance to the chart 
            document.InsertChart(chart);

0 个答案:

没有答案
相关问题