using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Microsoft.Research.DynamicDataDisplay.Charts
{
///
/// Represents a horizontal axis with values of type.
/// Can be placed only from bottom or top side of plotter.
/// By default is placed from the bottom side.
///
public class HorizontalAxis : NumericAxis
{
///
/// Initializes a new instance of the class, placed on bottom of .
///
public HorizontalAxis()
{
Placement = AxisPlacement.Bottom;
}
///
/// Validates the placement - e.g., vertical axis should not be placed from top or bottom, etc.
/// If proposed placement is wrong, throws an ArgumentException.
///
/// The new placement.
protected override void ValidatePlacement(AxisPlacement newPlacement)
{
if (newPlacement == AxisPlacement.Left || newPlacement == AxisPlacement.Right)
throw new ArgumentException(Strings.Exceptions.HorizontalAxisCannotBeVertical);
}
}
}