HighChart (하이차트) Widget Control
The Widget Controls (Property · Method · Event) you use to control the HighChart widget from a script. For an introduction to the widget and how to use it, see HighChart.
In the examples below, highchartID is the name (ID) you assigned to the HighChart widget on the canvas. In a script, access it as widgetID.member.
Widget Control summary
| Widget Control | Kind | Signature | Description |
|---|---|---|---|
setVar | Method | setVar(name, value) | Changes the value of a variable declared in the chart and redraws the chart |
Property
Not applicable — the HighChart widget has no script-only Property. In a script, read and write values with the common Widget Controls below (getProperty / setProperty).
Method
setVar
Changes the value of a single variable declared in the chart, then redraws the chart with the new value. The variable must already be declared in the chart definition's variable list.
- Kind: Method
- Parameters
name(string): Name of the declared chart variable to changevalue(string): The new value. It is injected as-is as a JavaScript expression, so string values must include their quotes, and an empty string is treated asnull.
- Returns: None (
void)
Example
// Inject an array of numbers
highchartID.setVar("data", "[1, 2, 3]");
// String values include their quotes
highchartID.setVar("title", "\"Sales\"");
Event
Not applicable — the HighChart widget has no dedicated Event.
Common Widget Control (all widgets)
Every widget can use name-based common Widget Controls (Method) such as setProperty / getProperty / setStyleProperty. See the common reference doc (to be written).