title: Chart.js in ReactJS app: no terminal error, but no rendering
body: <p>I'm currently trying to render a bar chart in ReactJS using Chart.js</p>
  
  <p>info:</p>
  
  <p>official page - <a href="http://www.chartjs.org/docs/" rel="nofollow noreferrer">http://www.chartjs.org/docs/</a></p>
  
  <p>gitHub - <a href="https://github.com/reactjs/react-chartjs" rel="nofollow noreferrer">https://github.com/reactjs/react-chartjs</a></p>
  
  <p>The problem I have is that even though my terminal doesn't give me any errors, my local server doesn't render anything.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>var React = require('react');
  var BarChart = require('../../node_modules/chart.js/Chart.js');
  var styles = require('./Styles.js');
  
  var data={
    labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
    datasets: [{
        label: '# of Votes',
        data: [12, 19, 3, 5, 2, 3],
        backgroundColor: [
            'rgba(255, 99, 132, 0.2)',
            'rgba(54, 162, 235, 0.2)',
            'rgba(255, 206, 86, 0.2)',
            'rgba(75, 192, 192, 0.2)',
            'rgba(153, 102, 255, 0.2)',
            'rgba(255, 159, 64, 0.2)'
        ],
        borderColor: [
            'rgba(255,99,132,1)',
            'rgba(54, 162, 235, 1)',
            'rgba(255, 206, 86, 1)',
            'rgba(75, 192, 192, 1)',
            'rgba(153, 102, 255, 1)',
            'rgba(255, 159, 64, 1)'
        ],
        borderWidth: 1
    }]
  };
  var options={
    scales: {
        yAxes: [{
            ticks: {
                beginAtZero:true
            }
        }]
    }
  };
  
  var Graphs = React.createClass({
    render: function() {
      return (
        &lt;div id='graphDiv'&gt;
          &lt;BarChart type='bar' data={data} options={options} /&gt;
        &lt;/div&gt;
        );
      }
    });
  
  module.exports = Graphs;
  </code></pre>
  
  <p>Please bear with me if I made some silly mistakes, it's the first React app I'm coding so I have a lot to learn.</p>
  
  <p>I have multiple questions, though:</p>
  
  <ol>
  <li><p>did I install the library at the right place? - I used npm and it is now located in  the node_modules folder</p></li>
  <li><p>Is the path towards the file written correctly? as the gitHub says it should be something like this:</p>
  
  <p>var LineChart = require("react-chartjs").Line;</p></li>
  <li><p>Is it ok to place the data and the options as global variables?</p></li>
  <li><p>what's wrong with my code if I don't get any error messages from the terminal ?</p></li>
  </ol>
  
  <p>Have a nice day</p>