Changeset 3530
- Timestamp:
- 04/26/10 09:29:18 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Analysis.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.Designer.cs
r2917 r3530 76 76 chartArea1.Name = "ChartArea1"; 77 77 this.chart.ChartAreas.Add(chartArea1); 78 legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; 78 79 legend1.Name = "Legend1"; 79 80 this.chart.Legends.Add(legend1); -
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.cs
r3495 r3530 120 120 for (int i = 0; i < row.Values.Count; i++) { 121 121 var value = row.Values[i]; 122 if ( double.IsNaN(value) || value < (double)decimal.MinValue || value > (double)decimal.MaxValue) {122 if (IsInvalidValue(value)) { 123 123 DataPoint point = new DataPoint(); 124 124 point.IsEmpty = true; … … 225 225 foreach (IndexedItem<double> item in e.Items) { 226 226 var value = item.Value; 227 if ( double.IsNaN(value) || value < (double)decimal.MinValue || value > (double)decimal.MaxValue) {227 if (IsInvalidValue(item.Value)) { 228 228 DataPoint point = new DataPoint(); 229 229 point.IsEmpty = true; … … 253 253 DataRow row = valuesRowsTable[(IObservableList<double>)sender]; 254 254 foreach (IndexedItem<double> item in e.Items) { 255 if ( double.IsNaN(item.Value))255 if (IsInvalidValue(item.Value)) 256 256 chart.Series[row.Name].Points[item.Index].IsEmpty = true; 257 else 257 else { 258 258 chart.Series[row.Name].Points[item.Index].YValues = new double[] { item.Value }; 259 chart.Series[row.Name].Points[item.Index].IsEmpty = false; 260 } 259 261 } 260 262 } … … 266 268 DataRow row = valuesRowsTable[(IObservableList<double>)sender]; 267 269 foreach (IndexedItem<double> item in e.Items) { 268 if ( double.IsNaN(item.Value))270 if (IsInvalidValue(item.Value)) 269 271 chart.Series[row.Name].Points[item.Index].IsEmpty = true; 270 else 272 else { 271 273 chart.Series[row.Name].Points[item.Index].YValues = new double[] { item.Value }; 272 } 273 } 274 } 274 chart.Series[row.Name].Points[item.Index].IsEmpty = false; 275 } 276 } 277 } 278 } 279 275 280 private void Values_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) { 276 281 if (InvokeRequired) … … 280 285 chart.Series[row.Name].Points.Clear(); 281 286 foreach (IndexedItem<double> item in e.Items) { 282 if ( double.IsNaN(item.Value))287 if (IsInvalidValue(item.Value)) 283 288 chart.Series[row.Name].Points[item.Index].IsEmpty = true; 284 else 289 else { 285 290 chart.Series[row.Name].Points[item.Index].YValues = new double[] { item.Value }; 291 chart.Series[row.Name].Points[item.Index].IsEmpty = false; 292 } 286 293 } 287 294 } 288 295 } 289 296 #endregion 297 298 private bool IsInvalidValue(double x) { 299 return double.IsNaN(x) || x < (double)decimal.MinValue || x > (double)decimal.MaxValue; 300 } 290 301 } 291 302 }
Note: See TracChangeset
for help on using the changeset viewer.