mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-27 19:50:10 +00:00
增加Pie的pieType支持实心饼图和线框柄图 (#349)
This commit is contained in:
@@ -2,6 +2,21 @@ using UnityEngine;
|
||||
|
||||
namespace XCharts.Runtime
|
||||
{
|
||||
|
||||
public enum PieType
|
||||
{
|
||||
/// <summary>
|
||||
/// solid pie chart - default fill style.
|
||||
/// ||实心饼图 - 默认填充样式
|
||||
/// </summary>
|
||||
Solid,
|
||||
|
||||
/// <summary>
|
||||
/// wireframe pie chart - only show the outline wireframe.
|
||||
/// ||线框饼图 - 仅显示轮廓线框
|
||||
/// </summary>
|
||||
Wireframe
|
||||
}
|
||||
[System.Serializable]
|
||||
[SerieConvert(typeof(Line), typeof(Bar))]
|
||||
[SerieHandler(typeof(PieHandler), true)]
|
||||
@@ -12,10 +27,20 @@ namespace XCharts.Runtime
|
||||
public class Pie : Serie
|
||||
{
|
||||
[SerializeField][Since("v3.8.1")] private bool m_RadiusGradient = false;
|
||||
[SerializeField][Since("v3.15.0")] private PieType m_PieType = PieType.Solid;
|
||||
|
||||
public override SerieColorBy defaultColorBy { get { return SerieColorBy.Data; } }
|
||||
public override bool titleJustForSerie { get { return true; } }
|
||||
|
||||
/// <summary>
|
||||
/// Pie chart type.
|
||||
/// || 饼图类型。
|
||||
/// </summary>
|
||||
public PieType pieType
|
||||
{
|
||||
get { return m_PieType; }
|
||||
set { if (PropertyUtil.SetStruct(ref m_PieType, value)) { SetVerticesDirty(); } }
|
||||
}
|
||||
/// <summary>
|
||||
/// Whether to use gradient color in pie chart.
|
||||
/// || 是否开启半径方向的渐变效果。
|
||||
|
||||
Reference in New Issue
Block a user