d3-annotation. You can edit the code beside to see what happens.
annotationscreated at the beginning of the script. At the very least, you have to specify the position of the thing to annotate (
y), and the text position (
d3.annotation()is called to effectively build the annotation.
note(~ the text)
noteis the part with the text and the border around it.
notesection of the
connectorpart of the
annotationsobject or ii/ using
typesof annotation are available. In the examples above, the default type
d3.annotationLabelwas used. It does not display anything for the subject.
d3.annotationCalloutRectas shown beside.