menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartAxisLabelInfo - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChartAxisLabelInfo

    Defines the axis label template point information.

    Inheritance
    System.Object
    ChartAxisLabelInfo
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ChartAxisLabelInfo : Object

    Constructors

    ChartAxisLabelInfo()

    Declaration
    public ChartAxisLabelInfo()

    ChartAxisLabelInfo(String, DateTime)

    Declaration
    public ChartAxisLabelInfo(string text, DateTime date)
    Parameters
    Type Name Description
    System.String text
    System.DateTime date

    Properties

    DateTimeLabel

    Gets the DateTime object for the current axis label in the DateTime axis, which can be used for display in the axis label template.

    Declaration
    public DateTime DateTimeLabel { get; set; }
    Property Value
    Type Description
    System.DateTime

    A DateTime value representing the text to be displayed in the DateTime axis labels.

    Remarks

    This property can be used to display date and time details in axis label templates for DateTime axes.

    Examples
     
    
    <SfChart> 
        <ChartPrimaryXAxis> 
            <LabelTemplate> 
                @{ 
                    var data = context as ChartAxisLabelInfo; 
                } 
                <div>@data.DateTimeValue.Month.ToString() </div> 
            </LabelTemplate> 
        </ChartPrimaryXAxis> 
    </SfChart> 

    Text

    Gets the text for each label in the axis, which can be used to display in the axis label template.

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

    A string value representing text to be displayed in the axis labels.

    Remarks

    This text can be used to display in the axis label templates for axis types such as category, numeric, and logarithmic.

    Examples
     
    
    <SfChart> 
        <ChartPrimaryXAxis> 
            <LabelTemplate> 
                @{ 
                    var data = context as ChartAxisLabelInfo; 
                } 
                <div>@data.Text</div> 
            </LabelTemplate> 
        </ChartPrimaryXAxis> 
    </SfChart> 
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved