我使用下面的代码创建了条形图。但我需要做两个修改,我不知道怎么做。
var chart = (ExcelBarChart)ws.Drawings.AddChart("barChart", eChartType.BarClustered);
chart.SetSize(1000, 500);
chart.SetPosition(10, 225);
chart.Legend.Position = eLegendPosition.Bottom;
chart.YAxis.MaxValue = 4;1)我需要去掉圆角边框,我需要笔直。2)我需要更改类别的方向,如下图所示。
Image of the graph is, and how I wish it to be.
如果有人能帮我,我将不胜感激。
发布于 2018-10-26 05:04:17
你已经很接近了!
可以使用chart.RoundedCorners = false;删除圆角边。
使用chart.XAxis.Orientation = eAxisOrientation.MaxMin;更改类别方向。
使用我自己的数据,您的代码生成了以下内容:

添加此代码后
chart.RoundedCorners = false;
chart.XAxis.Orientation = eAxisOrientation.MaxMin;你会得到这个:

https://stackoverflow.com/questions/52892180
复制相似问题