Chart3DMarkExtensions
public static class Chart3DMarkExtensionsSwift Charts 3D convenience lifts for common 2D marks. These let authoring
code add depth with a single .Z(...) modifier while still producing
the native 3D mark types used by the mesh pipeline.
Methods
Section titled “Methods”
Z(PointMark, float)
Section titled “Z(PointMark, float)”public static PointMark3D Z(this PointMark mark, float z)Lifts a 2D point into a PointMark3D at depth z with the same X, Y, series, style
and symbol key: a set symbol shape becomes the nearest solid, its size in points becomes a diameter in plot units
and a symbol rotation turns about Z. Returns null for a null mark.
Parameters
| Name | Type |
|---|---|
mark | ChartGuru.PointMark |
z | System.Single |
Returns
ChartGuru.PointMark3D
Z(PointMark, PlottableValueRef)
Section titled “Z(PointMark, PlottableValueRef)”public static PointMark3D Z(this PointMark mark, PlottableValueRef z)Lifts a 2D point to the depth z holds, as Chart3DMarkExtensions.Z(PointMark, float) does. Numbers
convert as they are and dates as seconds since the Unix epoch; a null value gives 0, and text or other values
throw an ArgumentException.
Parameters
| Name | Type |
|---|---|
mark | ChartGuru.PointMark |
z | ChartGuru.PlottableValueRef |
Returns
ChartGuru.PointMark3D
Z(BarMark, float)
Section titled “Z(BarMark, float)”public static Bar3DMark Z(this BarMark mark, float z)Lifts a 2D bar into a Bar3DMark at depth z with the same X, Y, series and style:
its width and height dimensions become the 3D width and depth as shares of a data unit (0.8 when automatic) and
its corner radius converts from points to plot units. The 3D bar starts unstacked; returns null for a null mark.
Parameters
| Name | Type |
|---|---|
mark | ChartGuru.BarMark |
z | System.Single |
Returns
ChartGuru.Bar3DMark
Z(BarMark, PlottableValueRef)
Section titled “Z(BarMark, PlottableValueRef)”public static Bar3DMark Z(this BarMark mark, PlottableValueRef z)Lifts a 2D bar to the depth z holds, as Chart3DMarkExtensions.Z(BarMark, float) does. Numbers
convert as they are and dates as seconds since the Unix epoch; a null value gives 0, and text or other values
throw an ArgumentException.
Parameters
| Name | Type |
|---|---|
mark | ChartGuru.BarMark |
z | ChartGuru.PlottableValueRef |
Returns
ChartGuru.Bar3DMark
Z(LineMark, float)
Section titled “Z(LineMark, float)”public static Line3DMark Z(this LineMark mark, float z)Lifts a 2D line point into a Line3DMark at depth z with the same X, Y, series,
style, interpolation and tension, and a tube radius of 0.0025 plot units per point of line width, at least 0.006.
Returns null for a null mark.
Parameters
| Name | Type |
|---|---|
mark | ChartGuru.LineMark |
z | System.Single |
Returns
ChartGuru.Line3DMark
Z(LineMark, PlottableValueRef)
Section titled “Z(LineMark, PlottableValueRef)”public static Line3DMark Z(this LineMark mark, PlottableValueRef z)Lifts a 2D line point to the depth z holds, as Chart3DMarkExtensions.Z(LineMark, float) does. Numbers
convert as they are and dates as seconds since the Unix epoch; a null value gives 0, and text or other values
throw an ArgumentException.
Parameters
| Name | Type |
|---|---|
mark | ChartGuru.LineMark |
z | ChartGuru.PlottableValueRef |
Returns
ChartGuru.Line3DMark
Z(AreaMark, float)
Section titled “Z(AreaMark, float)”public static Area3DMark Z(this AreaMark mark, float z)Lifts a 2D area point into an Area3DMark at depth z with the same X, Y, series,
style and interpolation, and a slab half thickness of 0.0025 plot units per point of line width, at least 0.01.
Returns null for a null mark.
Parameters
| Name | Type |
|---|---|
mark | ChartGuru.AreaMark |
z | System.Single |
Returns
ChartGuru.Area3DMark
Z(AreaMark, PlottableValueRef)
Section titled “Z(AreaMark, PlottableValueRef)”public static Area3DMark Z(this AreaMark mark, PlottableValueRef z)Lifts a 2D area point to the depth z holds, as Chart3DMarkExtensions.Z(AreaMark, float) does. Numbers
convert as they are and dates as seconds since the Unix epoch; a null value gives 0, and text or other values
throw an ArgumentException.
Parameters
| Name | Type |
|---|---|
mark | ChartGuru.AreaMark |
z | ChartGuru.PlottableValueRef |
Returns
ChartGuru.Area3DMark
Z(CandleStickMark, float, float)
Section titled “Z(CandleStickMark, float, float)”public static IChartMark[] Z(this CandleStickMark mark, float z, float slot = 1)Lifts a candlestick into 3D as two marks to add together: a wick rule from its low to its high and a body box
from its open to its close, both in the candle’s rising or falling color. The body is
CandleStickMark.BodyWidthRatio of slot wide along X and of a unit deep along Z;
pass the spacing of neighboring candles as slot when they are not one unit apart, such as
seconds between days on a date axis. Swift Charts 3D has no candlestick, so this is a Chart Guru extension.
Parameters
| Name | Type |
|---|---|
mark | ChartGuru.CandleStickMark |
z | System.Single |
slot | System.Single |
Returns
ChartGuru.IChartMark[]