Class CjAnimationConfig

java.lang.Object
com.oorian.chartjs.CjAnimationConfig
All Implemented Interfaces:
com.oorian.json.Jsonable

public class CjAnimationConfig extends Object implements com.oorian.json.Jsonable
Configuration for Chart.js animation settings.

Usage:


 CjAnimationConfig animation = new CjAnimationConfig()
     .setDuration(1000)
     .setEasing("easeOutQuart");
 
  • Constructor Details

    • CjAnimationConfig

      public CjAnimationConfig()
      Creates a new animation configuration.
  • Method Details

    • setEnabled

      public CjAnimationConfig setEnabled(boolean enabled)
      Sets whether animations are enabled.
      Parameters:
      enabled - True to enable animations
      Returns:
      This instance for method chaining
    • setDuration

      public CjAnimationConfig setDuration(int milliseconds)
      Sets the animation duration.
      Parameters:
      milliseconds - Duration in milliseconds
      Returns:
      This instance for method chaining
    • setEasing

      public CjAnimationConfig setEasing(String easing)
      Sets the easing function.
      Parameters:
      easing - The easing function name (e.g., "linear", "easeOutQuart")
      Returns:
      This instance for method chaining
    • setDelay

      public CjAnimationConfig setDelay(int milliseconds)
      Sets the animation delay.
      Parameters:
      milliseconds - Delay in milliseconds
      Returns:
      This instance for method chaining
    • setLoop

      public CjAnimationConfig setLoop(boolean loop)
      Sets whether the animation should loop.
      Parameters:
      loop - True to loop
      Returns:
      This instance for method chaining
    • getEnabled

      public Boolean getEnabled()
    • getDuration

      public Integer getDuration()
    • getEasing

      public String getEasing()
    • getDelay

      public Integer getDelay()
    • getLoop

      public Boolean getLoop()
    • initFromJson

      public void initFromJson(com.oorian.json.JsonValue json)
      Specified by:
      initFromJson in interface com.oorian.json.Jsonable
    • toJsonValue

      public com.oorian.json.JsonValue toJsonValue()
      Specified by:
      toJsonValue in interface com.oorian.json.Jsonable
    • hasValues

      public boolean hasValues()
      Checks if this configuration has any values set.
      Returns:
      True if any property is set