本文整理匯總了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 );
}