asp.net 中的网络图表

发布于 2024-08-09 07:54:55 字数 210 浏览 3 评论 0原文

正在使用 asp.net 中的 webchart 控件(http://www.carlosag.net/Tools/WebChart /)X 轴标签很长(例如 30 个字符),因此会被截断。有更好的方式来展示它们吗?

谢谢, 吉萨

Am working with webchart control in asp.net(http://www.carlosag.net/Tools/WebChart/) The X-axis labels are long(say 30 chars) and hence gets truncated. is there a better way of displaying them?

Thanks,
Geetha

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

听你说爱我 2024-08-16 07:54:55

如果某些图表组件较多或某些组件较长,则会自动更改 x 轴标签方向。您还应该能够以编程方式设置它。我是在使用 ChartFX 图表时完成此操作的。

some of the charting components automatically change x-axis label orientation if there are many of them or some of them are long. You should also be programmatically able to set it. I had done this while using ChartFX charts.

迷乱花海 2024-08-16 07:54:55

我所做的是以编程方式更改图表的底部填充,以便更改 x 轴上字符串可用的高度。

要使用 ChartText.StringFormat 属性更改图表控件的截断设置,并使用适当的枚举实例化它(您可以关闭截断)。可以添加枚举来组合效果。实例化一个新的 StringFormat 对象并从那里开始。

如果您正在迭代数据(就像我一样),您可以添加一行,例如

If strXVal.Length > 15 然后 objEngine.BottomChartPadding = 150

将以编程方式为 x 轴文本提供更多空间。

What I have done is programatically change the bottom padding of the chart in order to change the height available to the strings on the x axis.

To change the truncation settings of the chart control using the ChartText.StringFormat property and instantiate it with the appropriate enum (you can turn truncation off). The Enums can be added to combine effects. instantiate a new StringFormat object and go from there.

If you are iterating over your data (like I am) you can add a line like

If strXVal.Length > 15 Then objEngine.BottomChartPadding = 150

that will programatically provide more room for your x-axis text.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文