ggthemeassist icon indicating copy to clipboard operation
ggthemeassist copied to clipboard

Bonus feature: An annotate() helper

Open jemus42 opened this issue 8 years ago • 4 comments

One of the biggest selling points for the addin is the ability to trial-and-error a legend into the right position, and since positioning annotations can be a pain as well, it would be cool if there was a way the assistant could, well, assist with annotations.

jemus42 avatar Mar 12 '16 09:03 jemus42

I thought about this a bit today: The whole thing would not be a big deal if we restrict to one annotation. Just a textInput and "click" for the position like @calligross did for legend.position. But restricting to one annonation is obviously nonsense. I experimented with a numericInput to select the number of annotations (n) one wants to place in the plot. Depending on that input, n textInputs appear, one for each annotation. With every textInput comes an actionButton. The idea is to fetch input$click for every annotation separately. By clicking on the respective action button the next input$click will be ascribed to the respective annotation.

I´m still struggling on the actionButton-input$click-thing, that's why no PR so far...

ottlngr avatar Mar 13 '16 23:03 ottlngr

I think this sould be more or less straight forward, all you need is:

  • a data.frame
  • four inputs (id, x, y, text)
  • three buttons (insert, update, delete)

The id input may be hidden and updated by selecting a DT row.

Take a look at: http://www.r-bloggers.com/shiny-crud-app/

calligross avatar Mar 14 '16 04:03 calligross

That could be very useful, too: https://cran.r-project.org/web/packages/rhandsontable/vignettes/intro_rhandsontable.html

Probably saves the trouble to define the CRUD methods oneself.

ottlngr avatar Mar 20 '16 08:03 ottlngr

#51

ottlngr avatar Mar 20 '16 20:03 ottlngr