Annotations with strings on D3 histograms
I would like to add annotations to an SVG histogram written in D3.
I want to add lines and text to the chart as shown below:
My question is, is there a best practice for this or a general pattern?
My guess would be to use the .each method following the data .enter() method
. Then, using a conditional statement, you can call a function that inserts the rendered lines and text.
+3
source to share