Package com.oorian.chartjs
Class CjInteractionConfig
java.lang.Object
com.oorian.chartjs.CjInteractionConfig
- All Implemented Interfaces:
com.oorian.json.Jsonable
Configuration for Chart.js interaction settings.
Usage:
CjInteractionConfig interaction = new CjInteractionConfig()
.setMode(InteractionMode.INDEX)
.setIntersect(false);
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAxis()getMode()booleanChecks if this configuration has any values set.voidinitFromJson(com.oorian.json.JsonValue json) Sets the axis to use for interaction.setIntersect(boolean intersect) Sets whether to only trigger when directly over an element.setMode(InteractionMode mode) Sets the interaction mode.com.oorian.json.JsonValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.oorian.json.Jsonable
initFromJson, initFromJson, toJsonString
-
Constructor Details
-
CjInteractionConfig
public CjInteractionConfig()Creates a new interaction configuration.
-
-
Method Details
-
setMode
Sets the interaction mode.- Parameters:
mode- The interaction mode- Returns:
- This instance for method chaining
-
setIntersect
Sets whether to only trigger when directly over an element.- Parameters:
intersect- True for intersect mode- Returns:
- This instance for method chaining
-
setAxis
Sets the axis to use for interaction.- Parameters:
axis- "x", "y", "xy", or "r"- Returns:
- This instance for method chaining
-
getMode
-
getIntersect
-
getAxis
-
initFromJson
public void initFromJson(com.oorian.json.JsonValue json) - Specified by:
initFromJsonin interfacecom.oorian.json.Jsonable
-
toJsonValue
public com.oorian.json.JsonValue toJsonValue()- Specified by:
toJsonValuein interfacecom.oorian.json.Jsonable
-
hasValues
public boolean hasValues()Checks if this configuration has any values set.- Returns:
- True if any property is set
-