// internal void AdaptPlotSeriesAndDataEntity() // { // // if (_isPlot) // // { // // AdaptSeriesCount(); // // AdaptPlotDatasCount(0); // // } // AdaptSeriesCount(); // AdaptPlotDatasCount(0); // } // 清空绘图 internal void Clear() { IsPlotting = false; PlotDefaultView(); DataType = null; DataEntity?.Clear(); }
public void InitializeDataEntity <TDataType>(int lineCount, int sampleCount) { DataEntityInfo dataEntityInfo = new DataEntityInfo() { Capacity = this.DisplayPoints, DataType = typeof(TDataType), LineCount = lineCount, XType = XDataType }; if (null == DataEntity || !DataEntity.DataInfo.Equals(dataEntityInfo)) { switch (XDataType) { case StripChartX.XAxisDataType.Index: DataEntity = new IndexDataEntity <TDataType>(this, dataEntityInfo); break; case StripChartX.XAxisDataType.String: DataEntity = new StringDataEntity <TDataType>(this, dataEntityInfo); break; case StripChartX.XAxisDataType.TimeStamp: DataEntity = new TimeStampDataEntity <TDataType>(this, dataEntityInfo, sampleCount); break; } } else { DataEntity.Clear(); DataEntity.Initialize(sampleCount); } this.IsPlotting = true; }