SeriesLabelOptions Class
Contains options that define the appearance and behavior of data point labels.
Namespace: DevExpress.WinUI.Charts
Assembly: DevExpress.WinUI.Charts.v21.1.dll
Declaration
Related API Members
The following members accept/return SeriesLabelOptions objects:
Remarks
The SeriesLabelOptions class contains different settings for series labels:
- Content - SeriesLabelOptions.Pattern
- Position - SeriesLabelOptions.Indent
- Connector settings - SeriesLabelOptions.ShowConnectors, SeriesLabelOptions.ConnectorStrokeStyle
Example
The following markup customizes series labels for a Pie series:
<Page xmlns:Charts="using:DevExpress.WinUI.Charts"
xmlns:dx="using:DevExpress.WinUI.Controls.Core">
...
<Charts:PieChart>
<Charts:PieChart.Series>
<Charts:Series ...>
<Charts:Series.View>
<Charts:PieSeriesView ShowLabels="True">
<Charts:PieSeriesView.LabelOptions>
<Charts:SeriesLabelOptions Pattern="{}{VP:p}"
Charts:PieSeriesView.LabelPosition="TwoColumns"
ShowConnectors="True">
<Charts:SeriesLabelOptions.ElementTemplate>
<DataTemplate>
<Border BorderThickness="1"
Opacity="1.0"
BorderBrush="{Binding Path=PointColorBrush}">
<Border.Background>
<SolidColorBrush Color="White"/>
</Border.Background>
<TextBlock Text="{Binding Path=Text}"
Padding="5,1"
Foreground="Black"
FontFamily="SegoeUI"
FontStyle="Normal"
FontSize="14"
FontWeight="Light"
FontStretch="Normal"/>
</Border>
</DataTemplate>
</Charts:SeriesLabelOptions.ElementTemplate>
<Charts:SeriesLabelOptions.ConnectorStrokeStyle>
<dx:StrokeStyle DashArray="2 2"/>
</Charts:SeriesLabelOptions.ConnectorStrokeStyle>
</Charts:SeriesLabelOptions>
</Charts:PieSeriesView.LabelOptions>
</Charts:PieSeriesView>
</Charts:Series.View>
...
</Charts:Series>
</Charts:PieChart.Series>
</Charts:PieChart>
</Page>
Inheritance
Object
DependencyObject
UIElement
FrameworkElement
Control
ChartElement
SeriesLabelOptions
See Also