Charts c#图表epplus轴反向顺序

Charts c#图表epplus轴反向顺序,charts,reverse,epplus,Charts,Reverse,Epplus,我在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), Excel

我在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 in properties中有一个参数“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

如果您的格式看起来不可靠

此外,我必须更改chart.YAxis.LabelPosition,请参阅