Point3D.Z Property

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the Z coordinate of a 3D point.

Namespace:   System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

[BindableAttribute(true)]
public float Z { get; set; }

Property Value

Type: System.Single

The Z coordinate of a 3D point, which is measured as a percentage of the relevant chart area's depth.

This Z property is always expressed as a percentage of the relevant chart area's depth. With 3D charts, Z coordinates are relative, and have a value of 0 for the back wall of the chart area and a value of 100 for the front wall of the chart area.

Note   This Z property may be less than zero (located behind a chart area) or greater than 100 (located in front of a chart area).

Any point used in custom 3D drawing—which is accomplished using GDI+—must be transformed from X, Y and Z (3D) coordinates into X and Y (2D) coordinates using the TransformPoints method. This method takes an array of Point3D objects as its only parameter. By calling the TransformPoints method, the X and Y property values are changed to reflect the 3-dimensional space.

These new X and Y coordinates are then converted to absolute coordinates by using the GetAbsolutePoint method. They are then used for GDI+ method calls.

Relative Z coordinates can be obtained for series by using the GetSeriesDepth and GetSeriesZPosition methods.

.NET Framework
Available since 4.0
Return to top
Show: