ChartControl.Diagram Property

Gets the chart control's diagram and provides access to its settings.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v20.1.dll


public Diagram Diagram { get; set; }
Public Property Diagram As Diagram

Property Value

Type Description

A Diagram object that represents the chart control's diagram.


The Diagram is one of the basic chart elements, because it represents series data. Its most significant characteristic is type, allowing representation of only those series that are compatible with this diagram, within it.

To learn more on diagrams of different types, and to see which series types are compatible with each diagram types, refer to Diagram.


The following example demonstrates how to create a 2D Side-by-Side Bar. To do this, it is necessary to assign the ChartControl.Diagram property to XYDiagram2D, and then add two series with points to the diagram's Diagram.Series collection.

<Window x:Class="SideBySideBar2DChart.Window1" 
        Title="Window1" Height="350" Width="620">
        <dxc:ChartControl Name="chartControl1">
                        <dxc:BarSideBySideSeries2D DisplayName="First Series" BarWidth="0.5">
                            <!--region #Model-->
                                <dxc:Quasi3DBar2DModel />
                            <!--endregion #Model-->
                                <dxc:SeriesPoint Argument="A" Value="1" />
                                <dxc:SeriesPoint Argument="B" Value="2" />
                                <dxc:SeriesPoint Argument="C" Value="3" />
                                <dxc:SeriesPoint Argument="D" Value="4" />
                        <dxc:BarSideBySideSeries2D DisplayName="Second Series" BarWidth="0.5">
                            <!--region #Model2-->
                                <dxc:Quasi3DBar2DModel />
                            <!--endregion #Model2-->
                                <dxc:SeriesPoint Argument="A" Value="4" />
                                <dxc:SeriesPoint Argument="B" Value="3" />
                                <dxc:SeriesPoint Argument="C" Value="2" />
                                <dxc:SeriesPoint Argument="D" Value="1" />
                <dxc:Legend />
See Also