Quite good looking graph derived from d3.js http://c3js.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
508 B

var chart = c3.generate({
data: {
x: 'x',
columns: [
['x', '2010-01-01', '2011-01-01', '2012-01-01', '2013-01-01', '2014-01-01', '2015-01-01'],
['sample', 30, 200, 100, 400, 150, 250]
]
},
axis : {
x : {
type : 'timeseries',
tick: {
format: function (x) { return x.getFullYear(); }
//format: '%Y' // format string is also available for timeseries data
}
}
}
});