Changeset 2135 for trunk/sources/HeuristicLab.CEDMA.Charting
- Timestamp:
- 07/06/09 14:42:21 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.CEDMA.Charting/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Charting/3.3/BubbleChart.cs
r2133 r2135 111 111 Repaint(); 112 112 EnforceUpdate(); 113 } 114 115 public override void Render(Graphics graphics, int width, int height) { 116 graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; 117 base.Render(graphics, width, height); 113 118 } 114 119 … … 160 165 actualXValues.Add(subEntry.Get(path.ElementAt(1))); 161 166 } 162 } else {163 xs.Add(double.NaN);164 actualXValues.Add("NaN");165 167 } 166 168 if (results.OrdinalVariables.Contains(yDimension)) { … … 184 186 actualYValues.Add(subEntry.Get(path.ElementAt(1))); 185 187 } 186 } else { 188 } 189 if (xs.Count() == 0) { 190 xs.Add(double.NaN); 191 actualXValues.Add("NaN"); 192 } 193 if (ys.Count() == 0) { 187 194 ys.Add(double.NaN); 188 195 actualYValues.Add("NaN"); … … 228 235 229 236 private int CalculateAlpha(int size) { 230 return maxAlpha - (int)((double)(size - minBubbleSize) / (double)(maxBubbleSize - minBubbleSize) * (double)(maxAlpha - minAlpha));237 return (minAlpha + maxAlpha) / 2; 231 238 } 232 239 -
trunk/sources/HeuristicLab.CEDMA.Charting/3.3/BubbleChartView.Designer.cs
r1529 r2135 34 34 this.sizeComboBox = new System.Windows.Forms.ComboBox(); 35 35 this.sizeLabel = new System.Windows.Forms.Label(); 36 this.invertCheckbox = new System.Windows.Forms.CheckBox();37 36 this.bubbleChartControl = new HeuristicLab.CEDMA.Charting.BubbleChartControl(); 38 37 ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).BeginInit(); … … 43 42 // 44 43 this.yJitterLabel.AutoSize = true; 45 this.yJitterLabel.Location = new System.Drawing.Point(3, 30); 44 this.yJitterLabel.BackColor = System.Drawing.SystemColors.Control; 45 this.yJitterLabel.Location = new System.Drawing.Point(151, 6); 46 46 this.yJitterLabel.Name = "yJitterLabel"; 47 47 this.yJitterLabel.Size = new System.Drawing.Size(29, 13); … … 53 53 this.xJitterlabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 54 54 this.xJitterlabel.AutoSize = true; 55 this.xJitterlabel.Location = new System.Drawing.Point(291, 418); 55 this.xJitterlabel.BackColor = System.Drawing.SystemColors.Control; 56 this.xJitterlabel.Location = new System.Drawing.Point(346, 439); 56 57 this.xJitterlabel.Name = "xJitterlabel"; 57 58 this.xJitterlabel.Size = new System.Drawing.Size(29, 13); … … 62 63 // 63 64 this.xTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 64 this.xTrackBar.Location = new System.Drawing.Point(326, 418); 65 this.xTrackBar.BackColor = System.Drawing.SystemColors.Control; 66 this.xTrackBar.Location = new System.Drawing.Point(381, 435); 65 67 this.xTrackBar.Maximum = 100; 66 68 this.xTrackBar.Name = "xTrackBar"; 67 this.xTrackBar.Size = new System.Drawing.Size( 121, 45);69 this.xTrackBar.Size = new System.Drawing.Size(64, 45); 68 70 this.xTrackBar.TabIndex = 11; 69 71 this.xTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; … … 74 76 this.xAxisLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 75 77 this.xAxisLabel.AutoSize = true; 76 this.xAxisLabel.Location = new System.Drawing.Point(305, 394); 78 this.xAxisLabel.BackColor = System.Drawing.SystemColors.Control; 79 this.xAxisLabel.Location = new System.Drawing.Point(198, 438); 77 80 this.xAxisLabel.Name = "xAxisLabel"; 78 81 this.xAxisLabel.Size = new System.Drawing.Size(15, 13); … … 83 86 // 84 87 this.xAxisComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 88 this.xAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight; 85 89 this.xAxisComboBox.FormattingEnabled = true; 86 this.xAxisComboBox.Location = new System.Drawing.Point( 326, 391);90 this.xAxisComboBox.Location = new System.Drawing.Point(219, 435); 87 91 this.xAxisComboBox.Name = "xAxisComboBox"; 88 92 this.xAxisComboBox.Size = new System.Drawing.Size(121, 21); … … 93 97 // 94 98 this.yAxisLabel.AutoSize = true; 99 this.yAxisLabel.BackColor = System.Drawing.SystemColors.Control; 95 100 this.yAxisLabel.Location = new System.Drawing.Point(3, 6); 96 101 this.yAxisLabel.Name = "yAxisLabel"; … … 101 106 // yAxisComboBox 102 107 // 108 this.yAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight; 103 109 this.yAxisComboBox.FormattingEnabled = true; 104 110 this.yAxisComboBox.Location = new System.Drawing.Point(24, 3); … … 110 116 // yTrackBar 111 117 // 112 this.yTrackBar.Location = new System.Drawing.Point(38, 30); 118 this.yTrackBar.BackColor = System.Drawing.SystemColors.Control; 119 this.yTrackBar.Location = new System.Drawing.Point(186, 3); 113 120 this.yTrackBar.Maximum = 100; 114 121 this.yTrackBar.Name = "yTrackBar"; 115 this.yTrackBar.Size = new System.Drawing.Size( 107, 45);122 this.yTrackBar.Size = new System.Drawing.Size(59, 45); 116 123 this.yTrackBar.TabIndex = 10; 117 124 this.yTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; … … 121 128 // 122 129 this.sizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 130 this.sizeComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight; 123 131 this.sizeComboBox.FormattingEnabled = true; 124 this.sizeComboBox.Location = new System.Drawing.Point(32 9, 3);132 this.sizeComboBox.Location = new System.Drawing.Point(324, 3); 125 133 this.sizeComboBox.Name = "sizeComboBox"; 126 134 this.sizeComboBox.Size = new System.Drawing.Size(121, 21); … … 132 140 this.sizeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 133 141 this.sizeLabel.AutoSize = true; 134 this.sizeLabel.Location = new System.Drawing.Point(259, 6); 142 this.sizeLabel.BackColor = System.Drawing.SystemColors.Control; 143 this.sizeLabel.Location = new System.Drawing.Point(254, 6); 135 144 this.sizeLabel.Name = "sizeLabel"; 136 145 this.sizeLabel.Size = new System.Drawing.Size(64, 13); 137 146 this.sizeLabel.TabIndex = 15; 138 147 this.sizeLabel.Text = "Bubble size:"; 139 //140 // invertCheckbox141 //142 this.invertCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));143 this.invertCheckbox.AutoSize = true;144 this.invertCheckbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;145 this.invertCheckbox.Location = new System.Drawing.Point(326, 30);146 this.invertCheckbox.Name = "invertCheckbox";147 this.invertCheckbox.Size = new System.Drawing.Size(64, 17);148 this.invertCheckbox.TabIndex = 16;149 this.invertCheckbox.Text = "Inverse:";150 this.invertCheckbox.UseVisualStyleBackColor = true;151 this.invertCheckbox.CheckedChanged += new System.EventHandler(this.sizeComboBox_SelectedIndexChanged);152 148 // 153 149 // bubbleChartControl … … 158 154 this.bubbleChartControl.BackColor = System.Drawing.SystemColors.Control; 159 155 this.bubbleChartControl.Chart = null; 160 this.bubbleChartControl.Location = new System.Drawing.Point( 3, 81);156 this.bubbleChartControl.Location = new System.Drawing.Point(0, 30); 161 157 this.bubbleChartControl.Name = "bubbleChartControl"; 162 158 this.bubbleChartControl.ScaleOnResize = true; 163 this.bubbleChartControl.Size = new System.Drawing.Size(4 44, 304);159 this.bubbleChartControl.Size = new System.Drawing.Size(450, 399); 164 160 this.bubbleChartControl.TabIndex = 17; 165 161 // … … 168 164 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 169 165 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 170 this.Controls.Add(this.bubbleChartControl);171 this.Controls.Add(this.invertCheckbox);172 166 this.Controls.Add(this.sizeLabel); 173 167 this.Controls.Add(this.sizeComboBox); … … 179 173 this.Controls.Add(this.yAxisLabel); 180 174 this.Controls.Add(this.yAxisComboBox); 175 this.Controls.Add(this.bubbleChartControl); 181 176 this.Controls.Add(this.yTrackBar); 182 177 this.Name = "BubbleChartView"; … … 201 196 private System.Windows.Forms.ComboBox sizeComboBox; 202 197 private System.Windows.Forms.Label sizeLabel; 203 private System.Windows.Forms.CheckBox invertCheckbox;204 198 private BubbleChartControl bubbleChartControl; 205 199 } -
trunk/sources/HeuristicLab.CEDMA.Charting/3.3/BubbleChartView.cs
r2131 r2135 13 13 14 14 namespace HeuristicLab.CEDMA.Charting { 15 public class BubbleChartViewFactory : IResultsViewFactory {16 #region IResultsViewFactory Members17 18 public string Name {19 get { return "Bubble chart"; }20 }21 22 public IControl CreateView(Results results) {23 return new BubbleChartView(results);24 }25 26 #endregion27 }28 29 15 public partial class BubbleChartView : ViewBase { 30 16 private Results Results { … … 70 56 71 57 private void sizeComboBox_SelectedIndexChanged(object sender, EventArgs e) { 72 bubbleChartControl.Chart.SetBubbleSizeDimension((string)sizeComboBox.SelectedItem, invertCheckbox.Checked);58 bubbleChartControl.Chart.SetBubbleSizeDimension((string)sizeComboBox.SelectedItem, false); 73 59 UpdateChart(); 74 60 } 75 61 } 62 63 public class BubbleChartViewFactory : IResultsViewFactory { 64 #region IResultsViewFactory Members 65 66 public string Name { 67 get { return "Bubble chart"; } 68 } 69 70 public IControl CreateView(Results results) { 71 return new BubbleChartView(results); 72 } 73 74 #endregion 75 } 76 76 }
Note: See TracChangeset
for help on using the changeset viewer.