Commit 891ee8fb authored by Rushikesh Padsala's avatar Rushikesh Padsala
Browse files

Added Chart.js to Leaflet.js

parent d8909462
Pipeline #7518 passed with stages
in 8 seconds
<html>
<head>
<title>Building - Heat Demand</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
......@@ -34,7 +32,6 @@
}
</style>
</head>
<body>
<div id="map-container">
<div id="mapid"></div>
......@@ -42,6 +39,8 @@
<div id="chart-container">
<canvas id="yocChart"></canvas>
</div>
<script>
var mymap = L.map('mapid').setView([48.79205, 9.20758], 16);
var OpenStreetMap_DE = L.tileLayer('https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', {
......@@ -91,6 +90,9 @@
onEachFeature: onEachFeature,
style: style,
}).addTo(mymap);
// Retrieve the building year of construction data from the GeoJSON
var buildingYoc = building_data.features.map(function(feature) {
return feature.properties.Year_of_co;
......@@ -146,12 +148,6 @@ var yocChart = new Chart(ctx, {
}
});
</script>
</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