Class ChartAdornmentInfo
Represents adornments class configuration.
Inheritance
Namespace: Syncfusion.Windows.Chart
Assembly: Syncfusion.Chart.Wpf.dll
Syntax
public sealed class ChartAdornmentInfo : DependencyObject, IDisposable, IChartSerializer
Remarks
Chart adornments are used to show additional information about displaying series.
Examples
XAML:
<!--Chart with Adornments-->
<sfchart:Chart>
<sfchart:ChartArea Background="LightGray" GridBackground="White">
<sfchart:ChartSeries Type="Column" >
<sfchart:ChartSeries.AdornmentsInfo>
<sfchart:ChartAdornmentInfo
LabelContentPath="DataPoint.X" Visible="True" />
</sfchart:ChartSeries.AdornmentsInfo>
</sfchart:ChartSeries>
</sfchart:ChartArea>
</sfchart:Chart>
C#:
ChartSeries series = Chart1.Areas[0].Series[0];
ChartAdornmentInfo adornments = series.AdornmentsInfo;
adornments.LabelContentPath = "DataPoint.X";
adornments.Visible = true;
Constructors
ChartAdornmentInfo()
Declaration
public ChartAdornmentInfo()
Fields
AdornmentFontStretchProperty
Identifies the AdornmentFontStrech dependency property.
Declaration
public static readonly DependencyProperty AdornmentFontStretchProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
AdornmentForegroundProperty
Identifies the AdornmentForeground dependency property.
Declaration
public static readonly DependencyProperty AdornmentForegroundProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
AdornmentMarginProperty
Identifies the AdornmentMargin dependency property.
Declaration
public static readonly DependencyProperty AdornmentMarginProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
AdornmentsPositionProperty
Identifies the AdornmentsPosition dependency property.
Declaration
public static readonly DependencyProperty AdornmentsPositionProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
AdornmentWrappingProperty
Identifies the AdornmentWrapping dependency property.
Declaration
public static readonly DependencyProperty AdornmentWrappingProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ConnectorTemplateProperty
Identifies the ConnectorTemplate dependency property.
Declaration
public static readonly DependencyProperty ConnectorTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HorizontalAlignmentProperty
Identifies the Horizontalalignment dependency property.
Declaration
public static readonly DependencyProperty HorizontalAlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsLabelRotateProperty
Identifies the IsLabelRotate dependency property.
Declaration
public static readonly DependencyProperty IsLabelRotateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsSegmentAlignmentProperty
Identifies the IsSegmentAlignment dependency property.
Declaration
public static readonly DependencyProperty IsSegmentAlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelContentPathProperty
Identifies the LabelContentPath dependency property.
Declaration
public static readonly DependencyProperty LabelContentPathProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelTemplateProperty
Identifies the LabelTemplate dependency property.
Declaration
public static readonly DependencyProperty LabelTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LineTemplateProperty
Identifies the LineTemplate dependency property.
Declaration
public static readonly DependencyProperty LineTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
OffsetXProperty
Identifies the OffsetX dependency property.
Declaration
public static readonly DependencyProperty OffsetXProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
OffsetYProperty
Identifies the OffsetY dependency property.
Declaration
public static readonly DependencyProperty OffsetYProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SegmentHorizontalAlignmentProperty
Identifies the SegmentHorizontalAlignment dependency property.
Declaration
public static readonly DependencyProperty SegmentHorizontalAlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SegmentIsOutProperty
Identifies the SegmentIsOut dependency property.
Declaration
public static readonly DependencyProperty SegmentIsOutProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SegmentLabelContentProperty
Identifies the SegmentLabelContent dependency property.
Declaration
public static readonly DependencyProperty SegmentLabelContentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SegmentLabelDataTimeFormatProperty
Identifies the SegmentLabelDataTimeFormat dependency property.
Declaration
public static readonly DependencyProperty SegmentLabelDataTimeFormatProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SegmentLabelFontFamilyProperty
Identifies the SegmentLabelFontFamily dependency property.
Declaration
public static readonly DependencyProperty SegmentLabelFontFamilyProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SegmentLabelFontSizeProperty
Identifies the SegmentLabelFontSize dependency property.
Declaration
public static readonly DependencyProperty SegmentLabelFontSizeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SegmentLabelFontWeightProperty
Identifies the SegmentLabelFontWeight dependency property.
Declaration
public static readonly DependencyProperty SegmentLabelFontWeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SegmentLabelFormatProperty
Identifies the SegmentLabelFormat dependency property.
Declaration
public static readonly DependencyProperty SegmentLabelFormatProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SegmentLabelRotationProperty
Identifies the SegmentLabelRotation dependency property.
Declaration
public static readonly DependencyProperty SegmentLabelRotationProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SegmentShowLineProperty
Identifies the SegmentShowLine dependency property.
Declaration
public static readonly DependencyProperty SegmentShowLineProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SegmentVerticalAlignmentProperty
Identifies the SegmentVerticalAlignmen dependency property.
Declaration
public static readonly DependencyProperty SegmentVerticalAlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolHeightProperty
Identifies the SymbolHeight dependency property.
Declaration
public static readonly DependencyProperty SymbolHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolInteriorProperty
Identifies the SymbolInterior dependency property.
Declaration
public static readonly DependencyProperty SymbolInteriorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolProperty
Identifies the Symbol dependency property.
Declaration
public static readonly DependencyProperty SymbolProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolStrokeProperty
Identifies the SymbolStroke dependency property.
Declaration
public static readonly DependencyProperty SymbolStrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolStrokeThicknessProperty
Identifies the SymbolHeight dependency property.
Declaration
public static readonly DependencyProperty SymbolStrokeThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolTemplateProperty
Identifies the SymbolTemplate dependency property.
Declaration
public static readonly DependencyProperty SymbolTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SymbolWidthProperty
Identifies the SymbolWidth dependency property.
Declaration
public static readonly DependencyProperty SymbolWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
VerticalAlignmentProperty
Identifies the VerticalAlignment dependency property.
Declaration
public static readonly DependencyProperty VerticalAlignmentProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
VisibleProperty
Identifies the Visible dependency property.
Declaration
public static readonly DependencyProperty VisibleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
AdornmentFontStretch
Get and Set the AdornmentFontStretchProperty
Declaration
public FontStretch AdornmentFontStretch { get; set; }
Property Value
Type |
---|
System.Windows.FontStretch |
AdornmentForeground
Get and Set the AdornmentForegroundProperty
Declaration
public Brush AdornmentForeground { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
AdornmentMargin
Get and Set the AdornmentMarginProperty
Declaration
public Thickness AdornmentMargin { get; set; }
Property Value
Type |
---|
System.Windows.Thickness |
AdornmentsPosition
Gets or sets the adornments position.
Declaration
public AdornmentsPosition AdornmentsPosition { get; set; }
Property Value
Type | Description |
---|---|
AdornmentsPosition | The adornments position. |
AdornmentWrapping
Get and Set the AdornmentWrappingProperty
Declaration
public TextWrapping AdornmentWrapping { get; set; }
Property Value
Type |
---|
System.Windows.TextWrapping |
ConnectorTemplate
Gets or sets the connector template. This is a dependency property.
Declaration
public DataTemplate ConnectorTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | The connector template. |
Remarks
ChartAdornmentInfo provides flexible way to customize adornment's look. Represents line that connects ChartSegment with corresponding adorner.
Examples
C#:
This property is not intended to be used from C#.
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo>
<syncfusion:ChartAdornmentInfo.ConnectorTemplate>
<DataTemplate>
<Line X1="0" X2="10" Y1="0" Y2="0" Stroke="Black"/>
</DataTemplate>
</syncfusion:ChartAdornmentInfo.ConnectorTemplate>
</syncfusion:ChartAdornmentInfo>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
HorizontalAlignment
Gets or sets the horizontal alignment.
Declaration
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.HorizontalAlignment | The vertical alignment. |
Remarks
Per default template, adorner includes symbol and label. HorizontalAlignment property is used to adjust symbol's alignment with respect to adornment's label.
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment out state.
series.AdornmentsInfo.HorizontalAlignment = HorizontalAlignment.Bottom;
//Adding series to area.
chart.Areas[0].Series.Add(series);
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo HorizontalAlignment="Bottom"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
See Also
IsLabelRotate
Get and Set the IsLabelRotateProperty
Declaration
public bool IsLabelRotate { get; set; }
Property Value
Type |
---|
System.Boolean |
IsSegmentAlignment
Get and Set the IsSegmentAlignment Property
Declaration
public bool IsSegmentAlignment { get; set; }
Property Value
Type |
---|
System.Boolean |
LabelContentPath
Gets or sets the label content path. This is a dependency property.
Declaration
public string LabelContentPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | The label content path. |
Remarks
Used to provide property name that should be used for representing label content.
Examples
C#:
This property is intended to be used from XAML.
XAML:
<syncfusion:Chart xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartArea.PrimaryAxis>
<syncfusion:ChartAxis LabelRotateAngle="45" LabelsSource="{StaticResource ChartDataSource}" PositionPath="ID" ContentPath="City"/>
</syncfusion:ChartArea.PrimaryAxis>
<syncfusion:ChartSeries Type="Column" Data="{syncfusion:ChartBindingData Source={StaticResource ChartDataSource}, XPath=ID, YPaths=Population}"/>
</syncfusion:ChartArea>
</syncfusion:Chart>
LabelTemplate
Gets or sets the template. This is a dependency property.
Declaration
public DataTemplate LabelTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | The template. |
Remarks
Per default template, adorner includes symbol and label. property is used to set label's template.
Examples
C#:
This property is intended to be used from XAML.
XAML*:
<syncfusion:Chart xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 2 3 4 5 6">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo
VerticalAlignment="Top"
Visible="True"
SegmentLabelContent="YofTot">
<syncfusion:ChartAdornmentInfo.LabelTemplate>
<DataTemplate>
<Border CornerRadius="1"
BorderBrush="Black"
Background="White"
BorderThickness="1">
<Label FontSize="20" Content="{Binding}"/>
</Border>
</DataTemplate>
</syncfusion:ChartAdornmentInfo.LabelTemplate>
<syncfusion:ChartAdornmentInfo.SymbolTemplate>
<DataTemplate>
<Rectangle Stroke="Black" Fill="Red" Width="10" Height="10"/>
</DataTemplate>
</syncfusion:ChartAdornmentInfo.SymbolTemplate>
</syncfusion:ChartAdornmentInfo>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
*Syncfusion WPF Chart libraries should be referenced in project in order to run code samples.
See Also
LineTemplate
Get and Set the LineTemplate property
Declaration
public DataTemplate LineTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
OffsetX
Get and Set the OffsetXProperty
Declaration
public double OffsetX { get; set; }
Property Value
Type |
---|
System.Double |
OffsetY
Get and Set the OffsetYProperty
Declaration
public double OffsetY { get; set; }
Property Value
Type |
---|
System.Double |
SegmentHorizontalAlignment
Gets or sets the segment horizontal alignment. This is dependency property.
Declaration
public HorizontalAlignment SegmentHorizontalAlignment { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.HorizontalAlignment | The segment horizontal alignment. |
Remarks
Indicates where a label should be displayed horizontally relative to the segment.
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment label content type.
series.AdornmentsInfo.SegmentHorizontalAlignment = HorizontalAlignment.Center;
//Adding series to area.
chart.Areas[0].Series.Add(series);
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo SegmentHorizontalAlignment="Center"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
SegmentIsOut
Gets or sets a value indicating whether segment is out.
Declaration
public bool SegmentIsOut { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
Adorner can be either inside or outside of the segment. When Adorner is set to be outside - connecting line can be shown using SegmentShowLine property.
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment out state.
series.AdornmentsInfo.SegmentIsOut = true;
//Adding series to area.
chart.Areas[0].Series.Add(series);
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo SegmentIsOut="True"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
SegmentLabelContent
Gets or sets the content of the segment label. This is a dependency property.
Declaration
public LabelContent SegmentLabelContent { get; set; }
Property Value
Type | Description |
---|---|
LabelContent | The LabelContent of the segment label. |
Remarks
Label can display several types of content. Types for display can be found in LabelContent enumeration.
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment label content type.
series.AdornmentsInfo.SegmentLabelContent = LabelContent.YofTot;
//Adding series to area.
chart.Areas[0].Series.Add(series);
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo SegmentLabelContent="YofTot"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
SegmentLabelDataTimeFormat
Gets or sets the segment label data time format.
Declaration
public string SegmentLabelDataTimeFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | The segment label data time format. |
Remarks
Represents format string that should be used to represent date or time in adorner.
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment label date-time format for series' adorner.
series.AdornmentsInfo.SegmentLabelDataTimeFormat = "mm/dd/yy";
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo SegmentLabelDataTimeFormat="mm/dd/yy"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
SegmentLabelFontFamily
Gets or sets the segment label font family.
Declaration
public FontFamily SegmentLabelFontFamily { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.FontFamily | The segment label font family. |
Remarks
Identifies font family that should be used to display adornment's text.
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Creating font family converter.
FontFamilyConverter fontConverter = new FontFamilyConverter();
//Setting Segment label font family for series' adorner.
series.AdornmentsInfo.SegmentLabelFontFamily =
(FontFamily)fontConverter.ConvertFromString("Arial");
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo SegmentLabelFontFamily="Arial"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
SegmentLabelFontSize
Gets or sets the size of the segment label font.
Declaration
public int SegmentLabelFontSize { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The size of the segment label font. |
Remarks
Represents size the adornment's label should have.
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment label font size.
series.AdornmentsInfo.SegmentLabelFontSize = "20";
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo SegmentLabelFontSize="20"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
SegmentLabelFontWeight
Gets or sets the segment label font weight.
Declaration
public FontWeight SegmentLabelFontWeight { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.FontWeight | The segment label font weight. |
Remarks
Represents weight that adornment's font should have.
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment label font weight for series adorner's font.
series.AdornmentsInfo.SegmentLabelFontWeight = FontWeights.Bold;
//Adding series to area.
chart.Areas[0].Series.Add(series);
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo SegmentLabelFontWeight="Bold"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
SegmentLabelFormat
Gets or sets the segment label format.
Declaration
public string SegmentLabelFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | The segment label format. |
Remarks
Represents format string that should be used to represent numerical data in adorner.
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment label format for series' adorner.
series.AdornmentsInfo.SegmentLabelFormat = "0.00";
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo SegmentLabelFormat="0.00"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
SegmentLabelRotation
Gets or sets the segment label rotation. This is a dependency property.
Declaration
public double SegmentLabelRotation { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The segment label rotation. |
Remarks
Segment's rotation angle can be set from 0 to 360 degrees.
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment label rotation angle to 45 degrees.
series.AdornmentsInfo.SegmentLabelRotation = 45;
//Adding series to area.
chart.Areas[0].Series.Add(series);
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo SegmentLabelRotation="45"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
SegmentShowLine
Gets or sets a value indicating whether line that connects segment with label should be displayed.
Declaration
public bool SegmentShowLine { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
When adorners are set to be displayed there is an ability to show the line that connects segment with adorner.
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment label line.
series.AdornmentsInfo.SegmentShowLine = true;
//Adding series to area.
chart.Areas[0].Series.Add(series);
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo SegmentShowLine="True"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
SegmentVerticalAlignment
Gets or sets the segment vertical alignment. This is dependency property.
Declaration
public VerticalAlignment SegmentVerticalAlignment { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.VerticalAlignment | The segment horizontal alignment. |
Remarks
Indicates where a label should be displayed vertically relative to the segment.
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment label content type.
series.AdornmentsInfo.SegmentVerticalAlignment = VerticalAlignment.Top;
//Adding series to area.
chart.Areas[0].Series.Add(series);
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo SegmentVerticalAlignment="Top"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
Symbol
Gets or sets the symbol.
Declaration
public Symbol Symbol { get; set; }
Property Value
Type | Description |
---|---|
Symbol | The symbol. |
SymbolHeight
Gets or sets the height of the symbol.
Declaration
public double SymbolHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of the symbol. |
SymbolInterior
Gets or sets the symbol interior.
Declaration
public Brush SymbolInterior { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | The symbol interior. |
SymbolStroke
Gets or sets the symbol stroke.
Declaration
public Brush SymbolStroke { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | The symbol stroke. |
SymbolStrokeThickness
Gets or sets the stroke thickness of the symbol.
Declaration
public double SymbolStrokeThickness { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The stroke thickness of the symbol. |
SymbolTemplate
Gets or sets the symbol template. This is a dependency property.
Declaration
public DataTemplate SymbolTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | The symbol template. |
Remarks
Per default template, adorner includes symbol and label. property is used to set symbol's template. System.Windows.DataTemplate
Examples
C#:
This property is intended to be used from XAML.
XAML:
<syncfusion:Chart xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 2 3 4 5 6">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo
VerticalAlignment="Top"
Visible="True"
SegmentLabelContent="YofTot">
<syncfusion:ChartAdornmentInfo.LabelTemplate>
<DataTemplate>
<Border CornerRadius="1"
BorderBrush="Black"
Background="White"
BorderThickness="1">
<Label FontSize="20" Content="{Binding}"/>
</Border>
</DataTemplate>
</syncfusion:ChartAdornmentInfo.LabelTemplate>
<syncfusion:ChartAdornmentInfo.SymbolTemplate>
<DataTemplate>
<Rectangle Stroke="Black" Fill="Red" Width="10" Height="10"/>
</DataTemplate>
</syncfusion:ChartAdornmentInfo.SymbolTemplate>
</syncfusion:ChartAdornmentInfo>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
*Syncfusion WPF Chart libraries should be referenced in project in order to run code samples.
SymbolWidth
Gets or sets the width of the symbol.
Declaration
public double SymbolWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The width of the symbol. |
VerticalAlignment
Gets or sets the vertical alignment.
Declaration
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.VerticalAlignment | The vertical alignment. |
Remarks
Per default template, adorner includes symbol and label. VerticalAlignment property is used to adjust symbol's alignment with respect to adornment's label. HorizontalAlignment
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment out state.
series.AdornmentsInfo.VerticalAlignment = VerticalAlignment.Bottom;
//Adding series to area.
chart.Areas[0].Series.Add(series);
XAML: <syncfusion:Chart
xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo VerticalAlignment="Bottom"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
See Also
Visible
Gets or sets a value indicating whether label is visible.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
C#:
//Initializing a new chart.
Chart chart = new Chart();
//Adding area.
chart.Areas.Add(new ChartArea());
//Creating new series.
ChartSeries series = new ChartSeries();
//Setting Segment out state.
series.AdornmentsInfo.Visible = true;
//Adding series to area.
chart.Areas[0].Series.Add(series);
XAML:
<syncfusion:Chart xmlns:syncfusion="http://www.syncfusion.com/WpfChart.xsd">
<syncfusion:ChartArea>
<syncfusion:ChartSeries Data="1 1 2 2">
<syncfusion:ChartSeries.AdornmentsInfo>
<syncfusion:ChartAdornmentInfo Visible="True"/>
</syncfusion:ChartSeries.AdornmentsInfo>
</syncfusion:ChartSeries>
</syncfusion:ChartArea>
</syncfusion:Chart>
Methods
Deserialize(String)
Return the object from the String value.
Declaration
public object Deserialize(string xamlString)
Parameters
Type | Name | Description |
---|---|---|
System.String | xamlString |
Returns
Type |
---|
System.Object |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
OnPropertyChanged(DependencyPropertyChangedEventArgs)
Invoked whenever the effective value of any dependency property on this System.Windows.DependencyObject has been updated. The specific dependency property that changed is reported in the event data.
Declaration
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Event data that will contain the dependency property identifier of interest, the property metadata for the type, and old and new values. |
Serialize()
Return the Xaml String
Declaration
public string Serialize()
Returns
Type |
---|
System.String |
Events
PropertyChanged
Occurs when property changed.
Declaration
public event DependencyPropertyChangedEventHandler PropertyChanged
Event Type
Type |
---|
System.Windows.DependencyPropertyChangedEventHandler |