public class Function extends BaseOption
Maps to the Highcharts Function, highcharts.*callbackfunction data types.
Example: chart.events.click
ref: https://api.highcharts.com/highcharts/chart.events.click
Constructor and Description |
---|
Function() |
Function(String functionBody)
Construct with a function body.
|
Function(String functionBody,
String... parameters)
Construct with a function body and 1 or more parameters for the declaration of the Javascript function.
|
Modifier and Type | Method and Description |
---|---|
void |
addParameter(String parameter)
Add parameters to the declaration of the Javascript function.
|
String |
getFunctionBody()
Get the function body.
|
String |
getRawValue()
Get the function as raw Javascript.
|
boolean |
isConvertFunction()
Get whether to convert the function so it can be converted back to a function in your JavaScript.
|
boolean |
isEmitAsString()
Get whether to emit the function as a JSON string.
|
Function |
setEmitAsString(boolean emitAsString)
Set whether to emit the function as a JSON string and convert it so it to be converted back to a function in your JavaScript.
|
Function |
setEmitAsString(boolean emitAsString,
boolean convertFunction)
Set whether to emit the function as a JSON string.
|
Function |
setFunctionBody(String functionBody)
Set the function body.
|
set_hcNulledOption
public static final Function NULL
public Function()
public Function(String functionBody, String... parameters)
functionBody
- parameters
- public Function(String functionBody)
functionBody
- the function body.public String getRawValue()
public void addParameter(String parameter)
parameter
- the name of the parameter.public String getFunctionBody()
public Function setFunctionBody(String functionBody)
functionBody
- The function body string.public boolean isEmitAsString()
public boolean isConvertFunction()
public Function setEmitAsString(boolean emitAsString)
emitAsString
- boolean whether to emit the function as a JSON string.public Function setEmitAsString(boolean emitAsString, boolean convertFunction)
emitAsString
- boolean whether to emit the function as a JSON string.convertFunction
- boolean whether to convert the function so it can be converted back to a function in your JavaScript.Copyright © 2023. All rights reserved.