Skip to content

Instantly share code, notes, and snippets.

@preyneyv
Created August 24, 2019 05:13
Show Gist options
  • Select an option

  • Save preyneyv/f37c12cd4a85baa9783e701a5b65b94d to your computer and use it in GitHub Desktop.

Select an option

Save preyneyv/f37c12cd4a85baa9783e701a5b65b94d to your computer and use it in GitHub Desktop.
var data = {
  labels: ["January", "February", "March", "April", "May", "June", "July"],
  datasets: [
  {
    label: "My First dataset",
    backgroundColor: ['#cfc','#cfc','#cfc','#fcc','#cfc','#cfc','#cfc'],
    data: [65, 59, 80, 81, 56, 55, 40]
  },
  {
    label: "My Second dataset",
    backgroundColor: '#ccf',
    data: [28, 48, 40, 19, 86, 27, 90]
  }
  ]
};

var ctx = document.getElementById("myChart").getContext("2d");
var myBarChart = new Chart(ctx, {
  type: 'bar',
  data,
  options: {
    responsive: false
  }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment