This is a minor modification of this post. The basic problem is that to update the histogram, one had to (a) click on a point on the map, (2) go to the numeric input box and (3) press enter. This can be simplified by adding three pieces of code.
setValue
First, we modify the setValue
function so that in addition to modifying the value of the row clicked, it also communicates this value to the Shiny input variable row
.
function SetValue(i) {
document.getElementById("row").value = i;
Shiny.onInputChange("row", i)