javascript - Dygraph not shown on collapsed jQuery mobile collapsible widget -


i have multiple dygraphs plots, group in collapsible jquery widget, 1 show groups of graphs. sadly, works if collapsible div expanded @ start, if start collapsed, graph not drawn after expanding.

although not real solution, start all elements expanded. however, if collapses graphs , switches pages in between, same problem occurs.

here jsfiddle shows problem - set data-collapsed="false" , graph drawn.

you might try calling g.resize() or g.updateoptions() on charts when widget expands. these should no-ops, effect force dygraphs recalculate size of container <div>, has changed due expanding widget.

to knowledge, there's no way tell javascript when dom element becomes visible or resized in ways other window resizes. affects other js libraries well.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -