c# 图表 epplus 轴逆序

c# chart epplus axis reverse order

我在 Excel 中进行导出并使用 Epplus 绘制图表:

var chart = (ExcelChart)wksh.Drawings.AddChart("Chart", eChartType.Line);
chart.SetSize(500, 300);
chart.SetPosition(5, 800);
chart.Title.Text = "myChart";
chart.Series.Add(ExcelRange.GetAddress(2, 26, rowIndex, 26), ExcelRange.GetAddress(2, 25, rowIndex, 25));

并默认从左到右获取图表:

如何从右到左获取图表?

比如在excel属性中有一个参数"categories in reverse order":

在Epplus中是怎么做到的?

我有一个类似的问题,我想翻转我的 y 轴,我用

解决了这个问题
chart.YAxis.Orientation = eAxisOrientation.MaxMin;

如果你想做 x 那么同样的事情(但与 x)应该工作

chart.XAxis.Orientation = eAxisOrientation.MaxMin;

您可能还想设置

chart.XAxis.MinValue 
chart.XAxis.MaxValue 
chart.XAxis.Crosses

如果您的格式看起来很奇怪