C3JS - Cannot read property 'category10' of undefined : <p>I tried this c3.js code from jsfiddle (<a href="https://jsfiddle.net/varunoberoi/mcd6ucge">https://jsfiddle.net/varunoberoi/mcd6ucge</a>) but it doesn't seem to work in my localhost.</p>

<p>I'm using uniserver as my server. I copy-paste everything but it's not working. </p>

<pre><code>&lt;html&gt;
    &lt;head&gt;
        &lt;!-- CSS --&gt;
        &lt;link href="css/c3.css" rel="stylesheet" type="text/css" /&gt;

        &lt;!-- JAVASCRIPT --&gt;
        &lt;script src="js/d3.min.js" type="text/javascript"&gt;&lt;/script&gt;
        &lt;script src="js/c3.js" type="text/javascript"&gt;&lt;/script&gt;

        &lt;script type="text/javascript"&gt;
            window.onload=function(){
                var chart = c3.generate({
                    data: {
                        columns: [
                            ['data1', 300, 350, 300, 0, 0, 0],
                            ['data2', 130, 100, 140, 200, 150, 50]
                        ],
                        types: {
                            data1: 'area',
                            data2: 'area-spline'
                        }
                    },
                    axis: {
                        y: {
                            padding: {bottom: 0},
                            min: 0
                        },
                        x: {
                            padding: {left: 0},
                            min: 0,
                            show: false
                        }
                    }

                });
            }
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div id="chart"&gt;&lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>What I got when I check the Developer Tools' console is this:</p>

<pre><code>c3.js:5783 Uncaught TypeError: Cannot read property 'category10' of undefined
</code></pre>

<p>I tried different versions of c3.js but nothing. It's weird because it's working in jsfiddle and not in my local.</p>
