SimpleBarChart (심플 바차트) Widget Control
This page lists the Widget Control (Property · Method · Event) you use to control the SimpleBarChart widget from a script. For an introduction to the widget and how to use it, visit SimpleBarChart.
In the examples below, simplebarchartID is the name (ID) you assigned to the SimpleBarChart widget on the canvas. In a script, access members as widgetID.member.
Widget Control summary
| Widget Control | Kind | Signature | Description |
|---|---|---|---|
setListData | Method | setListData(data) | Sets the bar data from a list of objects |
setStringData | Method | setStringData(data) | Sets the bar data from a compact string |
Property
Not applicable — the SimpleBarChart widget has no script-only Property. In scripts, read and write values with the common Widget Control below (getProperty / setProperty).
Method
setListData
Sets all bar data at once from a list of objects. Each item is an object with value (required) plus optional color and width. Items without a value are skipped. Calling this method clears data you set as a string.
- Kind: Method
- Parameters:
data- a list of bar description objects shaped like{ value, color, width }.valueis a number (required),coloris a color string (for example,"#FF0000"), andwidthis a number (optional) - Returns: None (
void)
Example
simplebarchartID.setListData([
{ value: 10, color: "#FF0000", width: 8 },
{ value: -5, color: "#0000FF" },
]);
setStringData
Sets the bar data from a comma-separated compact string. Separate bars with ,, and inside one bar use : to give value:color:width in that order — color and width are optional, value is required.
- Kind: Method
- Parameters:
data- a string that joinsvalue:color:widthbar entries with, - Returns: None (
void)
Example
simplebarchartID.setStringData("10:FF0000:8,-5:0000FF,3");
Event
Not applicable — the SimpleBarChart widget has no dedicated Event.
Common Widget Control (all widgets)
Every widget supports name-based common Widget Control (Method) such as setProperty, getProperty, and setStyleProperty. See the common reference doc (to be written).