Changeset 864
- Timestamp:
- 11/29/08 12:28:22 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Visualization
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/ChartDataRowsModel.cs
r859 r864 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Globalization; 3 4 using System.Xml; 4 5 using HeuristicLab.Core; … … 129 130 } 130 131 131 132 133 132 public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) { 134 133 throw new NotImplementedException(); 135 136 // XmlNode node = base.GetXmlNode(name, document, persistedObjects); 137 // 138 // foreach (ChartDataRowsModelColumn column in Columns){ 139 // XmlNode columnElement = document.CreateNode(XmlNodeType.Element, "column", null); 140 // 141 // XmlAttribute idAttr = document.CreateAttribute("id"); 142 // idAttr.Value = (column.ColumnId).ToString(); 143 // columnElement.Attributes.Append(idAttr); 144 // 145 // for (int i = 0; i < column.Values.Length; i++){ 146 // if (i == 0){ 147 // columnElement.InnerText += column.Values[i].ToString(CultureInfo.InvariantCulture.NumberFormat); 148 // } else{ 149 // columnElement.InnerText += ";" + column.Values[i].ToString(CultureInfo.InvariantCulture.NumberFormat); 150 // } 151 // } 152 // node.AppendChild(columnElement); 153 // } 154 // 155 // return node; 134 156 135 } 157 136 158 159 160 137 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) { 161 138 throw new NotImplementedException(); 162 139 163 // base.Populate(node, restoredObjects);164 //165 // foreach (XmlNode column in node.ChildNodes){166 // XmlAttributeCollection attrs = column.Attributes;167 // XmlAttribute rowIdAttr = (XmlAttribute)attrs.GetNamedItem("id");168 // int rowId = int.Parse(rowIdAttr.Value);169 // AddDataRow(rowId);170 // string[] tokens = column.InnerText.Split(';');171 // double[] data = new double[tokens.Length];172 // for (int i = 0; i < data.Length; i++){173 // if (tokens[i].Length != 0){174 // if (175 // double.TryParse(tokens[i], NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out data[i]) ==176 // false){177 // throw new FormatException("Can't parse " + tokens[i] + " as double value.");178 // }179 // }180 // }181 // Columns[rowId-1].Values = data;182 // }183 140 } 184 141 } -
trunk/sources/HeuristicLab.Visualization/ChartDataRowsModelDummy.cs
r761 r864 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Drawing; 3 4 using System.Linq; 4 5 using System.Text; … … 6 7 namespace HeuristicLab.Visualization{ 7 8 public class ChartDataRowsModelDummy : ChartDataRowsModel { 9 8 10 public ChartDataRowsModelDummy(){ 9 11 Random rand = new Random(); 10 12 11 // TODO an neues model interface anpassen 12 throw new NotImplementedException(); 13 // test rows 13 14 14 // test rows 15 // for (int i = 0; i < 10; i++){ 16 // AddDataRow(i); 17 // PushData(i, rand.NextDouble() * 1000); 18 // PushData(i, rand.NextDouble() * 1000); 19 // PushData(i, rand.NextDouble() * 1000); 20 // } 15 // TODO change to call new DataRow("Datarow 1"); 16 DataRow row1 = new DataRow(); 17 row1.Label = "Datarow 1"; 18 row1.Color = Color.Red; 19 DataRow row2 = new DataRow(); 20 row2.Label = "Datarow 2"; 21 row2.Color = Color.Blue; 22 DataRow row3 = new DataRow(); 23 row3.Label = "Datarow 3"; 24 row3.Color = Color.DeepPink; 25 26 AddDataRow(row1); 27 AddDataRow(row2); 28 AddDataRow(row3); 29 30 for (int i = 0; i < 10; i++){ 31 32 // TODO Test AddDataRow mit bereits befüllter Row 33 34 row1.AddValue(rand.NextDouble() * 100); 35 row2.AddValues(new double[] { rand.NextDouble() * 100, 36 rand.NextDouble() * 100 }); 37 row3.AddValue(11.0); 38 // TODO after implemention of modifyValue: row1.ModifyValue(row1.getval[i]+100, i); 39 } 21 40 } 22 41 }
Note: See TracChangeset
for help on using the changeset viewer.