Changeset 1190 for trunk/sources
- Timestamp:
- 01/30/09 15:58:12 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Visualization
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/ChartDataRowsModel.cs
r1182 r1190 13 13 public class ChartDataRowsModel : ChartDataModelBase, IChartDataRowsModel{ 14 14 private string title = "Title"; 15 private string xAxisLabel; 15 //private string xAxisLabel; 16 private ILabelProvider labelProvider = new DefaultLabelProvider("0.##"); 17 18 public ILabelProvider XAxisLabelProvider { 19 get { return labelProvider; } 20 set { this.labelProvider = value; } 21 } 22 16 23 17 24 private readonly List<IDataRow> rows = new List<IDataRow>(); 18 private readonly List<string> xLabels = new List<string>();25 //private readonly List<string> xLabels = new List<string>(); 19 26 20 public List<string> XLabels{21 get { return xLabels; }22 }27 //public List<string> XLabels{ 28 // get { return xLabels; } 29 //} 23 30 24 31 public List<IDataRow> Rows{ … … 33 40 } 34 41 } 35 public string XAxisLabel {36 get { return xAxisLabel; }37 set {38 xAxisLabel = value;39 OnModelChanged();40 }41 }42 //public string XAxisLabel { 43 // get { return xAxisLabel; } 44 // set { 45 // xAxisLabel = value; 46 // OnModelChanged(); 47 // } 48 //} 42 49 43 50 public override IView CreateView() { … … 45 52 } 46 53 47 public void AddLabel(string label) {48 xLabels.Add(label);49 OnModelChanged();50 }54 //public void AddLabel(string label) { 55 // xLabels.Add(label); 56 // OnModelChanged(); 57 //} 51 58 52 public void AddLabel(string label, int index) {53 xLabels[index] = label;54 OnModelChanged();55 }59 //public void AddLabel(string label, int index) { 60 // xLabels[index] = label; 61 // OnModelChanged(); 62 //} 56 63 57 public void AddLabels(string[] labels) {58 foreach (var s in labels){59 AddLabel(s);60 }61 //OnModelChanged();62 }64 //public void AddLabels(string[] labels) { 65 // foreach (var s in labels){ 66 // AddLabel(s); 67 // } 68 // //OnModelChanged(); 69 //} 63 70 64 public void AddLabels(string[] labels, int index) {65 int i = 0;66 foreach (var s in labels){67 AddLabel(s, index + i);68 i++;69 }70 //OnModelChanged();71 }71 //public void AddLabels(string[] labels, int index) { 72 // int i = 0; 73 // foreach (var s in labels){ 74 // AddLabel(s, index + i); 75 // i++; 76 // } 77 // //OnModelChanged(); 78 //} 72 79 73 public void ModifyLabel(string label, int index) {74 xLabels[index] = label;75 OnModelChanged();76 }80 //public void ModifyLabel(string label, int index) { 81 // xLabels[index] = label; 82 // OnModelChanged(); 83 //} 77 84 78 public void ModifyLabels(string[] labels, int index) {79 int i = 0;80 foreach (var s in labels){81 ModifyLabel(s, index + i);82 i++;83 }84 //OnModelChanged();85 }85 //public void ModifyLabels(string[] labels, int index) { 86 // int i = 0; 87 // foreach (var s in labels){ 88 // ModifyLabel(s, index + i); 89 // i++; 90 // } 91 // //OnModelChanged(); 92 //} 86 93 87 public void RemoveLabel(int index) {88 xLabels.RemoveAt(index);89 OnModelChanged();90 }94 //public void RemoveLabel(int index) { 95 // xLabels.RemoveAt(index); 96 // OnModelChanged(); 97 //} 91 98 92 public void RemoveLabels(int index, int count) {93 for (int i = index; i < index + count; i++ ){94 RemoveLabel(i);95 }96 //OnModelChanged();97 }99 //public void RemoveLabels(int index, int count) { 100 // for (int i = index; i < index + count; i++ ){ 101 // RemoveLabel(i); 102 // } 103 // //OnModelChanged(); 104 //} 98 105 99 106 public void AddDataRow(IDataRow row) { -
trunk/sources/HeuristicLab.Visualization/DataRow.cs
r868 r1190 21 21 private List<double> dataRow = new List<double>(); 22 22 23 private ILabelProvider labelProvider = new DefaultLabelProvider("0.##"); 24 25 public ILabelProvider YAxisLabelProvider { 26 get { return labelProvider; } 27 set { this.labelProvider = value; } 28 } 29 30 23 31 public DataRow() { 24 32 } 25 33 26 34 public DataRow(string label) { 27 35 this.Label = label; 28 36 } 37 29 38 30 39 public DataRow(string label, Color color, int thickness, DrawingStyle style, List<double> dataRow) { 31 40 this.Label = label; 32 41 this.Color = color; 33 42 this.Thickness = thickness; … … 63 72 } 64 73 74 65 75 public string Label { 66 76 get { return label; } … … 70 80 } 71 81 } 82 72 83 73 84 public Color Color { -
trunk/sources/HeuristicLab.Visualization/IChartDataRowsModel.cs
r874 r1190 5 5 public interface IChartDataRowsModel : IItem { 6 6 string Title { get; set; } 7 string XAxisLabel { get; set; }8 List<string> XLabels { get; }7 //string XAxisLabel { get; set; } 8 //List<string> XLabels { get; } 9 9 List<IDataRow> Rows { get; } 10 ILabelProvider XAxisLabelProvider { get; set; } 10 11 11 12 void AddDataRow(IDataRow row); 12 13 void RemoveDataRow(IDataRow row); 13 14 14 void AddLabel(string label);15 void AddLabel(string label, int index);16 void AddLabels(string[] labels);17 void AddLabels(string[] labels, int index);18 void ModifyLabel(string label, int index);19 void ModifyLabels(string[] labels, int index);20 void RemoveLabel(int index);21 void RemoveLabels(int index, int count);15 //void AddLabel(string label); 16 //void AddLabel(string label, int index); 17 //void AddLabels(string[] labels); 18 //void AddLabels(string[] labels, int index); 19 //void ModifyLabel(string label, int index); 20 //void ModifyLabels(string[] labels, int index); 21 //void RemoveLabel(int index); 22 //void RemoveLabels(int index, int count); 22 23 23 24 event ModelChangedHandler ModelChanged; -
trunk/sources/HeuristicLab.Visualization/IDataRow.cs
r761 r1190 7 7 int Thickness { get; set; } 8 8 DrawingStyle Style { get; set; } 9 ILabelProvider YAxisLabelProvider { get; set; } 9 10 10 11 void AddValue(double value);
Note: See TracChangeset
for help on using the changeset viewer.