Open jjallaire opened 9 years ago
Yes I have this experimental faceting that interferes with the built in dimple resizing. Thinking strongly about taking out and handling faceting differently where this code will work well. Thanks. Didn't know you worked on dimple.
@jjallaire I forgot to also include the link to the lines where the sizing is very similar to the proposed. The only difference is these lines create the svg directly rather than dimple, and then the sizing methodology gets whacky as I try to handle the facets inside the svg using g elements in a grid.
I started roughing out a dimple widget a few months ago and as part of that figured out how to correctly sync up with the dimple resizing mechanisms. Here was my code:
https://github.com/jjallaire/dimple/blob/master/inst/htmlwidgets/dimple.js#L11-L45
The basic idea was to create the svg element with 100%, 100% sizing and then call
chart.draw(0, true)
on resize.