Advertisement
Towtow10

Untitled

Dec 26th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. var ctx = document.getElementById("myChart");
  2. var myChart = new Chart(ctx, {
  3. type: 'pie',
  4. data: {
  5. labels: [], // Names
  6. datasets: [{
  7. label: 'Loops',
  8. data: [15, 20, 99, 32], // Loops in pot
  9. backgroundColor: [
  10. 'rgba(255, 99, 132, 0.5)', //Random
  11. 'rgba(54, 162, 235, 0.2)',
  12. 'rgba(255, 206, 86, 0.2)',
  13. 'rgba(75, 192, 192, 0.2)'
  14. ],
  15. borderColor: [
  16. 'rgba(255, 99, 132, 1)', // Same as Random but with 1 as the alpha
  17. 'rgba(54, 162, 235, 1)',
  18. 'rgba(255, 206, 86, 1)',
  19. 'rgba(75, 192, 192, 1)'
  20. ],
  21. borderWidth: 1
  22. }]
  23. },
  24. options: {
  25. cutoutPercentage: 40,
  26. responsive: false,
  27. }
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement