Class ChartDataLabel
Represents chart data label class.
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.Chart.WinUI.dll
Syntax
public class ChartDataLabel : ChartSegment, INotifyPropertyChanged
Constructors
ChartDataLabel()
Initializes a new instance of the ChartDataLabel class.
Declaration
public ChartDataLabel()
ChartDataLabel(Double, Double, Double, Double, ChartSeriesBase)
Initializes a new instance of the ChartDataLabel class.
Declaration
public ChartDataLabel(double xVal, double yVal, double x, double y, ChartSeriesBase series)
Parameters
Type | Name | Description |
---|---|---|
System.Double | xVal | Used to specify the xvalue. |
System.Double | yVal | Used to specify the yvalue. |
System.Double | x | Used to specify the x position. |
System.Double | y | Used to specify the y position. |
ChartSeriesBase | series | Used to specify the series. |
Fields
BackgroundProperty
Identifies the Background dependency property.
Declaration
public static readonly DependencyProperty BackgroundProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
BorderBrushProperty
Identifies the BorderBrush dependency property.
Declaration
public static readonly DependencyProperty BorderBrushProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
BorderThicknessProperty
Identifies the BorderThickness dependency property.
Declaration
public static readonly DependencyProperty BorderThicknessProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
ConnectorHeightProperty
Identifies the ConnectorHeight dependency property.
Declaration
public static readonly DependencyProperty ConnectorHeightProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
ConnectorRotationProperty
Identifies the ConnectorRotation dependency property.
Declaration
public static readonly DependencyProperty ConnectorRotationProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
FontFamilyProperty
Identifies the FontFamily dependency property.
Declaration
public static readonly DependencyProperty FontFamilyProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
FontSizeProperty
Identifies the FontSize dependency property.
Declaration
public static readonly DependencyProperty FontSizeProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
FontStyleProperty
Identifies the FontStyle dependency property.
Declaration
public static readonly DependencyProperty FontStyleProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
ForegroundProperty
Identifies the Foreground dependency property.
Declaration
public static readonly DependencyProperty ForegroundProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
MarginProperty
Identifies the Margin dependency property.
Declaration
public static readonly DependencyProperty MarginProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty | The identifier for |
Properties
Background
Gets or sets the background brush to apply to the data label content.
Declaration
public Brush Background { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush | The Microsoft.UI.Xaml.Media.Brush value. |
BorderBrush
Gets or sets the brush that draws the outer border color.
Declaration
public Brush BorderBrush { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush | The Microsoft.UI.Xaml.Media.Brush value. |
BorderThickness
Gets or sets the outer border thickness of the data label.
Declaration
public Thickness BorderThickness { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Thickness |
ConnectorHeight
Gets or sets the height of the connector line.
Declaration
public double ConnectorHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
ConnectorRotation
Gets or sets the rotation angle for the connectors.
Declaration
public double ConnectorRotation { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Content
Gets the actual content displayed visually. Actual content is resolved based on Context.
Declaration
public object Content { get; }
Property Value
Type | Description |
---|---|
System.Object |
FontFamily
Gets or sets the font family for the data label.
Declaration
public FontFamily FontFamily { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.FontFamily |
Remarks
Identifies font family that should be used to display datalabel's text.
FontSize
Gets or sets the font size for the label.
Declaration
public double FontSize { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It takes the double value and its default value is 0. |
FontStyle
Gets or sets the font style for the adornment.
Declaration
public FontStyle FontStyle { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Text.FontStyle |
Foreground
Gets or sets the foreground brush to be applied for the data label content.
Declaration
public Brush Foreground { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Media.Brush | The Microsoft.UI.Xaml.Media.Brush value. |
Margin
Gets or sets the outer margin of a label.
Declaration
public Thickness Margin { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.Thickness |
Series
Gets or sets series property.
Declaration
public ChartSeriesBase Series { get; protected set; }
Property Value
Type | Description |
---|---|
ChartSeriesBase | The ChartSeriesBase value. |
X
Gets or sets the x screen coordinate relative to series
Declaration
public double X { get; }
Property Value
Type | Description |
---|---|
System.Double |
XData
Gets or sets the x-value to be bind in ChartAdornment.
Declaration
public double XData { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Y
Gets or sets the y screen coordinate relative to series
Declaration
public double Y { get; }
Property Value
Type | Description |
---|---|
System.Double |
YData
Gets or sets the y-value to be bind in ChartAdornment.
Declaration
public double YData { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
CreateVisual(Size)
Used for creating UIElement for rendering this segment. This method is not intended to be called explicitly outside the Chart but it can be overriden by any derived class.
Declaration
public override UIElement CreateVisual(Size size)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Size | size | Size of the panel |
Returns
Type | Description |
---|---|
Microsoft.UI.Xaml.UIElement | retuns UIElement |
Overrides
GetRenderedVisual()
Gets the UIElement used for rendering this segment.
Declaration
public override UIElement GetRenderedVisual()
Returns
Type | Description |
---|---|
Microsoft.UI.Xaml.UIElement | reurns UIElement |
Overrides
OnSizeChanged(Size)
Called whenever the segment's size changed. This method is not intended to be called explicitly outside the Chart but it can be overriden by any derived class.
Declaration
public override void OnSizeChanged(Size size)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Size | size |
Overrides
SetData(Double[])
Sets the values for this segment. This method is not intended to be called explicitly outside the Chart but it can be overriden by any derived class.
Declaration
public override void SetData(params double[] Values)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | Values |
Overrides
Update(IChartTransformer)
Updates the segments based on its data point value. This method is not intended to be called explicitly outside the Chart but it can be overriden by any derived class.
Declaration
public override void Update(IChartTransformer transformer)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.UI.Xaml.Charts.IChartTransformer | transformer | Reresents the view port of chart control.(refer Syncfusion.UI.Xaml.Charts.IChartTransformer) |