Skip to content

SurfacePlotMark

ClassChartGuruChartGuru.3D
public sealed class SurfacePlotMark : ChartMark3D, IChart3DMark, IChart3DDataMark, IChartMark

Bivariate surface plot: evaluates y = f(x, z) on a regular grid and emits a triangulated surface. Swift Charts equivalent: SurfacePlot(x:y:z:_). Supports SurfaceStyle.HeightBased, SurfaceStyle.NormalBased, and solid/gradient foreground styles.

SurfacePlotMark(string, string, string, SurfaceFunction)

Section titled “SurfacePlotMark(string, string, string, SurfaceFunction)”
public SurfacePlotMark(string xLabel, string yLabel, string zLabel, SurfacePlotMark.SurfaceFunction f)

Creates a surface whose height at each sampled (x, z) is f(x, z), like Swift Charts’ SurfacePlot(x:y:z:function:): it samples the X and Z scale domains, or those SurfacePlotMark.Domain(Vector2, Vector2) sets, on the theme’s grid (64 by 64 by default) and colors by height. The labels are kept as SurfacePlotMark.XLabel, SurfacePlotMark.YLabel and SurfacePlotMark.ZLabel without titling the axes, and a null function draws a flat surface at 0.

Parameters

NameType
xLabelSystem.String
yLabelSystem.String
zLabelSystem.String
fChartGuru.SurfacePlotMark.SurfaceFunction

SurfacePlotMark(string, string, string, LinearRegression3D)

Section titled “SurfacePlotMark(string, string, string, LinearRegression3D)”
public SurfacePlotMark(string xLabel, string yLabel, string zLabel, LinearRegression3D regression)

Swift Charts-style regression surface constructor for LinearRegression3D fits.

Parameters

NameType
xLabelSystem.String
yLabelSystem.String
zLabelSystem.String
regressionChartGuru.LinearRegression3D

public SurfacePlotMark ForegroundStyle(SurfaceStyle style)

Swift Charts equivalent: .ForegroundStyle(.heightBased) / .normalBased.

Parameters

NameType
styleChartGuru.SurfaceStyle

Returns

ChartGuru.SurfacePlotMark

public SurfacePlotMark ForegroundStyle(SurfaceStyle style, Gradient gradient)

Sets a height- or normal-based surface style with an explicit gradient.

Parameters

NameType
styleChartGuru.SurfaceStyle
gradientUnityEngine.Gradient

Returns

ChartGuru.SurfacePlotMark

public SurfacePlotMark Domain(Vector2 xDomain, Vector2 zDomain)

Override the sampling Domain (defaults to the X/Z scale domain).

Parameters

NameType
xDomainUnityEngine.Vector2
zDomainUnityEngine.Vector2

Returns

ChartGuru.SurfacePlotMark

public SurfacePlotMark Resolution(int rx, int rz)

Sampling resolution. Passed through to SurfaceMeshJob.

Parameters

NameType
rxSystem.Int32
rzSystem.Int32

Returns

ChartGuru.SurfacePlotMark

public SurfacePlotMark YRange(float min, float max)

Configures the color-mapping range without clipping geometry. Swift Charts equivalent: .foregroundStyle(.heightBased(yRange:)).

Parameters

NameType
minSystem.Single
maxSystem.Single

Returns

ChartGuru.SurfacePlotMark

public SurfacePlotMark ClampY(float min, float max)

Chart Guru extension that explicitly clamps sampled Y values before domain inference and projection.

Parameters

NameType
minSystem.Single
maxSystem.Single

Returns

ChartGuru.SurfacePlotMark

public SurfacePlotMark Boundary(SurfaceBoundaryMode mode)

Controls whether undefined surface edges close against the Y domain as in native Swift, or remain open.

Parameters

NameType
modeChartGuru.SurfaceBoundaryMode

Returns

ChartGuru.SurfacePlotMark

public override void BuildMesh(Chart3DMeshContext ctx)

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

Parameters

NameType
ctxChartGuru.Chart3DMeshContext
public override IChartMark Clone()

Creates an independent copy of this surface that shares its height function and copies its style, gradient, sampling domain, resolution, ranges and boundary mode; later changes to either mark do not affect the other.

Returns

ChartGuru.IChartMark

public string XLabel { get; }

Returns

System.String

public string YLabel { get; }

Returns

System.String

public string ZLabel { get; }

Returns

System.String

public SurfacePlotMark.SurfaceFunction Function { get; }

Returns

ChartGuru.SurfacePlotMark.SurfaceFunction

public SurfaceStyle Style { get; }

Returns

ChartGuru.SurfaceStyle

public SurfaceBoundaryMode BoundaryMode { get; }

Returns

ChartGuru.SurfaceBoundaryMode

public int ResolutionX { get; }

Returns

System.Int32

public int ResolutionZ { get; }

Returns

System.Int32

public Vector2 XDomain { get; }

Returns

UnityEngine.Vector2

public Vector2 ZDomain { get; }

Returns

UnityEngine.Vector2

public bool HasSamplingDomain { get; }

Returns

System.Boolean

public Vector2? YRangeValue { get; }

Optional color-mapping range for the height-based surface style. This does not change sampled geometry.

Returns

System.Nullable{UnityEngine.Vector2}

public Vector2? YClampValue { get; }

Returns

System.Nullable{UnityEngine.Vector2}

public Gradient SurfaceGradientValue { get; }

Returns

UnityEngine.Gradient

public override ChartType MarkType { get; }

Returns

ChartGuru.ChartType