Class DataLabel
Inherited Members
Namespace: Syncfusion.JavaScript.DataVisualization.Models
Assembly: Syncfusion.EJ.dll
Syntax
public class DataLabel : EJTagHelper
Constructors
DataLabel()
Declaration
public DataLabel()
Properties
Angle
Gets or sets the Angle of data label, which rotates the data label text based on angle value provided for data label.
Declaration
[JsonProperty("angle")]
public double Angle { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Remarks
Angle of the data label in degrees. Only the text gets rotated, whereas the background and border does not rotate.
Border
Gets or sets the Border of data label, which provides an option to customize the all four sides of the data label rectangle.
Declaration
[JsonProperty("border")]
public ChartBorder Border { get; set; }
Property Value
Type | Description |
---|---|
ChartBorder |
Remarks
Options for customizing the border of the data label.
ConnectorLine
Gets or sets the ConnectorLine of data label, which provides an option to customize the connector line of data label.
Declaration
[JsonProperty("connectorLine")]
public ConnectorLine ConnectorLine { get; set; }
Property Value
Type | Description |
---|---|
ConnectorLine |
Remarks
Options for displaying and customizing the line that connects point and data label.
ConnectorType
Gets or sets the connectorType of data label, which provides an option to customize the connector line type.
Declaration
[JsonProperty("connectorType")]
[JsonConverter(typeof(StringEnumConverter))]
public ConnectorType ConnectorType { get; set; }
Property Value
Type | Description |
---|---|
ConnectorType |
Remarks
Specifies connector type for data label.
EnableContrastColor
Gets or sets the saturation for the data label, which changes the data label text color based on background color.
Declaration
[JsonProperty("enableContrastColor")]
public bool EnableContrastColor { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
saturation for data label .
EnableWrap
Gets or sets the mode of data label, which wraps the data label when its width exceeds the maximum width.
Declaration
[JsonProperty("enableWrap")]
public bool EnableWrap { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
mode of the data label.
Fill
Gets or sets the Fill color of data label, which provides an option to customize the background color of data label rectangle.
Declaration
[JsonProperty("fill")]
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Background color of the data label.
Font
Gets or sets the Font of data label, which provides an option to customize the font size, color, opacity, weight of data label text.
Declaration
[JsonProperty("font")]
public ChartFont Font { get; set; }
Property Value
Type | Description |
---|---|
ChartFont |
Remarks
Options for customizing the data label font.
HorizontalTextAlignment
Gets or sets the HorizontalTextAlignment of data label, which displays the data label text horizontally either in near, far or center.
Declaration
[JsonProperty("horizontalTextAlignment")]
[JsonConverter(typeof(StringEnumConverter))]
public TextAlignment HorizontalTextAlignment { get; set; }
Property Value
Type | Description |
---|---|
TextAlignment |
Remarks
Horizontal alignment of the data label.
IsReversed
Gets or sets the value of isReversed property in datalabel, which renders the data label either far or near based on alignment.
Declaration
[JsonProperty("isReversed")]
public bool IsReversed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Enables or disables RTL for datalabel based on horizontalTextAlignment property.
Margin
Gets or sets the Margin of data label, which positions the data label text based on the provided margin value for data label.
Declaration
[JsonProperty("margin")]
public Margin Margin { get; set; }
Property Value
Type | Description |
---|---|
Margin |
Remarks
Margin of the text to its background shape. The size of the background shape increases based on the margin applied to its text.
MaximumLabelWidth
Gets or sets the max width of data label, which renders data label based on spcified maximum label with for data label.
Declaration
[JsonProperty("maximumLabelWidth")]
public double? MaximumLabelWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> |
Remarks
maxwdith of the data label.
Offset
Gets or sets the Offset of data label, which provides an option to customize the data label position vertically.
Declaration
[JsonProperty("offset")]
public object Offset { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Remarks
Moves the label vertically by specified offset.
Opacity
Gets or sets the Opacity of data label, which changes the data label text opacity based on specifies opacity value.
Declaration
[JsonProperty("opacity")]
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Remarks
Opacity of the data label.
Shape
Gets or sets the Shape of data label, which provides an option to customize the data label text background shape.
Declaration
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty("shape")]
public ChartShape Shape { get; set; }
Property Value
Type | Description |
---|---|
ChartShape |
Remarks
Background shape of the data label.
ShowEdgeLabels
Gets or sets the position of the datalabel, which displays the data label inside chart area when it is rendered outside.
Declaration
[JsonProperty("showEdgeLabels")]
public bool ShowEdgeLabels { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
displays the datalabel inside the chart area
Template
Gets or sets the Template for data label, which displays the data label text based on div created by specifying the div name for template property.
Declaration
[JsonProperty("template")]
public string Template { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Custom template to format the data label content. Use �point.x� and �point.y� as a placeholder text to display the corresponding data point�s x and y value.
TextMappingName
Gets or sets TextMappingName of data label, which specifies the property name in data source to display the data label text.
Declaration
[JsonProperty("textMappingName")]
public string TextMappingName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Name of a field in data source, where data label text is displayed.
TextPosition
Declaration
[JsonProperty("textPosition")]
[JsonConverter(typeof(StringEnumConverter))]
public TextPosition TextPosition { get; set; }
Property Value
Type | Description |
---|---|
TextPosition |
VerticalTextAlignment
Gets or sets the VerticalTextAlignment of data label, which displays the data label text vertically either in near, far or center.
Declaration
[JsonProperty("verticalTextAlignment")]
[JsonConverter(typeof(StringEnumConverter))]
public TextAlignment VerticalTextAlignment { get; set; }
Property Value
Type | Description |
---|---|
TextAlignment |
Remarks
Vertical alignment of the data label.
Visible
Gets or sets Visible property of data label, which shows or hides the data label of each series data point.
Declaration
[JsonProperty("visible")]
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Controls the visibility of the data labels.
Methods
ShouldSerializeBorder()
Declaration
public bool ShouldSerializeBorder()
Returns
Type | Description |
---|---|
System.Boolean |
ShouldSerializeConnectorLine()
Declaration
public bool ShouldSerializeConnectorLine()
Returns
Type | Description |
---|---|
System.Boolean |
ShouldSerializeFont()
Declaration
public bool ShouldSerializeFont()
Returns
Type | Description |
---|---|
System.Boolean |
ShouldSerializeMargin()
Declaration
public bool ShouldSerializeMargin()
Returns
Type | Description |
---|---|
System.Boolean |