skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI UI for Xamarin

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility and Security
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class Axis

This class represents a Chart Axis.

Inheritance
System.Object
InheritanceContextPropagator
Axis
AxisX
AxisY
Inherited Members
InheritanceContextPropagator.CreateInstanceCore()
InheritanceContextPropagator.FreezeCore(Boolean)
Namespace: Telerik.Windows.Controls.Charting
Assembly: Telerik.Windows.Controls.Charting.dll

Syntax

public abstract class Axis : InheritanceContextPropagator, ILogicalItem, INotifyPropertyChanged

Constructors

Axis()

Initializes a new instance of the Axis class.

Declaration
protected Axis()

Fields

AutoRangeProperty

Identifies the AutoRange dependency property.

Declaration
public static readonly DependencyProperty AutoRangeProperty
Field Value
System.Windows.DependencyProperty

AxisLabelsVisibilityProperty

Identifies the AxisLabelsVisibility dependency property.

Declaration
public static readonly DependencyProperty AxisLabelsVisibilityProperty
Field Value
System.Windows.DependencyProperty

AxisNameProperty

Identifies the AxisName dependency property.

Declaration
public static readonly DependencyProperty AxisNameProperty
Field Value
System.Windows.DependencyProperty

AxisStylesProperty

Identifies the AxisStyles dependency property.

Declaration
public static readonly DependencyProperty AxisStylesProperty
Field Value
System.Windows.DependencyProperty

DefaultLabelFormatProperty

Identifies the DefaultLabelFormat dependency property.

Declaration
public static readonly DependencyProperty DefaultLabelFormatProperty
Field Value
System.Windows.DependencyProperty

IsInverseProperty

Identifies the IsInverse axis dependency property.

Declaration
public static readonly DependencyProperty IsInverseProperty
Field Value
System.Windows.DependencyProperty

IsZeroBasedProperty

Identifies the Axis.IsZeroBased dependency property.

Declaration
public static readonly DependencyProperty IsZeroBasedProperty
Field Value
System.Windows.DependencyProperty

LabelRotationAngleProperty

Identifies the LabelRotationAngle dependency property.

Declaration
public static readonly DependencyProperty LabelRotationAngleProperty
Field Value
System.Windows.DependencyProperty

LabelStepProperty

Identifies the LabelStep dependency property.

Declaration
public static readonly DependencyProperty LabelStepProperty
Field Value
System.Windows.DependencyProperty

MajorGridLinesVisibilityProperty

Identifies the MajorGridLinesVisibility dependency property.

Declaration
public static readonly DependencyProperty MajorGridLinesVisibilityProperty
Field Value
System.Windows.DependencyProperty

MajorTicksVisibilityProperty

Identifies the MajorTicksVisibility dependency property.

Declaration
public static readonly DependencyProperty MajorTicksVisibilityProperty
Field Value
System.Windows.DependencyProperty

MaxValueProperty

Identifies the MaxValue dependency property.

Declaration
public static readonly DependencyProperty MaxValueProperty
Field Value
System.Windows.DependencyProperty

MinorGridLinesVisibilityProperty

Identifies the MinorGridLinesVisibility dependency property.

Declaration
public static readonly DependencyProperty MinorGridLinesVisibilityProperty
Field Value
System.Windows.DependencyProperty

MinorTickPointMultiplierProperty

Identifies the MinorTickPointMultiplier dependency property.

Declaration
public static readonly DependencyProperty MinorTickPointMultiplierProperty
Field Value
System.Windows.DependencyProperty

MinorTickPointsProperty

Identifies the MinorTickPoints dependency property.

Declaration
public static readonly DependencyProperty MinorTickPointsProperty
Field Value
System.Windows.DependencyProperty

MinorTicksVisibilityProperty

Identifies the MinorTicksVisibility dependency property.

Declaration
public static readonly DependencyProperty MinorTicksVisibilityProperty
Field Value
System.Windows.DependencyProperty

MinValueProperty

Identifies the MinValue dependency property.

Declaration
public static readonly DependencyProperty MinValueProperty
Field Value
System.Windows.DependencyProperty

PlotAreaAxisLabelsVisibilityProperty

Identifies the PlotAreaAxisLabelsVisibility dependency property.

Declaration
public static readonly DependencyProperty PlotAreaAxisLabelsVisibilityProperty
Field Value
System.Windows.DependencyProperty

PlotAreaAxisVisibilityProperty

Identifies the PlotAreaAxisVisibility dependency property.

