timelyportfolio / rcdimple

htmlwidgets for rCharts + dimple
http://www.buildingwidgets.com/blog/2015/3/18/week-11-dimple-as-htmlwidget
MIT License
28 stars 9 forks source link

dynamically resize based on the container #3

Open jjallaire opened 9 years ago

jjallaire commented 9 years ago

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.

timelyportfolio commented 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.

timelyportfolio commented 9 years ago

@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.