Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/21/18 15:37:44 (6 years ago)
Author:
pfleck
Message:

#2972 Implemented 1st version (UI is subject to change)

Location:
branches/2972_PDPRowSelect/HeuristicLab.Problems.DataAnalysis.Views/3.4/Controls
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2972_PDPRowSelect/HeuristicLab.Problems.DataAnalysis.Views/3.4/Controls/FactorPartialDependencePlot.cs

    r15845 r16445  
    167167      // add an event such that whenever a value is changed in the shared dataset,
    168168      // this change is reflected in the internal dataset (where the value becomes a whole column)
    169       if (this.sharedFixedVariables != null)
     169      if (this.sharedFixedVariables != null) {
    170170        this.sharedFixedVariables.ItemChanged -= sharedFixedVariables_ItemChanged;
     171        this.sharedFixedVariables.Reset -= sharedFixedVariables_Reset;
     172      }
     173
    171174      this.sharedFixedVariables = sharedFixedVariables;
    172175      this.sharedFixedVariables.ItemChanged += sharedFixedVariables_ItemChanged;
     176      this.sharedFixedVariables.Reset += sharedFixedVariables_Reset;
    173177
    174178      RecalculateInternalDataset();
     
    218222        if (updateOnFinish)
    219223          Update();
    220       }
    221       catch (OperationCanceledException) { }
    222       catch (AggregateException ae) {
     224      } catch (OperationCanceledException) { } catch (AggregateException ae) {
    223225        if (!ae.InnerExceptions.Any(e => e is OperationCanceledException))
    224226          throw;
     
    495497    }
    496498
     499    private void sharedFixedVariables_Reset(object sender, EventArgs e) {
     500      var newValue = sharedFixedVariables.GetStringValue(FreeVariable, 0);
     501      UpdateSelectedValue(newValue);
     502
     503      int idx = variableValues.IndexOf(newValue);
     504      UpdateAllSeriesStyles(idx);
     505    }
     506
    497507    private async void chart_DragDrop(object sender, DragEventArgs e) {
    498508      var data = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
  • branches/2972_PDPRowSelect/HeuristicLab.Problems.DataAnalysis.Views/3.4/Controls/PartialDependencePlot.cs

    r15845 r16445  
    245245      // add an event such that whenever a value is changed in the shared dataset,
    246246      // this change is reflected in the internal dataset (where the value becomes a whole column)
    247       if (this.sharedFixedVariables != null)
     247      if (this.sharedFixedVariables != null) {
    248248        this.sharedFixedVariables.ItemChanged -= sharedFixedVariables_ItemChanged;
     249        this.sharedFixedVariables.Reset -= sharedFixedVariables_Reset;
     250      }
     251
    249252      this.sharedFixedVariables = sharedFixedVariables;
    250253      this.sharedFixedVariables.ItemChanged += sharedFixedVariables_ItemChanged;
     254      this.sharedFixedVariables.Reset += sharedFixedVariables_Reset;
    251255
    252256      RecalculateTrainingLimits(initializeAxisRanges);
     
    314318        if (updateOnFinish)
    315319          Update();
    316       }
    317       catch (OperationCanceledException) { }
    318       catch (AggregateException ae) {
     320      } catch (OperationCanceledException) { } catch (AggregateException ae) {
    319321        if (!ae.InnerExceptions.Any(e => e is OperationCanceledException))
    320322          throw;
     
    625627
    626628      var variableName = variables[columnIndex];
    627       if (variableName == FreeVariable) return;
     629      if (variableName == FreeVariable) {
     630        return;
     631      }
    628632      if (internalDataset.VariableHasType<double>(variableName)) {
    629633        var v = sharedFixedVariables.GetDoubleValue(variableName, rowIndex);
     
    640644    }
    641645
     646    private void sharedFixedVariables_Reset(object sender, EventArgs e) {
     647      var newValue = sharedFixedVariables.GetDoubleValue(FreeVariable, 0);
     648      VerticalLineAnnotation.X = newValue;
     649      UpdateCursor();  // triggers update of InternalDataset
     650    }
     651
    642652    private void chart_AnnotationPositionChanging(object sender, AnnotationPositionChangingEventArgs e) {
    643653      var step = (trainingMax - trainingMin) / drawingSteps;
Note: See TracChangeset for help on using the changeset viewer.