javascript - How to put graph inside modal window? -


i've got modal window (div element set display: none;), appears, when user clicks on trigger. here code: https://jsfiddle.net/kh7447a2/. i've got graph, plotted using chart.js: https://jsfiddle.net/6ssyussw/. question how put graph inside modal window , make modal window pop graph on it? both work nice separately, when put them together, modal window doesn't pop or pops up, without graph.

here have working example:

https://jsfiddle.net/mun27he8/

i created new canvas element id mychart , added modal container:

  // add canvas   canvas = document.createelement("canvas");   canvas.id = "mychart";   canvas.width = 400;   canvas.height = 400;   contentholder.appendchild(canvas); 

then set chart js code run when click button.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -