Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to: Display Values Instead of Percents in the Legend

This example demonstrates how to customize the point options to display series point values instead of percents in the legend.

<dxc:ChartControl EnableAnimation="True">
    <dxc:ChartControl.Legend>
        <dxc:Legend />
    </dxc:ChartControl.Legend>
    <dxc:ChartControl.Diagram>
        <dxc:SimpleDiagram2D>
            <dxc:SimpleDiagram2D.Series>
                <dxc:PieSeries2D HoleRadiusPercent="0">
                    <dxc:PieSeries2D.Points>
                        <dxc:SeriesPoint Argument="A" Value="8" />
                        <dxc:SeriesPoint Argument="B" Value="15" />
                        <dxc:SeriesPoint Argument="C" Value="27" />
                    </dxc:PieSeries2D.Points>
                    <dxc:PieSeries2D.PointOptions>
                        <dxc:PointOptions>
                            <dxc:PointOptions.ValueNumericOptions>
                                <dxc:NumericOptions Format="Percent" Precision="0" />
                            </dxc:PointOptions.ValueNumericOptions>
                        </dxc:PointOptions>
                    </dxc:PieSeries2D.PointOptions>
                    <!--region #LegendPointOptions-->
                    <dxc:PieSeries2D.LegendPointOptions>
                        <dxc:PointOptions>
                            <dxc:PieSeries.PercentOptions>
                                <dxc:PercentOptions ValueAsPercent="False" />
                            </dxc:PieSeries.PercentOptions>
                            <dxc:PointOptions.ValueNumericOptions>
                                <dxc:NumericOptions Format="Number" Precision="0" />
                            </dxc:PointOptions.ValueNumericOptions>
                        </dxc:PointOptions>
                    </dxc:PieSeries2D.LegendPointOptions>
                    <!--endregion #LegendPointOptions-->
                </dxc:PieSeries2D>
            </dxc:SimpleDiagram2D.Series>
        </dxc:SimpleDiagram2D>
    </dxc:ChartControl.Diagram>
</dxc:ChartControl>
See Also