Skip to content

Instantly share code, notes, and snippets.

@ghalimi
Created Aug 7, 2015
Embed
What would you like to do?
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