- Timestamp:
- 03/24/11 15:46:59 (14 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
r5445 r5824 315 315 this.sizeTrackBar.TabIndex = 24; 316 316 this.sizeTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; 317 this.sizeTrackBar.Value = 1 5;317 this.sizeTrackBar.Value = 10; 318 318 this.sizeTrackBar.ValueChanged += new System.EventHandler(this.sizeTrackBar_ValueChanged); 319 319 // -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs
r5744 r5824 239 239 } 240 240 } 241 var xAxis = chart.ChartAreas[0].AxisX; 242 var yAxis = chart.ChartAreas[0].AxisY; 243 xTrackBar.Value = 0; 244 yTrackBar.Value = 0; 245 SetAutomaticUpdateOfAxis(xAxis, true); 246 SetAutomaticUpdateOfAxis(yAxis, true); 241 247 } 242 248 … … 256 262 point.MarkerSize = (int)Math.Round((sizeTrackBar.Value - sizeTrackBar.Minimum) * relativeSize + sizeTrackBar.Minimum); 257 263 } 264 } 265 266 private void UpdateDataPointJitter() { 267 var xAxis = this.chart.ChartAreas[0].AxisX; 268 var yAxis = this.chart.ChartAreas[0].AxisY; 269 SetAutomaticUpdateOfAxis(xAxis, false); 270 SetAutomaticUpdateOfAxis(yAxis, false); 271 272 foreach (DataPoint point in chart.Series[0].Points) { 273 IRun run = (IRun)point.Tag; 274 double xValue = GetValue(run, xAxisValue).Value; 275 double yValue = GetValue(run, yAxisValue).Value; 276 277 if (!xJitterFactor.IsAlmost(0.0)) 278 xValue += 0.1 * GetXJitter(run) * xJitterFactor * (xAxis.Maximum - xAxis.Minimum); 279 if (!yJitterFactor.IsAlmost(0.0)) 280 yValue += 0.1 * GetYJitter(run) * yJitterFactor * (yAxis.Maximum - yAxis.Minimum); 281 282 point.XValue = xValue; 283 point.YValues[0] = yValue; 284 } 285 } 286 287 private void SetAutomaticUpdateOfAxis(Axis axis, bool enabled) { 288 if (enabled) { 289 axis.Maximum = double.NaN; 290 axis.Minimum = double.NaN; 291 axis.MajorGrid.Interval = double.NaN; 292 axis.MajorTickMark.Interval = double.NaN; 293 axis.LabelStyle.Interval = double.NaN; 294 } else { 295 axis.Minimum = axis.Minimum; 296 axis.Maximum = axis.Maximum; 297 axis.MajorGrid.Interval = axis.MajorGrid.Interval; 298 axis.MajorTickMark.Interval = axis.MajorTickMark.Interval; 299 axis.LabelStyle.Interval = axis.LabelStyle.Interval; 300 } 301 258 302 } 259 303 … … 270 314 if (xValue.HasValue && yValue.HasValue && sizeValue.HasValue) { 271 315 xValue = xValue.Value; 272 if (!xJitterFactor.IsAlmost(0.0)) 273 xValue += 0.1 * GetXJitter(run) * xJitterFactor * (this.chart.ChartAreas[0].AxisX.Maximum - this.chart.ChartAreas[0].AxisX.Minimum); 316 274 317 yValue = yValue.Value; 275 if (!yJitterFactor.IsAlmost(0.0)) 276 yValue += 0.1 * GetYJitter(run) * yJitterFactor * (this.chart.ChartAreas[0].AxisY.Maximum - this.chart.ChartAreas[0].AxisY.Minimum); 318 277 319 if (run.Visible) { 278 320 DataPoint point = new DataPoint(xValue.Value, new double[] { yValue.Value, sizeValue.Value }); … … 280 322 point.Color = run.Color; 281 323 series.Points.Add(point); 282 283 324 if (!runToDataPointMapping.ContainsKey(run)) runToDataPointMapping.Add(run, new List<DataPoint>()); 284 325 runToDataPointMapping[run].Add(point); … … 527 568 this.xJitterFactor = xTrackBar.Value / 100.0; 528 569 this.yJitterFactor = yTrackBar.Value / 100.0; 529 this.UpdateDataPoints();570 UpdateDataPointJitter(); 530 571 } 531 572 private void sizeTrackBar_ValueChanged(object sender, EventArgs e) { … … 643 684 } 644 685 #endregion 686 645 687 } 646 688 }
Note: See TracChangeset
for help on using the changeset viewer.