Skip to content

Instantly share code, notes, and snippets.

@ghalimi
Created August 7, 2015 20:39
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 ghalimi/1dde31f27432bf12b505 to your computer and use it in GitHub Desktop.
Save ghalimi/1dde31f27432bf12b505 to your computer and use it in GitHub Desktop.
var data = [
{"country": "US", "product": "hardware", "amount": 6},
{"country": "US", "product": "software", "amount": 10},
{"country": "UK", "product": "hardware", "amount": 11},
{"country": "UK", "product": "software", "amount": 2},
{"country": "JP", "product": "hardware", "amount": 4},
{"country": "JP", "product": "software", "amount": 8}
];
var meta = {
"country": {
"type": "nominal",
"variable": "independent"
},
"product": {
"type": "nominal",
"variable": "independent"
},
"amount": {
"type": "extensive",
"variable": "dependent"
}
};
var blueprint = {
"meta": meta,
"visual": "bar",
"dimensions": {
"columns": {
"tabulated": null,
"visualized": {
"variable": "country",
"axis": "horizontal",
"series": null
},
"drilled": null
},
"rows": {
"tabulated": null,
"visualized": null,
"drilled": null
},
},
"measures": [
{
"variable": "amount",
"axis": "height",
"details": {
"variable": "product",
"type": "stack"
}
}
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment