Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 |
|
---|
6 | namespace 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.