更改 WPF Toolkit 图表中绘图区域和标题周围的边距
我正在使用 WPF Toolkit 2010 年 2 月版本的 Chart 控件。图表相对于绘图区域占用了大量空间。
如何控制绘图区域和图表标题周围的边距。这样,我可以将我需要的 10 个图表排列在网格中,而无需在屏幕上使用太多空间。
谢谢,
精灵。
I am using the Chart control of WPF Toolkit February 2010 release. The chart takes up lots of space relative to the plot area.
How do I control the margin around the plot area and title of the chart. This way, I can arrange the 10 charts I need in a grid without having to use so much space on the screen.
Thanks,
sprite.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 WPF Toolkit 讨论区中找到了类似问题的答案,并认为我应该分享这些知识。
当前唯一可用的解决方案是自己设置图表样式。所以基本上,我从工具包的源代码中获取了原始的样式定义,并对其进行了修改以满足我的需求。我还用它来完全删除图例。
此模板将标题和绘图区域周围的边距降至最低限度,并删除了图例。然后,我在适合我的需求的用户控件中使用了它,并多次重复使用它。
在控件的标头中定义了以下命名空间:
享受吧!
I found an answer to a similar question in the WPF Toolkit discussion boards and thought I'd share the knowledge.
The only solution currently available is to style the chart myself. So basically, I took the original style definition from the source code of the toolkit and I modified it to meet my needs. I also used this to remove the legend completely.
This template removes margins to a bare minimum around the title and plot area and also removes the legend. I then used this in a user control suited to my needs and reused it many times over.
The following namespaces were defined in the header of the control:
Enjoy!