增加AxisTickwidth参数可单独设置坐标轴刻度的宽度

This commit is contained in:
monitor1394
2020-03-20 08:47:34 +08:00
parent 0573dd4519
commit d32bc1b89d
7 changed files with 52 additions and 6 deletions

View File

@@ -21,6 +21,7 @@ namespace XCharts
[SerializeField] private bool m_AlignWithLabel;
[SerializeField] private bool m_Inside;
[SerializeField] private float m_Length;
[SerializeField] private float m_Width;
/// <summary>
/// Set this to false to prevent the axis tick from showing.
@@ -58,6 +59,15 @@ namespace XCharts
get { return m_Length; }
set { if (PropertyUtility.SetStruct(ref m_Length, value)) SetVerticesDirty(); }
}
/// <summary>
/// The width of the axis tick.Keep the same width with axis line when default 0.
/// 坐标轴刻度的宽度。默认为0时宽度和坐标轴一致。
/// </summary>
public float width
{
get { return m_Width; }
set { if (PropertyUtility.SetStruct(ref m_Width, value)) SetVerticesDirty(); }
}
public static AxisTick defaultTick
{
@@ -68,6 +78,7 @@ namespace XCharts
m_Show = true,
m_AlignWithLabel = false,
m_Inside = false,
m_Width = 0f,
m_Length = 5f
};
return tick;