Declaration
public static readonly DependencyProperty PlotAreaAxisVisibilityProperty
Field Value
System.Windows.DependencyProperty

StepLabelLevelCountProperty

Identifies the StepLabelLevelCountProperty dependency property.

Declaration
public static readonly DependencyProperty StepLabelLevelCountProperty
Field Value
System.Windows.DependencyProperty

StepLabelLevelHeightProperty

Identifies the StepLabelLevelHeightProperty dependency property.

Declaration
public static readonly DependencyProperty StepLabelLevelHeightProperty
Field Value
System.Windows.DependencyProperty

StepProperty

Identifies the Step dependency property.

Declaration
public static readonly DependencyProperty StepProperty
Field Value
System.Windows.DependencyProperty

StripLinesVisibilityProperty

Identifies the StripLinesVisibility dependency property.

Declaration
public static readonly DependencyProperty StripLinesVisibilityProperty
Field Value
System.Windows.DependencyProperty

TickPointsProperty

Identifies the TickPoints dependency property.

Declaration
public static readonly DependencyProperty TickPointsProperty
Field Value
System.Windows.DependencyProperty

TickPointsPropertyKey

Identifies the TickPoints dependency property key.

Declaration
protected static readonly DependencyPropertyKey TickPointsPropertyKey
Field Value
System.Windows.DependencyPropertyKey

TitleProperty

Identifies the Title dependency property.

Declaration
public static readonly DependencyProperty TitleProperty
Field Value
System.Windows.DependencyProperty

VisibilityProperty

Identifies the Visibility dependency property.

Declaration
public static readonly DependencyProperty VisibilityProperty
Field Value
System.Windows.DependencyProperty

Properties

ActualMaxValue

Gets the actual max value.

Declaration
public double ActualMaxValue { get; }
Property Value
System.Double

The actual max value.

ActualMinValue

Gets the actual calculated min value.

Declaration
public double ActualMinValue { get; }
Property Value
System.Double

The actual min value.

ActualRange

Gets the actual axis range -- the difference between ActualMaxValue and ActualMinValue.

Declaration
public double ActualRange { get; }
Property Value
System.Double

The actual range.

ActualStep

Gets the actual step.

Declaration
public double ActualStep { get; }
Property Value
System.Double

The actual step.

AutoRange

Gets or sets a value indicating whether the axis will calculate its MinValue, MaxValue and Step automatically.

Declaration
public bool AutoRange { get; set; }
Property Value
System.Boolean

True if the axis will calculate its MinValue, MaxValue and Step automatically; otherwise, false.

AxisLabelsVisibility

Gets or sets a value indicating whether the axis labels should be visible.

Declaration
public Visibility AxisLabelsVisibility { get; set; }
Property Value
System.Windows.Visibility

The default value is Visibility.Visible.

AxisName

Gets or sets the name of the Axis.

Declaration
public string AxisName { get; set; }
Property Value
System.String

The name of the Axis.

AxisStyles

Gets or sets the axis styles container.

Declaration
public AxisStyles AxisStyles { get; set; }
Property Value
AxisStyles

The axis styles container.

ChartArea

Gets or sets the chart area to which the current axis belongs.

Declaration
public ChartArea ChartArea { get; }
Property Value
ChartArea

The chart area.

DefaultLabelFormat

Gets or sets the default label format.

Declaration
public string DefaultLabelFormat { get; set; }
Property Value
System.String

The default label format.

IsInverse

Gets or sets a value indicating whether the axis should be inverted.

Declaration
public bool IsInverse { get; set; }
Property Value
System.Boolean

The default value is false.

IsZeroBased

Gets or sets a value indicating whether the values should start from 0.

Declaration
public bool IsZeroBased { get; set; }
Property Value
System.Boolean

LabelRotationAngle

Gets or sets the rotation angle that will be applied on all axis item labels.

Declaration
public double LabelRotationAngle { get; set; }
Property Value
System.Double

Gets or sets the rotation angle that will be applied on all axis item labels.

MajorGridLinesVisibility

Gets or sets a value indicating whether the major axis gridlines should be visible.

Declaration
[SRCategory("Layout")]
public Visibility MajorGridLinesVisibility { get; set; }
Property Value
System.Windows.Visibility

The default value is Visibility.Visible.

MajorTicksVisibility

Gets or sets a value indicating whether the major tick marks on the axis should be visible.

Declaration
public Visibility MajorTicksVisibility { get; set; }
Property Value
System.Windows.Visibility

