This section is regarding Methods and Properties available in the StockChart element.
Examples:| Method | Description | Example |
|---|---|---|
| get(String propertyName) | Returns the specified property of StockChart | stockChart.get(“backgroundColor”) |
| set(String propertyName, Mixed value [,Boolean updateChart = true]) | Sets the specified property of StockChart & optionally updates (default) the StockChart. | stockChart.set(“backgroundColor”, “red”) |
| addTo(String arrayName, Object options [, Number index = array.length]) | Adds a new element of given type to the specified array. | stockChart.addTo(“charts”, {data: []}) |
| render() | Renders the StockChart | stockChart.render() |
| exportChart(Object options) | Exports the StockChart as image | stockChart.exportChart() |
| print() | Prints the StockChart | stockChart.print() |
Can be accessed via get method or dot notation.
| Property | Description | Example |
|---|---|---|
| bounds | Bounding rectangle of Chart: {x1, x2, y1, y2} | stockChart.bounds / stockChart.get(“bounds”) |
| container | DOM-Element | stockChart.container / stockChart.get(“container” |
| selectedColorSet | Colors in the Selected Colorset | stockChart.selectedColorSet / stockChart.get(“selectedColorSet”) |
| title | Title of StockChart | stockChart.title / stockChart.get(“title”) |
| subtitles | Array of Subtitles of StockChart | stockChart.subtitles / stockChart.get(“subtitles”) |
| charts | Array of Charts of StockChart | stockChart.charts/ stockChart.get(“charts”) |
| navigator | Navigator of StockChart | stockChart.navigator/ stockChart.get(“navigator”) |
| rangeSelector | Range-Selector of StockChart | stockChart.rangeSelector/ stockChart.get(“rangeSelector”) |
All StockChart options become available as properties after StockChart is rendered. You can access them either via get method or dot notation. But you can change / set those values only via set method.
Please refer to StockChart Element for complete list of properties available.