I have a set of data that I need to visually represent as a graph on a web browser. While creating the graph itself is not an issue, I am looking to dynamically draw unique icons for each node.
These icons are specific to the characteristics of each node and cannot be pre-set images. They must be generated as we build the graph. I have already experimented with drawing these icons on a canvas, but I'm unsure how to then display them on individual nodes using tools like D3 or Cytoscape.js.
For example, a basic icon could be a rectangle with a certain number of dots, with their positions specified on each node.
What would be the best way to transfer the canvas-drawn image onto each node's background using D3 or Cytoscape.js?