alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ChartAxisLabelInfo

    Defines the axis label template point information.

    Inheritance
    object
    ChartAxisLabelInfo
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ChartAxisLabelInfo

    Constructors

    ChartAxisLabelInfo()

    Declaration
    public ChartAxisLabelInfo()

    ChartAxisLabelInfo(string, DateTime)

    Declaration
    public ChartAxisLabelInfo(string text, DateTime date)
    Parameters
    Type Name Description
    string text
    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
    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
    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>
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved