set(String propertyName, Mixed value [,Boolean updateStockChart = true])
Sets the value for the specified property of StockChart.
Parameters:
propertyName: Name of the property.
value: Value to be set on property
updateStockChart: When true, updates the StockChart after setting the value. Default value is true.
Example:stockChart.set(“exportEnabled”, true);
Note:
- You can refer toStockChart Elementfor complete list of properties available.
- StockChart should be rendered before you can use set method.
- By default StockChart gets updated / re-rendered, whenever set method is called. If you have multiple properties, it is recommended to disable auto update by setting updateStockChart to false till the last step. Otherwise, the performance might be affected because of rendering StockChart repeatedly.
var stockChart = new CanvasJS.StockChart("container",
{
.
.
exportEnabled: false,
.
.
});
stockChart.render();
stockChart.set("exportEnabled", true);
Properties that can be set via this method
Please refer toStockChart Elementfor complete list of properties that can be accessed via set.