Class StockChartDataLabelSettingsBuilder
Inheritance
Namespace: Syncfusion.EJ2.Charts
Assembly: Syncfusion.EJ2.dll
Syntax
public class StockChartDataLabelSettingsBuilder : ControlBuilder
Constructors
StockChartDataLabelSettingsBuilder()
Declaration
public StockChartDataLabelSettingsBuilder()
StockChartDataLabelSettingsBuilder(StockChartDataLabelSettings)
Declaration
public StockChartDataLabelSettingsBuilder(StockChartDataLabelSettings model)
Parameters
Type | Name | Description |
---|---|---|
StockChartDataLabelSettings | model |
Methods
Alignment(Alignment)
Specifies the alignment of the data label relative to the data point. The available options are: Near: Positions the label to the left of the data point. Center: Positions the label in the center of the data point. Far: Positions the label to the right of the data point.
Declaration
public StockChartDataLabelSettingsBuilder Alignment(Alignment value)
Parameters
Type | Name | Description |
---|---|---|
Alignment | value |
Returns
Angle(Double)
Specifies the rotation angle of the data label.
Declaration
public StockChartDataLabelSettingsBuilder Angle(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value |
Returns
Border(Object)
Configures the appearance of the border lines with options for width and color properties.
Declaration
public StockChartDataLabelSettingsBuilder Border(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value |
Returns
EnableRotation(Boolean)
If set to true, the data label will be rotated according to the specified angle.
Declaration
public StockChartDataLabelSettingsBuilder EnableRotation(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value |
Returns
Fill(String)
The background color of the data label accepts hex and rgba values as valid CSS color strings.
Declaration
public StockChartDataLabelSettingsBuilder Fill(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value |
Returns
Font(Object)
Customizes the appearance of the data label text with options for font size, color, style, weight, and family.
Declaration
public StockChartDataLabelSettingsBuilder Font(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value |
Returns
Format(String)
Used to format the data label, accepting global string formats like C
, n1
, P
, etc.
It also supports placeholders, such as {value}°C
, where {value}
represent the point data label (e.g., 20°C).
Declaration
public StockChartDataLabelSettingsBuilder Format(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value |
Returns
LabelIntersectAction(DataLabelIntersectAction)
Specifies the action to handle overlapping data labels. Available options include: None - All data labels are displayed, even if they overlap. Hide - Overlapping data labels are hidden to avoid clutter. Rotate90 - Data labels are rotated 90 degrees to avoid overlap and improve readability.
Declaration
public StockChartDataLabelSettingsBuilder LabelIntersectAction(DataLabelIntersectAction value)
Parameters
Type | Name | Description |
---|---|---|
DataLabelIntersectAction | value |
Returns
Margin(Object)
Configures the margin for the data label.
Declaration
public StockChartDataLabelSettingsBuilder Margin(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value |
Returns
Name(String)
Specifies the data source field that contains the data label value.
Declaration
public StockChartDataLabelSettingsBuilder Name(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value |
Returns
Opacity(Double)
Specifies the opacity level for the data label background, which controls its transparency.
Declaration
public StockChartDataLabelSettingsBuilder Opacity(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value |
Returns
Position(LabelPosition)
Specifies the position of the data label relative to the data point. The available options 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 in the middle of the point. Auto: Automatically selects the best position for the label based on the series and data point.
Declaration
public StockChartDataLabelSettingsBuilder Position(LabelPosition value)
Parameters
Type | Name | Description |
---|---|---|
LabelPosition | value |
Returns
Rx(Double)
Specifies the X-axis rounded corner radius for the data label.
Note that
border
values must not be null for this feature to work.
Declaration
public StockChartDataLabelSettingsBuilder Rx(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value |
Returns
Ry(Double)
Specifies the Y-axis rounded corner radius for the data label.
Note that
border
values must not be null for this feature to work.
Declaration
public StockChartDataLabelSettingsBuilder Ry(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value |
Returns
ShowZero(Boolean)
If set to true, data labels for zero values in the series are render.
Declaration
public StockChartDataLabelSettingsBuilder ShowZero(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value |
Returns
Template(String)
Custom template for the data label.
Use ${point.x}
and ${point.y}
as placeholders to display the corresponding data point values.
Declaration
public StockChartDataLabelSettingsBuilder Template(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value |
Returns
Visible(Boolean)
If set to true, data labels for the series are render. By default, it is set to false.
Declaration
public StockChartDataLabelSettingsBuilder Visible(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value |