I have the following code in my shiny application to give the user the possibly to choose what pointshape they would like to use on the plot.
selectInput(\"p
Not a full answer, but need formatting:
I have seen it before here: http://shiny.rstudio.com/gallery/selectize-examples.html. Look at the "Select a GitHub repo" input.
Using the I()
expression within a render call:
selectizeInput('github', 'Select a Github repo', choices = '', options = list(
valueField = 'url',
labelField = 'name',
searchField = 'name',
options = list(),
create = FALSE,
render = I("{
option: function(item, escape) {
return '' +
'
' + escape(item.name) + ':' +
' ' + escape(item.description) + '' +
' (by ' + escape(item.username) + ')' +
'' +
(item.language ? '- ' + escape(item.language) + '
' : '') +
'- ' + escape(item.watchers) + ' watchers
' +
'- ' + escape(item.forks) + ' forks
' +
'
' +
'';
}
}"),
Specifically the '
line.
The issue now is to call a unique image for each option, which should also be possible within I()
.