Getting values from Constant Variables

The values of “constant” variables are accessed by reading the properties of controller.variables. This object contains a property for each constant variable defined.

Example:

var apiKEy = controller.variables['API Key'];

// use the apiKey in your code

In the above example, the chart has a constant variable of type “string” defined with the name “API Key”. We access the value by reading the property “API Key” from controller.variables.