Blame view

public/assets/js/charts-bars.js 795 Bytes
2dde15d57   Андрей Ларионов   Утверждение переноса
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  /**
   * For usage, visit Chart.js docs https://www.chartjs.org/docs/latest/
   */
  const barConfig = {
    type: 'bar',
    data: {
      labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
      datasets: [
        {
          label: 'Shoes',
          backgroundColor: '#0694a2',
          // borderColor: window.chartColors.red,
          borderWidth: 1,
          data: [-3, 14, 52, 74, 33, 90, 70],
        },
        {
          label: 'Bags',
          backgroundColor: '#7e3af2',
          // borderColor: window.chartColors.blue,
          borderWidth: 1,
          data: [66, 33, 43, 12, 54, 62, 84],
        },
      ],
    },
    options: {
      responsive: true,
      legend: {
        display: false,
      },
    },
  }
  
  const barsCtx = document.getElementById('bars')
  window.myBar = new Chart(barsCtx, barConfig)