I am using Spire.XLS Chart in Excel in C #
I need to create a chart like the one attached, someone who can help me know how I can generate it, I think it would be the Donut
I hope you can help me
//Create a workbook
Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets[0];
//Insert data
sheet.Range["A1"].Value = "67";
sheet.Range["A2"].Value = "164";
//Add a new chart, set chart type as doughnut
Chart chart = sheet.Charts.Add();
chart.ChartType = ExcelChartType.Doughnut;
chart.DataRange = sheet.Range["A1:A2"];
chart.SeriesDataFromRange = false;
//Set position of chart
chart.LeftColumn = 4;
chart.TopRow = 2;
chart.RightColumn = 12;
chart.BottomRow = 22;
//Chart title
chart.ChartTitle = "Chart title";
chart.ChartTitleArea.IsBold = true;
chart.ChartTitleArea.Size = 12;
chart.Series[0].DataPoints.DefaultDataPoint.DataLabels.HasValue = true;
chart.Series[0].Format.Options.DoughnutHoleSize = 45;
//Create a font
ExcelFont font = workbook.CreateFont();
font.Size = 13.0;
//Set font
chart.Series[0].DataPoints[0].DataLabels.TextArea.SetFont(font);
ChartDataLabels format = chart.Series[0].DataPoints[0].DataLabels;
format.HasPercentage = true;
format.Delimiter = "\n";
//Change the position of data label
format.IsXMode = true;
format.IsYMode = true;
format.X = 1700;
format.Y = 2000;
chart.Series[0].DataPoints[1].DataLabels.HasValue = false;
chart.Series[0].DataPoints[1].DataFormat.Fill.FillType = ShapeFillType.SolidColor;
chart.Series[0].DataPoints[1].DataFormat.Fill.ForeColor = Color.LightGray;
//Save the document
string output = "CreateDoughnutChart20756.xlsx";
workbook.SaveToFile(output, ExcelVersion.Version2013);
ChartDataLabels.HasPercentage = true;