MayaGans / githubCalendar

Creating a visual in Observable, then turning it into a widget. All the R user will need to supply is a data frame of dates and values... I hope)
https://observablehq.com/@mayagans/a-github-inspired-calendar
Other
24 stars 1 forks source link

Get app.R to work #4

Closed MayaGans closed 3 years ago

MayaGans commented 3 years ago

The function itself is working but inside a shiny app if I move the slider in the example another plot is rendered (and the data isn't even updated!)

timelyportfolio commented 3 years ago

I'll be happy to start working on this. First commit to begin the process is https://github.com/timelyportfolio/githubCalendar/commit/212cca653a0270e90cb382d42a6573a9aca88d86. This change attaches the svg d3 selection to the widget instance so we can refer to it post-render. There are lots of ways to handle this, so let me know if you want to see other approaches.

Next step will be to use the d3 enter/update/exit pattern on the sub-elements.

MayaGans commented 3 years ago

Amazing thank you! Not sure where the best place is to take notes and ask questions (I wrote some directly on the commit?)