- Timestamp:
- 08/14/12 13:27:53 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs
r8139 r8485 89 89 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].LegendText = ESTIMATEDVALUES_ALL_SERIES_NAME; 90 90 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].ChartType = SeriesChartType.FastLine; 91 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndices, allEstimatedValues); 92 this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]); 91 if (allEstimatedValues.Count > 0) { 92 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndices, allEstimatedValues); 93 this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]); 94 } 93 95 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Tag = Content; 94 96 this.ToggleSeriesData(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]); … … 224 226 225 227 IEnumerable<int> indices = null; 226 IEnumerable<double>predictedValues = null;228 double[] predictedValues = null; 227 229 switch (series.Name) { 228 230 case ESTIMATEDVALUES_ALL_SERIES_NAME: 229 231 indices = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndices).Except(Content.ProblemData.TestIndices).ToArray(); 230 232 var estimatedValues = Content.EstimatedValues.ToArray(); 231 predictedValues = indices.Select(index => estimatedValues[index]).To List();233 predictedValues = indices.Select(index => estimatedValues[index]).ToArray(); 232 234 break; 233 235 case ESTIMATEDVALUES_TRAINING_SERIES_NAME: … … 240 242 break; 241 243 } 242 series.Points.DataBindXY(indices, predictedValues); 243 this.InsertEmptyPoints(series); 244 if (predictedValues.Length > 0) { 245 series.Points.DataBindXY(indices, predictedValues); 246 this.InsertEmptyPoints(series); 247 } 244 248 chart.Legends[series.Legend].ForeColor = Color.Black; 245 249 UpdateCursorInterval();
Note: See TracChangeset
for help on using the changeset viewer.