Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3701


Ignore:
Timestamp:
05/07/10 15:06:38 (15 years ago)
Author:
mkommend
Message:

corrected jitter of RunCollectionBubbleChart (ticket #970)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs

    r3638 r3701  
    157157
    158158    private void UpdateComboBoxes() {
     159      string selectedXAxis = (string)this.xAxisComboBox.SelectedItem;
     160      string selectedYAxis = (string)this.yAxisComboBox.SelectedItem;
     161      string selectedSizeAxis = (string)this.sizeComboBox.SelectedItem;
    159162      this.xAxisComboBox.Items.Clear();
    160163      this.yAxisComboBox.Items.Clear();
     
    170173        this.sizeComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
    171174        this.sizeComboBox.SelectedItem = SizeDimension.Constant.ToString();
     175
     176        bool changed = false;
     177        if (selectedXAxis != null && xAxisComboBox.Items.Contains(selectedXAxis)) {
     178          xAxisComboBox.SelectedItem = selectedXAxis;
     179          changed = true;
     180        }
     181        if (selectedYAxis != null && yAxisComboBox.Items.Contains(selectedYAxis)) {
     182          yAxisComboBox.SelectedItem = selectedYAxis;
     183          changed = true;
     184        }
     185        if (selectedSizeAxis != null && sizeComboBox.Items.Contains(selectedSizeAxis)) {
     186          sizeComboBox.SelectedItem = selectedSizeAxis;
     187          changed = true;
     188        }
     189        if (changed)
     190          UpdateDataPoints();
    172191      }
    173192    }
     
    211230      sizeValue = GetValue(run, (string)sizeComboBox.SelectedItem);
    212231      if (xValue.HasValue && yValue.HasValue && sizeValue.HasValue) {
    213         xValue = xValue.Value + xValue.Value * GetXJitter(run) * xJitterFactor;
    214         yValue = yValue.Value + yValue.Value * GetYJitter(run) * yJitterFactor;
     232        xValue = xValue.Value;
     233        if (!xJitterFactor.IsAlmost(0.0))
     234          xValue += 0.1 * GetXJitter(run) * xJitterFactor * (this.chart.ChartAreas[0].AxisX.Maximum - this.chart.ChartAreas[0].AxisX.Minimum);
     235        yValue = yValue.Value;
     236        if (!yJitterFactor.IsAlmost(0.0))
     237          yValue += 0.1 * GetYJitter(run) * yJitterFactor * (this.chart.ChartAreas[0].AxisY.Maximum - this.chart.ChartAreas[0].AxisY.Minimum);
    215238        if (run.Visible) {
    216239          DataPoint point = new DataPoint(xValue.Value, new double[] { yValue.Value, sizeValue.Value });
Note: See TracChangeset for help on using the changeset viewer.