Changeset 1458 for trunk/sources/HeuristicLab.Visualization
- Timestamp:
- 03/27/09 17:48:20 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Visualization
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/Grid.cs
r1240 r1458 3 3 namespace HeuristicLab.Visualization { 4 4 public class Grid : WorldShape { 5 private Color color = Color.LightBlue; 6 5 7 public override void Draw(Graphics graphics) { 6 8 ClearShapes(); … … 12 14 LineShape line = new LineShape(ClippingArea.X1, y, 13 15 ClippingArea.X2, y, 14 Color.LightBlue, 1,16 color, 1, 15 17 DrawingStyle.Dashed); 16 18 AddShape(line); … … 23 25 LineShape line = new LineShape(x, ClippingArea.Y1, 24 26 x, ClippingArea.Y2, 25 Color.LightBlue, 1,27 color, 1, 26 28 DrawingStyle.Dashed); 27 29 AddShape(line); … … 30 32 LineShape lineZeroX = new LineShape(0, ClippingArea.Y1, 31 33 0, ClippingArea.Y2, 32 Color.LightBlue, 3,34 color, 3, 33 35 DrawingStyle.Dashed); 34 36 35 37 LineShape lineZeroY = new LineShape(ClippingArea.X1, 0, 36 38 ClippingArea.X2, 0, 37 Color.LightBlue, 3,39 color, 3, 38 40 DrawingStyle.Dashed); 39 41 … … 43 45 base.Draw(graphics); 44 46 } 47 48 public Color Color { 49 get { return color; } 50 set { color = value; } 51 } 45 52 } 46 53 } -
trunk/sources/HeuristicLab.Visualization/LineChart.cs
r1457 r1458 85 85 foreach (YAxisDescriptor yAxisDescriptor in model.YAxes) { 86 86 YAxisInfo info = GetYAxisInfo(yAxisDescriptor); 87 canvas.AddShape(info.Grid); 87 if (yAxisDescriptor.ShowGrid) { 88 info.Grid.Color = yAxisDescriptor.GridColor; 89 canvas.AddShape(info.Grid); 90 } 88 91 } 89 92 -
trunk/sources/HeuristicLab.Visualization/YAxisDescriptor.cs
r1457 r1458 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Drawing; 3 4 using HeuristicLab.Visualization.LabelProvider; 4 5 using HeuristicLab.Visualization.Test; … … 14 15 public bool ClipChangeable = true; 15 16 private AxisPosition position = AxisPosition.Left; 17 18 private bool showGrid = true; 19 private Color gridColor = Color.LightBlue; 16 20 17 21 public event YAxisDescriptorChangedHandler YAxisDescriptorChanged; … … 82 86 public AxisPosition Position { 83 87 get { return position; } 84 set { position = value; } 88 set { 89 position = value; 90 OnYAxisDescriptorChanged(); 91 } 92 } 93 94 public bool ShowGrid { 95 get { return showGrid; } 96 set { 97 showGrid = value; 98 OnYAxisDescriptorChanged(); 99 } 100 } 101 102 public Color GridColor { 103 get { return gridColor; } 104 set { 105 gridColor = value; 106 OnYAxisDescriptorChanged(); 107 } 85 108 } 86 109
Note: See TracChangeset
for help on using the changeset viewer.