anychart.onDocumentReady(function () {
dataSet = anychart.data.set([
var chart = anychart.line();
chart.title().text("Click on Chart to Add a Point ");
chart.spline(dataSet).markers(null);
chart.xAxis().staggerMode(false);
chart.container("container").draw();
indexSetter = (dataSet.mapAs().getRowsCount())+1;
var streamButton = document.getElementById("streamButton");
streamButton.innerHTML = "Stop" + "\nstream";
value : Math.floor((Math.random() * 500)+ 1)
streamButton.onclick = function() {
streamButton.onclick = function () {
streamButton.innerHTML = "Start" + "\nstream";