[feature][axis] support AxisName.onZero (#207)

This commit is contained in:
monitor1394
2022-07-03 10:02:22 +08:00
parent 9b263c883b
commit 33fd4aa9f3
4 changed files with 17 additions and 3 deletions

View File

@@ -12,11 +12,12 @@ namespace XCharts.Runtime
{
[SerializeField] private bool m_Show;
[SerializeField] private string m_Name;
[SerializeField][Since("v3.1.0")] private bool m_OnZero;
[SerializeField] private LabelStyle m_LabelStyle = new LabelStyle();
/// <summary>
/// Whether to show axis name.
/// |是否显示坐标名称。
/// |是否显示坐标名称。
/// </summary>
public bool show
{
@@ -33,6 +34,15 @@ namespace XCharts.Runtime
set { if (PropertyUtil.SetClass(ref m_Name, value)) SetComponentDirty(); }
}
/// <summary>
/// Whether the axis name position are the same with 0 position of YAxis.
/// |坐标轴名称的位置是否保持和Y轴0刻度一致。
/// </summary>
public bool onZero
{
get { return m_OnZero; }
set { if (PropertyUtil.SetStruct(ref m_OnZero, value)) SetComponentDirty(); }
}
/// <summary>
/// The text style of axis name.
/// |文本样式。
/// </summary>