Skip to content

ChartMorpher

ClassChartGuruChartGuru
public class ChartMorpher

Drives value and chart-type transitions. Interpolates previous-to-current mark values via a Burst job using an ChartGuru.Animation curve.

public event Action<ChartMorpher> OnMorphStarted

No description is available for this member.

Returns

System.Action{ChartGuru.ChartMorpher} — No return description is available.

public event Action<ChartMorpher, float> OnMorphProgress

No description is available for this member.

Returns

System.Action{ChartGuru.ChartMorpher,System.Single} — No return description is available.

public event Action<ChartMorpher> OnMorphComplete

No description is available for this member.

Returns

System.Action{ChartGuru.ChartMorpher} — No return description is available.

public MorphState State { get; }

No description is available for this member.

Returns

ChartGuru.MorphState — No return description is available.

public float Progress { get; }

No description is available for this member.

Returns

System.Single — No return description is available.

public float EasedProgress { get; }

Eased progress in [0, 1] (may briefly overshoot for spring curves). Use for domain/grid animation.

Returns

System.Single — No return description is available.

public ChartType SourceType { get; }

No description is available for this member.

Returns

ChartGuru.ChartType — No return description is available.

public ChartType TargetType { get; }

No description is available for this member.

Returns

ChartGuru.ChartType — No return description is available.

public bool IsMorphing { get; }

No description is available for this member.

Returns

System.Boolean — No return description is available.

public bool IsTypeMorph { get; }

True while a chart-type transition is in progress (source and target types differ).

Returns

System.Boolean — No return description is available.

public ChartMorphStyle MorphStyle { get; }

Visual style the renderer should use for the ongoing type morph.

Returns

ChartGuru.ChartMorphStyle — No return description is available.

public NativeArray<float2> CurrentPositions { get; }

No description is available for this member.

Returns

Unity.Collections.NativeArray{Unity.Mathematics.float2} — No return description is available.

public NativeArray<float> CurrentValues { get; }

No description is available for this member.

Returns

Unity.Collections.NativeArray{System.Single} — No return description is available.

public bool HasAnimatedColors { get; }

No description is available for this member.

Returns

System.Boolean — No return description is available.

public Vector2 SourceXDomain { get; }

No description is available for this member.

Returns

UnityEngine.Vector2 — No return description is available.

public Vector2 SourceYDomain { get; }

No description is available for this member.

Returns

UnityEngine.Vector2 — No return description is available.

public bool IsEntryAnimation { get; }

True while the in-progress value animation began with no previous values (i.e. it was triggered by ChartGuru.Chart.ReplayEntryAnimation(System.Nullable%7bChartGuru.Animation%7d)). Renderers can use this to opt into kind-specific entry-only motion modifiers (alpha fade, scale-in, slide-in, color lerp from theme background, …) that would look strange during ordinary data-change animations.

Returns

System.Boolean — No return description is available.

public ChartMorpher(Chart chart)

No description is available for this member.

Parameters

Name Type Description
chart ChartGuru.Chart

StartMorph(ChartType, ChartType, Animation, Action)

Section titled “StartMorph(ChartType, ChartType, Animation, Action)”
public void StartMorph(ChartType sourceType, ChartType targetType, Animation animation, Action onComplete = null)

Starts a chart-type morph. The chart has already switched to targetType by the time this is called. The morpher keeps values stable (source == target) so the data doesn’t “grow in” on every morph; instead the renderer cross-fades between the source and target chart type using ChartGuru.ChartMorpher.EasedProgress.

Parameters

Name Type Description
sourceType ChartGuru.ChartType
targetType ChartGuru.ChartType
animation ChartGuru.Animation
onComplete System.Action

StartMorph(ChartType, ChartType, Animation, ChartMorphStyle, Action)

Section titled “StartMorph(ChartType, ChartType, Animation, ChartMorphStyle, Action)”
public void StartMorph(ChartType sourceType, ChartType targetType, Animation animation, ChartMorphStyle style, Action onComplete = null)

Starts a chart-type morph. The chart has already switched to targetType by the time this is called. The morpher keeps values stable (source == target) so the data doesn’t “grow in” on every morph; instead the renderer cross-fades between the source and target chart type using ChartGuru.ChartMorpher.EasedProgress.

Parameters

Name Type Description
sourceType ChartGuru.ChartType
targetType ChartGuru.ChartType
animation ChartGuru.Animation
style ChartGuru.ChartMorphStyle
onComplete System.Action

StartValueAnimation(float[], Color[], Color[], Animation)

Section titled “StartValueAnimation(float[], Color[], Color[], Animation)”
public void StartValueAnimation(float[] previousValues, Color[] previousColors, Color[] currentColors, Animation animation)

Starts a value animation from previous values to current values. Used when data changes and the chart has a non-null ChartGuru.Chart.Animation.

Parameters

Name Type Description
previousValues System.Single[]
previousColors UnityEngine.Color[]
currentColors UnityEngine.Color[]
animation ChartGuru.Animation
public void Update(float deltaTime)

No description is available for this member.

Parameters

Name Type Description
deltaTime System.Single
public void CompleteMorph()

No description is available for this member.

public void CancelMorph()

No description is available for this member.

public bool TryGetCurrentColor(int index, out Color color)

No description is available for this member.

Parameters

Name Type Description
index System.Int32
color UnityEngine.Color

Returns

System.Boolean — No return description is available.

public void Dispose()

No description is available for this member.