Class ChartDataMarker
Represents the data markers in chart series. Data markers appearance can be customized using this class.
Inheritance
Namespace: Syncfusion.SfChart.XForms
Assembly: Syncfusion.SfChart.XForms.dll
Syntax
public class ChartDataMarker : Element, IThemeElementExamples
SfChart chart = new SfChart();
LineSeries lineSeries = new LineSeries();
lineSeries.DataMarker = new ChartDataMarker();
lineSeries.DataMarker.ShowLabel = true;
lineSeries.DataMarker.LabelStyle = new DataMarkerLabelStyle();
lineSeries.DataMarker.LabelStyle.TextColor = Color.Blue;
lineSeries.DataMarker.LabelStyle.BorderColor = Color.Red;
lineSeries.DataMarker.LabelStyle.Margin = 5;
lineSeries.DataMarker.LabelStyle.LabelPosition = DataMarkerLabelPosition.Center;
chart.Series.Add(lineSeries)Constructors
ChartDataMarker()
Initializes a new instance of the ChartDataMarker class.
Declaration
public ChartDataMarker()Fields
ConnectorLineStyleProperty
Gets or sets the options for customizing the data marker's connector line. This is a bindable property.
Declaration
public static readonly BindableProperty ConnectorLineStylePropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
LabelContentProperty
Gets or sets an option that determines the content to be displayed in the data marker label. This is a bindable property.
Declaration
public static readonly BindableProperty LabelContentPropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
LabelStyleProperty
Gets or sets the options for customizing the data marker's label. This is a bindable property.
Declaration
public static readonly BindableProperty LabelStylePropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
LabelTemplateProperty
Gets or sets the DataMarkerTemplate property.
Declaration
public static readonly BindableProperty LabelTemplatePropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
MarkerBorderColorProperty
Gets or sets the border color of the data marker symbol. This is a bindable property.
Declaration
public static readonly BindableProperty MarkerBorderColorPropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
MarkerBorderWidthProperty
Gets or sets the width of the data marker border line. This is a bindable property.
Declaration
public static readonly BindableProperty MarkerBorderWidthPropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
MarkerColorProperty
Gets or sets the color of the data marker. This is a bindable property.
Declaration
public static readonly BindableProperty MarkerColorPropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
MarkerHeightProperty
Gets or sets the height of the data marker. This is a bindable property.
Declaration
public static readonly BindableProperty MarkerHeightPropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
MarkerTypeProperty
Gets or sets the icon type of the data marker. This is a bindable property.
Declaration
public static readonly BindableProperty MarkerTypePropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
MarkerWidthProperty
Gets or sets the width of the data marker. This is a bindable property.
Declaration
public static readonly BindableProperty MarkerWidthPropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
ShowLabelProperty
Gets or sets the value that indicates whether to show label for the data marker. This is a bindable property.
Declaration
public static readonly BindableProperty ShowLabelPropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
ShowMarkerProperty
Gets or sets the value that indicates whether to show marker for the data marker. This is a bindable property.
Declaration
public static readonly BindableProperty ShowMarkerPropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
UseSeriesPaletteProperty
Gets or sets the value that indicates whether to set the series color to the data marker's label background. This is a bindable property.
Declaration
public static readonly BindableProperty UseSeriesPalettePropertyField Value
| Type | 
|---|
| Xamarin.Forms.BindableProperty | 
Properties
ConnectorLineStyle
Gets or sets the options for customizing the data marker's connector line. This is a bindable property.
Declaration
public ConnectorLineStyle ConnectorLineStyle { get; set; }Property Value
| Type | Description | 
|---|---|
| ConnectorLineStyle | This property takes the ConnectorLineStyle value. | 
LabelContent
Gets or sets an option that determines the content to be displayed in the data marker label. This is a bindable property.
Declaration
public LabelContent LabelContent { get; set; }Property Value
| Type | Description | 
|---|---|
| LabelContent | This property takes the LabelContent value. | 
LabelStyle
Gets or sets the options for customizing the data marker's label. This is a bindable property.
Declaration
public DataMarkerLabelStyle LabelStyle { get; set; }Property Value
| Type | Description | 
|---|---|
| DataMarkerLabelStyle | This property takes the DataMarkerLabelStyle value. | 
LabelTemplate
The DataMarkerTemplate property sets the template for data marker of the series. This is a bindable property.
Declaration
public DataTemplate LabelTemplate { get; set; }Property Value
| Type | Description | 
|---|---|
| Xamarin.Forms.DataTemplate | This property takes the DataTemplate value. | 
MarkerBorderColor
Gets or sets the border color of the data marker symbol. This is a bindable property.
Declaration
public Color MarkerBorderColor { get; set; }Property Value
| Type | Description | 
|---|---|
| Xamarin.Forms.Color | This property takes the Xamarin.Forms.Color as its value. | 
MarkerBorderWidth
Gets or sets the width of the data marker border line. This is a bindable property.
Declaration
public double MarkerBorderWidth { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Double | This property takes the double value. | 
MarkerColor
Gets or sets the color of the data marker. This is a bindable property.
Declaration
public Color MarkerColor { get; set; }Property Value
| Type | Description | 
|---|---|
| Xamarin.Forms.Color | This property takes the Xamarin.Forms.Color as its value. | 
MarkerHeight
Gets or sets the height of the data marker. This is a bindable property.
Declaration
public double MarkerHeight { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Double | This property takes the double value. | 
MarkerType
Gets or sets the icon type of the data marker. This is a bindable property.
Declaration
public DataMarkerType MarkerType { get; set; }Property Value
| Type | Description | 
|---|---|
| DataMarkerType | This property takes the DataMarkerType value. | 
MarkerWidth
Gets or sets the width of the data marker. This is a bindable property.
Declaration
public double MarkerWidth { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Double | This property takes the double value. | 
ShowLabel
Gets or sets a value indicating whether to show label for the data marker. This is a bindable property.
Declaration
public bool ShowLabel { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | This property takes the boolean value. | 
ShowMarker
Gets or sets a value indicating whether to show marker for the data marker. This is a bindable property.
Declaration
public bool ShowMarker { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | This property takes the boolean value. | 
UseSeriesPalette
Gets or sets a value indicating whether to set the series color to the data marker's label background. This is a bindable property.
Declaration
public bool UseSeriesPalette { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | This property takes the boolean value. | 
Methods
OnBindingContextChanged()
Override this method to execute an action when the BindingContext changes.
Declaration
protected override void OnBindingContextChanged()OnParentSet()
Declaration
protected override void OnParentSet()