daily pastebin goal
57%
SHARE
TWEET

Untitled

a guest Mar 21st, 2019 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const ctx = document.getElementById('myChart').getContext('2d');
  2.      
  3. /**
  4.  * Created by thocou on 21/03/19.
  5.  */
  6. import Chart from 'chart.js'
  7.  
  8. let ctx = document.getElementById('rentResumeChart').getContext('2d');
  9.  
  10. let rentResumeChart = new Chart(ctx, {
  11. responsive: true,
  12. maintainAspectRatio: false,
  13. type: 'bar',
  14. data: {
  15.     labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
  16.     datasets: [{
  17.         label: '# of Votes',
  18.         data: [12, 19, 3, 5, 2, 3],
  19.         backgroundColor: [
  20.             'rgba(255, 99, 132, 0.2)',
  21.             'rgba(54, 162, 235, 0.2)',
  22.             'rgba(255, 206, 86, 0.2)',
  23.             'rgba(75, 192, 192, 0.2)',
  24.             'rgba(153, 102, 255, 0.2)',
  25.             'rgba(255, 159, 64, 0.2)'
  26.         ],
  27.         borderColor: [
  28.             'rgba(255, 99, 132, 1)',
  29.             'rgba(54, 162, 235, 1)',
  30.             'rgba(255, 206, 86, 1)',
  31.             'rgba(75, 192, 192, 1)',
  32.             'rgba(153, 102, 255, 1)',
  33.             'rgba(255, 159, 64, 1)'
  34.         ],
  35.         borderWidth: 1
  36.     }]
  37. },
  38. options: {
  39.     scales: {
  40.         yAxes: [{
  41.             ticks: {
  42.                 beginAtZero: true
  43.             }
  44.         }]
  45.     }
  46. }
  47. });
  48.      
  49. <canvas id="rentResumeChart" class="rentResumeChart"></canvas>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top