I am trying to plot a time series graph for a given data with two columns, first having a Time-stamp and second is the respective voltage value at that time. Accessing the data file through C3.js url method and also specifying the parse format for the date-time. The output does not turn up. I don't know but, is it the way I am trying here is right? Kindly help me with it.
This is my C3 script:
var chart=c3.generate({
data: {
url: '/data/data.csv'
x: 'timestamp'
xFormat: '%m/%d/%Y %H:%M:%S %p'
// My date format in .csv file is: 9/30/2015 6:38:00 PM
columns: [
['timestamp', ... ],
['voltage', ... ]
]
},
axis: {
x: {
type: 'timeseries',
tick: {
format: function(x) {
retun x.getDate();
}
}
}
}
});