dpvis-lib
Version:
Small datapackage visualization library
100 lines (96 loc) • 2.5 kB
HTML
<html>
<head>
<meta charset="utf-8">
<title>dpvis-lib</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
<script type="text/javascript">
var config = {
"hierarchies": [
{
"datapackageHierarchy": "functional_classification",
"url": "functional_classification",
"label": "Functional Classification"
},
{
"datapackageHierarchy": "administrative_classification",
"url": "administrative_classification",
"label": "Administrative Classification"
}
],
"value": [
{
"field": "Betrag.sum",
"formatOptions": {
"symbol": "€",
"decimal": ",",
"thousand": ".",
"precision": 2,
"format": "%s%v",
"grouping": 3
},
"label": "Betrag"
}
],
"filters": {
"Typ": {
"name": "fin_source_Typ.Typ",
"label_ref": "fin_source_Typ.Bezeichnung",
"ref": "fin_source_Typ",
"type": "string",
"default": true,
"defaultValue": "",
"defaultLabel": "All",
"label": "Bezeichnung",
"values": [
{
"value": "",
"label": "All"
},
{
"value": "1",
"label": "Senatsverwaltungen"
},
{
"value": "2",
"label": "Verfassungsorgane"
},
{
"value": "3",
"label": "Bezirke"
}
]
},
"Jahr": {
"name": "date_2.Jahr",
"label_ref": "date_2.Jahr",
"ref": "date_2",
"type": "integer",
"default": true,
"defaultValue": 2017,
"defaultLabel": "All",
"label": "Jahr",
"values": [
{
"value": "",
"label": "All"
},
{
"value": 2016,
"label": 2016
},
{
"value": 2017,
"label": 2017
}
]
}
}
}
dpvis.treemap('#app', config)
</script>
</body>
</html>