Created
October 3, 2017 17:44
-
-
Save makoto/e03ba9644680dd9f36838af45892ed74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chart = c3.generate({ | |
data: { | |
x: 'x', | |
xFormat: '%Y-%m-%d %H:%M:%S UTC', | |
url:'http://localhost:3000/api/v1/usages', | |
mimeType: 'json', | |
keys: { | |
x: 'date', | |
value: [ "data1"] | |
}, | |
}, | |
axis: { | |
x: { | |
type: "timeseries", | |
tick: { | |
format: '%H:%M:%S' | |
} | |
} | |
} | |
}); | |
setTimeout(function () { | |
chart.load({ | |
url: 'http://localhost:3000/api/v1/usages', | |
mimeType: 'json', | |
axis: { | |
x: { | |
type: "timeseries", | |
tick: { | |
format: '%H:%M:%S' | |
} | |
} | |
} | |
}); | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment