animint icon indicating copy to clipboard operation
animint copied to clipboard

HTML Widget bindings

Open srvanderplas opened this issue 9 years ago • 7 comments

http://www.htmlwidgets.org/develop_intro.html

We should seriously consider getting HTMLWidget bindings for animint; this might allow us to zoom, etc. and interact with other JS libraries.

There are also some really handy functions that may be useful for us: http://www.htmlwidgets.org/develop_advanced.html#dataframetod3

We may be able to simplify the rendering/conversion by using dataframetod3() instead of writing a bunch of json files.

srvanderplas avatar Mar 26 '15 17:03 srvanderplas

The resize method does look particularly nice, but I'm not sure that gives us zooming capabilities...

cpsievert avatar Mar 31 '15 18:03 cpsievert

Resize does not zoom. It just provided a hook to handle resize event. Happy to help in converting if you decide to do it.

timelyportfolio avatar Mar 31 '15 19:03 timelyportfolio

Good to know, thanks @timelyportfolio. By any chance, can you think of other benefits of converting (we already have shiny bindings)? I might be inclined to wait a few months since we might have 2 google summer of code students and there is already lots going on on the JS side...

cpsievert avatar Mar 31 '15 19:03 cpsievert

at useR 2016 I discussed with @cpsievert and we decided it would probably be a good idea to make animint work with htmlwidgets, which seems to be a de facto standard.

tdhock avatar Jul 06 '16 19:07 tdhock

@faizan-khan-iit like I said during the skype today, it would be a nice contribution for the R community if you have time to get animint to work with htmlwidgets... not sure how hard that will be though. ask @cpsievert, he has some experience with that I think.

tdhock avatar Jul 11 '16 14:07 tdhock

Creating a new htmlwidget is fairly straightforward. Here is a nice overview of how to create one -- http://www.htmlwidgets.org/develop_intro.html

cpsievert avatar Jul 11 '16 15:07 cpsievert

@tdhock Sounds nice. I will try and get familiar with it in the next few days. @cpsievert Thanks!

faizan-khan-iit avatar Jul 11 '16 16:07 faizan-khan-iit