我试图让图例中显示的“A”列中的用户以及栏中用户旁边的数据。我不确定空白数据来自哪里,也不确定为什么显示为“系列”
我还希望左边的值显示在 0% 到 100% 之间,这样每 10% 的用户就更容易阅读。
Excel.Range dataRange = chartSheet.get_Range("A1", "C" + chart.Rows.Count.ToString());
//chart.Rows.Count = 2
Excel.ChartObjects chartObjects = (Excel.ChartObjects)(excelWorksheet.ChartObjects(Type.Missing));
Excel.ChartObject newChartObject = chartObjects.Add(0, 600, 300, 300);
object paramChartFormat = 1;
object paramCategoryLabels = 0;
object paramSeriesLabels = 0;
bool paramHasLegend = true;
object paramTitle = "Performance Efficiency";
object paramCategoryTitle = "Providers";
object paramValueTitle = "Percentage";
newChartObject.Chart.ChartWizard(dataRange, Excel.XlChartType.xl3DColumn,
paramChartFormat, Excel.XlRowCol.xlRows, paramCategoryLabels,
paramSeriesLabels, paramHasLegend, paramTitle, paramCategoryTitle,
paramValueTitle, Type.Missing);