- Timestamp:
- 06/03/09 01:42:55 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/3.2/LineChart.cs
r1987 r1993 24 24 private readonly Dictionary<IDataRow, RowEntry> rowToRowEntry = new Dictionary<IDataRow, RowEntry>(); 25 25 26 private readonly ViewSettings viewSettings;27 28 26 private readonly WorldShape userInteractionShape = new WorldShape(); 29 27 private readonly RectangleShape rectangleShape = new RectangleShape(0, 0, 0, 0, Color.FromArgb(50, 0, 0, 255)); … … 55 53 56 54 this.model = model; 57 viewSettings = model.ViewSettings; 58 viewSettings.OnUpdateSettings += UpdateViewSettings; 55 this.model.ViewSettings.OnUpdateSettings += UpdateViewSettings; 59 56 60 57 Item = model; … … 87 84 /// </summary> 88 85 private void UpdateViewSettings() { 89 titleShape.Font = viewSettings.TitleFont;90 titleShape.Color = viewSettings.TitleColor;86 titleShape.Font = model.ViewSettings.TitleFont; 87 titleShape.Color = model.ViewSettings.TitleColor; 91 88 titleShape.Text = model.Title; 92 89 93 legendShape.Font = viewSettings.LegendFont;94 legendShape.Color = viewSettings.LegendColor;95 96 xAxis.Font = viewSettings.XAxisFont;97 xAxis.Color = viewSettings.XAxisColor;90 legendShape.Font = model.ViewSettings.LegendFont; 91 legendShape.Color = model.ViewSettings.LegendColor; 92 93 xAxis.Font = model.XAxis.Font; 94 xAxis.Color = model.XAxis.Color; 98 95 99 96 SetLegendPosition(); … … 242 239 /// </summary> 243 240 private void SetLegendPosition() { 244 switch ( viewSettings.LegendPosition) {241 switch (model.ViewSettings.LegendPosition) { 245 242 case LegendPosition.Bottom: 246 setLegendBottom();243 SetLegendBottom(); 247 244 break; 248 245 249 246 case LegendPosition.Top: 250 setLegendTop();247 SetLegendTop(); 251 248 break; 252 249 253 250 case LegendPosition.Left: 254 setLegendLeft();251 SetLegendLeft(); 255 252 break; 256 253 257 254 case LegendPosition.Right: 258 setLegendRight();255 SetLegendRight(); 259 256 break; 260 257 } 261 258 } 262 259 263 public void setLegendRight() { 264 // legend right 265 legendShape.BoundingBox = new RectangleD(canvasUI.Width - legendShape.GetMaxLabelLength(), 10, canvasUI.Width, 266 canvasUI.Height - 50); 260 public void SetLegendRight() { 261 legendShape.BoundingBox = new RectangleD(canvasUI.Width - legendShape.GetMaxLabelLength(), 10, canvasUI.Width, canvasUI.Height - 50); 267 262 legendShape.ClippingArea = new RectangleD(0, 0, legendShape.BoundingBox.Width, legendShape.BoundingBox.Height); 268 263 legendShape.Row = false; … … 270 265 } 271 266 272 public void setLegendLeft() { 273 // legend left 267 public void SetLegendLeft() { 274 268 legendShape.BoundingBox = new RectangleD(10, 10, canvasUI.Width, canvasUI.Height - 50); 275 269 legendShape.ClippingArea = new RectangleD(0, 0, legendShape.BoundingBox.Width, legendShape.BoundingBox.Height); 276 270 legendShape.Row = false; 277 271 legendShape.CreateLegend(); 278 279 canvasUI.Invalidate(); 280 } 281 282 public void setLegendTop() { 283 // legend top 284 legendShape.BoundingBox = new RectangleD(100, canvasUI.Height - canvasUI.Height, canvasUI.Width, 285 canvasUI.Height - 10); 272 } 273 274 public void SetLegendTop() { 275 legendShape.BoundingBox = new RectangleD(100, canvasUI.Height - canvasUI.Height, canvasUI.Width, canvasUI.Height - 10); 286 276 legendShape.ClippingArea = new RectangleD(0, 0, legendShape.BoundingBox.Width, legendShape.BoundingBox.Height); 287 277 legendShape.Row = true; … … 290 280 } 291 281 292 public void setLegendBottom() { 293 // legend bottom 282 public void SetLegendBottom() { 294 283 legendShape.BoundingBox = new RectangleD(100, 2, canvasUI.Width, canvasUI.Height); 295 284 legendShape.ClippingArea = new RectangleD(0, 0, legendShape.BoundingBox.Width, legendShape.BoundingBox.Height);
Note: See TracChangeset
for help on using the changeset viewer.