简体   繁体   English

C# 使用 EPPlus 更改 Excel 图表 label 方向

[英]C# Change Excel chart label orientation using EPPlus

There doesn't seem to be any method in EPPlus for changing the orientation of tick labels on a chart. EPPlus 中似乎没有任何方法可以更改图表上刻度标签的方向。

I can see it's possible to make changes by using the XML properties exposed by ChartXML but documentation for this seems to be thin on the ground.我可以看到可以使用 ChartXML 公开的 XML 属性进行更改,但是这方面的文档似乎很少见。 Can anybody help me out here, please?有人可以帮我吗?

Thanks谢谢

John约翰

Newer version of Epplus (from 5 onwards I think) support this - you can use Axis.TextBody.Rotation and set it between -90 and 90.较新版本的 Epplus(我认为是从 5 开始)支持这一点 - 您可以使用 Axis.TextBody.Rotation 并将其设置在 -90 和 90 之间。

chart.XAxis.TextBody.Rotation = -90;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM