githubCalendar icon indicating copy to clipboard operation
githubCalendar copied to clipboard

Suggestion: Add shiny input

Open JohnCoene opened this issue 5 years ago • 1 comments

Hi Maya, great package as usual!

An idea would be to set a shiny input value on click, probably somewhere here: https://github.com/MayaGans/githubCalendar/blob/f2dddaf15c74e873c577994dce4a46a0496e81e6/inst/htmlwidgets/js/makeChart.js#L101

.on("click", function(event){
    if(HTMLWidgets.shinyMode){
        Shiny.setInputValue(el.id + '_click', event);
    }
})

Not too familiar with d3 so I could be getting this totally wrong.

JohnCoene avatar Oct 11 '20 08:10 JohnCoene

Oh no. I just realised it comes later in the book (Chapter 18) :man_facepalming:

JohnCoene avatar Oct 11 '20 08:10 JohnCoene