Changeset 13783
- Timestamp:
- 04/21/16 17:24:10 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/GradientChart.cs
r13780 r13783 200 200 var p = series.Points.Last(); 201 201 vla.X = p.XValue; 202 var ta = new TextAnnotation { Text = string.Format("X: {0:0.000}, Y: {1:0.000}", p.XValue, p.YValues[0]), Visible = true, X = p.XValue, Y = p.YValues[0] }; 202 var ta = new TextAnnotation { 203 Text = string.Format("X: {0:0.000}, Y: {1:0.000}", p.XValue, p.YValues[0]), 204 Visible = true, 205 X = p.XValue, 206 Y = p.YValues[0], 207 AxisX = ChartAreas[0].AxisX, 208 AxisY = ChartAreas[0].AxisY 209 }; 203 210 ta.ClipToChartArea = "ChartArea1"; 211 ta.Name = series.Name; 204 212 Annotations.Add(ta); 205 213 } … … 334 342 var x = e.NewLocationX; 335 343 336 var va = VerticalLineAnnotation;337 Annotations.Clear();338 Annotations.Add(va);344 // var va = VerticalLineAnnotation; 345 // Annotations.Clear(); 346 // Annotations.Add(va); 339 347 for (int i = 0; i < solutionList.Count; ++i) { 340 348 var y = GetEstimatedValue(solutionList[i], x); 341 349 var s = Series[i]; 342 350 var n = s.Points.Count; 343 var ta = new TextAnnotation { X = x, Y = y };344 Annotations.Add(ta);345 351 s.Points[n - 1] = new DataPoint(x, y) { MarkerColor = Color.Red, MarkerSize = 5 }; 352 } 353 foreach (var annotation in Annotations.OfType<TextAnnotation>()) { 354 var p = Series[annotation.Name].Points.Last(); 355 annotation.Text = string.Format("X: {0:0.000}, Y: {1:0.000}", p.XValue, p.YValues[0]); 356 annotation.X = p.XValue; 357 annotation.Y = p.YValues[0]; 346 358 } 347 359 Update();
Note: See TracChangeset
for help on using the changeset viewer.