Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. ...
  2. var ctx = document.getElementById("chart").getContext("2d");
  3. var myChart = new Chart(ctx).Bar(data);
  4.  
  5. myChart.destroy();
  6.  
  7. myChart = new Chart(ctx).Bar(newData);
  8.  
  9. data.labels = [5, 6, 7, 8, 9];
  10. data.datasets[0].data = [5, 6, 7, 8, 9];
  11. myChart.destroy();
  12. myChart = new Chart(ctx).Bar(data);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement