Adds a new element of given type to the specified array. For example, it can be used to add a new Chart to “charts” Array.
Parameters:var stockChart = new CanvasJS.StockChart("container",
{
.
.
subtitles: []
.
.
});
stockChart.render();
stockChart.addTo("subtitles", { text: "StockChart Subtitles"});