Class ChartDataLabelSettings
Inheritance
Inherited Members
Namespace: Syncfusion.EJ2.Charts
Assembly: Syncfusion.EJ2.dll
Syntax
public class ChartDataLabelSettings : EJTagHelper
Constructors
ChartDataLabelSettings()
Declaration
public ChartDataLabelSettings()
Properties
Alignment
Specifies the alignment for data Label. They are, Near: Aligns the label to the left of the point. Center: Aligns the label to the center of the point. Far: Aligns the label to the right of the point.
Declaration
[HtmlAttributeName("alignment")]
public Alignment Alignment { get; set; }
Property Value
Type | Description |
---|---|
Alignment | The default value is Syncfusion.EJ2.Charts.Alignment.Center |
Angle
Specifies angle for data label.
Declaration
[HtmlAttributeName("angle")]
public double Angle { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 0 |
Border
Option for customizing the border lines.
Declaration
[HtmlAttributeName("border")]
public ChartBorder Border { get; set; }
Property Value
Type | Description |
---|---|
ChartBorder | The default value is null |
ContentTemplate
To get or set value for ContentTemplate.
Declaration
public MvcTemplate<object> ContentTemplate { get; set; }
Property Value
Type | Description |
---|---|
MvcTemplate<System.Object> |
EnableRotation
Enables rotation for data label.
Declaration
[HtmlAttributeName("enableRotation")]
public bool EnableRotation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
Fill
The background color of the data label accepts value in hex and rgba as a valid CSS color string.
Declaration
[HtmlAttributeName("fill")]
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "transparent" |
Font
Option for customizing the data label text.
Declaration
[HtmlAttributeName("font")]
public ChartFont Font { get; set; }
Property Value
Type | Description |
---|---|
ChartFont | The default value is null |
Format
Used to format the point data label that accepts any global string format like 'C', 'n1', 'P' etc. It also accepts placeholder like '{value}°C' in which value represent the point data label, e.g, 20°C.
Declaration
[HtmlAttributeName("format")]
public string Format { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
LabelIntersectAction
Show Datalabel Even two Data Labels Are Overflow.
Declaration
[HtmlAttributeName("labelIntersectAction")]
public DataLabelIntersectAction LabelIntersectAction { get; set; }
Property Value
Type | Description |
---|---|
DataLabelIntersectAction | The default value is DataLabelIntersectAction.Hide |
Margin
Margin configuration for the data label.
Declaration
[HtmlAttributeName("margin")]
public ChartMargin Margin { get; set; }
Property Value
Type | Description |
---|---|
ChartMargin | The default value is null |
Name
The DataSource field that contains the data label value.
Declaration
[HtmlAttributeName("name")]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Opacity
The opacity for the background.
Declaration
[HtmlAttributeName("opacity")]
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 1 |
Position
Specifies the position of the data label. They are, Outer: Positions the label outside the point. top: Positions the label on top of the point. Bottom: Positions the label at the bottom of the point. Middle: Positions the label to the middle of the point. Auto: Positions the label based on series.
Declaration
[HtmlAttributeName("position")]
public LabelPosition Position { get; set; }
Property Value
Type | Description |
---|---|
LabelPosition | The default value is LabelPosition.Auto |
Rx
The roundedCornerX for the data label. It requires border
values not to be null.
Declaration
[HtmlAttributeName("rx")]
public double Rx { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 5 |
Ry
The roundedCornerY for the data label. It requires border
values not to be null.
Declaration
[HtmlAttributeName("ry")]
public double Ry { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 5 |
ShowZero
If set true, data label for zero values in series renders.
Declaration
[HtmlAttributeName("showZero")]
public bool ShowZero { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
Template
Custom template to show the data label. Use ${point.x} and ${point.y} as a placeholder text to display the corresponding data point.
Declaration
[HtmlAttributeName("template")]
public string Template { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Visible
If set true, data label for series renders.
Declaration
[HtmlAttributeName("visible")]
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |