gpt4 book ai didi

c# - ZedGraph 条宽

转载 作者:行者123 更新时间:2023-11-30 22:36:53 30 4
gpt4 key购买 nike

有没有办法修改 ZedGraph 条的宽度?如果是这样,这样做所需的代码是什么?是否有可能使条形图也随着缩放比例缩放?由于当前缩放的工作方式,我有一些条没有显示(x 轴范围很宽,这使得所有条都非常瘦)。如果栏太窄,它根本不会显示。我希望条形图更宽一些,这样它们就会始终显示出来,而无需放大才能看到它们。

最佳答案

documentation for ZedGraph有以下关于条形图的说法(强调我的):

Typically, bar charts would be created with XAxis.Type = AxisType.Text or XAxis.Type = AxisType.Ordinal (both types use ordinal values), such that the bars are drawn at integral values along the "base" axis, starting with 1 (e.g., the first bar cluster is at 1.0, the second is at 2.0, etc.). However, the ordinal axis type is not a requirement for bar charts. It is possible to create a bar chart that is not evenly spaced, by providing X values and using AxisType.Linear (in this case, you may need to use the GraphPane.ClusterScaleWidth property to tell ZedGraph how wide the bars should be. See this wiki page for details). For bar charts, the tic marks are typically between the bar clusters, which can be accomplished with the Axis.MajorTic.IsBetweenLabels property. However, this property is only applicable for AxisType.Text axes.

不幸的是,wiki 链接转到了 ZedGraph 的作者似乎已经放弃的旧域。但是有一个存档版本:Wiki Page

最后,您可能会发现查看优秀的 source code reference at sourceforge 很有帮助.

关于c# - ZedGraph 条宽,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6791715/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com