Commit 74f261a3 authored by Kjetil Thuen's avatar Kjetil Thuen
Browse files

Made example html contain two charts

parent 5a3b9bf9
......@@ -12,6 +12,8 @@
.chartContainer {
position: relative;
width: 40%;
float: left;
margin: 45px;
.controls {
......
......@@ -11,7 +11,8 @@
<body>
<section id="main">
<!-- A chartContainer must have the class "chartContainer" and a unique id -->
<div class="chartContainer" id="content"></div>
<div class="chartContainer" id="bergen"></div>
<div class="chartContainer" id="voss"></div>
</section>
<script>
//An object describing how and from where to fetch the numbers. The
......@@ -46,7 +47,49 @@
]
},
display: {
name: "Befolkningsframskrivning for Bergen, fordelt på kjønn",
name: "Befolkningsframskrivning (hovedalternativ) for Bergen",
leftsymbol: "fa fa-female",
rightsymbol: "fa fa-male",
leftlabel: "Kvinner",
rightlabel: "Menn",
leftcolor: "#EBA487",
rightcolor: "#87CEEB",
birthyearlabel: "Fødselsår",
agelabel: "Alder"
}
};
befolkningVoss = {
host: "http://nesstar-dev.nsd.uib.no",
port: 80,
service: "touch/hfk/restdata",
cube: "Fypr-2014-Bef_C1",
filter: {
measures: [ "Befolkning" ],
dimensions: [
{
"id": "tid"
},
{
"id": "alder",
"members": []
},
{
"id": "Kjnn",
"members": ["1","2"]
},
{
"id": "Framskrivingsalternativ",
"members": ["1"]
},
{
"id": "Region",
"members": ["123"]
}
]
},
display: {
name: "Befolkningsframskrivning (hovedalternativ) for Voss",
leftsymbol: "fa fa-female",
rightsymbol: "fa fa-male",
leftlabel: "Kvinner",
......@@ -58,9 +101,9 @@
}
};
/* Initializing the timebars component in the #content div, using the
befolkningBergen object */
window.nesstartimebars.main("content", befolkningBergen);
/* Initializing the timebars component in the .chartContainer divs */
window.nesstartimebars.main("bergen", befolkningBergen);
window.nesstartimebars.main("voss", befolkningVoss);
</script>
</body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment