using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace XCharts.Runtime { public class SerieDataContext { public Vector3 labelPosition; /// /// 开始角度 /// public float startAngle; /// /// 结束角度 /// public float toAngle; /// /// 一半时的角度 /// public float halfAngle; /// /// 当前角度 /// public float currentAngle; /// /// 饼图数据项的内半径 /// public float insideRadius; /// /// 饼图数据项的偏移半径 /// public float offsetRadius; public float outsideRadius; public Vector3 position; public List dataPoints = new List(); public List dataLabels = new List(); public List children = new List(); /// /// 绘制区域。 /// public Rect rect; public Rect backgroundRect; public Rect subRect; public int level; public SerieData parent; public Color32 color; public double area; public float angle; public Vector3 offsetCenter; public Vector3 areaCenter; public float stackHeight; public bool isClip; public bool canShowLabel = true; public Image symbol; /// /// Whether the data item is highlighted. /// |该数据项是否被高亮,一般由鼠标悬停或图例悬停触发高亮。 /// public bool highlight { get { return m_Highligth; } set { m_Highligth = value; } } private bool m_Highligth; public bool selected; public void Reset() { canShowLabel = true; highlight = false; parent = null; symbol = null; rect = Rect.zero; subRect = Rect.zero; children.Clear(); dataPoints.Clear(); dataLabels.Clear(); } } }