Changeset 1457 for trunk/sources/HeuristicLab.Visualization/LineChart.cs
- Timestamp:
- 03/27/09 17:34:56 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/LineChart.cs
r1390 r1457 6 6 using HeuristicLab.Visualization.Legend; 7 7 using HeuristicLab.Visualization.Options; 8 using HeuristicLab.Visualization.Test; 8 9 9 10 namespace HeuristicLab.Visualization { … … 93 94 canvas.AddShape(xAxis); 94 95 95 int yAxesWidth = 0; 96 int yAxesWidthLeft = 0; 97 int yAxesWidthRight = 0; 96 98 97 99 foreach (YAxisDescriptor yAxisDescriptor in model.YAxes) { … … 99 101 if (yAxisDescriptor.ShowYAxis) { 100 102 canvas.AddShape(info.YAxis); 101 yAxesWidth += YAxisWidth; 103 info.YAxis.Position = yAxisDescriptor.Position; 104 switch (yAxisDescriptor.Position) { 105 case AxisPosition.Left: 106 yAxesWidthLeft += YAxisWidth; 107 break; 108 case AxisPosition.Right: 109 yAxesWidthRight += YAxisWidth; 110 break; 111 default: 112 throw new NotImplementedException(); 113 } 102 114 } 103 115 } … … 111 123 titleShape.Y = canvasUI.Height - 10; 112 124 113 RectangleD linesAreaBoundingBox = new RectangleD(yAxesWidth ,125 RectangleD linesAreaBoundingBox = new RectangleD(yAxesWidthLeft, 114 126 XAxisHeight, 115 canvasUI.Width ,127 canvasUI.Width - yAxesWidthRight, 116 128 canvasUI.Height); 117 129 … … 126 138 127 139 int yAxisLeft = 0; 140 int yAxisRight = (int)linesAreaBoundingBox.X2; 141 128 142 foreach (YAxisDescriptor yAxisDescriptor in model.YAxes) { 129 143 YAxisInfo info = GetYAxisInfo(yAxisDescriptor); 130 144 if (yAxisDescriptor.ShowYAxis) { 131 info.YAxis.BoundingBox = new RectangleD(yAxisLeft, 132 linesAreaBoundingBox.Y1, 133 yAxisLeft + YAxisWidth, 134 linesAreaBoundingBox.Y2); 135 yAxisLeft += YAxisWidth; 145 switch (yAxisDescriptor.Position) { 146 case AxisPosition.Left: 147 info.YAxis.BoundingBox = new RectangleD(yAxisLeft, 148 linesAreaBoundingBox.Y1, 149 yAxisLeft + YAxisWidth, 150 linesAreaBoundingBox.Y2); 151 yAxisLeft += YAxisWidth; 152 break; 153 case AxisPosition.Right: 154 info.YAxis.BoundingBox = new RectangleD(yAxisRight, 155 linesAreaBoundingBox.Y1, 156 yAxisRight + YAxisWidth, 157 linesAreaBoundingBox.Y2); 158 yAxisRight += YAxisWidth; 159 break; 160 default: 161 throw new NotImplementedException(); 162 } 136 163 } 137 164 }
Note: See TracChangeset
for help on using the changeset viewer.