- Timestamp:
- 05/31/09 20:38:11 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Visualization.Test/3.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization.Test/3.2/LineChartTestForm.cs
r1530 r1981 8 8 public partial class LineChartTestForm : Form { 9 9 private readonly IView view; 10 private ChartDataRowsModel model;10 private readonly ChartDataRowsModel model; 11 11 12 12 public LineChartTestForm() { -
trunk/sources/HeuristicLab.Visualization.Test/3.2/LineChartTests.cs
r1972 r1981 15 15 16 16 [Test] 17 public void TestLineChart () {17 public void TestLineChartWithManyDataPoints() { 18 18 LineChartTestForm f = new LineChartTestForm(model); 19 19 … … 72 72 73 73 [Test] 74 public void TestGrid() { 75 LineChartTestForm f = new LineChartTestForm(model); 76 77 model.XAxis.ShowGrid = true; 78 model.XAxis.GridColor = Color.Red; 79 80 model.DefaultYAxis.ShowGrid = true; 81 model.DefaultYAxis.GridColor = Color.Blue; 82 83 IDataRow row1 = new DataRow(); 84 row1.RowSettings.Label = "row1"; 85 86 model.AddDataRow(row1); 87 88 row1.AddValue(0); 89 row1.AddValue(10); 90 91 f.ShowDialog(); 92 } 93 94 [Test] 95 public void TestShowMarkers() { 96 LineChartTestForm f = new LineChartTestForm(model); 97 98 IDataRow row1 = new DataRow(); 99 row1.RowSettings.Label = "row1"; 100 row1.RowSettings.Color = Color.Red; 101 row1.RowSettings.ShowMarkers = true; 102 103 IDataRow row2 = new DataRow(); 104 row2.RowSettings.Label = "row2"; 105 row2.RowSettings.Color = Color.Blue; 106 row2.RowSettings.ShowMarkers = false; 107 108 model.AddDataRow(row1); 109 model.AddDataRow(row2); 110 111 for (int i = 0; i < 10; i++) { 112 row1.AddValue(i); 113 row2.AddValue(i*2); 114 } 115 116 f.ShowDialog(); 117 } 118 119 [Test] 120 public void TestShowLabelOnAxes() { 121 LineChartTestForm f = new LineChartTestForm(model); 122 123 IDataRow row1 = new DataRow(); 124 IDataRow row2 = new DataRow(); 125 126 model.XAxis.Label = "X-Axis"; 127 model.XAxis.ShowLabel = true; 128 129 row1.YAxis = model.DefaultYAxis; 130 row1.YAxis.Label = "Y-Axis row1"; 131 row1.RowSettings.Color = Color.Blue; 132 row1.YAxis.ShowYAxisLabel = false; 133 134 row2.YAxis = new YAxisDescriptor(); 135 row2.YAxis.Label = "Y-Axis row2"; 136 row2.RowSettings.Color = Color.Red; 137 row2.YAxis.ShowYAxisLabel = true; 138 139 model.AddDataRow(row1); 140 model.AddDataRow(row2); 141 142 row1.AddValue(0); 143 row1.AddValue(10); 144 row1.AddValue(15); 145 row1.AddValue(16); 146 147 row2.AddValue(0); 148 row2.AddValue(20); 149 row2.AddValue(25); 150 row2.AddValue(26); 151 152 f.ShowDialog(); 153 } 154 155 [Test] 74 156 public void TestAxes() { 75 157 LineChartTestForm f = new LineChartTestForm(model); … … 88 170 89 171 yaxis1.Label = "Y-Axis 1"; 90 yaxis1.ShowYAxisLabel = true;91 172 yaxis1.Position = AxisPosition.Left; 92 yaxis1.ShowGrid = true;93 yaxis1.GridColor = Color.Gray;94 173 95 174 yaxis2.Label = "Y-Axis 2"; 96 yaxis2.ShowYAxisLabel = true;97 175 yaxis2.Position = AxisPosition.Right; 98 yaxis2.ShowGrid = false;99 176 100 177 row1.RowSettings.Color = Color.Red; 101 row1.RowSettings.Thickness = 3;102 row1.RowSettings.Style = DrawingStyle.Solid;103 178 row1.RowSettings.Label = "Die Rote"; 104 179 105 180 row2.RowSettings.Color = Color.Green; 106 row2.RowSettings.Thickness = 3;107 row2.RowSettings.Style = DrawingStyle.Solid;108 181 row2.RowSettings.Label = "Die Grüne"; 109 182 110 183 row3.RowSettings.Color = Color.Blue; 111 row3.RowSettings.Thickness = 3;112 row3.RowSettings.Style = DrawingStyle.Solid;113 184 row3.RowSettings.Label = "Die Blaue"; 114 185 row3.YAxis = yaxis2; … … 131 202 row3.AddValue(rand.NextDouble() * 1); 132 203 }; 204 205 f.ShowDialog(); 206 } 207 208 [Test] 209 public void TestDataRowWithOnlyOneValueShouldntCauseZoomLevelTooHighError() { 210 LineChartTestForm f = new LineChartTestForm(model); 211 212 IDataRow row1 = new DataRow(); 213 row1.AddValue(10); 214 215 model.AddDataRow(row1); 133 216 134 217 f.ShowDialog();
Note: See TracChangeset
for help on using the changeset viewer.