TransitionsOptions
Namespace: Wisej.Web.Ext.ChartJS4.Models
Assembly: Wisej.Web.Ext.ChartJS4 (4.1.0.0)
Transitions options (Chart.js options.transitions).
- C#
- VB.NET
public class TransitionsOptions : OptionsBase
Public Class TransitionsOptions
Inherits OptionsBase
Transitions configure the animations used for specific update modes: active (hover), resize, show, hide, reset, none or any custom mode. Each mode maps to an object with animation and/or animations members. Since the modes are open-ended, they are supplied through ExtensionData. An instance is obtained from Transitions.
Example:
var chart = new ChartJS4();
chart.ChartOptions.Transitions.ExtensionData = new Dictionary<string, object>
{
["show"] = new { animations = new { x = new { from = 0 }, y = new { from = 0 } } },
["hide"] = new { animations = new { x = new { to = 0 }, y = new { to = 0 } } }
};
Constructors
TransitionsOptions()
Initializes a new instance of TransitionsOptions.
Methods
ResetExtensionData()
Resets the ExtensionData property to its default value of null.
Used by the Visual Studio designer when the user resets the property.
Example:
chart.ChartOptions.Transitions.ResetExtensionData();
ShouldSerializeExtensionData()
Determines whether the ExtensionData property should be serialized by the designer.
Returns: Boolean. true if ExtensionData contains at least one entry; otherwise false.
Used by the Visual Studio designer to decide whether to generate code for the property.
Example:
if (transitions.ShouldSerializeExtensionData())
transitions.ResetExtensionData();