Changeset 14860 for trunk/sources/HeuristicLab.Analysis.Views
- Timestamp:
- 04/13/17 14:01:44 (7 years ago)
- Location:
- trunk/sources/HeuristicLab.Analysis.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotControl.Designer.cs
r14826 r14860 87 87 this.chart.Titles.Add(title1); 88 88 this.chart.CustomizeLegend += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs>(this.chart_CustomizeLegend); 89 this.chart.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDoubleClick); 89 90 this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown); 90 91 this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove); -
trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotControl.cs
r14826 r14860 29 29 using HeuristicLab.Collections; 30 30 using HeuristicLab.Common; 31 using HeuristicLab.MainForm; 31 32 using HeuristicLab.MainForm.WindowsForms; 32 33 … … 122 123 foreach (var row in rows) { 123 124 RegisterScatterPlotDataRowEvents(row); 124 Series series = new Series(row.Name) { 125 Tag = row 126 }; 125 Series series = new Series(row.Name) { Tag = row }; 126 127 127 if (row.VisualProperties.DisplayName.Trim() != String.Empty) series.LegendText = row.VisualProperties.DisplayName; 128 128 else series.LegendText = row.Name; 129 129 130 var regressionSeries = new Series(row.Name + "_Regression") { 130 131 Tag = row, … … 134 135 Color = Color.Transparent // to avoid auto color assignment via color palette 135 136 }; 137 136 138 seriesToRegressionSeriesTable.Add(series, regressionSeries); 137 139 ConfigureSeries(series, regressionSeries, row); 138 140 FillSeriesWithRowValues(series, row); 141 139 142 chart.Series.Add(series); 140 143 chart.Series.Add(regressionSeries); … … 439 442 440 443 #region Chart Event Handlers 444 private void chart_MouseDoubleClick(object sender, MouseEventArgs e) { 445 HitTestResult result = chart.HitTest(e.X, e.Y,ChartElementType.DataPoint); 446 if (result.ChartElementType != ChartElementType.DataPoint) return; 447 448 var series = result.Series; 449 var dataPoint = series.Points[result.PointIndex]; 450 var tag = dataPoint.Tag; 451 var content = tag as IContent; 452 453 if (tag == null) return; 454 if (content == null) return; 455 456 MainFormManager.MainForm.ShowContent(content); 457 } 458 441 459 private void chart_MouseDown(object sender, MouseEventArgs e) { 442 460 HitTestResult result = chart.HitTest(e.X, e.Y); … … 511 529 point.YValues = new double[] { value.Y }; 512 530 } 531 point.Tag = value.Tag; 513 532 series.Points.Add(point); 514 533 if (value.X != 0.0f) … … 604 623 double cov = sxy / n - sx * sy / n / n; 605 624 // standard error of x 606 double sigmaX = Math.Sqrt(sxx / n - 625 double sigmaX = Math.Sqrt(sxx / n - sx * sx / n / n); 607 626 // standard error of y 608 double sigmaY = Math.Sqrt(syy / n - 627 double sigmaY = Math.Sqrt(syy / n - sy * sy / n / n); 609 628 610 629 // correlation
Note: See TracChangeset
for help on using the changeset viewer.