title: C3 js Cannot read property 'width' of undefined
body: <p>I am trying to setup a C3 chart for the first time.</p>
  
  <p>I have followed the example on their offical website and got the following html:</p>
  
  <pre><code>&lt;section class="panel panel-default"&gt;
      &lt;header class="panel-heading font-bold"&gt;C3 Test&lt;/header&gt;
      &lt;section class="panel-body"&gt;
          &lt;div id="chart"&gt;&lt;/div&gt;
      &lt;/section&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>For this i have the following javascript:</p>
  
  <pre><code>    var chart = c3.generate({
      bindto: '#chart',
      data: {
          columns: [
              ['data1', 30, 200, 100, 400, 150, 250],
              ['data2', 50, 20, 10, 40, 15, 25]
          ],
          axes: {
              data2: 'y2'
          },
          types: {
              data2: 'bar'
          }
      },
      axis: {
          y: {
              label: {
                  text: 'Y Label',
                  position: 'outer-middle'
              },
              tick: {
                  format: d3.format("$,") // ADD
              }
          },
          y2: {
              show: true,
              label: {
                  text: 'Y2 Label',
                  position: 'outer-middle'
              }
          }
      }
  });
  </code></pre>
  
  <p>However when i run this i get the following error:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'width' of undefined c3.min.js:3
  </code></pre>
  
  <p>Does anyone know what the problem might be?</p>