SurfacePlotMark
public sealed class SurfacePlotMark : ChartMark3D, IChart3DMark, IChart3DDataMark, IChartMarkBivariate 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.
Constructors
Section titled “Constructors”
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
| Name | Type |
|---|---|
xLabel | System.String |
yLabel | System.String |
zLabel | System.String |
f | ChartGuru.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
| Name | Type |
|---|---|
xLabel | System.String |
yLabel | System.String |
zLabel | System.String |
regression | ChartGuru.LinearRegression3D |
Methods
Section titled “Methods”
ForegroundStyle(SurfaceStyle)
Section titled “ForegroundStyle(SurfaceStyle)”public SurfacePlotMark ForegroundStyle(SurfaceStyle style)Swift Charts equivalent: .ForegroundStyle(.heightBased) / .normalBased.
Parameters
| Name | Type |
|---|---|
style | ChartGuru.SurfaceStyle |
Returns
ChartGuru.SurfacePlotMark
ForegroundStyle(SurfaceStyle, Gradient)
Section titled “ForegroundStyle(SurfaceStyle, Gradient)”public SurfacePlotMark ForegroundStyle(SurfaceStyle style, Gradient gradient)Sets a height- or normal-based surface style with an explicit gradient.
Parameters
| Name | Type |
|---|---|
style | ChartGuru.SurfaceStyle |
gradient | UnityEngine.Gradient |
Returns
ChartGuru.SurfacePlotMark
Domain(Vector2, Vector2)
Section titled “Domain(Vector2, Vector2)”public SurfacePlotMark Domain(Vector2 xDomain, Vector2 zDomain)Override the sampling Domain (defaults to the X/Z scale domain).
Parameters
| Name | Type |
|---|---|
xDomain | UnityEngine.Vector2 |
zDomain | UnityEngine.Vector2 |
Returns
ChartGuru.SurfacePlotMark
Resolution(int, int)
Section titled “Resolution(int, int)”public SurfacePlotMark Resolution(int rx, int rz)Sampling resolution. Passed through to SurfaceMeshJob.
Parameters
| Name | Type |
|---|---|
rx | System.Int32 |
rz | System.Int32 |
Returns
ChartGuru.SurfacePlotMark
YRange(float, float)
Section titled “YRange(float, float)”public SurfacePlotMark YRange(float min, float max)Configures the color-mapping range without clipping geometry. Swift Charts equivalent: .foregroundStyle(.heightBased(yRange:)).
Parameters
| Name | Type |
|---|---|
min | System.Single |
max | System.Single |
Returns
ChartGuru.SurfacePlotMark
ClampY(float, float)
Section titled “ClampY(float, float)”public SurfacePlotMark ClampY(float min, float max)Chart Guru extension that explicitly clamps sampled Y values before domain inference and projection.
Parameters
| Name | Type |
|---|---|
min | System.Single |
max | System.Single |
Returns
ChartGuru.SurfacePlotMark
Boundary(SurfaceBoundaryMode)
Section titled “Boundary(SurfaceBoundaryMode)”public SurfacePlotMark Boundary(SurfaceBoundaryMode mode)Controls whether undefined surface edges close against the Y domain as in native Swift, or remain open.
Parameters
| Name | Type |
|---|---|
mode | ChartGuru.SurfaceBoundaryMode |
Returns
ChartGuru.SurfacePlotMark
BuildMesh(Chart3DMeshContext)
Section titled “BuildMesh(Chart3DMeshContext)”public override void BuildMesh(Chart3DMeshContext ctx)Write triangles / instanced draws for this mark into the context registry.
Parameters
| Name | Type |
|---|---|
ctx | ChartGuru.Chart3DMeshContext |
Clone()
Section titled “Clone()”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
Properties
Section titled “Properties”
XLabel
Section titled “XLabel”public string XLabel { get; }Returns
System.String
YLabel
Section titled “YLabel”public string YLabel { get; }Returns
System.String
ZLabel
Section titled “ZLabel”public string ZLabel { get; }Returns
System.String
Function
Section titled “Function”public SurfacePlotMark.SurfaceFunction Function { get; }Returns
ChartGuru.SurfacePlotMark.SurfaceFunction
public SurfaceStyle Style { get; }Returns
ChartGuru.SurfaceStyle
BoundaryMode
Section titled “BoundaryMode”public SurfaceBoundaryMode BoundaryMode { get; }Returns
ChartGuru.SurfaceBoundaryMode
ResolutionX
Section titled “ResolutionX”public int ResolutionX { get; }Returns
System.Int32
ResolutionZ
Section titled “ResolutionZ”public int ResolutionZ { get; }Returns
System.Int32
XDomain
Section titled “XDomain”public Vector2 XDomain { get; }Returns
UnityEngine.Vector2
ZDomain
Section titled “ZDomain”public Vector2 ZDomain { get; }Returns
UnityEngine.Vector2
HasSamplingDomain
Section titled “HasSamplingDomain”public bool HasSamplingDomain { get; }Returns
System.Boolean
YRangeValue
Section titled “YRangeValue”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}
YClampValue
Section titled “YClampValue”public Vector2? YClampValue { get; }Returns
System.Nullable{UnityEngine.Vector2}
SurfaceGradientValue
Section titled “SurfaceGradientValue”public Gradient SurfaceGradientValue { get; }Returns
UnityEngine.Gradient
MarkType
Section titled “MarkType”public override ChartType MarkType { get; }Returns
ChartGuru.ChartType