增加AxisLinestartExtendLengthendExtendLength设置轴线的延长线

This commit is contained in:
monitor1394
2025-09-01 23:05:49 +08:00
parent d1f424f3a1
commit dd473b7d29
4 changed files with 29 additions and 4 deletions

View File

@@ -10,6 +10,8 @@ namespace XCharts.Runtime
public class AxisLine : BaseLine
{
[SerializeField] private bool m_OnZero;
[SerializeField] private float m_StartExtendLength;
[SerializeField] private float m_EndExtendLength;
[SerializeField] private bool m_ShowArrow;
[SerializeField] private ArrowStyle m_Arrow = new ArrowStyle();
@@ -23,6 +25,24 @@ namespace XCharts.Runtime
set { if (PropertyUtil.SetStruct(ref m_OnZero, value)) SetVerticesDirty(); }
}
/// <summary>
/// Extend length of the axis line at the start.
/// ||轴线起点延长线长度。
/// </summary>
public float startExtendLength
{
get { return m_StartExtendLength; }
set { if (PropertyUtil.SetStruct(ref m_StartExtendLength, value)) SetVerticesDirty(); }
}
/// <summary>
/// Extend length of the axis line at the end.
/// ||轴线终点延长线长度。
/// </summary>
public float endExtendLength
{
get { return m_EndExtendLength; }
set { if (PropertyUtil.SetStruct(ref m_EndExtendLength, value)) SetVerticesDirty(); }
}
/// <summary>
/// Whether to show the arrow symbol of axis.
/// ||是否显示箭头。
/// </summary>