Hi everyone! In my continuing saga of translating index.html
's into observable notebooks I want to create buttons that impact the plot - and this finally forced me to actually try to grasp what viewof
actually does
In the little notebook here I leveraged viewof
to get my little circles to change color on click. It seems like viewof is used to enable what I first tried to do - create a global function to be used with an event handler.
I guess I was wondering if there are ways I can improve on this to make why or when youâd use viewof
more obvious? Or maybe Iâve missed the mark on what viewof
does entirely?
I think a little notebook like this will be helpful in the âtranslationâ of observable-ifying d3 (at least for me ) so any feedback is appreciated! Thank you !!