Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11024


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.

Location:
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews
Files:
2 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
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs

    r11007 r11024  
    663663      Axis yAxis = this.chart.ChartAreas[0].AxisY;
    664664      int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count();
    665       SetCustomAxisLabels(xAxis, xAxisComboBox.SelectedIndex - axisDimensionCount);
    666       SetCustomAxisLabels(yAxis, yAxisComboBox.SelectedIndex - axisDimensionCount);
    667       if (xAxisComboBox.SelectedItem != null)
    668         xAxis.Title = xAxisComboBox.SelectedItem.ToString();
    669       if (yAxisComboBox.SelectedItem != null)
    670         yAxis.Title = yAxisComboBox.SelectedItem.ToString();
     665      //mkommend: combobox.SelectedIndex could not be used as this changes during hoovering over possible values
     666      var xSAxisSelectedIndex = xAxisValue == null ? 0 : xAxisComboBox.Items.IndexOf(xAxisValue);
     667      var ySAxisSelectedIndex = yAxisValue == null ? 0 : xAxisComboBox.Items.IndexOf(yAxisValue);
     668      SetCustomAxisLabels(xAxis, xSAxisSelectedIndex - axisDimensionCount);
     669      SetCustomAxisLabels(yAxis, ySAxisSelectedIndex - axisDimensionCount);
     670      if (xAxisValue != null)
     671        xAxis.Title = xAxisValue;
     672      if(yAxisValue != null)
     673      yAxis.Title = yAxisValue;
    671674    }
    672675
Note: See TracChangeset for help on using the changeset viewer.