The default value is Visibility.Visible.

MaxValue

Gets or sets the highest value on the axis.

Declaration
public double MaxValue { get; set; }
Property Value
System.Double

The highest value on the axis.

Remarks

Using the AddRange(Double, Double, Double) method is the preferred approach for manual axis range creation as it updates all range values in an atomic operation and avoids the performance overhead of separate processing of the MinValue, MaxValue, and Step values (when set through the respective properties).

MinorGridLinesVisibility

Gets or sets a value indicating whether the minor axis gridlines should be visible.

Declaration
[SRCategory("Layout")]
public Visibility MinorGridLinesVisibility { get; set; }
Property Value
System.Windows.Visibility

The default value is Visibility.Visible.

MinorTickPointMultiplier

Gets or sets the multiplier that would define the minor tick intervals (e.g. when the multiplier is set to 3 that means there would be 3 intervals separated by 2 minor tick points).

Declaration
public int MinorTickPointMultiplier { get; set; }
Property Value
System.Int32

MinorTickPoints

Gets or sets the minor tick points collection for the respective axis.

Declaration
public MinorTickPointCollection MinorTickPoints { get; protected set; }
Property Value
MinorTickPointCollection

MinorTicksVisibility

Gets or sets a value indicating whether the minor tick marks on the axis should be visible.

Declaration
public Visibility MinorTicksVisibility { get; set; }
Property Value
System.Windows.Visibility

The default value is Visibility.Visible.

MinValue

Gets or sets the lowest value on the axis.

Declaration
public double MinValue { get; set; }
Property Value
System.Double

The lowest value on the axis.

Remarks

Using the AddRange(Double, Double, Double) method is the preferred approach for manual axis range creation as it updates all range values in an atomic operation and avoids the performance overhead of separate processing of the MinValue, MaxValue, and Step values (when set through the respective properties).

PlotAreaAxisLabelsVisibility

Gets or sets the visibility of the labels of the corresponding axis, rendered at the zero point inside the PlotArea.

Declaration
public Visibility PlotAreaAxisLabelsVisibility { get; set; }
Property Value
System.Windows.Visibility

The plot area axis labels visibility.

PlotAreaAxisVisibility

Gets or sets the visibility of the corresponding axis, rendered at the zero point inside the PlotArea.

Declaration
[SRCategory("Layout")]
public Visibility PlotAreaAxisVisibility { get; set; }
Property Value
System.Windows.Visibility

The default value is Visibility.Visible.

SeriesMaxValue

Gets the series' max value.

Declaration
protected double SeriesMaxValue { get; }
Property Value
System.Double

The series' max value.

SeriesMinValue

Gets the series' min value.

Declaration
protected double SeriesMinValue { get; }
Property Value
System.Double

The series' min value.

Step

Gets or sets the step between axis items.

Declaration
public double Step { get; set; }
Property Value
System.Double

The step between axis items.

Remarks

Using the AddRange(Double, Double, Double) method is the preferred approach for manual axis range creation as it updates all range values in an atomic operation and avoids the performance overhead of separate processing of the MinValue, MaxValue, and Step values (when set through the respective properties).

StripLinesVisibility

Gets or sets a value indicating whether the axis strip lines should be visible.

Declaration
[SRCategory("Layout")]
public Visibility StripLinesVisibility { get; set; }
Property Value
System.Windows.Visibility

The default value is Visibility.Visible.

TickPoints

Gets or sets the tick points collection for the vertical axis. This is a dependency property.

Declaration
public TickPointCollection TickPoints { get; protected set; }
Property Value
TickPointCollection

The vertical tick points.

Title

Gets or sets the axis title.

Declaration
[SRCategory("Content")]
public string Title { get; set; }
Property Value
System.String

Visibility

Gets or sets a value indicating whether the axis should be visible.

Declaration
[SRCategory("Layout")]
public Visibility Visibility { get; set; }
Property Value
System.Windows.Visibility

The default value is Visibility.Visible.

Methods

AddRange(Double, Double, Double)

Adds the specified range of axis values. The AutoRange property must be set to false prior to calling this method, otherwise it will result in no-op.

Declaration
public void AddRange(double minValue, double maxValue, double step)
Parameters
System.Double minValue

Axis MinValue.

System.Double maxValue

Axis MaxValue.

System.Double step

Axis Step.

Remarks

This is the preferred approach for manual axis range creation as it updates all range values in an atomic operation and avoids the performance overhead of separate processing of the MinValue, MaxValue, and Step values (when set through the respective properties).

