JSFiddle - React, Tailwind, and code Playground
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: {
json: [{'date': '2014-11-1', 'metric1': 300.2},
{'date': '2014-11-2', 'metric1': 297},
{'date': '2014-11-3', 'metric1': 250},
{'date': '2014-11-4', 'metric1': 250}],
keys: {
x: 'date',
value: ['metric1']
},
types: {
metric1: 'spline'
}
},
axis: {
x: {
type: 'timeseries',
tick: {
format: '%d-%m'
}
},
y: {
label: {
text: 'Metric is cut off yygg',
position: 'outer-middle',
// inner-top : default
// inner-middle
// inner-bottom
// outer-top
// outer-middle
// outer-bottom
},
tick: {
count:5,
format: function(){return''}
}
}
}
});