[feature][axis] support Settings.axisMaxSplitNumber

This commit is contained in:
monitor1394
2022-07-04 13:37:16 +08:00
parent 2248b61d03
commit 4d5e2481b0
5 changed files with 17 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ namespace XCharts.Runtime
[SerializeField][Range(1, 10)] protected float m_CicleSmoothness = 2f;
[SerializeField] protected float m_LegendIconLineWidth = 2;
[SerializeField] private float[] m_LegendIconCornerRadius = new float[] { 0.25f, 0.25f, 0.25f, 0.25f };
[SerializeField][Since("v3.1.0")] protected float m_AxisMaxSplitNumber = 20;
public bool show { get { return m_Show; } }
/// <summary>
@@ -137,6 +138,16 @@ namespace XCharts.Runtime
set { if (PropertyUtil.SetClass(ref m_LegendIconCornerRadius, value, true)) SetVerticesDirty(); }
}
/// <summary>
/// the max splitnumber of axis.
/// |坐标轴最大分隔段数。段数过大时可能会生成较多的label节点。
/// </summary>
public float axisMaxSplitNumber
{
get { return m_AxisMaxSplitNumber; }
set { if (PropertyUtil.SetStruct(ref m_AxisMaxSplitNumber, value)) SetVerticesDirty(); }
}
public void Copy(Settings settings)
{
m_ReversePainter = settings.reversePainter;