Is there a way to get the id of the current cell (e.g. r#) so that I can tell my custom visualization library (https://github.com/ismms-himc/clustergrammer-gl) where to insert the visualization into the HTML DOM?
Itâs possible to get the r# ID by creating an HTML element in a cell and then querying for its parent ID (see e.g. this notebook), but this is kind of a hack so I wouldnât rely on it. I think it would be more reliable to define a named cell as in this fork:
There I used the fact that you can pass a reference to an HTML element as args.container. I also added some code to clean up the something div so that rerunning cgm(args) wonât keep appending more copies of the graphic to that cell.