Fixed an issue where the Radar could not refresh itself after parameter changing #122

This commit is contained in:
monitor1394
2021-02-18 09:24:01 +08:00
parent fbb33426ca
commit 5e57916d2f
6 changed files with 74 additions and 38 deletions

View File

@@ -26,6 +26,17 @@ namespace XCharts
m_Radars.Clear();
}
/// <summary>
/// 移除指定Radar的所有Indicator。
/// </summary>
/// <param name="radarIndex"></param>
public void RemoveIndicator(int radarIndex)
{
var radar = GetRadar(radarIndex);
if (radar == null) return;
radar.indicatorList.Clear();
}
/// <summary>
/// 添加雷达坐标系组件。
/// </summary>
@@ -61,6 +72,14 @@ namespace XCharts
return radar;
}
public bool AddIndicator(int radarIndex, Radar.Indicator indicator)
{
var radar = GetRadar(radarIndex);
if (radar == null) return false;
radar.AddIndicator(indicator);
return true;
}
/// <summary>
/// 添加指示器。
/// </summary>