title: Why is this bar chart using chart.js not rendering in react.js?
body: <p>I'm trying to add a bar chart to my app with arbitrary data for now but I can't get it to render. The it's imported correctly and i've used example code from the chart.js web site but no luck. What am I missing?</p>
  
  <pre><code>import Chart from 'chart.js';
  import React, { Component } from 'react';
  
  class ChartTeamOne extends Component {
  setState(){
    const t1ChartEl= document.getElementById("teamOneCanvas");
    let teamOneChart = new Chart(t1ChartEl,{
    type: 'bar',
    data: {
      labels: ["Red", "Blue"],
      datasets: [{
          label: '# of Votes',
          data: [12, 19],
          backgroundColor: [
              'rgba(255, 99, 132, 0.2)',
              'rgba(54, 162, 235, 0.2)',
          ],
          borderColor: [
              'rgba(255,99,132,1)',
              'rgba(54, 162, 235, 1)',
          ],
          borderWidth: 1
      }]
  },
  options: {
      scales: {
          yAxes: [{
              ticks: {
                  beginAtZero:true
              }
          }]
      }
  }
  });
  }
  render(){
  return(
    &lt;canvas id="teamOneCanvas"&gt;&lt;/canvas&gt;
  );
  }
  }
  
  export default ChartTeamOne;
  </code></pre>