Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4777 for trunk/sources


Ignore:
Timestamp:
11/12/10 01:21:11 (14 years ago)
Author:
swagner
Message:

Worked on flexible row coloring for data rows (#925)

Location:
trunk/sources/HeuristicLab.Analysis/3.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis/3.3/AlleleFrequencyAnalyzer.cs

    r4722 r4777  
    164164          allelesTable = new DataTable("Alleles");
    165165          results.Add(new Result("Alleles", allelesTable));
     166
    166167          allelesTable.Rows.Add(new DataRow("Unique Alleles"));
    167           DataRowVisualProperties visualProperties = new DataRowVisualProperties();
    168           visualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Line;
    169           visualProperties.SecondYAxis = true;
    170           visualProperties.StartIndexZero = true;
    171           allelesTable.Rows.Add(new DataRow("Unique Alleles of Best Known Solution", null, visualProperties));
    172           allelesTable.Rows.Add(new DataRow("Fixed Alleles", null, visualProperties));
    173           allelesTable.Rows.Add(new DataRow("Fixed Alleles of Best Known Solution", null, visualProperties));
    174           allelesTable.Rows.Add(new DataRow("Lost Alleles of Best Known Solution", null, visualProperties));
     168
     169          allelesTable.Rows.Add(new DataRow("Unique Alleles of Best Known Solution", null));
     170          allelesTable.Rows["Unique Alleles of Best Known Solution"].VisualProperties.SecondYAxis = true;
     171          allelesTable.Rows["Unique Alleles of Best Known Solution"].VisualProperties.StartIndexZero = true;
     172
     173          allelesTable.Rows.Add(new DataRow("Fixed Alleles", null));
     174          allelesTable.Rows["Fixed Alleles"].VisualProperties.SecondYAxis = true;
     175          allelesTable.Rows["Fixed Alleles"].VisualProperties.StartIndexZero = true;
     176
     177          allelesTable.Rows.Add(new DataRow("Fixed Alleles of Best Known Solution", null));
     178          allelesTable.Rows["Fixed Alleles of Best Known Solution"].VisualProperties.SecondYAxis = true;
     179          allelesTable.Rows["Fixed Alleles of Best Known Solution"].VisualProperties.StartIndexZero = true;
     180
     181          allelesTable.Rows.Add(new DataRow("Lost Alleles of Best Known Solution", null));
     182          allelesTable.Rows["Lost Alleles of Best Known Solution"].VisualProperties.SecondYAxis = true;
     183          allelesTable.Rows["Lost Alleles of Best Known Solution"].VisualProperties.StartIndexZero = true;
    175184        } else {
    176185          allelesTable = (DataTable)results["Alleles"].Value;
  • trunk/sources/HeuristicLab.Analysis/3.3/DataRow.cs

    r4722 r4777  
    6666    #endregion
    6767
    68     #region Storing & Cloning
    6968    [StorableConstructor]
    7069    private DataRow(bool deserializing) : base(deserializing) { }
     
    7473      this.values = new ObservableList<double>(original.values);
    7574    }
    76     public override IDeepCloneable Clone(Cloner cloner) {
    77       return new DataRow(this, cloner);
    78     }
    79     #endregion
    8075    public DataRow()
    8176      : base() {
     
    9388      values = new ObservableList<double>();
    9489    }
    95     public DataRow(string name, string description, DataRowVisualProperties visualProperties)
     90    public DataRow(string name, string description, IEnumerable<double> values)
    9691      : base(name, description) {
    97       VisualProperties = visualProperties;
    98       values = new ObservableList<double>();
     92      VisualProperties = new DataRowVisualProperties();
     93      this.values = new ObservableList<double>(values);
    9994    }
    10095
     
    106101    }
    107102    #endregion
     103
     104    public override IDeepCloneable Clone(Cloner cloner) {
     105      return new DataRow(this, cloner);
     106    }
    108107
    109108    public event EventHandler VisualPropertiesChanged;
  • trunk/sources/HeuristicLab.Analysis/3.3/DataRowVisualProperties.cs

    r4722 r4777  
    104104    #endregion
    105105
    106     #region Storing & Cloning
    107106    [StorableConstructor]
    108107    protected DataRowVisualProperties(bool deserializing) : base() { }
     
    114113      this.startIndexZero = original.startIndexZero;
    115114    }
    116     public override IDeepCloneable Clone(Cloner cloner) {
    117       return new DataRowVisualProperties(this, cloner);
    118     }
    119     #endregion
    120115    public DataRowVisualProperties() {
    121116      chartType = DataRowChartType.Line;
     
    131126    }
    132127
     128    public override IDeepCloneable Clone(Cloner cloner) {
     129      return new DataRowVisualProperties(this, cloner);
     130    }
     131
    133132    public event PropertyChangedEventHandler PropertyChanged;
    134133    protected virtual void OnPropertyChanged(string propertyName) {
  • trunk/sources/HeuristicLab.Analysis/3.3/PopulationDiversityAnalyzer.cs

    r4748 r4777  
    171171            minAvgMaxSimilarityDataTable = new DataTable("Average Minimum/Average/Maximum Solution Similarity");
    172172            results.Add(new Result("Average Minimum/Average/Maximum Solution Similarity", minAvgMaxSimilarityDataTable));
    173             DataRowVisualProperties visualProperties = new DataRowVisualProperties();
    174             visualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Line;
    175             visualProperties.StartIndexZero = true;
    176             minAvgMaxSimilarityDataTable.Rows.Add(new DataRow("Average Minimum Solution Similarity", null, visualProperties));
    177             minAvgMaxSimilarityDataTable.Rows.Add(new DataRow("Average Average Solution Similarity", null, visualProperties));
    178             minAvgMaxSimilarityDataTable.Rows.Add(new DataRow("Average Maximum Solution Similarity", null, visualProperties));
     173            minAvgMaxSimilarityDataTable.Rows.Add(new DataRow("Average Minimum Solution Similarity", null));
     174            minAvgMaxSimilarityDataTable.Rows["Average Minimum Solution Similarity"].VisualProperties.StartIndexZero = true;
     175            minAvgMaxSimilarityDataTable.Rows.Add(new DataRow("Average Average Solution Similarity", null));
     176            minAvgMaxSimilarityDataTable.Rows["Average Average Solution Similarity"].VisualProperties.StartIndexZero = true;
     177            minAvgMaxSimilarityDataTable.Rows.Add(new DataRow("Average Maximum Solution Similarity", null));
     178            minAvgMaxSimilarityDataTable.Rows["Average Maximum Solution Similarity"].VisualProperties.StartIndexZero = true;
    179179          } else {
    180180            minAvgMaxSimilarityDataTable = (DataTable)results["Average Minimum/Average/Maximum Solution Similarity"].Value;
     
    186186          // store minimum, average, maximum similarities data table
    187187          DataTable minAvgMaxSimilaritiesDataTable = new DataTable("Minimum/Average/Maximum Solution Similarities");
    188           minAvgMaxSimilaritiesDataTable.Rows.Add(new DataRow("Minimum Solution Similarity"));
     188          minAvgMaxSimilaritiesDataTable.Rows.Add(new DataRow("Minimum Solution Similarity", null, minSimilarities));
    189189          minAvgMaxSimilaritiesDataTable.Rows["Minimum Solution Similarity"].VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Points;
    190           minAvgMaxSimilaritiesDataTable.Rows["Minimum Solution Similarity"].Values.AddRange(minSimilarities);
    191           minAvgMaxSimilaritiesDataTable.Rows.Add(new DataRow("Average Solution Similarity"));
     190          minAvgMaxSimilaritiesDataTable.Rows.Add(new DataRow("Average Solution Similarity", null, avgSimilarities));
    192191          minAvgMaxSimilaritiesDataTable.Rows["Average Solution Similarity"].VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Points;
    193           minAvgMaxSimilaritiesDataTable.Rows["Average Solution Similarity"].Values.AddRange(avgSimilarities);
    194           minAvgMaxSimilaritiesDataTable.Rows.Add(new DataRow("Maximum Solution Similarity"));
     192          minAvgMaxSimilaritiesDataTable.Rows.Add(new DataRow("Maximum Solution Similarity", null, maxSimilarities));
    195193          minAvgMaxSimilaritiesDataTable.Rows["Maximum Solution Similarity"].VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Points;
    196           minAvgMaxSimilaritiesDataTable.Rows["Maximum Solution Similarity"].Values.AddRange(maxSimilarities);
    197194          if (!results.ContainsKey("Minimum/Average/Maximum Solution Similarities")) {
    198195            results.Add(new Result("Minimum/Average/Maximum Solution Similarities", minAvgMaxSimilaritiesDataTable));
Note: See TracChangeset for help on using the changeset viewer.