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