Chart3DTexture
public sealed class Chart3DTexture : MonoBehaviour, IChartHostRenders a 3D chart into the RawImage on the same GameObject through its own private view, only when
something it shows changed. It hosts its own chart like any chart host (an inline definition or a chart asset, plus
bound data), or mirrors a scene Chart 3D host. Use it where the chart is a texture; Chart3DImage is the
interactive Canvas chart.
Methods
Section titled “Methods”
SetChart(Chart)
Section titled “SetChart(Chart)”public void SetChart(Chart chart)Shows a chart built in code instead of the texture’s content or source until Chart3DTexture.ClearChart() is called.
The chart is runtime state, is not saved and stays its caller’s. Like a mirrored source it is drawn as given, so
several outputs can show one chart; whoever animates it runs its transitions.
Parameters
| Name | Type |
|---|---|
chart | ChartGuru.Chart |
ClearChart()
Section titled “ClearChart()”public void ClearChart()Returns from a chart set in code to the texture’s content or source.
SetData(ChartDataFrame, bool)
Section titled “SetData(ChartDataFrame, bool)”public void SetData(ChartDataFrame data, bool shapeChanged = true)Shows data instead of the bound data of the texture’s own chart, mapped by the definition’s
layers. The data is runtime state and is not saved; pass null to return to the bound data. Pass
shapeChanged false when the data keeps the columns, row count and categories shown, so the
chart’s values update in place.
Parameters
| Name | Type |
|---|---|
data | ChartGuru.ChartDataFrame |
shapeChanged | System.Boolean |
ClearData()
Section titled “ClearData()”public void ClearData()Returns from data set in code to the bound data.
Rebuild()
Section titled “Rebuild()”public void Rebuild()Recompiles the texture’s own chart from its definition and data now; a disabled texture recompiles when enabled.
SetDirty()
Section titled “SetDirty()”public void SetDirty()Recompiles the texture’s own chart on the next update.
ReplayEntryAnimation(Animation?)
Section titled “ReplayEntryAnimation(Animation?)”public void ReplayEntryAnimation(Animation? animation = null)Replays the entry animation of the texture’s own chart, using the chart’s animation when none is given.
Parameters
| Name | Type |
|---|---|
animation | System.Nullable{ChartGuru.Animation} |
PlayLift(float, Animation?, Action)
Section titled “PlayLift(float, Animation?, Action)”public void PlayLift(float lift, Animation? animation = null, Action completed = null)Plays the lift into 3D (toward 1) or the flattening into 2D (toward 0), as Chart3DComponent.PlayLift(float, Animation?, Action).
The output’s own chart animates; a mirrored or code chart, drawn as given, takes the lift at once.
Parameters
| Name | Type |
|---|---|
lift | System.Single |
animation | System.Nullable{ChartGuru.Animation} |
completed | System.Action |
Invalidate()
Section titled “Invalidate()”public void Invalidate()Rebuilds and renders the texture on its next update, for content that changed without telling the chart, such as
a stateful surface function; Chart3DTexture.Refresh(float) renders at once.
Refresh(float)
Section titled “Refresh(float)”public void Refresh(float deltaTime = 0)Immediately renders current inputs, including stateful functions. Use deltaTime to advance a manually clocked view.
Parameters
| Name | Type |
|---|---|
deltaTime | System.Single |
Constructors
Section titled “Constructors”
Chart3DTexture()
Section titled “Chart3DTexture()”public Chart3DTexture()Properties
Section titled “Properties”
ContentMode
Section titled “ContentMode”public Chart3DContentMode ContentMode { get; set; }Where this texture gets its chart. Setting Chart3DContentMode.Own clears the source; Source mode
without a source draws nothing.
Returns
ChartGuru.Chart3DContentMode
Source
Section titled “Source”public Chart3DComponent Source { get; set; }The scene Chart 3D host this texture mirrors in Source mode. Assigning a host switches the texture to Source mode; null only clears the reference, so a texture in Source mode then draws nothing. Either way a chart set from code is cleared.
Returns
ChartGuru.Chart3DComponent
Content
Section titled “Content”public ChartHostContent Content { get; }What this texture hosts in Own mode: an inline definition or a chart asset, plus bound data.
Returns
ChartGuru.ChartHostContent
Definition
Section titled “Definition”public ChartDefinition Definition { get; }The definition of this texture’s own chart, to read or edit. In Play Mode a texture that uses a chart asset
returns its own copy, like Renderer.material, so runtime edits never change the asset. Call
Chart3DTexture.Rebuild() after editing it.
Returns
ChartGuru.ChartDefinition
InlineDefinition
Section titled “InlineDefinition”public ChartDefinition InlineDefinition { get; set; }The definition stored with this texture, used when no chart asset is assigned.
Returns
ChartGuru.ChartDefinition
DefinitionAsset
Section titled “DefinitionAsset”public ChartAsset DefinitionAsset { get; set; }Shared chart asset; assigning one replaces the inline definition until it is cleared.
Returns
ChartGuru.ChartAsset
DataAsset
Section titled “DataAsset”public ChartDataAsset DataAsset { get; set; }Shared data table bound to this texture’s own chart.
Returns
ChartGuru.ChartDataAsset
public Chart Chart { get; }The chart being drawn: a chart set from code, else the source’s chart in Source mode or this texture’s own chart.
Show a chart built in code with Chart3DTexture.SetChart(Chart) and return with Chart3DTexture.ClearChart().
Returns
ChartGuru.Chart
HasRuntimeChart
Section titled “HasRuntimeChart”public bool HasRuntimeChart { get; }True while a chart set from code replaces what the texture shows.
Returns
System.Boolean
IsShowingPreviewData
Section titled “IsShowingPreviewData”public bool IsShowingPreviewData { get; }True while the texture’s own chart shows generated preview data because nothing is bound and the definition has no rows.
Returns
System.Boolean
ViewSettings
Section titled “ViewSettings”public Chart3DViewSettings ViewSettings { get; }Returns
ChartGuru.Chart3DViewSettings
public ChartTheme Theme { get; set; }Optional theme for this output’s 3D look, axis, grid and text colors and background. Empty uses the chart’s theme; the chart’s own palette always colors the marks.
Returns
ChartGuru.ChartTheme
Appearance
Section titled “Appearance”public Chart3DAppearanceOverride Appearance { get; set; }Optional changes to the theme’s 3D look for this output only, such as another environment cubemap.
Returns
ChartGuru.Chart3DAppearanceOverride
public Chart3DPose Pose { get; set; }Returns
ChartGuru.Chart3DPose
Projection
Section titled “Projection”public Chart3DCameraProjection Projection { get; set; }Returns
ChartGuru.Chart3DCameraProjection
AutoRotate
Section titled “AutoRotate”public bool AutoRotate { get; set; }Returns
System.Boolean
Texture
Section titled “Texture”public RenderTexture Texture { get; }Returns
UnityEngine.RenderTexture
HasError
Section titled “HasError”public bool HasError { get; }Returns
System.Boolean
public float Zoom { get; set; }Lens zoom of this view; 1 is the framed size. Runtime only.
Returns
System.Single
public float Lift { get; set; }How lifted the chart is drawn, as Chart3DComponent.Lift: 1 at full depth and the chart’s pose, 0 flat
and facing the viewer, as its 2D chart. Setting it shows the new lift at once.
Returns
System.Single