将子类别的 Microsoft 图表控件 X 轴标签格式设置为类似于 Excel 中生成的图表
我在尝试复制使用 .Net 的 Microsoft 图表控件在 Microsoft Excel 2007 中生成的图表时遇到问题
该图表显示了一年中每个月的前 5 个条目(每个月可能有不同的 5 个条目)然后显示一些指标的细分,
我可以完美地获取数据,问题归结为这样一个事实:在 Excel 图表中,它已格式化 X 轴标签,如下图所示: 这就是我们希望轴格式化的方式,以便每个月份名称仅针对该月份的 5 个子类别列出一次。
但我不知道如何使用 Microsoft 图表控件重现这一点,当我对图表控件使用相同的数据时,它会将 X 轴格式化为(忽略颜色等): 我已绑定数据,以便 XAxis 值为“January AAA-BBB”,我想也许我需要将月份部分分离为可以单独格式化/分组的其他轴值。
任何帮助将不胜感激。
I am having issues attempting to replicate a chart that has been generated in Microsoft Excel 2007 by using the Microsoft Chart Control for .Net
The chart is showing the TOP 5 entries for each Month (each month could have a different 5 entries) of the year and then showing a breakdown of some metrics
I can get the data perfectly fine, the issue comes down to the fact that in the Excel chart it has formatted the X-Axis labels as shown in the following image:
Which is how we want the axis formatted so that each Month name is only listed once for the 5 sub categories that are for that month.
But I do not know how to reproduce this using the Microsoft Chart Control, when I use the same data for the chart control it formats the X-Axis as (ignore colors and such):
I have bound the data so that the XAxis value is "January AAA-BBB", I'm thinking that maybe I need to separate out the Month portion into some other axis value that can be formatted/grouped separately.
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经成功地使用了一系列自定义标签,我手动将其放置在正确的“部分”下。
I have managed to use a series of CustomLabel's that I manually position to be under the correct "sections".