d3fc icon indicating copy to clipboard operation
d3fc copied to clipboard

How to use annotations in a webGL environment ?

Open Analysiszaj opened this issue 1 year ago • 1 comments

How to use annotations in a webGL environment ?

Analysiszaj avatar May 27 '24 10:05 Analysiszaj

I find the best way to approach this is to use SVG for the annotations, giving you a more flexible API (DOM interactions, styling, mouse movements etc), and WebGL for plotting the series data, allowing you to capitalise on the performance.

For an example, take a look at this visualisation:

https://colineberhardt.github.io/d3fc-webgl-hathi-explorer/

You can see how the series and annotation are rendered on different layers in the code here:

https://github.com/ColinEberhardt/d3fc-webgl-hathi-explorer/blob/master/index.js#L129-L142

ColinEberhardt avatar May 30 '24 08:05 ColinEberhardt