增加SerieLabelautoOffset参数设置是否自动判断上下偏移

This commit is contained in:
monitor1394
2020-06-04 12:33:25 +08:00
parent 384c6a842e
commit 91a7c88ea1
6 changed files with 21 additions and 3 deletions

View File

@@ -102,6 +102,7 @@ namespace XCharts
[SerializeField] private float m_BorderWidth = 0.5f;
[SerializeField] private Color m_BorderColor = Color.grey;
[SerializeField] private string m_NumericFormatter = "";
[SerializeField] private bool m_AutoOffset = false;
/// <summary>
/// Whether the label is showed.
@@ -332,5 +333,13 @@ namespace XCharts
get { return m_NumericFormatter; }
set { if (PropertyUtility.SetClass(ref m_NumericFormatter, value)) SetComponentDirty(); }
}
/// <summary>
/// 是否开启自动偏移。当开启时Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。
/// </summary>
public bool autoOffset
{
get { return m_AutoOffset; }
set { if (PropertyUtility.SetStruct(ref m_AutoOffset, value)) SetAllDirty(); }
}
}
}