Advertisement
Guest User

sorgente_pagina

a guest
Jul 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.40 KB | None | 0 0
  1. <html><head><title>Grafici Analisi Spesa</title></head><body><h1>Grafici Analisi Spesa</h1><canvas id="myChart" width="400" height="400"></canvas><script>var ctx = window.document.getElementById('myChart').getContext('2d');
  2.             var myChart = new Chart(ctx, {
  3.                 type: 'bar',
  4.                 data: {
  5.                     labels:  ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
  6.                     datasets: [{
  7.                         label: '# of Votes',
  8.                         data: [12, 19, 3, 5, 2, 3],
  9.                         backgroundColor: [
  10.                             'rgba(255, 99, 132, 0.2)',
  11.                             'rgba(54, 162, 235, 0.2)',
  12.                             'rgba(255, 206, 86, 0.2)',
  13.                             'rgba(75, 192, 192, 0.2)',
  14.                             'rgba(153, 102, 255, 0.2)',
  15.                             'rgba(255, 159, 64, 0.2)'
  16.                         ],
  17.                         borderColor: [
  18.                             'rgba(255, 99, 132, 1)',
  19.                             'rgba(54, 162, 235, 1)',
  20.                             'rgba(255, 206, 86, 1)',
  21.                             'rgba(75, 192, 192, 1)',
  22.                             'rgba(153, 102, 255, 1)',
  23.                             'rgba(255, 159, 64, 1)'
  24.                         ],
  25.                         borderWidth: 1
  26.                     }]
  27.                 },
  28.                 options: {
  29.                     scales: {
  30.                         yAxes: [{
  31.                             ticks: {
  32.                                 beginAtZero: true
  33.                             }
  34.                         }]
  35.                     }
  36.                 }
  37.             });
  38.             </script></body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement