c3 - JSON data with timeseries and date filter

Display only the first of the month

by JaelB

HTML

<script src="https://rawgit.com/masayuki0812/c3/master/c3.js"></script>
<link rel="stylesheet" href="https://rawgit.com/masayuki0812/c3/master/c3.css">
<div id="chart"></div>

JavaScript

var chart = c3.generate({
    data: {
        type: 'bar',
        json: [
            { 'indicator': 'X', 'totalX': 100 },
            { 'indicator': 'Y', 'totalY': 200 },
            { 'indicator': 'Z', 'totalZ': 300 }
        ],
        groups: [
        	["totalX", "totalY", "totalZ"],
        ],
        keys: {
            x: 'indicator',
            value: ['totalX', 'totalY', 'totalZ'],
        },
    },
    axis: {
            x: {
                type: 'category'
            }
    },
    bar: {
        width: {
            ratio: 0.5
        }
    },
   dc
});