8 using System.Collections.Generic;
20 [SerializeField]
private bool m_Show =
true;
25 [SerializeField]
private List<string> m_AxisLabelText =
new List<string>();
27 public bool show {
get {
return m_Show; }
set { m_Show = value; } }
55 public List<string>
axisLabelText {
get {
return m_AxisLabelText; }
set { m_AxisLabelText = value; } }
57 public List<float> runtimeStageAngle =
new List<float>();
58 public List<Vector3> runtimeLabelPosition =
new List<Vector3>();
59 private List<ChartLabel> m_RuntimeLabelList =
new List<ChartLabel>();
61 internal Color32 GetAxisLineColor(
ChartTheme theme,
int index)
68 internal Color32 GetAxisLineBackgroundColor(ChartTheme theme,
int index)
76 internal Color32 GetSplitLineColor(Color32 themeColor,
int serieIndex,
float angle)
90 internal Color32 GetAxisTickColor(Color32 themeColor,
int serieIndex,
float angle)
104 internal Color32 GetPointerColor(ChartTheme theme,
int serieIndex,
float angle, ItemStyle itemStyle)
107 if (!ChartHelper.IsClearColor(itemStyle.color))
109 return itemStyle.GetColor();
111 for (
int i = 0; i < runtimeStageAngle.Count; i++)
113 if (angle < runtimeStageAngle[i])
116 ChartHelper.SetColorOpacity(ref color, itemStyle.opacity);
120 color = theme.GetColor(serieIndex);
121 ChartHelper.SetColorOpacity(ref color, itemStyle.opacity);
125 public void ClearLabelObject()
127 m_RuntimeLabelList.Clear();
130 public void AddLabelObject(ChartLabel label)
132 m_RuntimeLabelList.Add(label);
135 public ChartLabel GetLabelObject(
int index)
137 if (index >= 0 && index < m_RuntimeLabelList.Count)
139 return m_RuntimeLabelList[index];
144 public void SetLabelObjectPosition(
int index, Vector3 pos)
146 if (index >= 0 && index < m_RuntimeLabelList.Count)
148 m_RuntimeLabelList[index].SetPosition(pos);
152 public void SetLabelObjectText(
int index,
string text)
154 if (index >= 0 && index < m_RuntimeLabelList.Count)
156 m_RuntimeLabelList[index].SetText(text);
160 public void SetLabelObjectActive(
bool flag)
162 foreach (var label
in m_RuntimeLabelList)
164 label.SetActive(flag);