Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/11/09 19:30:54 (15 years ago)
Author:
gkronber
Message:

worked on CEDMA presentation layer (bubble chart, and collection of results) (#419)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Charting/BubbleChartView.cs

    r1106 r1108  
    1212
    1313namespace HeuristicLab.CEDMA.Charting {
    14   public partial class BubbleChartView : ViewBase {
     14  public partial class BubbleChartView : ViewBase, IResultsView {
    1515    private Results results;
    1616    private const string CONSTANT_SIZE = "<constant>";
    1717    private Label pleaseSelectAxisLabel = new Label();
    1818
    19     public BubbleChartView(Results results) {
    20       this.results = results;
     19    public BubbleChartView() {
    2120      InitializeComponent();
    22       bubbleChartControl.Chart = new BubbleChart(results, 0, 0, 100, 100);
    23       xAxisComboBox.Items.AddRange(results.OrdinalVariableNames);
    24       yAxisComboBox.Items.AddRange(results.OrdinalVariableNames);
    25       sizeComboBox.Items.Add(CONSTANT_SIZE);
    26       sizeComboBox.Items.AddRange(results.VariableNames);
    27       sizeComboBox.SelectedItem = sizeComboBox.Items[0];
    28       sizeComboBox.Enabled = false;
    29       invertCheckbox.Enabled = false;
    30       sizeLabel.Enabled = false;
    31       yAxisComboBox.SelectedItem = yAxisComboBox.Items[0];
    32       xAxisComboBox.SelectedItem = xAxisComboBox.Items[0];
    3321    }
    3422
     
    3927    private void UpdateChart() {
    4028      if (xAxisComboBox.SelectedItem == null || yAxisComboBox.SelectedItem == null) return;
    41       xJitterlabel.Enabled = true;
    42       xTrackBar.Enabled = true;
    43       yJitterLabel.Enabled = true;
    44       yTrackBar.Enabled = true;
    45       sizeComboBox.Enabled = true;
    46       invertCheckbox.Enabled = true;
    47       sizeLabel.Enabled = true;
    4829      bubbleChartControl.Chart.ShowXvsY((string)xAxisComboBox.SelectedItem, (string)yAxisComboBox.SelectedItem);
    4930    }
     
    6445      }
    6546    }
     47
     48    #region IResultsView Members
     49
     50    public Control Control {
     51      get { return this; }
     52    }
     53
     54    string IResultsView.Name {
     55      get { return "Bubble chart"; }
     56    }
     57
     58    public void ShowResults(Results results) {
     59      this.results = results;
     60      bubbleChartControl.Chart = new BubbleChart(results, 0, 0, 100, 100);
     61      xAxisComboBox.Items.AddRange(Results.OrdinalVariables);
     62      xAxisComboBox.Items.AddRange(Results.CategoricalVariables);
     63      yAxisComboBox.Items.AddRange(Results.OrdinalVariables);
     64      yAxisComboBox.Items.AddRange(Results.CategoricalVariables);
     65      sizeComboBox.Items.Add(CONSTANT_SIZE);
     66      sizeComboBox.Items.AddRange(Results.OrdinalVariables);
     67      sizeComboBox.SelectedItem = sizeComboBox.Items[0];
     68      yAxisComboBox.SelectedItem = yAxisComboBox.Items[0];
     69      xAxisComboBox.SelectedItem = xAxisComboBox.Items[0];
     70    }
     71
     72    #endregion
    6673  }
    6774}
Note: See TracChangeset for help on using the changeset viewer.