增加PieChart多饼图支持

This commit is contained in:
monitor1394
2019-07-28 00:44:53 +08:00
parent a1dc6ca8ad
commit 0f25f4449b
26 changed files with 227112 additions and 123737 deletions

View File

@@ -156,6 +156,11 @@ namespace XCharts
return null;
}
public int GetIndex(string legendName)
{
return m_Data.IndexOf(legendName);
}
public void RemoveButton()
{
m_DataBtnList.Clear();
@@ -164,7 +169,7 @@ namespace XCharts
public void SetButton(string name, Button btn, int total)
{
int index = m_DataBtnList.Values.Count;
btn.transform.localPosition = GetButtonLocationPosition(total,index);
btn.transform.localPosition = GetButtonLocationPosition(total, index);
m_DataBtnList[name] = btn;
btn.gameObject.SetActive(show);
btn.GetComponentInChildren<Text>().text = name;
@@ -183,7 +188,7 @@ namespace XCharts
m_Location.OnChanged();
}
private Vector2 GetButtonLocationPosition(int size,int index)
private Vector2 GetButtonLocationPosition(int size, int index)
{
switch (m_Orient)
{