增加SerieiconStyle统一配置图标

This commit is contained in:
monitor1394
2021-07-18 14:16:06 +08:00
parent 012f6ccb52
commit 31f653e3e0
12 changed files with 91 additions and 106 deletions

View File

@@ -21,6 +21,7 @@ namespace XCharts
[SerializeField] private bool m_Selected;
[SerializeField] private bool m_Ignore = false;
[SerializeField] private float m_Radius;
[SerializeField] private bool m_EnableIconStyle = false;
[SerializeField] private IconStyle m_IconStyle = new IconStyle();
[SerializeField] private bool m_EnableLabel = false;
[SerializeField] private SerieLabel m_Label = new SerieLabel();
@@ -58,6 +59,10 @@ namespace XCharts
/// </summary>
public bool selected { get { return m_Selected; } set { m_Selected = value; } }
/// <summary>
/// 是否启用单个数据项的图标设置。
/// </summary>
public bool enableIconStyle { get { return m_EnableIconStyle; } set { m_EnableIconStyle = value; } }
/// <summary>
/// the icon of data.
/// 数据项图标样式。
/// </summary>
@@ -185,6 +190,7 @@ namespace XCharts
m_Show = true;
m_Selected = false;
m_CanShowLabel = true;
m_EnableIconStyle = false;
m_EnableSymbol = false;
m_EnableLabel = false;
m_EnableEmphasis = false;
@@ -381,6 +387,10 @@ namespace XCharts
{
if (labelObject != null) labelObject.SetLabelActive(flag);
}
public void SetIconActive(bool flag)
{
if (labelObject != null) labelObject.SetIconActive(flag);
}
public void SetPolygon(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4)
{