But I want to ‘pretty-up’ the viz by displaying some custom icons right next to, and ahead of, the text (the text that displays each object type). And I want the icon that is to be displayed at each object node to be selected based upon the contents of the text. For example, if an object type is “IMAGEOBJECT”, then I want a particular icon that looks like an image to be selected for display on that node, and so on, so on. I will have a complete set of icons to represent each kind of object.
If you download the assets here
you can run the TidyTree3 and see the beautiful hierarchy visualization that the Observable folks created, and that I merely leveraged and customized a bit.
Of course, you won’t be able to see the click-to-remote feature working since I have not included the remote server, Editor application, etc.
I’ve tried several things to get icons to appear ahead of the object type, but to no avail. I’ve also tried to find another viz that appears to do what I want, but couldn’t find an example to follow. I have been able to create a span element ahead of each text element, with a style that references an icon, but I could not get icons to display in the viz.
Can anyone help get me on the right track?