mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 08:50:10 +00:00
整理重构代码
This commit is contained in:
@@ -943,7 +943,6 @@ namespace XCharts
|
||||
/// </summary>
|
||||
public float runtimePieDataTotal { get; internal set; }
|
||||
public float runtimeWaveSpeed { get; internal set; }
|
||||
internal int runtimeLastCheckDataCount { get; set; }
|
||||
internal float runtimeCheckValue { get; set; }
|
||||
public bool nameDirty { get { return m_NameDirty; } }
|
||||
|
||||
@@ -1547,22 +1546,21 @@ namespace XCharts
|
||||
public void ClearHighlight()
|
||||
{
|
||||
highlighted = false;
|
||||
foreach (var sd in m_Data)
|
||||
foreach (var serieData in m_Data)
|
||||
{
|
||||
sd.highlighted = false;
|
||||
serieData.highlighted = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置指定索引的数据为高亮状态
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
public void SetHighlight(int index)
|
||||
public void SetHighlight(int index, bool flag)
|
||||
{
|
||||
if (index <= 0) return;
|
||||
for (int i = 0; i < m_Data.Count; i++)
|
||||
var serieData = GetSerieData(index);
|
||||
if (serieData != null)
|
||||
{
|
||||
m_Data[i].highlighted = index == i;
|
||||
serieData.highlighted = flag;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1572,13 +1570,6 @@ namespace XCharts
|
||||
else return m_BarWidth * categoryWidth;
|
||||
}
|
||||
|
||||
internal float GetBarGap(float categoryWidth)
|
||||
{
|
||||
if (m_BarGap == -1) return 0;
|
||||
else if (m_BarGap <= 1) return GetBarWidth(categoryWidth) * m_BarGap;
|
||||
else return m_BarGap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置所有数据的图标是否显示
|
||||
/// </summary>
|
||||
@@ -1633,15 +1624,6 @@ namespace XCharts
|
||||
}
|
||||
}
|
||||
|
||||
internal bool IsNeedShowDataIcon()
|
||||
{
|
||||
foreach (var data in m_Data)
|
||||
{
|
||||
if (data.iconStyle.show) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsIgnoreIndex(int index, int dimension)
|
||||
{
|
||||
if (m_Ignore)
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace XCharts
|
||||
/// Vessel component for liquid chart.
|
||||
/// <para>
|
||||
/// 容器组件。
|
||||
/// 一般用于LiquidChart。
|
||||
/// 一般用于LiquidChart。可以有多个Vessel,Serie中用vesselIndex来对应。
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
@@ -73,6 +73,7 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetStruct(ref m_Shape, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// Thickness of vessel.
|
||||
/// 容器厚度。
|
||||
/// </summary>
|
||||
public float shapeWidth
|
||||
@@ -81,6 +82,7 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetStruct(ref m_ShapeWidth, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// The gap between the vessel and the liquid.
|
||||
/// 间隙。容器和液体的间隙。
|
||||
/// </summary>
|
||||
public float gap
|
||||
@@ -152,7 +154,8 @@ namespace XCharts
|
||||
/// </summary>
|
||||
public float runtimeRadius { get; internal set; }
|
||||
/// <summary>
|
||||
/// 运行时内半径。
|
||||
/// The actual radius after deducting shapeWidth and gap.
|
||||
/// 运行时内半径。扣除厚度和间隙后的实际半径。
|
||||
/// </summary>
|
||||
public float runtimeInnerRadius { get; internal set; }
|
||||
public static Vessel defaultVessel
|
||||
|
||||
Reference in New Issue
Block a user