function makePopup(layer, simCode, tsData) {
popup_data = tsData;
var popupHtml = "<div id='popup_div' ><canvas class='chart_popup' id='popup_canvas' ></canvas></div>" ;
var popup = L.popup({ minWidth:400 })
.setLatLng(map.getCenter())
.setContent(popupHtml)
.openOn(map);
var tsCtx = document.getElementById("popup_canvas").getContext("2d");
var tsChart = new Chart(tsCtx, {
type: "line",
data: popup_data,
options: {
responsive: true,
maintainAspectRatio: true,
}
});
}
// @option maxHeight: Number = null
// If set, creates a scrollable container of the given height
// inside a popup if its content exceeds it.
maxHeight: null,