From ec76ac4c4db8ef91b8a13fec8c0c3d432febb4d1 Mon Sep 17 00:00:00 2001 From: Patrick <patrick.wuerstle@gmx.de> Date: Mon, 20 Jul 2020 11:34:09 +0200 Subject: [PATCH] Add Graph --- vcm/Restricted/index.html | 5 ++++- vcm/config.json | 18 ++++++++++++++++ vcm/index.html | 6 +++++- vcm/templates/cus_Menu.js | 7 +++++- vcm/templates/custom.css | 3 +++ vcm/templates/custom.js | 2 ++ vcm/templates/items.json | 20 +++++++++++++++++ vcm/templates/newDevBahn.js | 43 +++++++++++++++++++++++++++++++++++++ 8 files changed, 101 insertions(+), 3 deletions(-) diff --git a/vcm/Restricted/index.html b/vcm/Restricted/index.html index e0caaee8f..4d6a50f20 100644 --- a/vcm/Restricted/index.html +++ b/vcm/Restricted/index.html @@ -164,7 +164,7 @@ <div class="title-box vcm_copyright_headerTitle"></div> <!-- Drop down menu starts here --> <div class="dropdown hidden" style="float: right; right:20px"> - <i class="fa fa-bars" id="dropdownMenu" style="font-size:1.8rem;color: antiquewhite; margin-top:1rem;"></i> + <i class="fa fa-bars" id="dropdownMenu" style="font-size:1.8rem;color: white !important; margin-top:1rem;"></i> <div class="dropdown-content"> <button class="accordion">Partizipation</button> <div class="sub-menu"> @@ -174,6 +174,9 @@ <div class="sub-menu"> <a href="#" onclick="EnergiekonzeptFunction('nothing')">Stöckach</a> </div> + <div class="sub-menu"> + <a href="#" onclick="nordbahnview()">Nordbahnhof</a> + </div> <button class="accordion">Acoustics</button> <div class="sub-menu"> <a href="#">Sub Menu 3</a> diff --git a/vcm/config.json b/vcm/config.json index fb91fcf73..10eedc8b8 100644 --- a/vcm/config.json +++ b/vcm/config.json @@ -1189,6 +1189,24 @@ "pitch": -33.51784735784641, "roll": 359.9542703265667, "animate": true + }, + { + "name": "NordBView", + "cameraPosition": [ + 9.196706687392629, + 48.787236688854634, + 452.8161295397872 + ], + "groundPosition": [ + 9.197929833190297, + 48.7971060262033, + -0.004254466513807599 + ], + "distance": 1190.703214339934, + "heading": 4.680790508536784, + "pitch": -22.356993435657433, + "roll": 0.016861192553048996, + "animate": true } ] } \ No newline at end of file diff --git a/vcm/index.html b/vcm/index.html index c5cde2e2a..3ae5499d9 100644 --- a/vcm/index.html +++ b/vcm/index.html @@ -165,7 +165,7 @@ <div class="title-box vcm_copyright_headerTitle"></div> <!-- Drop down menu starts here --> <div class="dropdown hidden" style="float: right; right:20px"> - <i class="fa fa-bars" id="dropdownMenu" style="font-size:1.8rem;color: antiquewhite; margin-top:1rem;"></i> + <i class="fa fa-bars" id="dropdownMenu" style="font-size:1.8rem;color: white !important; margin-top:1rem;"></i> <div class="dropdown-content"> <button class="accordion">Partizipation</button> <div class="sub-menu"> @@ -174,6 +174,8 @@ <button class="accordion">Energy</button> <div class="sub-menu"> <a href="#" onclick="EnergiekonzeptFunction('nothing')">Stöckach</a> + + <a href="#" onclick="nordbahnview()">Nordbahnhof</a> </div> <button class="accordion">Acoustics</button> <div class="sub-menu"> @@ -557,6 +559,7 @@ </div> <!-- <div class='legend-source'>Source: <a href="#link to source">Name of source</a></div> --> </div> + <div style='width:100%;margin-top:200px;' id="chartNordB"></div> <!-- <div id="slider-color"></div> --> </div> @@ -579,6 +582,7 @@ <script src='lib/vcm_thirdparty.js'></script> <script src="lib/vcm-compiled_api.js"></script> <script src="sources/nouislider.js"></script> + <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script> <script src="templates/slider.js"></script> <link href="templates/sliders.css" rel="stylesheet"> diff --git a/vcm/templates/cus_Menu.js b/vcm/templates/cus_Menu.js index 5876c65a3..5e16ae54c 100644 --- a/vcm/templates/cus_Menu.js +++ b/vcm/templates/cus_Menu.js @@ -10,4 +10,9 @@ var acc = document.getElementsByClassName("accordion"); subMenu.style.maxHeight = subMenu.scrollHeight + "px"; } }); - } \ No newline at end of file + } + +function nordbahnview(){ + var viewp = vcs.vcm.Framework.getInstance().viewpoints.NordBView + vcs.vcm.Framework.getInstance().getActiveMap().gotoViewPoint(viewp); +} \ No newline at end of file diff --git a/vcm/templates/custom.css b/vcm/templates/custom.css index 4f30c1dfb..abfdc8833 100644 --- a/vcm/templates/custom.css +++ b/vcm/templates/custom.css @@ -470,3 +470,6 @@ div.tour-top-navi { /* margin-top: -2px; */ } +#dropdownMenu{ + color:white !important; +} \ No newline at end of file diff --git a/vcm/templates/custom.js b/vcm/templates/custom.js index 6f1700a18..d976ef18d 100644 --- a/vcm/templates/custom.js +++ b/vcm/templates/custom.js @@ -231,5 +231,7 @@ function NordbahnhofText() { document.getElementById("Energiekonzept").style.display = "none"; document.getElementById("UmfrageOne").style.display = "none"; document.getElementById("NordbahnhofInfo").style.display = "block"; + showTour(); + showgraph(); } \ No newline at end of file diff --git a/vcm/templates/items.json b/vcm/templates/items.json index b311956b5..c1c8bb345 100644 --- a/vcm/templates/items.json +++ b/vcm/templates/items.json @@ -74,6 +74,26 @@ "animate": true } }, + { "id": "NordBView", + "type": "viewpoint", + "viewpoint": { + "name": "NordBView", + "cameraPosition": [ + 9.196706687392629, + 48.787236688854634, + 452.8161295397872 + ], + "groundPosition": [ + 9.197929833190297, + 48.7971060262033, + -0.004254466513807599 + ], + "distance": 1190.703214339934, + "heading": 4.680790508536784, + "pitch": -22.356993435657433, + "roll": 0.016861192553048996, + "animate": true + }}, { "id": "Energiefahrrad", "type": "viewpoint", diff --git a/vcm/templates/newDevBahn.js b/vcm/templates/newDevBahn.js index c80b8c849..3de7e869e 100644 --- a/vcm/templates/newDevBahn.js +++ b/vcm/templates/newDevBahn.js @@ -337,6 +337,49 @@ function oldZust(){ } + function showgraph(){ + var options = { + series: [{ + name: "Bisheriges Gebäude", + data: [376513, 291342, 187649, 62589, 3942,0,0,0, 8, 81966, 231772, 360644] + },{ + name:"Neues Gebäude", + data: [37772, 28936, 17886, 4169, 128,1,0,0, 44, 7224, 23163, 36245] + }], + chart: { + height: 350, + width: '100%', + type: 'line', + zoom: { + enabled: false + } + }, + dataLabels: { + enabled: false + }, + stroke: { + curve: 'straight' + }, + title: { + text: 'Heating Demand by Month', + align: 'left' + }, + grid: { + row: { + colors: ['#f3f3f3', 'transparent'], // takes an array which will be repeated on columns + opacity: 0.5 + }, + }, + xaxis: { + categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep','Okt','Nov','Dez'], + } + }; + + var chart = new ApexCharts(document.querySelector("#chartNordB"), options); + chart.render(); + + } + \ No newline at end of file -- GitLab