本文整理汇总了C#中ZedGraph.Axis.GetClusterWidth方法的典型用法代码示例。如果您正苦于以下问题:C# Axis.GetClusterWidth方法的具体用法?C# Axis.GetClusterWidth怎么用?C# Axis.GetClusterWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZedGraph.Axis
的用法示例。
在下文中一共展示了Axis.GetClusterWidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBarWidth
/// <summary>
/// Returns the width of the bar, in pixels, based on the settings for
/// <see cref="Size"/> and <see cref="IsMaximumWidth"/>.
/// </summary>
/// <param name="pane">The parent <see cref="GraphPane"/> object.</param>
/// <param name="baseAxis">The <see cref="Axis"/> object that
/// represents the bar base (independent axis).</param>
/// <param name="scaleFactor">
/// The scaling factor to be used for rendering objects. This is calculated and
/// passed down by the parent <see cref="GraphPane"/> object using the
/// <see cref="GraphPane.CalcScaleFactor"/> method, and is used to proportionally adjust
/// font sizes, etc. according to the actual size of the graph.
/// </param>
/// <returns>The width of each bar, in pixel units</returns>
public float GetBarWidth( GraphPane pane, Axis baseAxis, double scaleFactor )
{
if ( isMaximumWidth )
return baseAxis.GetClusterWidth( pane ) / ( 1.0F + pane.MinClusterGap );
else
return (float) ( this.size * scaleFactor );
}