Changeset 8835
- Timestamp:
- 10/23/12 10:38:43 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs
r8832 r8835 259 259 } 260 260 } 261 var xAxis = chart.ChartAreas[0].AxisX;262 var yAxis = chart.ChartAreas[0].AxisY;263 261 xTrackBar.Value = 0; 264 262 yTrackBar.Value = 0; … … 290 288 var yAxis = this.chart.ChartAreas[0].AxisY; 291 289 292 293 // disable automatic update of axis 294 var disabledParameters = new AxisParameters(); 295 disabledParameters.min = disabledParameters.max = disabledParameters.majorGridInterval = disabledParameters.majorTickMarkInterval = disabledParameters.labelStyleInterval = double.NaN; 296 297 AxisParameters savedXParameters, savedYParameters; 298 savedXParameters = SetAxisParameters(xAxis, disabledParameters); 299 savedYParameters = SetAxisParameters(yAxis, disabledParameters); 290 double xAxisRange = xAxis.Maximum - xAxis.Minimum; 291 double yAxisRange = yAxis.Maximum - yAxis.Minimum; 300 292 301 293 foreach (DataPoint point in chart.Series[0].Points) { … … 305 297 306 298 if (!xJitterFactor.IsAlmost(0.0)) 307 xValue += 0.1 * GetXJitter(run) * xJitterFactor * ( savedXParameters.max - savedXParameters.min);299 xValue += 0.1 * GetXJitter(run) * xJitterFactor * (xAxisRange); 308 300 if (!yJitterFactor.IsAlmost(0.0)) 309 yValue += 0.1 * GetYJitter(run) * yJitterFactor * ( savedYParameters.max - savedYParameters.min);301 yValue += 0.1 * GetYJitter(run) * yJitterFactor * (yAxisRange); 310 302 311 303 point.XValue = xValue; 312 304 point.YValues[0] = yValue; 313 305 } 314 SetAxisParameters(xAxis, savedXParameters); 315 SetAxisParameters(yAxis, savedYParameters); 316 } 317 318 private AxisParameters SetAxisParameters(Axis axis, AxisParameters @new) { 319 var old = new AxisParameters(); 320 old.min = axis.Minimum; 321 old.max = axis.Maximum; 322 old.majorGridInterval = axis.MajorGrid.Interval; 323 old.majorTickMarkInterval = axis.MajorTickMark.Interval; 324 old.labelStyleInterval = axis.LabelStyle.Interval; 325 326 axis.Maximum = @new.max; 327 axis.Minimum = @new.min; 328 axis.MajorGrid.Interval = @new.majorGridInterval; 329 axis.MajorTickMark.Interval = @new.majorTickMarkInterval; 330 axis.LabelStyle.Interval = @new.labelStyleInterval; 331 return old; 306 332 307 } 333 308
Note: See TracChangeset
for help on using the changeset viewer.