Skip to content

Instantly share code, notes, and snippets.

@aslamhadi
Created August 17, 2016 12:12
Show Gist options
  • Save aslamhadi/3e78f32a0f8d39bce982d896e69dc25c to your computer and use it in GitHub Desktop.
Save aslamhadi/3e78f32a0f8d39bce982d896e69dc25c to your computer and use it in GitHub Desktop.
x axis category c3js
var chart = c3.generate({
data: {
columns: [
['reject', 30, 200, 100, 400, 150, 250, 50, 100, 250],
['size', 40, 500, 400, 40, 15, 200, 50, 10, 600]
],
type: 'bar'
},
axis: {
x: {
type: 'category',
categories: ['cat1', 'cat2', 'cat3', 'cat4', 'cat5', 'cat6', 'cat7', 'cat8', 'cat9']
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment