viewof shinyinput = {
let shinyinput = 'NULL'
var svg = d3.select(DOM.svg(width, 100))
.property("value", shinyinput);
svg.selectAll("circles")
.data(['red', 'blue', 'yellow'])
.enter()
.append("circle")
.attr("r", 40)
.attr("cx", function(d,i) { return 60 + (i*100) })
.attr("cy", 50)
.attr("fill", d => colorScale(d))
.attr('stroke', 'black')
.attr('stroke-width', 3)
.attr('data-value', d => d)
.attr('cursor', 'pointer')
.on("click", (event, d) => {
shinyinput = d
svg.property("value", shinyinput).dispatch("input");
});
return svg.node()
}