Changeset 3487 for trunk/sources
- Timestamp:
- 04/22/10 15:42:36 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.Designer.cs
r3482 r3487 24 24 /// </summary> 25 25 private void InitializeComponent() { 26 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 27 System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); 26 this.components = new System.ComponentModel.Container(); 27 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 28 System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); 28 29 this.yJitterLabel = new System.Windows.Forms.Label(); 29 30 this.xJitterlabel = new System.Windows.Forms.Label(); … … 42 43 this.colorButton = new System.Windows.Forms.Button(); 43 44 this.colorDialog = new System.Windows.Forms.ColorDialog(); 45 this.tooltip = new System.Windows.Forms.ToolTip(this.components); 44 46 ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).BeginInit(); 45 47 ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).BeginInit(); … … 157 159 | System.Windows.Forms.AnchorStyles.Left) 158 160 | System.Windows.Forms.AnchorStyles.Right))); 159 chartArea 2.Name = "ChartArea1";160 this.chart.ChartAreas.Add(chartArea 2);161 chartArea1.Name = "ChartArea1"; 162 this.chart.ChartAreas.Add(chartArea1); 161 163 this.chart.Location = new System.Drawing.Point(6, 30); 162 164 this.chart.Name = "chart"; 163 series 2.ChartArea = "ChartArea1";164 series 2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bubble;165 series 2.CustomProperties = "BubbleMaxSize=0";166 series 2.IsVisibleInLegend = false;167 series 2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;168 series 2.Name = "Bubbles";169 series 2.YValuesPerPoint = 2;170 this.chart.Series.Add(series 2);165 series1.ChartArea = "ChartArea1"; 166 series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Bubble; 167 series1.CustomProperties = "BubbleMaxSize=0"; 168 series1.IsVisibleInLegend = false; 169 series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle; 170 series1.Name = "Bubbles"; 171 series1.YValuesPerPoint = 2; 172 this.chart.Series.Add(series1); 171 173 this.chart.Size = new System.Drawing.Size(554, 261); 172 174 this.chart.TabIndex = 16; … … 279 281 private System.Windows.Forms.Button colorButton; 280 282 private System.Windows.Forms.ColorDialog colorDialog; 283 private System.Windows.Forms.ToolTip tooltip; 281 284 } 282 285 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs
r3482 r3487 283 283 284 284 private void chart_MouseMove(object sender, MouseEventArgs e) { 285 HitTestResult h = this.chart.HitTest(e.X, e.Y); 285 286 if (!Locked) { 286 HitTestResult h = this.chart.HitTest(e.X, e.Y);287 287 if (this.draggedRun != null && h.ChartElementType != ChartElementType.DataPoint) { 288 288 DataObject data = new DataObject(); … … 301 301 } 302 302 } 303 string newTooltipText; 304 string oldTooltipText; 305 if (h.ChartElementType == ChartElementType.DataPoint) { 306 IRun run = (IRun)((DataPoint)h.Object).Tag; 307 newTooltipText = run.Name + System.Environment.NewLine; 308 newTooltipText += xAxisComboBox.SelectedItem + " : " + Content.GetValue(run, xAxisComboBox.SelectedIndex).ToString() + Environment.NewLine; 309 newTooltipText += yAxisComboBox.SelectedItem + " : " + Content.GetValue(run, yAxisComboBox.SelectedIndex).ToString() + Environment.NewLine; ; 310 } else 311 newTooltipText = string.Empty; 312 oldTooltipText = this.tooltip.GetToolTip(chart); 313 if (newTooltipText != oldTooltipText) 314 this.tooltip.SetToolTip(chart, newTooltipText); 303 315 } 304 316 #endregion
Note: See TracChangeset
for help on using the changeset viewer.