All docs
V21.2
21.2
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

SunburstPaletteColorizerBase.LegendItemPattern Property

Gets or sets the format pattern that is applied to a sunburst legend item’s text.

Namespace: DevExpress.Xpf.TreeMap

Assembly: DevExpress.Xpf.TreeMap.v21.2.dll

Declaration

public string LegendItemPattern { get; set; }

Property Value

Type Description
String

A string that formats legend item text.

Remarks

Patterns can contain regular text (displayed as is) and value placeholders in braces. To format numeric and date/time values, you can apply format specifiers. Use a colon to separate a placeholder and its format specifier.

The following table contains the available placeholders:

Placeholder Description
{L} Displays the group name.
{V} Displays the total value of group items.
{V1} Displays the first value of the range for a SunburstRangeColorizer.
{V2} Displays the second value of the range for a SunburstRangeColorizer.

If a pattern starts with a placeholder in the XAML markup, insert empty brackets into the beginning of the pattern as follows: “{}{L}: {V}”. For more information, refer to the following topic: {} Escape sequence / markup extension.

Example: How to Format Legend Item Text in a Sunburst

This example shows how to color sunburst items based on value ranges and format the legend item text generated for each colorizer range.

A sunburst with formatted legend text

<Window xmlns:dxtm="http://schemas.devexpress.com/winfx/2008/xaml/treemap"  
        x:Class="SunburstSample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:dxtmt="http://schemas.devexpress.com/winfx/2008/xaml/treemap/themekeys"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
        xmlns:local="clr-namespace:SunburstSample"
        mc:Ignorable="d"
        Title="MainWindow" Height="240" Width="360">
    <Grid>
        <dxtm:SunburstControl>
            <dxtm:SunburstControl.Colorizer>
                <dxtm:SunburstPaletteColorizer LegendItemPattern="{}{L}: {V} elements">
                    <dxtm:SunburstPaletteColorizer.Palette>
                        <dxtm:MarqueePalette/>
                    </dxtm:SunburstPaletteColorizer.Palette>
                </dxtm:SunburstPaletteColorizer>
            </dxtm:SunburstControl.Colorizer>
            <dxtm:SunburstControl.Legend>
                <dxtm:Legend VerticalPosition="Top" 
                             HorizontalPosition="Right" 
                             Margin="4"/>
            </dxtm:SunburstControl.Legend>
        </dxtm:SunburstControl>
    </Grid>
</Window>
See Also