//static int labelCounter = 0; private void AddValuesToPlotData(PlotData[] plotData) { if (!_HoldOn) { ClearPlot(); } var customLabel = CustomPlotLabel.Length > 0 ? "[" + CustomPlotLabel + "] " : ""; foreach (var t in plotData) { var points = t.Points; var title = customLabel + t.Title; Labels.Add(title + customLabel); DataSeriesCollection.Add(new DataPointCollection { DataPoints = points, Title = title, ColorTag = "ColorTag" }); //if (DataSeriesCollection.Count > 0 && points[0] is ComplexDataPoint) //{ // RealLabels.Add(title + "\r(real)" + customLabel); // PhaseLabels.Add(title + "\r(phase)" + customLabel); // ImagLabels.Add(title + "\r(imag)" + customLabel); // AmplitudeLabels.Add(title + "\r(amp)" + customLabel); //} //else //{ // Labels.Add(title + customLabel); // has to happen before updating the bound collection //} } PlotTitles.Add(Title); UpdatePlotSeries(); }
//static int labelCounter = 0; private void AddValuesToPlotData(PlotData[] plotData) { if (!_HoldOn) { ClearPlot(); } foreach (var t in plotData) { var points = t.Points; var title = t.Title; Labels.Add(title); DataSeriesCollection.Add(new DataPointCollection { DataPoints = points, Title = title, ColorTag = "ColorTag" }); PlotTitles.Add(Title); } UpdatePlotSeries(); }