This is a really cool idea! I totally get what you want to do: have the end user (the viewer of the visualization, not its author) be able to edit the text of the annotations.
Currently, you might be able to implement a flow where when the user clicks on the annotation, it pops up a text input field (e.g. Window.alert()
), and the resulting text can feed into an update to the annotation. While this technically can work, it would not save the change permanently. The change would be reset whenever the page reloads.
I have been thinking a lot about how we might add the ability for users to interact with vizzes and then have the result saved. One day in the future I would like to introduce a new feature to VizHub that I think of as “Persistent State” or “Persistent Configuration” wherein a viz could make changes to its “state” or “configuration”, and that state lives inside the real-time enabled VizHub platform alongside files. This would have the added benefit that if one user makes a change, all other users viewing the same viz would get that update in real time. This is the ideal future, but it’s unfortunately not here yet.
Will post back here when it’s working!