I formatted the y axis and disabled the tooltip because the minute range is 0-59, but still the y axis is a range of values ββ(0-99). So I used a custom tooltip to convert a range of values ββto a range of time.
var chart = c3.generate({
data: {
columns: [
['data1',201510210120, 201510210150, 201510210120, 201510210130,201510210135,201510210150],
['data2',201510210125, 201510210200, 201510210130, 201510210140,201510210155,201510210150],
['data3',201510210130, 201510210140, 201510210140, 201510210150,201510210125,201510210200]
]
},
size: {
height: 320
},
axis: {
x: {
type: 'category',
categories: ['ABC', 'PQR', 'WWW', 'POINT', 'ETA','RTA']
},
y: {
tick: {
format: function (d) { return d.toString().substr(8, 2) + ':' + d.toString().substr(10, 2); }
},
max: 201510212300,
min: 201510210100
}
},
tooltip: {
show: false
}
});
source
share