Skip to main content

Total Labels

  • 2 minutes to read

Total labels display several series points’ total value. A Series View type defines which series points are used to calculate the total value: Stacked Bar Total Labels show Stacked Bar series groups’ total values; the Pie Total Label displays Pie (Doughnut) series points’ total value.

The following sections describe the types of Total Labels:

Pie Total Label

The Pie Total Label displays the total value of all Pie (Doughnut) series’ points.

PieTotalLabelSample

The table below lists the main properties that affect element appearance and functionality.

Availability

The PieSeries2D.TotalLabel property.

Content

PieTotalLabel.TextPattern, PieTotalLabel.Content

Appearance

PieTotalLabel.ContentTemplate, Foreground, FontFamily, FontStyle, FontSize, FontWeight, FontStretch

The following code demonstrates how to configure the Pie Total Label:

Use the PieSeries2D.TotalLabel property to configure a Pie’s total labels.

<dxc:PieSeries2D.TotalLabel>
    <dxc:PieTotalLabel TextPattern="Total area&#x0a;{TV:F2} km&#xb2;"/>
</dxc:PieSeries2D.TotalLabel>

Stacked Bar Total Labels

Stacked Bar Total Labels show Stacked Bar series groups’ total values.

StackedBarTotalLabelSample

The following table lists the main properties that affect element appearance and functionality:

Availability

The Pane’s BarStackedSeries2D.TotalLabel attached property.

Content

StackedBarTotalLabel.TextPattern

Appearance

ChartTextElement.ElementTemplate, Foreground, FontFamily, FontStyle, FontSize, FontWeight, FontStretch

Layout

XYDiagram2D.LabelsResolveOverlappingMinIndent, StackedBarTotalLabel.ResolveOverlappingMode, StackedBarTotalLabel.Indent

Connector Line

StackedBarTotalLabel.ConnectorVisible, StackedBarTotalLabel.ConnectorThickness,

The example below shows how to modify the Stacked Bar Total Labels.

The Pane class’s BarStackedSeries2D.TotalLabel attached property allows you to configure total labels of stacked bars that are in the pane. Note that different panes have different settings for total labels, and it does not apply the same changes to other panes.

<dxc:XYDiagram2D.DefaultPane>
    <dxc:Pane>
        <dxc:BarStackedSeries2D.TotalLabel>
            <dxc:StackedBarTotalLabel TextPattern="Total:&#x0a;{TV:F1}" ConnectorVisible="True"/>
        </dxc:BarStackedSeries2D.TotalLabel>
    </dxc:Pane>
</dxc:XYDiagram2D.DefaultPane>