Skip to content

Instantly share code, notes, and snippets.

@brenopolanski
Created August 9, 2018 18:37
Show Gist options
  • Save brenopolanski/161d01a0929a9f8cb7a2431a2ecd6907 to your computer and use it in GitHub Desktop.
Save brenopolanski/161d01a0929a9f8cb7a2431a2ecd6907 to your computer and use it in GitHub Desktop.
C3.js Sparkline
// Reference: http://jsfiddle.net/ggamir/Lx380cL4/
var chart = c3.generate({
bindto: '#chart',
data: {
columns: [
['sample', 30, 200, 100, 400, 150, 250, 20, 80, 0, 400, 500, 1000, 2000, 200]
]
},
legend: {
show: false
}, tooltip:{show:false},
axis: {
x: {show:false},
y: {show:false}
}, size: {height:30, width:50}, point: {
show: false
}
});
<body>
<div id="chart"></div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment