- Timestamp:
- 07/20/16 15:56:56 (9 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Controls
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Controls/GradientChart.Designer.cs
r14118 r14131 31 31 System.Windows.Forms.DataVisualization.Charting.StripLine stripLine2 = new System.Windows.Forms.DataVisualization.Charting.StripLine(); 32 32 System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); 33 System.Windows.Forms.DataVisualization.Charting.Title title1 = new System.Windows.Forms.DataVisualization.Charting.Title(); 33 34 this.calculationPendingLabel = new System.Windows.Forms.Label(); 34 35 this.calculationPendingTimer = new System.Windows.Forms.Timer(this.components); … … 74 75 chartArea1.Name = "ChartArea"; 75 76 chartArea1.Position.Auto = false; 76 chartArea1.Position.Height = 100F;77 chartArea1.Position.Height = 90F; 77 78 chartArea1.Position.Width = 100F; 79 chartArea1.Position.Y = 10F; 78 80 this.chart.ChartAreas.Add(chartArea1); 79 81 this.chart.Dock = System.Windows.Forms.DockStyle.Fill; … … 88 90 this.chart.Size = new System.Drawing.Size(453, 308); 89 91 this.chart.TabIndex = 0; 92 title1.Alignment = System.Drawing.ContentAlignment.TopCenter; 93 title1.DockedToChartArea = "ChartArea"; 94 title1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 95 title1.IsDockedInsideChartArea = false; 96 title1.Name = "Title"; 97 title1.Text = "[Title]"; 98 this.chart.Titles.Add(title1); 90 99 this.chart.SelectionRangeChanged += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CursorEventArgs>(this.chart_SelectionRangeChanged); 91 100 this.chart.AnnotationPositionChanged += new System.EventHandler(this.chart_AnnotationPositionChanged); … … 94 103 this.chart.DragEnter += new System.Windows.Forms.DragEventHandler(this.chart_DragEnter); 95 104 this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove); 105 this.chart.Resize += new System.EventHandler(this.chart_Resize); 96 106 // 97 107 // configurationButton -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Controls/GradientChart.cs
r14118 r14131 66 66 set { 67 67 chart.Annotations[0].Visible = value; 68 if (!value) chart. ChartAreas[0].AxisX.Title= string.Empty;68 if (!value) chart.Titles[0].Text = string.Empty; 69 69 } 70 70 } … … 281 281 282 282 if (ShowCursor) 283 chart. ChartAreas[0].AxisX.Title= FreeVariable + " : " + defaultValue.ToString("N3", CultureInfo.CurrentCulture);283 chart.Titles[0].Text = FreeVariable + " : " + defaultValue.ToString("N3", CultureInfo.CurrentCulture); 284 284 285 285 ResizeAllSeriesData(); … … 323 323 throw; 324 324 } 325 } 326 327 public void UpdateTitlePosition() { 328 var title = chart.Titles[0]; 329 var plotArea = InnerPlotPosition; 330 331 title.Visible = plotArea.Width != 0; 332 333 title.Position.X = plotArea.X + (plotArea.Width / 2); 325 334 } 326 335 … … 627 636 628 637 if (ShowCursor) { 629 chart. ChartAreas[0].AxisX.Title= FreeVariable + " : " + x.ToString("N3", CultureInfo.CurrentCulture);638 chart.Titles[0].Text = FreeVariable + " : " + x.ToString("N3", CultureInfo.CurrentCulture); 630 639 chart.Update(); 631 640 } … … 639 648 } 640 649 641 private void chart_DragDrop(object sender, DragEventArgs e) {650 private async void chart_DragDrop(object sender, DragEventArgs e) { 642 651 var data = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 643 652 if (data != null) { 644 653 var solution = data as IRegressionSolution; 645 654 if (!solutions.Contains(solution)) 646 AddSolutionAsync(solution);655 await AddSolutionAsync(solution); 647 656 } 648 657 } … … 670 679 OnZoomChanged(this, EventArgs.Empty); 671 680 } 681 682 private void chart_Resize(object sender, EventArgs e) { 683 UpdateTitlePosition(); 684 } 672 685 #endregion 673 686 } 674 687 } 688
Note: See TracChangeset
for help on using the changeset viewer.