/************************************************/ /* */ /* Copyright (c) 2018 - 2021 monitor1394 */ /* https://github.com/monitor1394 */ /* */ /************************************************/ namespace XCharts { public partial class RingChart { /// /// 更新指定系列执行数据项的最大值 /// /// /// /// /// public bool UpdateMax(int serieIndex, int dataIndex, float value) { var serie = m_Series.GetSerie(serieIndex); if (serie != null) { return serie.UpdateData(dataIndex, 1, value); } return false; } /// /// 更新指定系列的所有数据项的最大值 /// /// /// /// public bool UpdateMax(int serieIndex, float value) { var serie = m_Series.GetSerie(serieIndex); if (serie != null) { var flag = true; for (int i = 0; i < serie.dataCount; i++) { if (serie.UpdateData(i, 1, value)) flag = false; } return flag; } return false; } /// /// 更新第一个系列第一个数据项的最大值 /// /// /// public bool UpdateMax(float value) { return UpdateMax(0, 0, value); } /// /// Adds the data with the specified maximum value to the specified serie. /// 添加指定最大值的数据到指定系列中。 /// /// the name of serie /// the data /// the max data /// the name of data /// Returns True on success public override SerieData AddData(string serieName, float value, float max, string dataName = null) { return base.AddData(serieName, value, max, dataName); } /// /// Adds the data with the specified maximum value to the specified serie. /// 添加指定最大值的数据到指定系列中。 /// /// the index of serie /// the data /// the max data /// the name of data /// Returns True on success public override SerieData AddData(int serieIndex, float value, float max, string dataName = null) { return base.AddData(serieIndex, value, max, dataName); } } }