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 |
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 |
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>