XY-Diagram 3D

  • 4 minutes to read

This topic lists series view types associated with the ASP.NET Chart Control's XY-Diagram 3D type. It also demonstrates how to access its specific options (both at design time and runtime), and describes these options. Before reading this section, you may wish to review the following help topic on diagram fundamentals: Diagram Overview.

The topic consists of the following sections.

Associated Series View Types

In addition to a wide range of series types, the WebChartControl can plot a 2D XY series in a high resolution pseudo-3D style. Also, the Chart Control enables you to rotate a 3D chart using the mouse pointer both at design time and runtime. A typical XY-Diagram 3D example is shown in the following image.

Diagram_3dXY

The XY-Diagram 3D type is compatible with series of the following view types.

A completely different graphical engine is used for 3D diagram types to meet their specific requirements. For this reason, the 3D diagram has functionality that is unique to its type (in comparison to the 2D diagram type). It's impossible to plot 2D and 3D series within the same diagram.

For extended descriptions of the options available for this diagram type, refer to the following section of this document: Specific Options.

Accessing a Diagram

You can access XY-Diagram 3D options at design time. Click the chart to select it, and in the Properties window, expand the WebChartControl.Diagram property.

XYDiagram3DOptions

Cast your instance of the Diagram object to the XYDiagram3D type at runtime.

// Create a new WebChartControl instance.
WebChartControl chart = new WebChartControl();

// Create a series of a compatible view type, 
// and add it to the chart's collection,
// so that the diagram object is not equal to null.
Series series1 = new Series("Line 3D Series 1", ViewType.Line3D);
chart.Series.Add(series1);

// Create a diagram and cast it to the XYDiagram3D type.
XYDiagram3D diagram = (XYDiagram3D)chart.Diagram;

// Access the diagram's options.
diagram.AxisX.Interlaced = true;
diagram.PlaneDepthFixed = 20;

Specific Options

The XYDiagram3D.AxisX and XYDiagram3D.AxisY properties include functionality similar to their XY-Diagram 2D counterparts. For more information, refer to the following help topic: Axes.

The XYDiagram3D.BackColor, XYDiagram3D.BackImage and XYDiagram3D.FillStyle properties determine the diagram's background. Since the XY-Diagram 3D type does not support multiple panes, you do not need to access a pane in order to specify the background.

The XYDiagram3D.PlaneDepthFixed property determines the depth (thickness) of coordinate planes, in diagram pixels.

NOTE

The diagram pixels is a measurement unit introduced specifically for 3D diagrams to meet their unique requirements.

The XYDiagram3D.SeriesDistance and XYDiagram3D.SeriesDistanceFixed properties specify the distance between two series that the 3D diagram plots. The SeriesDistanceFixed property specifies the distance in pixels, while the SeriesDistance property specifies it in X-axis measurement units.

In addition, you can define the distance between series and the argument coordinate planes (front and back) in diagram pixels, by using the XYDiagram3D.SeriesIndentFixed property.

Also note that the Crosshair Cursor and Tooltips are not available for the XY-Diagram 3D.

Perspective

In a perspective projection, the lines that are parallel to the object converge as they move towards a theoretical horizon line on the projection surface. The rate at which parallel lines converge is called the perspective angle. This angle is determined by the distance of an imaginary viewer from a 3D diagram object. To enable or disable the 3D perspective, use the Diagram3D.PerspectiveEnabled property. When it is set to true, you can use the Diagram3D.PerspectiveAngle property to define the required angle. Setting the Diagram3D.PerspectiveAngle property to 0 will disable the perspective.

NOTE

You cannot use 3D web charts at the Medium Trust permission level. To learn more, refer to the following help topic: Medium Trust Support.

See Also