AutoRangeChangedCallback(DependencyObject, DependencyPropertyChangedEventArgs)

Called when the AutoRange property changes.

Declaration
protected static void AutoRangeChangedCallback(DependencyObject target, DependencyPropertyChangedEventArgs args)
Parameters
System.Windows.DependencyObject target

The target object.

System.Windows.DependencyPropertyChangedEventArgs args

The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

Calculate2DMaxItemsCount()

Calculates the max items count for 2D axis.

Declaration
protected abstract int Calculate2DMaxItemsCount()
Returns
System.Int32

CalculateMaxItemsCount()

Calculates the max items count.

Declaration
protected int CalculateMaxItemsCount()
Returns
System.Int32

CalculateMaxValue()

Gets the max value.

Declaration
protected double CalculateMaxValue()
Returns
System.Double

CalculateMinValue()

Gets the min value.

Declaration
protected double CalculateMinValue()
Returns
System.Double

CalculateNumberOfSteps()

Calculates the number of steps in the axis.

Declaration
public double CalculateNumberOfSteps()
Returns
System.Double

ConvertDataUnitsToPhysical(Double)

Converts the data units to physical pixels.

Declaration
public double ConvertDataUnitsToPhysical(double inputRange)
Parameters
System.Double inputRange

The input range.

Returns
System.Double

ConvertPhysicalUnitsToData(Double)

Converts physical pixels to data units.

Declaration
public abstract double ConvertPhysicalUnitsToData(double inputValue)
Parameters
System.Double inputValue

The input value.

Returns
System.Double

Returns data units measured by the current axis.

InitializeAxisValues()

Initializes the axis values (MinValue, MaxValue, Step).

Declaration
protected virtual void InitializeAxisValues()

InitializeAxisValuesForAutoRange()

Initializes the axis values (MinValue, MaxValue, Step) when AutoRange is enabled.

Declaration
protected abstract void InitializeAxisValuesForAutoRange()

InvalidateRange()

Invalidates the Axis range.

Declaration
protected void InvalidateRange()

MaxValueChangedCallback(DependencyObject, DependencyPropertyChangedEventArgs)

Called when the MaxValue property changes.

Declaration
protected static void MaxValueChangedCallback(DependencyObject target, DependencyPropertyChangedEventArgs args)
Parameters
System.Windows.DependencyObject target

The target object.

System.Windows.DependencyPropertyChangedEventArgs args

The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

MinValueChangedCallback(DependencyObject, DependencyPropertyChangedEventArgs)

Called when the MinValue property changes.

Declaration
protected static void MinValueChangedCallback(DependencyObject target, DependencyPropertyChangedEventArgs args)
Parameters
System.Windows.DependencyObject target

The target object.

System.Windows.DependencyPropertyChangedEventArgs args

The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

ScaleManualStepOnZoom(Double)

Calculates the manual step on zoom.

Declaration
protected virtual double ScaleManualStepOnZoom(double step)
Parameters
System.Double step

The step.

Returns
System.Double

StepChangedCallback(DependencyObject, DependencyPropertyChangedEventArgs)

Called when the Step property changes.

Declaration
protected static void StepChangedCallback(DependencyObject target, DependencyPropertyChangedEventArgs args)
Parameters
System.Windows.DependencyObject target

The target object.

System.Windows.DependencyPropertyChangedEventArgs args

The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

UpdateAxisValuesOnZoom(ref Double, ref Double, ref Double)

Updates the axis values on zoom in scenarios with manual axis range.

Declaration
protected virtual void UpdateAxisValuesOnZoom(ref double minValue, ref double maxValue, ref double step)
Parameters
System.Double minValue

The min value.

System.Double maxValue

The max value.

System.Double step

The step.

UpdateRange()

Updates the range of the Axis.

Declaration
protected virtual void UpdateRange()

VerifySeriesDataIsValid()

Verifies the series data is valid.

Declaration
protected bool VerifySeriesDataIsValid()
Returns
System.Boolean

Events

AxisStyleChanged

Occurs when the axis style has changed.

Declaration
public event EventHandler<UserStyleChangedEventArgs> AxisStyleChanged
Event Type
System.EventHandler<UserStyleChangedEventArgs>

PropertyChanged

Occurs when a property value changes.

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler

RangeChanged

This event supports the RadChart infrastructure and is not meant to be directly used by your code.

Declaration
public event EventHandler RangeChanged
Event Type
System.EventHandler

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.