The Chart3D control can contain the unlimited number of legends. Each legend can display information about series, their colorized point markers or surface fill styles.
This document explains how to solve the following tasks.
To configure a newly added legend, use XAML like the following. Note that the legend title accompanies the legend.
Xaml |
<dxc:Chart3DControl>
<dxc:Chart3DControl.Legends>
<dxc:Legend x:Name="legend"
HorizontalPosition="Right"
VerticalPosition="Top"
IndentFromDiagram="16">
<dxc:Legend.Title>
<dxc:LegendTitle Content="Legend Title">
</dxc:Legend.Title>
</dxc:Legend>
</dxc:Chart3DControl.Legends>
</dxc:Chart3DControl>
|
The code above uses the following classes and properties.
The following image demonstrates the result of the code above.

Each series can provide a legend item to a legend. In addition, colorizers and fill styles also add their legend items to a legend. The following images demonstrate the different available legend item types.
The following XAML demonstrates how legend items can be configured.
Xaml |
<dxc:Series ShowInLegend="True"
CheckableInLegend="True">
<dxc:Series.View>
<dxc:Bar3DSeriesView>
<dxc:Bar3DSeriesView.Colorizer>
<dxc:RangeColorizer3D Legend="{Binding ElementName=legend}"
LegendTextPattern="{}{V:F2}">
</dxc:RangeColorizer3D>
</dxc:Bar3DSeriesView.Colorizer>
</dxc:Bar3DSeriesView>
</dxc:Series.View>
</dxc:Series>
|
The XAML above uses the following types and properties.