[improve][Candlestick] improve CandlestickChart

This commit is contained in:
monitor1394
2022-08-26 23:17:54 +08:00
parent a1d8f34720
commit a885be625e
9 changed files with 26 additions and 21 deletions

View File

@@ -1296,11 +1296,12 @@ namespace XCharts.Runtime
/// <param name="dataName"></param>
/// <param name="dataId">the unique id of data</param>
/// <returns></returns>
public SerieData AddData(double open, double close, double lowest, double heighest, string dataName = null, string dataId = null)
public SerieData AddData(double indexOrTimestamp, double open, double close, double lowest, double heighest, string dataName = null, string dataId = null)
{
CheckMaxCache();
var serieData = SerieDataPool.Get();
serieData.data.Clear();
serieData.data.Add(indexOrTimestamp);
serieData.data.Add(open);
serieData.data.Add(close);
serieData.data.Add(lowest);
@@ -1309,7 +1310,7 @@ namespace XCharts.Runtime
serieData.index = m_Data.Count;
serieData.id = dataId;
AddSerieData(serieData);
m_ShowDataDimension = 4;
m_ShowDataDimension = 5;
SetVerticesDirty();
CheckDataName(dataName);
labelDirty = true;