menu

ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartAxis - ASP.NETMVC-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChartAxis

    Inheritance
    System.Object
    Syncfusion.EJ2.EJTagHelper
    ChartAxis
    ChartPrimaryXAxisChart
    ChartPrimaryYAxisChart
    Namespace: Syncfusion.EJ2.Charts
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class ChartAxis : EJTagHelper

    Constructors

    ChartAxis()

    Declaration
    public ChartAxis()

    Properties

    Border

    Configures the appearance of the border around multi-level labels, including the color, width, and type of the border.

    Declaration
    public ChartLabelBorder Border { get; set; }
    Property Value
    Type Description
    ChartLabelBorder

    The default value is null

    Coefficient

    The coefficient value adjusts the size of the polar radar chart's radius. A higher value increases the radius size, while a smaller value decreases it.

    Declaration
    public double Coefficient { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 100

    ColumnIndex

    Specifies the index of the column where the axis is associated when the chart area is divided into multiple plot areas using columns.

    Declaration
    public double ColumnIndex { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0

    CrossesAt

    Specifies the value at which the axis line intersects with the vertical axis or vice versa.

    Declaration
    public object CrossesAt { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    CrossesInAxis

    Specifies the name of the axis with which the axis line should intersect.

    Declaration
    public string CrossesInAxis { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    CrosshairTooltip

    Options to customize the appearance and behavior of the crosshair tooltip that appears when hovering over the chart.

    Declaration
    public ChartCrosshairTooltip CrosshairTooltip { get; set; }
    Property Value
    Type Description
    ChartCrosshairTooltip

    The default value is null

    Description

    A description for the axis that provides additional information about its content for screen readers.

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

    The default value is null

    DesiredIntervals

    The desiredIntervals property allows the axis to calculate intervals that are roughly equal to the specified number, promoting a more readable and evenly spaced axis.

    Declaration
    public double DesiredIntervals { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is Double.NaN

    EdgeLabelPlacement

    The edgeLabelPlacement property ensures that labels positioned at the edges of the axis do not overlap with the axis boundaries or other chart elements, offering several options to improve chart readability by managing edge labels effectively. Available options are: None: No action will be performed on edge labels. Hide: Edge labels will be hidden to prevent overlap. Shift: Edge labels will be shifted to fit within the axis bounds without overlapping.

    Declaration
    public EdgeLabelPlacement EdgeLabelPlacement { get; set; }
    Property Value
    Type Description
    EdgeLabelPlacement

    The default value is EdgeLabelPlacement.Shift

    EnableAutoIntervalOnZooming

    If set to true, the axis interval will be calculated automatically based on the zoomed range.

    Declaration
    public bool EnableAutoIntervalOnZooming { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    EnableScrollbarOnZooming

    If set to true, a scrollbar will appear while zooming to help navigate through the zoomed content.

    Declaration
    public bool EnableScrollbarOnZooming { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    EnableTrim

    If set to true, axis labels will be trimmed based on the maximumLabelWidth.

    Declaration
    public bool EnableTrim { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    EnableWrap

    Specifies whether the axis labels should be wrapped based on the specified maximumLabelWidth. When set to true, the axis labels will automatically wrap to fit within the available width defined by maximumLabelWidth.

    Declaration
    public bool EnableWrap { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    Interval

    Specifies the interval for the axis.

    Declaration
    public double Interval { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is Double.NaN

    IntervalType

    The intervalType property defines how the intervals on a date-time axis are calculated and displayed. Available options are: Auto: Automatically determines the interval type based on the data and chart settings. Years: Sets the interval of the axis in years. Months: Sets the interval of the axis in months. Days: Sets the interval of the axis in days. Hours: Sets the interval of the axis in hours. Minutes: Sets the interval of the axis in minutes.

    Declaration
    public IntervalType IntervalType { get; set; }
    Property Value
    Type Description
    IntervalType

    The default value is IntervalType.Auto

    IsComplex

    Declaration
    protected override bool IsComplex { get; }
    Property Value
    Type
    System.Boolean
    Overrides
    Syncfusion.EJ2.EJTagHelper.IsComplex

    IsIndexed

    If set to true, data points are rendered based on their index.

    Declaration
    public bool IsIndexed { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    IsInversed

    If set to true, the axis will be rendered in an inversed manner.

    Declaration
    public bool IsInversed { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    LabelFormat

    Used to format the axis label. This property accepts global string formats such as C, n1, P, etc. It also accepts placeholders like {value}°C, where {value} represents the axis label (e.g., 20°C).

    Declaration
    public string LabelFormat { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    LabelIntersectAction

    Specifies the action to take when axis labels intersect with each other. The available options are: None: Shows all labels without any modification. Hide: Hides the label if it intersects with another label. Trim: Trims the label text to fit within the available space. Wrap: Wraps the label text to fit within the available space. MultipleRows: Displays the label text in multiple rows to avoid intersection. Rotate45: Rotates the label text by 45 degrees to avoid intersection. Rotate90: Rotates the label text by 90 degrees to avoid intersection.

    Declaration
    public LabelIntersectAction LabelIntersectAction { get; set; }
    Property Value
    Type Description
    LabelIntersectAction

    The default value is LabelIntersectAction.Trim

    LabelPadding

    The labelPadding property adjusts the distance to ensure a clear space between the axis labels and the axis line.

    Declaration
    public double LabelPadding { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 5

    LabelPlacement

    The labelPlacement property controls where the category axis labels are rendered in relation to the axis ticks. Available options are: BetweenTicks: Renders the label between the axis ticks. OnTicks: Renders the label directly on the axis ticks.

    Declaration
    public LabelPlacement LabelPlacement { get; set; }
    Property Value
    Type Description
    LabelPlacement

    The default value is LabelPlacement.BetweenTicks

    LabelPosition

    The labelPosition property determines where the axis labels are rendered in relation to the axis line. Available options are: Inside: Renders the labels inside the axis line. Outside: Renders the labels outside the axis line.

    Declaration
    public AxisPosition LabelPosition { get; set; }
    Property Value
    Type Description
    AxisPosition

    The default value is AxisPosition.Outside

    LabelRotation

    The angle to which the axis label gets rotated.

    Declaration
    public double LabelRotation { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0

    LabelStyle

    This property allows defining various font settings to control how the labels are displayed on the axis.

    Declaration
    public ChartFont LabelStyle { get; set; }
    Property Value
    Type Description
    ChartFont

    The default value is null

    LineBreakAlignment

    Determines the alignment of labels when a line break occurs in the axis labels.

    Declaration
    public TextAlignment LineBreakAlignment { get; set; }
    Property Value
    Type Description
    TextAlignment

    The default value is TextAlignment.Center

    LineStyle

    Options for customizing the axis lines.

    Declaration
    public ChartAxisLine LineStyle { get; set; }
    Property Value
    Type Description
    ChartAxisLine

    The default value is null

    LogBase

    Specifies the base value for a logarithmic axis.

    Note that valueType must be set to Logarithmic for this feature to work.

    Declaration
    public double LogBase { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 10

    MajorGridLines

    Options for customizing major grid lines on the axis.

    Declaration
    public ChartMajorGridLines MajorGridLines { get; set; }
    Property Value
    Type Description
    ChartMajorGridLines

    The default value is null

    MajorTickLines

    Options for customizing major tick lines on the axis.

    Declaration
    public ChartMajorTickLines MajorTickLines { get; set; }
    Property Value
    Type Description
    ChartMajorTickLines

    The default value is null

    Maximum

    Specifies the maximum value of the axis range, which sets the upper bound of the axis and defines the largest value displayed on the chart, helping to control the visible range of data.

    Declaration
    public object Maximum { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    MaximumLabels

    Specifies the maximum number of labels per 100 pixels relative to the axis length.

    Declaration
    public double MaximumLabels { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 3

    MaximumLabelWidth

    Specifies the maximum width of an axis label.

    Declaration
    public double MaximumLabelWidth { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 34

    Minimum

    Specifies the minimum value of the axis range, which sets the lower bound of the axis and defines the smallest value that will be displayed on the chart to control the visible range of data.

    Declaration
    public object Minimum { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    MinorGridLines

    Options for customizing minor grid lines on the axis.

    Declaration
    public ChartMinorGridLines MinorGridLines { get; set; }
    Property Value
    Type Description
    ChartMinorGridLines

    The default value is null

    MinorTickLines

    Options for customizing minor tick lines on the axis.

    Declaration
    public ChartMinorTickLines MinorTickLines { get; set; }
    Property Value
    Type Description
    ChartMinorTickLines

    The default value is null

    MinorTicksPerInterval

    Specifies the number of minor ticks per interval.

    Declaration
    public double MinorTicksPerInterval { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0

    MultiLevelLabels

    Multi-level labels are used to display hierarchical or grouped labels on the axis, allowing for a more detailed and structured data representation.

    Declaration
    public List<ChartMultiLevelLabel> MultiLevelLabels { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<ChartMultiLevelLabel>

    The default value is null

    Name

    A unique identifier for an axis. To associate an axis with a series, set this name to the xAxisName or yAxisName properties of the series.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    OpposedPosition

    If set to true, the axis will render on the opposite side of its default position.

    Declaration
    public bool OpposedPosition { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    ParentPropertyName

    Declaration
    protected override string ParentPropertyName { get; }
    Property Value
    Type
    System.String
    Overrides
    Syncfusion.EJ2.EJTagHelper.ParentPropertyName

    PlaceNextToAxisLine

    Specifies whether axis elements, such as axis labels and the axis title, should be crossed by the axis line.

    Declaration
    public bool PlaceNextToAxisLine { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    PlotOffset

    Specifies the padding on the top, bottom, left and right sides of the chart area, in pixels.

    Declaration
    public double PlotOffset { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0

    PlotOffsetBottom

    Specifies the bottom padding for the chart area, in pixels.

    Declaration
    public double PlotOffsetBottom { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is Double.NaN

    PlotOffsetLeft

    Specifies the left padding for the chart area, in pixels.

    Declaration
    public double PlotOffsetLeft { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is Double.NaN

    PlotOffsetRight

    Specifies the right padding for the chart area, in pixels.

    Declaration
    public double PlotOffsetRight { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is Double.NaN

    PlotOffsetTop

    Specifies the top padding for the chart area, in pixels.

    Declaration
    public double PlotOffsetTop { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is Double.NaN

    RangePadding

    The rangePadding property determines how padding is applied to the axis range, affecting the appearance of the chart by adjusting the minimum and maximum values of the axis. Available options are: None: No padding is applied to the axis. Normal: Padding is applied based on the range calculation. Additional: The interval of the axis is added as padding to both the minimum and maximum values of the range. Round: The axis range is rounded to the nearest possible value that is divisible by the interval.

    Declaration
    public ChartRangePadding RangePadding { get; set; }
    Property Value
    Type Description
    ChartRangePadding

    The default value is ChartRangePadding.Auto

    RowIndex

    Specifies the index of the row where the axis is associated when the chart area is divided into multiple plot areas using rows.

    Declaration
    public double RowIndex { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0

    ScrollbarSettings

    Configures the scrollbar with options for customization, including appearance, behavior, and lazy loading settings.

    Declaration
    public ChartScrollbarSettings ScrollbarSettings { get; set; }
    Property Value
    Type Description
    ChartScrollbarSettings

    The default value is null

    Skeleton

    Specifies the skeleton format used for processing date-time values.

    Declaration
    public string Skeleton { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    SkeletonType

    Specifies the format type to be used in date-time formatting.

    Declaration
    public SkeletonType SkeletonType { get; set; }
    Property Value
    Type Description
    SkeletonType

    The default value is SkeletonType.DateTime

    Span

    Specifies the number of columns or rows that an axis spans horizontally or vertically.

    Declaration
    public double Span { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 1

    StartAngle

    Specifies the start angle for the series in a polar or radar chart, measured in degrees from the horizontal axis, determining the initial angle from which the series begins.

    Declaration
    public double StartAngle { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0

    StartFromZero

    If set to true, the axis starts from zero. If set to false, the axis starts from the minimum value of the data.

    Declaration
    public bool StartFromZero { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    StripLines

    Specifies the collection of strip lines for the axis, which are visual elements used to mark or highlight specific ranges.

    Declaration
    public List<ChartStripLine> StripLines { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<ChartStripLine>

    The default value is null

    TabIndex

    The tabIndex value for the axis, determining its position in the tab order.

    Declaration
    public double TabIndex { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 2

    TickPosition

    The tickPosition property determines where the axis ticks are rendered in relation to the axis line. Available options are: Inside: Renders the ticks inside the axis line. Outside: Renders the ticks outside the axis line.

    Declaration
    public AxisPosition TickPosition { get; set; }
    Property Value
    Type Description
    AxisPosition

    The default value is AxisPosition.Outside

    Title

    Specifies the title of an axis, displayed along the axis to provide context about the represented data.

    Declaration
    public string Title { get; set; }
    Property Value
    Type Description
    System.String

    The default value is ""

    TitlePadding

    Specifies the padding between the axis title and the axis labels.

    Declaration
    public double TitlePadding { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 5

    TitleRotation

    Defines an angle for rotating the axis title. By default, the angle is calculated based on the position and orientation of the axis.

    Declaration
    public double TitleRotation { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is Double.NaN

    TitleStyle

    Options for customizing the appearance of the axis title, including font family, size, style, weight, and color.

    Declaration
    public ChartFont TitleStyle { get; set; }
    Property Value
    Type Description
    ChartFont

    The default value is null

    ValueType

    The valueType property defines the type of data that the axis can manage, ensuring correct rendering based on the data type. This property supports multiple data types, each suited for different kinds of data visualization. Available options include: Double: Used for rendering a numeric axis to accommodate numeric data. DateTime: Utilized for rendering a date-time axis to manage date-time data. Category: Employed for rendering a category axis to manage categorical data. Logarithmic: Applied for rendering a logarithmic axis to handle a wide range of values. DateTimeCategory: Used to render a date-time category axis for managing business days.

    Declaration
    public ValueType ValueType { get; set; }
    Property Value
    Type Description
    ValueType

    The default value is ValueType.Double

    Visible

    If set to true, axis labels will be visible in the chart. By default, axis labels are enabled.

    Declaration
    public bool Visible { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    ZoomFactor

    The axis is scaled by this factor. When zoomFactor is 0.5, the chart is scaled by 200% along this axis.

    Note the value ranges from 0 to 1.

    Declaration
    public double ZoomFactor { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 1

    ZoomPosition

    Sets the position of the zoomed axis on the chart, with the zoomPosition property specifying the position within the zoomed range, from 0 (start) to 1 (end).

    Declaration
    public double ZoomPosition { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 0

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved