Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Charts/Axes/Numeric/VerticalAxis.cs @ 13398

Last change on this file since 13398 was 12503, checked in by aballeit, 10 years ago

#2283 added GUI and charts; fixed MCTS

File size: 1.1 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Media;
6
7namespace Microsoft.Research.DynamicDataDisplay.Charts
8{
9  /// <summary>
10  /// Represents a vertical axis with values of System.Double type.
11  /// Can be placed only from left or right side of plotter.
12  /// By default is placed from the left side.
13  /// </summary>
14  public class VerticalAxis : NumericAxis
15  {
16    /// <summary>
17    /// Initializes a new instance of the <see cref="VerticalAxis"/> class.
18    /// </summary>
19    public VerticalAxis()
20    {
21      Placement = AxisPlacement.Left;
22    }
23
24    /// <summary>
25    /// Validates the placement - e.g., vertical axis should not be placed from top or bottom, etc.
26    /// If proposed placement if wrong, throws an ArgumentException.
27    /// </summary>
28    /// <param name="newPlacement">The new placement.</param>
29    protected override void ValidatePlacement(AxisPlacement newPlacement)
30    {
31      if (newPlacement == AxisPlacement.Bottom || newPlacement == AxisPlacement.Top)
32        throw new ArgumentException(Strings.Exceptions.VerticalAxisCannotBeHorizontal);
33    }
34  }
35}
Note: See TracBrowser for help on using the repository browser.