Skip to content

Instantly share code, notes, and snippets.

@xuexue
Created April 8, 2013 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuexue/5337566 to your computer and use it in GitHub Desktop.
Save xuexue/5337566 to your computer and use it in GitHub Desktop.
var data = polyjs.data({
category: ['A', 'B', 'A', 'B', 'A', 'B', 'A', 'B'],
number: [10, 15, 12, 23, 23, 15, 9, 13]
});
polyjs.chart({
layer: {
data: data,
type: 'bar',
x: 'category',
y: 'sum(number)'
},
dom: 'chart_sum',
width: 250,
height: 250
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment