Class NativeHook
- java.lang.Object
-
- org.pepstock.charba.client.plugins.NativeHook
-
- All Implemented Interfaces:
IsJSType
@JsType(isNative=true, name="Function", namespace="<global>") public final class NativeHook extends Object implements IsJSType
Enables the capability to create a plugin hook directly in java script language.
This could be helpful when for performance reason, you don't want to wraps all objects.
The hook will receive only 3 arguments, to use in the java script code,"chart"
,"args"
,"options"
.
See CHART.JS doc about the arguments.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NativeHook
create(String code)
String
toSource()
Returns a string representing the source code of the function.
-
-
-
Method Detail
-
create
@JsOverlay public static NativeHook create(String code)
Creates a plugin hook in java script.
The hook will receive only 3 arguments, to use in the java script code,"chart"
,"args"
,"options"
.- Parameters:
code
- the code of the hook to execute- Returns:
- a plugin hook in java script
-
toSource
@JsMethod(name="toString") public String toSource()
Returns a string representing the source code of the function.- Returns:
- a string representing the source code of the function
-
-