I can add static html code to a Leaflet popup window but can not load a Dygraph chart into a popup window. How does one load dynamic content into a Leaflet popup window?
Here is a simple jsfiddle with a graph and map.
https://jsfiddle.net/scottgeowork/pybvvo27/1/
[GIS] dynamic content in leaflet popup window
dynamicjavascriptjqueryleaflet
Best Answer
In order to update the popup content I've added an on click function, and used the popup.setContent method.
https://jsfiddle.net/1k4ujv94/2/