Skip to content

ChartMark3D

ClassChartGuruChartGuru.3D
public abstract class ChartMark3D : ChartMark, IChart3DMark, IChart3DDataMark, IChartMark

Base class for every 3D mark. Inherits the full 2D ChartMark authoring surface (foregroundStyle, annotation, offset …) so users don't have to relearn the API, and then layers ChartMark3D.DataPoint3D, and a mesh hook on top.

protected DataPoint3D _dataPoint3D

Returns

ChartGuru.DataPoint3D

protected Vector3 _offset3D

Returns

UnityEngine.Vector3

protected Quaternion _symbolRotation

Returns

UnityEngine.Quaternion

protected object _zKey

Returns

System.Object

protected float _metalness

Returns

System.Single

protected float _roughness

Returns

System.Single

protected ChartMark3D()

protected ChartMark3D(float x, float y, float z)

Initializes a derived mark at data coordinates (x, y, z); its 2D ChartMark3D.DataPoint is (x, y).

Parameters

NameType
xSystem.Single
ySystem.Single
zSystem.Single
protected ChartMark3D(DataPoint3D p)

Initializes a derived mark at p, keeping its range ends, series index and identity; its 2D ChartMark3D.DataPoint is the point’s XY projection.

Parameters

NameType
pChartGuru.DataPoint3D

public ChartMark3D Offset(float x, float y, float z)

3D offset in plot coordinates. Swift Charts equivalent: .Offset(x:y:z:).

Parameters

NameType
xSystem.Single
ySystem.Single
zSystem.Single

Returns

ChartGuru.ChartMark3D

public ChartMark3D ZKey(object key)

Tag mark by Z category for legend + chartZSelection.

Parameters

NameType
keySystem.Object

Returns

ChartGuru.ChartMark3D

public ChartMark3D SymbolRotation(Quaternion rotation)

Swift Charts equivalent: .SymbolRotation(_:). Rotates the 3D symbol geometry.

Parameters

NameType
rotationUnityEngine.Quaternion

Returns

ChartGuru.ChartMark3D

public ChartMark3D SymbolRotation(float xDeg, float yDeg, float zDeg)

Set symbol rotation from Euler angles in degrees.

Parameters

NameType
xDegSystem.Single
yDegSystem.Single
zDegSystem.Single

Returns

ChartGuru.ChartMark3D

public ChartMark3D Metalness(float value)

Swift Charts equivalent: .metalness(_:).

Parameters

NameType
valueSystem.Single

Returns

ChartGuru.ChartMark3D

public ChartMark3D Roughness(float value)

Swift Charts equivalent: .roughness(_:).

Parameters

NameType
valueSystem.Single

Returns

ChartGuru.ChartMark3D

public ChartMark3D ColorGradient(bool enabled = true)

Derives a bottom-to-top gradient from the current palette, color-scale or foreground color. An authored gradient takes priority.

Parameters

NameType
enabledSystem.Boolean

Returns

ChartGuru.ChartMark3D

public abstract void BuildMesh(Chart3DMeshContext ctx)

Write triangles / instanced draws for this mark into the context registry.

Parameters

NameType
ctxChartGuru.Chart3DMeshContext
protected void CopyCommon3DStateTo(ChartMark3D target)

Copies the state every 3D mark shares onto target, from colors, series and annotation to the data point, 3D offset, symbol rotation, Z key, metalness, roughness and color gradient, for a derived mark’s ChartMark.Clone().

Parameters

NameType
targetChartGuru.ChartMark3D
public override (Vector2 source, Vector2 target) GetMorphTargets(ChartType targetType, Rect plotArea)

Returns the center of plotArea as both source and target, so 2D morph recipes hold 3D marks in place; 3D hosts play chart type changes as their own transitions from the drawn geometry.

Parameters

NameType
targetTypeChartGuru.ChartType
plotAreaUnityEngine.Rect

Returns

System.ValueTuple{UnityEngine.Vector2,UnityEngine.Vector2}

public DataPoint3D DataPoint3D { get; set; }

Returns

ChartGuru.DataPoint3D

public override DataPoint DataPoint { get; set; }

Returns

ChartGuru.DataPoint

public Vector3 Position3D { get; }

Project the mark’s anchor point into world-space data coordinates.

Returns

UnityEngine.Vector3

public Vector3 Offset3D { get; }

Returns

UnityEngine.Vector3

public Quaternion SymbolRotationQuaternion { get; }

Returns

UnityEngine.Quaternion

public object ZKeyValue { get; }

Returns

System.Object

public float? MetalnessValue { get; }

Returns

System.Nullable{System.Single}

public float? RoughnessValue { get; }

Returns

System.Nullable{System.Single}

public bool ColorGradientEnabled { get; }

Whether the resolved foreground color gets an implicit gradient when no authored gradient is present.

Returns

System.Boolean