Skip to content

Instantly share code, notes, and snippets.

@jasonish
Created July 18, 2016 06:05
Show Gist options
  • Save jasonish/5eb9169b2832376b5cb6518ec8bfed92 to your computer and use it in GitHub Desktop.
Save jasonish/5eb9169b2832376b5cb6518ec8bfed92 to your computer and use it in GitHub Desktop.
c3.generate({
bindto: "#test-c3",
data: {
x: 'date',
columns: [
["date"].concat(this.eventsOverTime.map((x:any) => {
return x.date;
})),
["Events"].concat(this.eventsOverTime.map((x:any) => {
return x.value;
}))
],
type: "area-spline",
},
axis: {
x: {
type: 'timeseries',
tick: {
format: "%H:%M"
}
}
},
subchart: {
show: true
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment