Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/17/14 14:01:21 (10 years ago)
Author:
mkommend
Message:

#2121: Fixed bugs in the bubble chart and box plot view regarding the axis labeling.

File:
1 edited

Legend:

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

    r11007 r11024  
    216216        if (datapoint != null) {
    217217          IRun run = (IRun)datapoint.Tag;
    218           string selectedAxis = (string)xAxisComboBox.SelectedItem;
     218          string selectedAxis = xAxisValue;
    219219          IItem value = null;
    220220
     
    374374      Axis yAxis = this.chart.ChartAreas[BoxPlotChartAreaName].AxisY;
    375375      int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count();
    376       SetCustomAxisLabels(xAxis, xAxisComboBox.SelectedIndex - axisDimensionCount);
    377       SetCustomAxisLabels(yAxis, yAxisComboBox.SelectedIndex - axisDimensionCount);
    378       if (xAxisComboBox.SelectedItem != null)
    379         xAxis.Title = xAxisComboBox.SelectedItem.ToString();
    380       if (yAxisComboBox.SelectedItem != null)
    381         yAxis.Title = yAxisComboBox.SelectedItem.ToString();
     376      //mkommend: combobox.SelectedIndex could not be used as this changes during hoovering over possible values
     377      var xSAxisSelectedIndex = xAxisValue == null ? 0 : xAxisComboBox.Items.IndexOf(xAxisValue);
     378      var ySAxisSelectedIndex = yAxisValue == null ? 0 : xAxisComboBox.Items.IndexOf(yAxisValue);
     379      SetCustomAxisLabels(xAxis, xSAxisSelectedIndex - axisDimensionCount);
     380      SetCustomAxisLabels(yAxis, ySAxisSelectedIndex - axisDimensionCount);
     381      if (xAxisValue != null)
     382        xAxis.Title = xAxisValue;
     383      if (yAxisValue != null)
     384        yAxis.Title = yAxisValue;
    382385    }
    383386
Note: See TracChangeset for help on using the changeset viewer.