mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 17:30:10 +00:00
增加Axis的mainAxis参数设置主轴可控制柱图的朝向 (#331)
This commit is contained in:
@@ -100,6 +100,7 @@ namespace XCharts.Runtime
|
||||
[SerializeField] private bool m_Clockwise = true;
|
||||
[SerializeField] private bool m_InsertDataToHead;
|
||||
[SerializeField][Since("v3.11.0")] private float m_MinCategorySpacing = 0;
|
||||
[SerializeField][Since("v3.15.0")] private bool m_MainAxis = false;
|
||||
[SerializeField] protected List<Sprite> m_Icons = new List<Sprite>();
|
||||
[SerializeField] protected List<string> m_Data = new List<string>();
|
||||
[SerializeField] protected AxisLine m_AxisLine = AxisLine.defaultAxisLine;
|
||||
@@ -299,6 +300,17 @@ namespace XCharts.Runtime
|
||||
set { if (PropertyUtil.SetStruct(ref m_Clockwise, value)) SetAllDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// Whether it is the main axis. When both X and Y axes are of the same type, the axis set to main axis will determine the orientation,
|
||||
/// such as horizontal bar chart and vertical bar chart.
|
||||
/// ||是否为主轴。当XY轴类型都相同时,设置为主轴的轴会决定朝向,如横向柱图和纵向柱图。
|
||||
/// </summary>
|
||||
[Since("v3.15.0")]
|
||||
public bool mainAxis
|
||||
{
|
||||
get { return m_MainAxis; }
|
||||
set { if (PropertyUtil.SetStruct(ref m_MainAxis, value)) SetAllDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// Category data, available in type: 'Category' axis.
|
||||
/// ||类目数据,在类目轴(type: 'category')中有效。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user