Changeset 761 for trunk/sources/HeuristicLab.Visualization/LineChart.cs
- Timestamp:
- 11/15/08 10:47:40 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/LineChart.cs
r754 r761 49 49 private void Reset() 50 50 { 51 BeginUpdate(); 52 53 // TODO clear existing shapes 54 55 WorldShape mainWorld = canvasUI1.MainCanvas.WorldShape; 56 57 double spacing = mainWorld.BoundingBox.Width/model.Columns.Count; 58 double oldX = 0; 59 double currentX = spacing; 60 ChartDataRowsModelColumn oldColumn = null; 61 // reload data from the model and create shapes 62 foreach (ChartDataRowsModelColumn column in model.Columns) 63 { 64 if (oldColumn != null) 65 { 66 if (column.Values != null) 67 { 68 for (int i = 0; i < column.Values.Length; i++) 69 { 70 LineShape line = new LineShape(oldX, oldColumn.Values[i], currentX, column.Values[i], 0, lineColors[i]); 71 mainWorld.AddShape(line); 72 } 73 oldX = currentX; 74 currentX += spacing; 75 } 76 oldColumn = column; 77 } 78 else 79 { 80 oldColumn = column; 81 } 82 83 canvasUI1.Invalidate(); 84 85 // AddColumn(column.ColumnId, column.Values); 86 } 87 88 EndUpdate(); 51 // TODO an neues model interface anpassen 52 throw new NotImplementedException(); 53 54 // BeginUpdate(); 55 // 56 // // TODO clear existing shapes 57 // 58 // WorldShape mainWorld = canvasUI1.MainCanvas.WorldShape; 59 // 60 // double spacing = mainWorld.BoundingBox.Width/model.Columns.Count; 61 // double oldX = 0; 62 // double currentX = spacing; 63 // ChartDataRowsModelColumn oldColumn = null; 64 // // reload data from the model and create shapes 65 // foreach (ChartDataRowsModelColumn column in model.Columns) 66 // { 67 // if (oldColumn != null) 68 // { 69 // if (column.Values != null) 70 // { 71 // for (int i = 0; i < column.Values.Length; i++) 72 // { 73 // LineShape line = new LineShape(oldX, oldColumn.Values[i], currentX, column.Values[i], 0, lineColors[i]); 74 // mainWorld.AddShape(line); 75 // } 76 // oldX = currentX; 77 // currentX += spacing; 78 // } 79 // oldColumn = column; 80 // } 81 // else 82 // { 83 // oldColumn = column; 84 // } 85 // 86 // canvasUI1.Invalidate(); 87 // 88 // // AddColumn(column.ColumnId, column.Values); 89 // } 90 // 91 // EndUpdate(); 89 92 } 90 93 … … 146 149 protected override void AddItemEvents() 147 150 { 148 base.AddItemEvents(); 149 model.ColumnChanged += OnDataChanged; 151 // TODO an neues model interface anpassen 152 throw new NotImplementedException(); 153 // base.AddItemEvents(); 154 // model.ColumnChanged += OnDataChanged; 150 155 } 151 156 152 157 protected override void RemoveItemEvents() 153 158 { 154 base.RemoveItemEvents(); 155 model.ColumnChanged -= OnDataChanged; 159 // TODO an neues model interface anpassen 160 throw new NotImplementedException(); 161 162 // base.RemoveItemEvents(); 163 // model.ColumnChanged -= OnDataChanged; 156 164 } 157 165
Note: See TracChangeset
for help on using the changeset viewer.