Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Charts/Axes/TimeSpan/VerticalTimeSpanAxis.cs @ 12503

Last change on this file since 12503 was 12503, checked in by aballeit, 9 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;
5
6namespace Microsoft.Research.DynamicDataDisplay.Charts
7{
8  /// <summary>
9  /// Represents a vertical axis with values of <see cref="TimeSpan"/> type.
10  /// </summary>
11  public class VerticalTimeSpanAxis : TimeSpanAxis
12  {
13    /// <summary>
14    /// Initializes a new instance of the <see cref="VerticalTimeSpanAxis"/> class, placed (by default) on the left side of <see cref="ChartPlotter"/>.
15    /// </summary>
16    public VerticalTimeSpanAxis()
17    {
18      Placement = AxisPlacement.Left;
19    }
20
21    /// <summary>
22    /// Validates the placement - e.g., vertical axis should not be placed from top or bottom, etc.
23    /// If proposed placement is wrong, throws an ArgumentException.
24    /// </summary>
25    /// <param name="newPlacement">The new placement.</param>
26    protected override void ValidatePlacement(AxisPlacement newPlacement)
27    {
28      if (newPlacement == AxisPlacement.Bottom || newPlacement == AxisPlacement.Top)
29        throw new ArgumentException(Strings.Exceptions.VerticalAxisCannotBeHorizontal);
30    }
31  }
32}
Note: See TracBrowser for help on using the repository browser.