ChartTransition
public sealed class ChartTransitionThe one transition driver of a chart renderer. It owns timing (delay, duration, repeats and autoreverse),
the presented value of every mark and the source state a new transition starts from. Data transitions pair
marks by MarkKey (or the chart's Chart.TransitionMapping) and retarget from the
presented state when they start while another one runs. All buffers grow with the largest chart and are
reused, so starting and running a transition allocates nothing once warm.
Constructors
Section titled “Constructors”
ChartTransition(Chart)
Section titled “ChartTransition(Chart)”public ChartTransition(Chart chart)Creates the driver for chart.
Parameters
| Name | Type |
|---|---|
chart |
ChartGuru.Chart |
Methods
Section titled “Methods”
TryGetCurrentColor(int, out Color)
Section titled “TryGetCurrentColor(int, out Color)”public bool TryGetCurrentColor(int index, out Color color)Presented color of the mark at index while colors animate.
Parameters
| Name | Type |
|---|---|
index |
System.Int32 |
color |
UnityEngine.Color |
Returns
System.Boolean
StartType(ChartType, ChartType, Animation)
Section titled “StartType(ChartType, ChartType, Animation)”public void StartType(ChartType sourceType, ChartType targetType, Animation animation)Starts a cross-fading chart-type morph from sourceType to targetType.
Parameters
| Name | Type |
|---|---|
sourceType |
ChartGuru.ChartType |
targetType |
ChartGuru.ChartType |
animation |
ChartGuru.Animation |
StartType(ChartType, ChartType, MorphOptions)
Section titled “StartType(ChartType, ChartType, MorphOptions)”public void StartType(ChartType sourceType, ChartType targetType, MorphOptions options)Starts a chart-type morph with options (animation, style, point mapping and completion
callback). The chart has already switched to targetType; values stay at their targets
while the renderer morphs the marks between the two types. A running type morph finishes first.
Parameters
| Name | Type |
|---|---|
sourceType |
ChartGuru.ChartType |
targetType |
ChartGuru.ChartType |
options |
ChartGuru.MorphOptions |
StartEntry(Animation)
Section titled “StartEntry(Animation)”public void StartEntry(Animation animation)Grows every mark in from zero, the entry animation hosts play when a chart first appears.
Parameters
| Name | Type |
|---|---|
animation |
ChartGuru.Animation |
Complete()
Section titled “Complete()”public void Complete()Ends the running transition on its target and raises ChartTransition.Completed.
Cancel()
Section titled “Cancel()”public void Cancel()Stops the running transition without raising completion; the chart then draws its target.
Dispose()
Section titled “Dispose()”public void Dispose()Releases the native buffers; do not use the instance afterward.
Properties
Section titled “Properties”
public ChartTransitionKind Kind { get; }What the running or last transition animates.
Returns
ChartGuru.ChartTransitionKind
IsRunning
Section titled “IsRunning”public bool IsRunning { get; }True while a transition runs.
Returns
System.Boolean
Progress
Section titled “Progress”public float Progress { get; }Progress through the current cycle in [0, 1].
Returns
System.Single
EasedProgress
Section titled “EasedProgress”public float EasedProgress { get; }Progress after the animation curve; springs may overshoot 1 briefly.
Returns
System.Single
SourceType
Section titled “SourceType”public ChartType SourceType { get; }Chart type the transition starts from.
Returns
ChartGuru.ChartType
TargetType
Section titled “TargetType”public ChartType TargetType { get; }Chart type the transition ends on.
Returns
ChartGuru.ChartType
IsTypeMorph
Section titled “IsTypeMorph”public bool IsTypeMorph { get; }True while a chart-type morph runs.
Returns
System.Boolean
IsEntryAnimation
Section titled “IsEntryAnimation”public bool IsEntryAnimation { get; }True while the entry animation (Chart.ReplayEntryAnimation(Animation?)) grows every mark in from zero.
Returns
System.Boolean
MorphStyle
Section titled “MorphStyle”public ChartMorphStyle MorphStyle { get; }Visual style of the running type morph.
Returns
ChartGuru.ChartMorphStyle
PointMapping
Section titled “PointMapping”public PointMapping PointMapping { get; }How the running transition pairs source and target marks.
Returns
ChartGuru.PointMapping
SourceXDomain
Section titled “SourceXDomain”public Vector2 SourceXDomain { get; }Effective X domain the axes animate from during a data transition.
Returns
UnityEngine.Vector2
SourceYDomain
Section titled “SourceYDomain”public Vector2 SourceYDomain { get; }Effective Y domain the axes animate from during a data transition.
Returns
UnityEngine.Vector2
CurrentValues
Section titled “CurrentValues”public NativeArray<float> CurrentValues { get; }Presented value of every mark of the chart, by mark index: the value renderers draw while the transition runs. Entering marks start from zero. The array is a view into reused storage; do not keep or dispose it.
Returns
Unity.Collections.NativeArray{System.Single}
HasAnimatedColors
Section titled “HasAnimatedColors”public bool HasAnimatedColors { get; }True while mark colors animate (heat-map cells).
Returns
System.Boolean
Events
Section titled “Events”
Started
Section titled “Started”public event Action<ChartTransition> StartedRaised when a transition starts, including when it retargets a running one.
Returns
System.Action{ChartGuru.ChartTransition}
Progressed
Section titled “Progressed”public event Action<ChartTransition, float> ProgressedRaised with the cycle progress in [0, 1] every time a running transition advances.
Returns
System.Action{ChartGuru.ChartTransition,System.Single}
Completed
Section titled “Completed”public event Action<ChartTransition> CompletedRaised when a transition reaches its target; not raised when it is retargeted or cancelled.
Returns
System.Action{ChartGuru.ChartTransition}