code: function addData(chart, label, data) {
      chart.data.labels.push(label)
      chart.data.datasets.forEach((dataset) => {
          dataset.data.push(data)
      })
      chart.update()
  }
docs: var ctx = document.getElementById("myChart") var myChart = new Chart(ctx, { type: 'line', data: { labels: ["arcs"], datasets: [{ label: '#Arcs', data: [] }] }, options: { scales: { yAxes: [{ ticks: { beginAtZero:true } }] } } }) let r = 0