alexa
menu

Blazor Toolkit

    Show / Hide Table of Contents

    Class ChartAxisLineStyle

    Represents the style settings for a chart axis line, enabling customization of color, width, and dash patterns.

    Inheritance
    System.Object
    SfBaseComponent
    ChartSubComponent
    ChartAxisLineStyle
    Implements
    System.IAsyncDisposable
    Inherited Members
    SfBaseComponent.DisposeAsync()
    Namespace: Syncfusion.Blazor.Toolkit.Charts
    Assembly: Syncfusion.Blazor.Toolkit.dll
    Syntax
    public class ChartAxisLineStyle : ChartSubComponent, IAsyncDisposable, ISubcomponentTracker

    Constructors

    ChartAxisLineStyle()

    Declaration
    public ChartAxisLineStyle()

    Properties

    Color

    Gets or sets the color of the axis line.

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

    A string representing the color of the axis line. The default value is #b5b5b5.

    Remarks

    Use valid hex or rgba CSS color strings for the color value to ensure the correct presentation of the axis line in charts.

    Examples
    // The following code demonstrates setting a customize color for the axis line.
    <SfChart>
        <ChartPrimaryXAxis>
            <ChartAxisLineStyle Width="3" Color="red" />
        </ChartPrimaryXAxis>
        <ChartPrimaryYAxis>
            <ChartAxisLineStyle Width="3" Color="red" />
        </ChartPrimaryYAxis>
        <ChartSeries DataSource="@WeatherReports" XName="X" YName="Y" />
    </SfChart>

    DashArray

    Gets or sets the dash array of the axis line.

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

    A string representing the dash array of the axis line. The default value is an empty string.

    Remarks

    This property allows customization of the axis line's stroke pattern. Use a series of numbers to define the dash and gap lengths (e.g., "5,2,1" for a pattern of 5px dash, 2px gap, 1px dash).

    Examples
    // The following code demonstrates setting a customize color for the axis line.
    <SfChart>
        <ChartPrimaryXAxis>
            <ChartAxisLineStyle Width="3" DashArray="5,1" />
        </ChartPrimaryXAxis>
        <ChartPrimaryYAxis>
            <ChartAxisLineStyle Width="3" DashArray="5,1" />
        </ChartPrimaryYAxis>
        <ChartSeries DataSource="@WeatherReports" XName="X" YName="Y" />
    </SfChart>

    Width

    Gets or sets the width of the axis line in pixels.

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

    The double value representing the width of the axis line in pixels. The default value is 1.

    Remarks

    This property specifies the thickness of the axis line, allowing for visual emphasis as necessary.

    Examples
    // The following code demonstrates setting a customize width for the axis line.
    <SfChart>
        <ChartPrimaryXAxis>
            <ChartAxisLineStyle Width="3" />
        </ChartPrimaryXAxis>
        <ChartPrimaryYAxis>
            <ChartAxisLineStyle Width="3" />
        </ChartPrimaryYAxis>
        <ChartSeries DataSource="@WeatherReports" XName="X" YName="Y" />
    </SfChart>

    Implements

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