Files
XCharts/Runtime/Serie/SerieDataContext.cs

63 lines
2.0 KiB
C#
Raw Normal View History

2021-01-11 08:54:28 +08:00
2021-12-19 20:53:55 +08:00
using System.Collections.Generic;
2021-11-23 13:20:07 +08:00
using UnityEngine;
using UnityEngine.UI;
2022-02-19 22:37:57 +08:00
namespace XCharts.Runtime
2021-01-11 08:54:28 +08:00
{
2021-12-08 08:31:32 +08:00
public class SerieDataContext
{
2021-12-09 07:12:15 +08:00
public Vector3 labelPosition { get; set; }
/// <summary>
/// 开始角度
/// </summary>
public float startAngle { get; internal set; }
/// <summary>
/// 结束角度
/// </summary>
public float toAngle { get; internal set; }
/// <summary>
/// 一半时的角度
/// </summary>
public float halfAngle { get; internal set; }
/// <summary>
/// 当前角度
/// </summary>
public float currentAngle { get; internal set; }
/// <summary>
/// 饼图数据项的内半径
/// </summary>
public float insideRadius { get; internal set; }
/// <summary>
/// 饼图数据项的偏移半径
/// </summary>
public float offsetRadius { get; internal set; }
public float outsideRadius { get; set; }
public Vector3 position { get; set; }
2021-12-19 20:53:55 +08:00
public List<Vector3> dataPoints = new List<Vector3>();
2022-03-04 22:17:32 +08:00
public List<SerieData> children = new List<SerieData>();
2021-12-09 07:12:15 +08:00
/// <summary>
/// 绘制区域。
/// </summary>
public Rect rect { get; set; }
public Rect subRect { get; set; }
public int level { get; set; }
public SerieData parent { get; set; }
public Color32 color { get; set; }
public double area { get; set; }
public float angle { get; set; }
public Vector3 offsetCenter { get; set; }
public float stackHeight { get; set; }
2022-01-26 20:47:14 +08:00
public bool isClip { get; set; }
2021-12-09 07:12:15 +08:00
2021-12-31 13:00:17 +08:00
public bool canShowLabel = true;
2021-12-09 07:12:15 +08:00
public Image symbol { get; set; }
/// <summary>
/// Whether the data item is highlighted.
/// 该数据项是否被高亮,一般由鼠标悬停或图例悬停触发高亮。
/// </summary>
2021-12-11 18:26:28 +08:00
public bool highlight { get; set; }
2021-12-09 07:12:15 +08:00
2021-12-08 08:31:32 +08:00
}
2021-01-11 08:54:28 +08:00
}