Skip to content

Commit

Permalink
refactor code to support 3d pie
Browse files Browse the repository at this point in the history
  • Loading branch information
monitor1394 committed Mar 15, 2022
1 parent c002ac0 commit bfa68fd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions Assets/XCharts/Runtime/Component/Main/Serie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1142,12 +1142,12 @@ public override void ClearComponentDirty()
/// The index of serie,start at 0.
/// 系列的索引,从0开始。
/// </summary>
public int index { get; internal set; }
public int index { get; set; }
/// <summary>
/// Whether the serie is highlighted.
/// 该系列是否高亮,一般由图例悬停触发。
/// </summary>
public bool highlighted { get; internal set; }
public bool highlighted { get; set; }
/// <summary>
/// the count of data list.
/// 数据项个数。
Expand All @@ -1160,27 +1160,27 @@ public override void ClearComponentDirty()
/// <summary>
/// 饼图的中心点位置。
/// </summary>
public Vector3 runtimeCenterPos { get; internal set; }
public Vector3 runtimeCenterPos { get; set; }
/// <summary>
/// 饼图的内径
/// </summary>
public float runtimeInsideRadius { get; internal set; }
public float runtimeInsideRadius { get; set; }
/// <summary>
/// 饼图的外径
/// </summary>
public float runtimeOutsideRadius { get; internal set; }
public float runtimeOutsideRadius { get; set; }
/// <summary>
/// 运行时的最大数据值
/// </summary>
public double runtimeDataMax { get; internal set; }
public double runtimeDataMax { get; set; }
/// <summary>
/// 运行时的最小数据值
/// </summary>
public double runtimeDataMin { get; internal set; }
public double runtimeDataMin { get; set; }
/// <summary>
/// 饼图的数据项之和
/// </summary>
public double runtimePieDataTotal { get; internal set; }
public double runtimePieDataTotal { get; set; }
public float runtimeWaveSpeed { get; internal set; }
public Painter runtimeCanvas { get; internal set; }
public double runtimeCheckValue { get; set; }
Expand Down
8 changes: 4 additions & 4 deletions Assets/XCharts/Runtime/Component/Sub/SerieAnimation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ public bool NeedAnimation(int dataIndex)
else return dataIndex <= m_CurrDataProgress;
}

internal void CheckProgress(double total)
public void CheckProgress(double total)
{
if (IsFinish()) return;
if (!m_IsInit || m_IsPause || m_IsEnd) return;
Expand Down Expand Up @@ -411,7 +411,7 @@ internal void CheckProgress(double total)
}
}

internal float GetCurrAnimationDuration(int dataIndex = -1)
public float GetCurrAnimationDuration(int dataIndex = -1)
{
if (dataIndex >= 0)
{
Expand All @@ -422,7 +422,7 @@ internal float GetCurrAnimationDuration(int dataIndex = -1)
else return m_FadeInDuration > 0 ? m_FadeInDuration / 1000 : 1f;
}

internal float CheckBarProgress(int dataIndex, float barHig, int dataCount, out bool isBarEnd)
public float CheckBarProgress(int dataIndex, float barHig, int dataCount, out bool isBarEnd)
{
isBarEnd = false;
var initHig = m_FadeOut ? barHig : 0;
Expand Down Expand Up @@ -468,7 +468,7 @@ public void AllBarEnd()
End();
}

internal void CheckSymbol(float dest)
public void CheckSymbol(float dest)
{
if (!enable || m_IsEnd || m_IsPause || !m_IsInit) return;
if (IsInDelay()) return;
Expand Down
14 changes: 7 additions & 7 deletions Assets/XCharts/Runtime/Component/Sub/SerieData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,23 +143,23 @@ public bool ignore
/// <summary>
/// 饼图数据项的开始角度(运行时自动计算)
/// </summary>
public float runtimePieStartAngle { get; internal set; }
public float runtimePieStartAngle { get; set; }
/// <summary>
/// 饼图数据项的结束角度(运行时自动计算)
/// </summary>
public float runtimePieToAngle { get; internal set; }
public float runtimePieToAngle { get; set; }
/// <summary>
/// 饼图数据项的一半时的角度(运行时自动计算)
/// </summary>
public float runtimePieHalfAngle { get; internal set; }
public float runtimePieHalfAngle { get; set; }
/// <summary>
/// 饼图数据项的当前角度(运行时自动计算)
/// </summary>
public float runtimePieCurrAngle { get; internal set; }
public float runtimePieCurrAngle { get; set; }
/// <summary>
/// 饼图数据项的内半径
/// </summary>
public float runtimePieInsideRadius { get; internal set; }
public float runtimePieInsideRadius { get; set; }
/// <summary>
/// 饼图数据项的外半径
/// </summary>
Expand All @@ -170,15 +170,15 @@ public float runtimePieOutsideRadius
if (radius > 0) return radius;
else return m_RtPieOutsideRadius;
}
internal set
set
{
m_RtPieOutsideRadius = value;
}
}
/// <summary>
/// 饼图数据项的偏移半径
/// </summary>
public float runtimePieOffsetRadius { get; internal set; }
public float runtimePieOffsetRadius { get; set; }
public Vector3 runtimePosition { get; set; }
/// <summary>
/// 绘制区域。
Expand Down

0 comments on commit bfa68fd

Please sign in to comment.