Skip to end of metadata
Go to start of metadata

Remarks

LinearAxis is a range axis type that puts numeric values evenly between a Minimum and Maximum value along a chart axis. By default, it determines Minimum, Maximum, and Interval values from the charting data to fit all of the chart elements on the screen.

You can also explicitly set specific values for these properties. because it is range type you can specify the Interval between value, and also how much interval count by using MaximumIntervalCount

Example

XAML


Definition

public class LinearAxis : NumericAxis

Summary

The following table summarizes the members exposed in this class.

Public Constructors

LinearAxis Constructor()Instantiates a new instance of the LinearAxis class.

Public Properties

ActualIntervalGets the actual interval of the axis.
IntervalGets or sets the axis interval.
IsAlternatingGridLineGets or sets a value that indicates status AlternatingGridLine or not
MaximumIntervalCountGets the maximum interval count when auto interval mode is used.

Protected Properties

ActualDoubleRangeGets the actual range of double values.

Fields

ActualIntervalPropertyIdentifies the ActualInterval dependency property.
IntervalPropertyIdentifies the Interval dependency property.
IsAlternatingGridLinePropertyIdentifies the IsAlternatingGridLine dependency property.
MaximumIntervalCountPropertyIdentifies the MaximumIntervalCount dependency property.

Protected Methods

CalculateActualInterval(Size)Returns the actual interval to use to determine which values are displayed in the axis.
GetLabelValues(Size)Returns a sequence of values to plot on the axis.
GetMajorTickMarkValues(Size)Returns a sequence of values to create major tick marks for.
GetPlotAreaCoordinate(object, double)Returns the plot area coordinate of a value.
GetPlotAreaCoordinate(object, Range<IComparable>, double)Returns the plot area coordinate of a value.
GetValueAtPosition(UnitValue)Returns the value range given a plot area coordinate.
OnActualRangeChanged(Range<IComparable>)Updates ActualDoubleRange when ActualRange changes.
OverrideDataRange(Range<IComparable>)Overrides the actual range to ensure that it is never set to an empty range.

Public Constructors

public LinearAxis()

Instantiates a new instance of the LinearAxis class.

Public Properties

public double ActualInterval { get; }

Gets the actual interval of the axis.

public Nullable<double> Interval { get; set; }

Gets or sets the axis interval.

public bool IsAlternatingGridLine { get; set; }

Gets or sets a value that indicates status AlternatingGridLine or not

public int MaximumIntervalCount { get; set; }

Gets the maximum interval count when auto interval mode is used.

Protected Properties

protected Range<double> ActualDoubleRange { get; }

Gets the actual range of double values.

Fields

public static readonly DependencyProperty ActualIntervalProperty

Identifies the ActualInterval dependency property.

public static readonly DependencyProperty IntervalProperty

Identifies the Interval dependency property.

public static readonly DependencyProperty IsAlternatingGridLineProperty

Identifies the IsAlternatingGridLine dependency property.

public static readonly DependencyProperty MaximumIntervalCountProperty

Identifies the MaximumIntervalCount dependency property.

Protected Methods

protected double CalculateActualInterval(Size availableSize)

Returns the actual interval to use to determine which values are displayed in the axis.

Parameters

availableSizeThe available size.

Return Types

Actual interval to use to determine which values are displayed in the axis.

 

protected IEnumerable<IComparable> GetLabelValues(Size availableSize)

Returns a sequence of values to plot on the axis.

Parameters

availableSizeThe available size.

Return Types

A sequence of values to plot on the axis.

 

protected IEnumerable<IComparable> GetMajorTickMarkValues(Size availableSize)

Returns a sequence of values to create major tick marks for.

Parameters

availableSizeThe available size.

Return Types

A sequence of values to create major tick marks for.

 

protected UnitValue GetPlotAreaCoordinate(object value, double length)

Returns the plot area coordinate of a value.

Parameters

valueThe value to plot.
lengthThe length of axis.

Return Types

The plot area coordinate of a value.

 

protected UnitValue GetPlotAreaCoordinate(object value, Range<IComparable> currentRange, double length)

Returns the plot area coordinate of a value.

Parameters

valueThe value to plot.
currentRangeThe range of values.
lengthThe length of axis.

Return Types

The plot area coordinate of a value.

 

protected IComparable GetValueAtPosition(UnitValue value)

Returns the value range given a plot area coordinate.

Parameters

valueThe plot area position.

Return Types

The value at that plot area coordinate.

 

protected void OnActualRangeChanged(Range<IComparable> range)

Updates ActualDoubleRange when ActualRange changes.

Parameters

rangeNew ActualRange value.

 

protected Range<IComparable> OverrideDataRange(Range<IComparable> range)

Overrides the actual range to ensure that it is never set to an empty range.

Parameters

rangeThe range to override.

Return Types

Returns the overridden range.
  • No labels