Skip to main content

Simple 3D Diagram

  • 4 minutes to read

The Simple 3D Diagram displays simple series such as Pies and Donuts in a high-resolution pseudo-3D view. Refer to the Simple 2D Diagram document to learn more about the 2D counterpart.

WPF_SimpleDiagram3D

This document consists of the following sections:

Compatible Series Types

The diagram can only display series of compatible types. You can add the following series to the Simple 3D diagram:

Series type Image
Pie simple-diagram-3D-pie
Donut simple-diagram-3D-donut

Refer to the Series Type Compatibility document to learn more about series compatibility.

How to Create a Chart with a Simple 3D Diagram

Use the following markup to design a chart with a Simple 3D Diagram:

<dxc:ChartControl>
       <dxc:ChartControl.Legends>
           <dxc:Legend/>
       </dxc:ChartControl.Legends>
       <dxc:ChartControl.Titles>
           <dxc:Title Content="Company Sales by Regions"
                      HorizontalAlignment="Center"/>
       </dxc:ChartControl.Titles>
       <!-- The 3D Simple diagram's settings. -->
       <dxc:SimpleDiagram3D>
           <!-- The 3D Pie series settings. -->
           <dxc:PieSeries3D LegendTextPattern="{}{A}" HoleRadiusPercent="50">
               <dxc:SeriesPoint Argument="South America" Value="2.117"/>
               <dxc:SeriesPoint Argument="Australia" Value="2.272"/>
               <dxc:SeriesPoint Argument="Europe" Value="3.725"/>
               <dxc:SeriesPoint Argument="North America" Value="4.182"/>
               <dxc:SeriesPoint Argument="Asia" Value="5.289"/>
           </dxc:PieSeries3D>
       </dxc:SimpleDiagram3D>
</dxc:ChartControl>

The table below lists all the classes and properties that the markup uses:

Class or Property Description
ChartControl The chart control.
ChartControlBase.Legends The chart control’s legends collection.
Legend A chart legend.
ChartControlBase.Titles The chart control’s titles collection.
Title A chart title.
TitleBase.Content Title’s content.
TitleBase.HorizontalAlignment Specifies the horizontal title alignment.
SimpleDiagram3D The Simple 3D Diagram.
PieSeries3D The 3D Pie series.
Series.LegendTextPattern Specifies how Pie values are represented in a legend.
PieSeries.HoleRadiusPercent Specifies a Donut series’s hole radius in percentages.
SeriesPoint A series point.
SeriesPoint.Argument The series point’s argument.
SeriesPoint.Value The series point’s value.

You can also access a Simple 3D Diagram at runtime using the following code:

// Cast Diagram to the SimpleDiagram3D type. 
SimpleDiagram3D diagram = chart.Diagram as SimpleDiagram3D;
if (diagram != null) {
    // Access to the diagram's options. 
    diagram.RuntimeRotation = true;
}

Simple 3D Diagram’s Specific Options

In addition to the SimpleDiagram3D.Dimension and SimpleDiagram3D.LayoutDirection properties, the Simple 3D diagram supports options common to all 3D diagrams.

The following list details specific properties for a 3D Diagram:

Zooming and Scrolling

The Diagram3D.HorizontalScrollPercent and Diagram3D.VerticalScrollPercent properties determine the distance the chart can move in relation to the central position within a diagram as a diagram width percentage. These properties can be specified using positive or negative values. If the ScrollPercent properties specify values that are too large, the series inside the diagram may be moved outside. Use the Diagram3D.RuntimeScrolling property to provide end users with scrolling capabilities at runtime.

The Diagram3D.ZoomPercent property specifies a chart magnification value. This value should be between 1 and 500 percents and is equal to 100 by default. Use the Diagram3D.RuntimeZooming property to enable zooming at runtime.

Refer to Zooming and Scrolling (3D Charts) for more information.

Perspective

In a perspective projection, the lines that are parallel to the object converge as they move towards a horizon line on the projection surface. The rate at which parallel lines converge is called the perspective angle. Use the Diagram3D.PerspectiveAngle property to specify a perspective angle for a 3D diagram in a perspective projection. The Perspective Angle may be equal to or more than 0, and must be less than 180.

Rotation

Use the Diagram3D.RuntimeRotation property to allow chart rotation at runtime.

3D charts can be rotated using the Ctrl+mouse pointer (design time) or mouse pointer only (runtime).

Refer to Rotation (3D Charts) for more details.

See Also