Changeset 4635 for trunk/sources
- Timestamp:
- 10/21/10 11:37:51 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj
r4104 r4635 289 289 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 290 290 </ProjectReference> 291 <ProjectReference Include="..\..\HeuristicLab.Visualization.ChartControlsExtensions\3.3\HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj"> 292 <Project>{315BDA09-3F4F-49B3-9790-B37CFC1C5750}</Project> 293 <Name>HeuristicLab.Visualization.ChartControlsExtensions-3.3</Name> 294 </ProjectReference> 291 295 </ItemGroup> 292 296 <ItemGroup> -
trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLabOptimizationViewsPlugin.cs.frame
r4633 r4635 38 38 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 39 39 [PluginDependency("HeuristicLab.Optimization", "3.3")] 40 [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions","3.3")] 40 41 public class HeuristicLabOptimizationViewsPlugin : PluginBase { 41 42 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.Designer.cs
r4094 r4635 58 58 this.sizeComboBox = new System.Windows.Forms.ComboBox(); 59 59 this.sizeLabel = new System.Windows.Forms.Label(); 60 this.chart = new System.Windows.Forms.DataVisualization.Charting.Chart();60 this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart(); 61 61 this.zoomButton = new System.Windows.Forms.RadioButton(); 62 62 this.selectButton = new System.Windows.Forms.RadioButton(); … … 309 309 private System.Windows.Forms.ComboBox sizeComboBox; 310 310 private System.Windows.Forms.Label sizeLabel; 311 private System.Windows.Forms.DataVisualization.Charting.Chart chart;311 private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart; 312 312 private System.Windows.Forms.RadioButton zoomButton; 313 313 private System.Windows.Forms.RadioButton selectButton; -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs
r4212 r4635 54 54 InitializeComponent(); 55 55 56 this.categoricalMapping = new Dictionary<int, Dictionary<object, double>>(); 57 this.xJitter = new Dictionary<IRun, double>(); 58 this.yJitter = new Dictionary<IRun, double>(); 59 this.random = new Random(); 60 this.colorDialog.Color = Color.Black; 61 this.colorButton.Image = this.GenerateImage(16, 16, this.colorDialog.Color); 62 this.isSelecting = false; 63 64 this.chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true; 65 this.chart.ChartAreas[0].CursorY.IsUserSelectionEnabled = true; 66 this.chart.ChartAreas[0].CursorX.Interval = 1; 67 this.chart.ChartAreas[0].CursorY.Interval = 1; 68 this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = !this.isSelecting; 69 this.chart.ChartAreas[0].AxisY.ScaleView.Zoomable = !this.isSelecting; 56 categoricalMapping = new Dictionary<int, Dictionary<object, double>>(); 57 xJitter = new Dictionary<IRun, double>(); 58 yJitter = new Dictionary<IRun, double>(); 59 random = new Random(); 60 colorDialog.Color = Color.Black; 61 colorButton.Image = this.GenerateImage(16, 16, this.colorDialog.Color); 62 isSelecting = false; 63 64 chart.CustomizeChartAreas(); 65 chart.EnableMiddleClickPanning = false; 66 chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true; 67 chart.ChartAreas[0].CursorY.IsUserSelectionEnabled = true; 68 chart.ChartAreas[0].CursorX.Interval = 1; 69 chart.ChartAreas[0].CursorY.Interval = 1; 70 chart.ChartAreas[0].AxisX.ScaleView.Zoomable = !this.isSelecting; 71 chart.ChartAreas[0].AxisY.ScaleView.Zoomable = !this.isSelecting; 70 72 } 71 73 … … 506 508 SetCustomAxisLabels(xAxis, xAxisComboBox.SelectedIndex - axisDimensionCount); 507 509 SetCustomAxisLabels(yAxis, yAxisComboBox.SelectedIndex - axisDimensionCount); 510 if (xAxisComboBox.SelectedItem != null) 511 xAxis.Title = xAxisComboBox.SelectedItem.ToString(); 512 if (yAxisComboBox.SelectedItem != null) 513 yAxis.Title = yAxisComboBox.SelectedItem.ToString(); 508 514 } 509 515 -
trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.cs
r4630 r4635 31 31 EnableDoubleClickResetsZoom = true; 32 32 EnableMiddleClickPanning = true; 33 CustomizeChartAreas(); 33 34 } 34 35 35 36 [DefaultValue(true)] 36 37 public bool EnableDoubleClickResetsZoom { get; set; } 37 38 38 [DefaultValue(true)] 39 39 public bool EnableMiddleClickPanning { get; set; } 40 40 41 public void InitializeChartAreas() { 42 ChartAreas.Clear(); 43 ChartAreas.Add(CreateDefaultChartArea("ChartArea1")); 44 } 41 public void CustomizeChartAreas() { 42 foreach (ChartArea chartArea in ChartAreas) { 43 foreach (Axis axis in chartArea.Axes) { 44 axis.MajorGrid.LineColor = SystemColors.GradientInactiveCaption; 45 axis.MajorTickMark.TickMarkStyle = TickMarkStyle.AcrossAxis; 46 axis.ScrollBar.BackColor = Color.Transparent; 47 axis.ScrollBar.LineColor = Color.Transparent; 48 axis.ScrollBar.ButtonColor = SystemColors.GradientInactiveCaption; 49 axis.ScrollBar.ButtonStyle = ScrollBarButtonStyles.SmallScroll; 50 axis.ScrollBar.Size = 12; 51 axis.TitleFont = new Font(axis.TitleFont.FontFamily, 12); 52 } 45 53 46 public static ChartArea CreateDefaultChartArea(string name) { 47 ChartArea chartArea = new ChartArea(name); 48 chartArea.AxisX.MajorGrid.LineColor = SystemColors.GradientInactiveCaption; 49 chartArea.AxisY.MajorGrid.LineColor = SystemColors.GradientInactiveCaption; 50 chartArea.AxisX.MajorTickMark.TickMarkStyle = TickMarkStyle.AcrossAxis; 51 chartArea.AxisY.MajorTickMark.TickMarkStyle = TickMarkStyle.AcrossAxis; 52 chartArea.AxisX.ScrollBar.BackColor = Color.Transparent; 53 chartArea.AxisY.ScrollBar.BackColor = Color.Transparent; 54 chartArea.AxisX.ScrollBar.LineColor = Color.Transparent; 55 chartArea.AxisY.ScrollBar.LineColor = Color.Transparent; 56 chartArea.AxisX.ScrollBar.ButtonColor = SystemColors.GradientInactiveCaption; 57 chartArea.AxisY.ScrollBar.ButtonColor = SystemColors.GradientInactiveCaption; 58 chartArea.AxisX.ScrollBar.ButtonStyle = ScrollBarButtonStyles.SmallScroll; 59 chartArea.AxisY.ScrollBar.ButtonStyle = ScrollBarButtonStyles.SmallScroll; 60 chartArea.AxisX.ScrollBar.Size = 12; 61 chartArea.AxisY.ScrollBar.Size = 12; 62 chartArea.CursorX.Interval = 0; 63 chartArea.CursorY.Interval = 0; 64 chartArea.CursorX.IsUserSelectionEnabled = true; 65 chartArea.CursorY.IsUserSelectionEnabled = true; 66 chartArea.CursorX.SelectionColor = SystemColors.GradientActiveCaption; 67 chartArea.CursorY.SelectionColor = SystemColors.GradientActiveCaption; 68 return chartArea; 54 chartArea.CursorX.Interval = 0; 55 chartArea.CursorY.Interval = 0; 56 chartArea.CursorX.IsUserSelectionEnabled = true; 57 chartArea.CursorY.IsUserSelectionEnabled = true; 58 chartArea.CursorX.SelectionColor = SystemColors.GradientActiveCaption; 59 chartArea.CursorY.SelectionColor = SystemColors.GradientActiveCaption; 60 } 69 61 } 70 62 … … 83 75 84 76 #region panning 85 86 77 private class PanningSupport { 87 78 public ChartArea ChartArea { get; private set; } … … 107 98 return ChartStartPosition.X - (pixelX - PixelStartPosition.X) * Pixel2ChartScale.Width; 108 99 } 109 110 100 public double ChartY(double pixelY) { 111 101 return ChartStartPosition.Y + (pixelY - PixelStartPosition.Y) * Pixel2ChartScale.Height; … … 137 127 base.OnMouseMove(e); 138 128 } 139 140 129 #endregion 141 130
Note: See TracChangeset
for help on using the changeset viewer.