Cách thay đổi màu mặc định của Biểu đồ hình tròn Excel bằng EPPlus theo chương trình.EPPlus cách thay đổi màu của Biểu đồ PIE trong EXCEL
dưới đây là mã của tôi
var pieChart = worksheet.Drawings.AddChart("piechart", eChartType.Pie3D) as ExcelPieChart;
//Set top left corner to row 1 column 2
pieChart.SetPosition(18, 0, 0, 0);
pieChart.SetSize(350, 300);
pieChart.Series.Add(ExcelRange.GetAddress(12, 2, 15, 2),ExcelRange.GetAddress(12, 1, 15, 1));
pieChart.Legend.Position = eLegendPosition.Bottom;
pieChart.Legend.Border.Fill.Color = Color.Green;
pieChart.Legend.Border.LineStyle = eLineStyle.Solid;
pieChart.Legend.Border.Fill.Style = eFillStyle.SolidFill;
pieChart.Title.Text = "Current Status";
pieChart.DataLabel.ShowCategory = false;
pieChart.DataLabel.ShowPercent = true;
Tôi muốn thay đổi màu sắc mặc định cho một số màu sắc tươi sáng.
Đề xuất và ném một số ánh sáng về điều này.
một lời nhận xét cuối năm nhưng có một lỗi đánh máy cho t anh ta xml cho PieChart. Nên là 'c: pieChart' thay vì' c: lineChart' nhưng phần mở rộng tuyệt vời. – Steven
Cảm ơn @Steven, tôi đã sửa lỗi này. –