Chart3DBuilder
public sealed class Chart3DBuilderMirror of ChartBuilder for 3D charts. Owns its own Chart
instance (with ChartDimension.ThreeD) and exposes Swift-Charts-3D
fluent modifiers such as chartZAxis, chartZScale, chart3DPose,
chart3DCameraProjection, and animation.
Constructors
Section titled “Constructors”
Chart3DBuilder()
Section titled “Chart3DBuilder()”public Chart3DBuilder()Methods
Section titled “Methods”
Add(IChartMark)
Section titled “Add(IChartMark)”public Chart3DBuilder Add(IChartMark mark)Add a single renderable 3D mark.
Parameters
| Name | Type |
|---|---|
mark | ChartGuru.IChartMark |
Returns
ChartGuru.Chart3DBuilder
Add(IEnumerable)
Section titled “Add(IEnumerable)”public Chart3DBuilder Add(IEnumerable<IChartMark> marks)Adds the marks in enumeration order as Chart3DBuilder.Add(IChartMark) does for each: nulls are skipped and a mark
that does not implement IChart3DMark throws an ArgumentException.
Parameters
| Name | Type |
|---|---|
marks | System.Collections.Generic.IEnumerable{ChartGuru.IChartMark} |
Returns
ChartGuru.Chart3DBuilder
AddHistogramBars(IEnumerable, Func<T, float>, NumberBins, Func<List, float>, Color?, string, float)
Section titled “AddHistogramBars(IEnumerable, Func<T, float>, NumberBins, Func<List, float>, Color?, string, float)”public Chart3DBuilder AddHistogramBars<T>(IEnumerable<T> data, Func<T, float> value, NumberBins<float> bins, Func<List<T>, float> aggregate = null, Color? color = null, string seriesKey = "Histogram", float z = 0)Histogram: buckets data by value into bins and adds a
Bar3DMark per bin at its middle and depth z, with the bin’s count or
aggregate of its items, as ChartGuru.ChartBuilder.AddHistogramBars<T1>(System.Collections.Generic.IEnumerable<<>>, System.Func<<>, float>, ChartGuru.NumberBins<float>, System.Func<System.Collections.Generic.List<<>>, float>, System.Nullable<UnityEngine.Color>, string) does. Each bar spans
its bin, so neighbors touch like the bins they count, and the X domain runs from the first bin edge to the last
unless the chart sets one. A Chart Guru extension: Swift Charts 3D has no bar mark.
Parameters
| Name | Type |
|---|---|
data | System.Collections.Generic.IEnumerable{{T}} |
value | System.Func{{T},System.Single} |
bins | ChartGuru.NumberBins{System.Single} |
aggregate | System.Func{System.Collections.Generic.List{{T}},System.Single} |
color | System.Nullable{UnityEngine.Color} |
seriesKey | System.String |
z | System.Single |
Returns
ChartGuru.Chart3DBuilder
ChartType(ChartType)
Section titled “ChartType(ChartType)”public Chart3DBuilder ChartType(ChartType type)Explicit chart type override (e.g. force ChartType.Scatter3D).
Parameters
| Name | Type |
|---|---|
type | ChartGuru.ChartType |
Returns
ChartGuru.Chart3DBuilder
Theme(ChartTheme)
Section titled “Theme(ChartTheme)”public Chart3DBuilder Theme(ChartTheme theme)Theme for the palette, typography, axis, grid and text colors and, through its 3D appearance, the 3D look. Null uses the default theme.
Parameters
| Name | Type |
|---|---|
theme | ChartGuru.ChartTheme |
Returns
ChartGuru.Chart3DBuilder
ChartForegroundStyleScale(Dictionary<string, Color>)
Section titled “ChartForegroundStyleScale(Dictionary<string, Color>)”public Chart3DBuilder ChartForegroundStyleScale(Dictionary<string, Color> scale)Maps style keys to colors, so marks with a matching ForegroundStyleKey and the legend draw them in those
colors; null clears the mapping. Swift Charts equivalent: .chartForegroundStyleScale([“A”: .red]), which
native Chart3D ignores.
Parameters
| Name | Type |
|---|---|
scale | System.Collections.Generic.Dictionary{System.String,UnityEngine.Color} |
Returns
ChartGuru.Chart3DBuilder
ChartSymbolScale(Dictionary<string, Symbol3D>)
Section titled “ChartSymbolScale(Dictionary<string, Symbol3D>)”public Chart3DBuilder ChartSymbolScale(Dictionary<string, Symbol3D> scale)Maps symbol keys to 3D symbols, so points whose PointMark3D.Symbol(PlottableValueRef) key matches draw
as that symbol; null clears the mapping. Keys without an entry take spheres, cubes, cones and cylinders in the
order they first appear. The chart keeps the mapping as its 2D symbol scale (circle, square, triangle and diamond
for these four), which billboards and custom meshes cannot join: they draw as spheres there. Swift Charts
equivalent: .chartSymbolScale([“Adelie”: .square]).
Parameters
| Name | Type |
|---|---|
scale | System.Collections.Generic.Dictionary{System.String,ChartGuru.Symbol3D} |
Returns
ChartGuru.Chart3DBuilder
ChartForegroundStyleScale(ColorScale)
Section titled “ChartForegroundStyleScale(ColorScale)”public Chart3DBuilder ChartForegroundStyleScale(ColorScale scale)Colors marks whose style key is a number through scale, a continuous color scale such as
ColorScale.Viridis(0f, 10f), which the legend shows; null returns them to the automatic scale over their
own values. Swift Charts equivalent: .chartForegroundStyleScale(domain:range:) for numeric values.
Parameters
| Name | Type |
|---|---|
scale | ChartGuru.ColorScale |
Returns
ChartGuru.Chart3DBuilder
ColorScalePresetIndex(int)
Section titled “ColorScalePresetIndex(int)”public Chart3DBuilder ColorScalePresetIndex(int presetIndex)The built-in color scale that numeric style keys use without an explicit scale, by preset index; -1 uses the default.
Parameters
| Name | Type |
|---|---|
presetIndex | System.Int32 |
Returns
ChartGuru.Chart3DBuilder
ChartXAxis(Action)
Section titled “ChartXAxis(Action)”public Chart3DBuilder ChartXAxis(Action<AxisBuilder> configure)Swift Charts equivalent: .chartXAxis { … }.
Parameters
| Name | Type |
|---|---|
configure | System.Action{ChartGuru.AxisBuilder} |
Returns
ChartGuru.Chart3DBuilder
ChartYAxis(Action)
Section titled “ChartYAxis(Action)”public Chart3DBuilder ChartYAxis(Action<AxisBuilder> configure)Swift Charts equivalent: .chartYAxis { … }.
Parameters
| Name | Type |
|---|---|
configure | System.Action{ChartGuru.AxisBuilder} |
Returns
ChartGuru.Chart3DBuilder
ChartZAxis(Action)
Section titled “ChartZAxis(Action)”public Chart3DBuilder ChartZAxis(Action<AxisBuilder> configure)Swift Charts 3D equivalent: .chartZAxis { … }.
Parameters
| Name | Type |
|---|---|
configure | System.Action{ChartGuru.AxisBuilder} |
Returns
ChartGuru.Chart3DBuilder
ChartXScale(ScaleType)
Section titled “ChartXScale(ScaleType)”public Chart3DBuilder ChartXScale(ScaleType type)Swift Charts equivalent: .chartXScale(type:).
Parameters
| Name | Type |
|---|---|
type | ChartGuru.ScaleType |
Returns
ChartGuru.Chart3DBuilder
ChartXScale(ScaleType, double)
Section titled “ChartXScale(ScaleType, double)”public Chart3DBuilder ChartXScale(ScaleType type, double scaleParameter)Configures a parameterized X scale such as power or symmetric log.
Parameters
| Name | Type |
|---|---|
type | ChartGuru.ScaleType |
scaleParameter | System.Double |
Returns
ChartGuru.Chart3DBuilder
ChartXScale(float, float, ScaleType?)
Section titled “ChartXScale(float, float, ScaleType?)”public Chart3DBuilder ChartXScale(float domainMin, float domainMax, ScaleType? type = null)Swift Charts equivalent: .chartXScale(domain:type:).
Parameters
| Name | Type |
|---|---|
domainMin | System.Single |
domainMax | System.Single |
type | System.Nullable{ChartGuru.ScaleType} |
Returns
ChartGuru.Chart3DBuilder
ChartXScale(float, float, ScaleType, double)
Section titled “ChartXScale(float, float, ScaleType, double)”public Chart3DBuilder ChartXScale(float domainMin, float domainMax, ScaleType type, double scaleParameter)Configures an X domain and parameterized scale type.
Parameters
| Name | Type |
|---|---|
domainMin | System.Single |
domainMax | System.Single |
type | ChartGuru.ScaleType |
scaleParameter | System.Double |
Returns
ChartGuru.Chart3DBuilder
ChartYScale(ScaleType)
Section titled “ChartYScale(ScaleType)”public Chart3DBuilder ChartYScale(ScaleType type)Swift Charts equivalent: .chartYScale(type:).
Parameters
| Name | Type |
|---|---|
type | ChartGuru.ScaleType |
Returns
ChartGuru.Chart3DBuilder
ChartYScale(ScaleType, double)
Section titled “ChartYScale(ScaleType, double)”public Chart3DBuilder ChartYScale(ScaleType type, double scaleParameter)Configures a parameterized Y scale such as power or symmetric log.
Parameters
| Name | Type |
|---|---|
type | ChartGuru.ScaleType |
scaleParameter | System.Double |
Returns
ChartGuru.Chart3DBuilder
ChartYScale(float, float, ScaleType?)
Section titled “ChartYScale(float, float, ScaleType?)”public Chart3DBuilder ChartYScale(float domainMin, float domainMax, ScaleType? type = null)Swift Charts equivalent: .chartYScale(domain:type:).
Parameters
| Name | Type |
|---|---|
domainMin | System.Single |
domainMax | System.Single |
type | System.Nullable{ChartGuru.ScaleType} |
Returns
ChartGuru.Chart3DBuilder
ChartYScale(float, float, ScaleType, double)
Section titled “ChartYScale(float, float, ScaleType, double)”public Chart3DBuilder ChartYScale(float domainMin, float domainMax, ScaleType type, double scaleParameter)Configures a Y domain and parameterized scale type.
Parameters
| Name | Type |
|---|---|
domainMin | System.Single |
domainMax | System.Single |
type | ChartGuru.ScaleType |
scaleParameter | System.Double |
Returns
ChartGuru.Chart3DBuilder
ChartZScale(ScaleType)
Section titled “ChartZScale(ScaleType)”public Chart3DBuilder ChartZScale(ScaleType type)Swift Charts equivalent: .chartZScale(type:).
Parameters
| Name | Type |
|---|---|
type | ChartGuru.ScaleType |
Returns
ChartGuru.Chart3DBuilder
ChartZScale(ScaleType, double)
Section titled “ChartZScale(ScaleType, double)”public Chart3DBuilder ChartZScale(ScaleType type, double scaleParameter)Configures a parameterized Z scale such as power or symmetric log.
Parameters
| Name | Type |
|---|---|
type | ChartGuru.ScaleType |
scaleParameter | System.Double |
Returns
ChartGuru.Chart3DBuilder
ChartZScale(float, float, ScaleType?)
Section titled “ChartZScale(float, float, ScaleType?)”public Chart3DBuilder ChartZScale(float domainMin, float domainMax, ScaleType? type = null)Swift Charts equivalent: .chartZScale(domain:type:).
Parameters
| Name | Type |
|---|---|
domainMin | System.Single |
domainMax | System.Single |
type | System.Nullable{ChartGuru.ScaleType} |
Returns
ChartGuru.Chart3DBuilder
ChartZScale(float, float, ScaleType, double)
Section titled “ChartZScale(float, float, ScaleType, double)”public Chart3DBuilder ChartZScale(float domainMin, float domainMax, ScaleType type, double scaleParameter)Configures a Z domain and parameterized scale type.
Parameters
| Name | Type |
|---|---|
domainMin | System.Single |
domainMax | System.Single |
type | ChartGuru.ScaleType |
scaleParameter | System.Double |
Returns
ChartGuru.Chart3DBuilder
ChartXScaleDomain(float, float)
Section titled “ChartXScaleDomain(float, float)”public Chart3DBuilder ChartXScaleDomain(float domainMin, float domainMax)Swift Charts equivalent: .ChartXScale(domain:).
Parameters
| Name | Type |
|---|---|
domainMin | System.Single |
domainMax | System.Single |
Returns
ChartGuru.Chart3DBuilder
ChartYScaleDomain(float, float)
Section titled “ChartYScaleDomain(float, float)”public Chart3DBuilder ChartYScaleDomain(float domainMin, float domainMax)Swift Charts equivalent: .ChartYScale(domain:).
Parameters
| Name | Type |
|---|---|
domainMin | System.Single |
domainMax | System.Single |
Returns
ChartGuru.Chart3DBuilder
ChartZScaleDomain(float, float)
Section titled “ChartZScaleDomain(float, float)”public Chart3DBuilder ChartZScaleDomain(float domainMin, float domainMax)Swift Charts 3D equivalent: .chartZScale(domain:).
Parameters
| Name | Type |
|---|---|
domainMin | System.Single |
domainMax | System.Single |
Returns
ChartGuru.Chart3DBuilder
ChartXScaleRange(float, float, ScaleType?)
Section titled “ChartXScaleRange(float, float, ScaleType?)”public Chart3DBuilder ChartXScaleRange(float rangeMin, float rangeMax, ScaleType? type = null)Swift Charts equivalent: .ChartXScale(range:).
Parameters
| Name | Type |
|---|---|
rangeMin | System.Single |
rangeMax | System.Single |
type | System.Nullable{ChartGuru.ScaleType} |
Returns
ChartGuru.Chart3DBuilder
ChartYScaleRange(float, float, ScaleType?)
Section titled “ChartYScaleRange(float, float, ScaleType?)”public Chart3DBuilder ChartYScaleRange(float rangeMin, float rangeMax, ScaleType? type = null)Swift Charts equivalent: .ChartYScale(range:).
Parameters
| Name | Type |
|---|---|
rangeMin | System.Single |
rangeMax | System.Single |
type | System.Nullable{ChartGuru.ScaleType} |
Returns
ChartGuru.Chart3DBuilder
ChartZScaleRange(float, float, ScaleType?)
Section titled “ChartZScaleRange(float, float, ScaleType?)”public Chart3DBuilder ChartZScaleRange(float rangeMin, float rangeMax, ScaleType? type = null)Swift Charts 3D equivalent: .chartZScale(range:).
Parameters
| Name | Type |
|---|---|
rangeMin | System.Single |
rangeMax | System.Single |
type | System.Nullable{ChartGuru.ScaleType} |
Returns
ChartGuru.Chart3DBuilder
Chart3DPose(Chart3DPose)
Section titled “Chart3DPose(Chart3DPose)”public Chart3DBuilder Chart3DPose(Chart3DPose pose)Set the camera pose. Swift Charts equivalent: .Chart3DPose(_:).
Parameters
| Name | Type |
|---|---|
pose | ChartGuru.Chart3DPose |
Returns
ChartGuru.Chart3DBuilder
Chart3DPose(float, float)
Section titled “Chart3DPose(float, float)”public Chart3DBuilder Chart3DPose(float azimuthDegrees, float inclinationDegrees)Set the camera pose from raw azimuth/inclination angles in degrees.
Parameters
| Name | Type |
|---|---|
azimuthDegrees | System.Single |
inclinationDegrees | System.Single |
Returns
ChartGuru.Chart3DBuilder
Chart3DCameraProjection(Chart3DCameraProjection)
Section titled “Chart3DCameraProjection(Chart3DCameraProjection)”public Chart3DBuilder Chart3DCameraProjection(Chart3DCameraProjection projection)Set the camera projection. Swift Charts equivalent: .Chart3DCameraProjection(_:).
Parameters
| Name | Type |
|---|---|
projection | ChartGuru.Chart3DCameraProjection |
Returns
ChartGuru.Chart3DBuilder
SurfacePreset(Chart3DSurfacePreset)
Section titled “SurfacePreset(Chart3DSurfacePreset)”public Chart3DBuilder SurfacePreset(Chart3DSurfacePreset preset)Chooses the base surface material while preserving per-mark roughness and metalness overrides.
Parameters
| Name | Type |
|---|---|
preset | ChartGuru.Chart3DSurfacePreset |
Returns
ChartGuru.Chart3DBuilder
Animation(Animation)
Section titled “Animation(Animation)”public Chart3DBuilder Animation(Animation animation)Sets the animation the built chart plays when its values change, which lifts and entry replays also use when given none; without one, changes show at once.
Parameters
| Name | Type |
|---|---|
animation | ChartGuru.Animation |
Returns
ChartGuru.Chart3DBuilder
Stacking(MarkStackingMethod)
Section titled “Stacking(MarkStackingMethod)”public Chart3DBuilder Stacking(MarkStackingMethod method)Sets the stacking of every Bar3DMark and StackedArea3DMark in the chart when
Chart3DBuilder.Build() runs, replacing the method each mark set; other marks are unaffected.
Parameters
| Name | Type |
|---|---|
method | ChartGuru.MarkStackingMethod |
Returns
ChartGuru.Chart3DBuilder
Stacked()
Section titled “Stacked()”public Chart3DBuilder Stacked()Stacks every bar and stacked area from zero when the chart is built; shortcut for Stacking(MarkStackingMethod.Standard).
Returns
ChartGuru.Chart3DBuilder
Grouped()
Section titled “Grouped()”public Chart3DBuilder Grouped()Builds every bar and stacked area unstacked, each standing from zero at its own X and Z; shortcut for
Stacking(MarkStackingMethod.Unstacked).
Returns
ChartGuru.Chart3DBuilder
Normalized()
Section titled “Normalized()”public Chart3DBuilder Normalized()Stacks every bar and stacked area as shares of the total at its position when the chart is built, so stacks fill
0 to 1; shortcut for Stacking(MarkStackingMethod.Normalized).
Returns
ChartGuru.Chart3DBuilder
Centered()
Section titled “Centered()”public Chart3DBuilder Centered()Stacks every bar and stacked area centered on zero when the chart is built, like a streamgraph; shortcut for
Stacking(MarkStackingMethod.Center).
Returns
ChartGuru.Chart3DBuilder
ChartTitle(string)
Section titled “ChartTitle(string)”public Chart3DBuilder ChartTitle(string title)Sets the title 3D hosts draw outside the plot, at the chart’s title position (top center by default) in the theme’s title style; null or empty adds none.
Parameters
| Name | Type |
|---|---|
title | System.String |
Returns
ChartGuru.Chart3DBuilder
ChartSubtitle(string)
Section titled “ChartSubtitle(string)”public Chart3DBuilder ChartSubtitle(string subtitle)Sets the subtitle 3D hosts draw under the title in the theme’s subtitle style; null or empty adds none.
Parameters
| Name | Type |
|---|---|
subtitle | System.String |
Returns
ChartGuru.Chart3DBuilder
ChartZSelection(Action<float?>)
Section titled “ChartZSelection(Action<float?>)”public Chart3DBuilder ChartZSelection(Action<float?> handler)Swift Charts equivalent: .ChartZSelection(…).
Parameters
| Name | Type |
|---|---|
handler | System.Action{System.Nullable{System.Single}} |
Returns
ChartGuru.Chart3DBuilder
Build()
Section titled “Build()”public Chart Build()Build and return the configured Chart. The caller typically
passes it to a Chart3DComponent in the scene or to the editor
preview window.
Returns
ChartGuru.Chart