MCPcopy Index your code
hub / github.com/plotly/plotly.js / drawOne

Function drawOne

src/components/annotations/draw.js:57–67  ·  view source on GitHub ↗
(gd, index)

Source from the content-addressed store, hash-verified

55 * index (int): the annotation to draw
56 */
57function drawOne(gd, index) {
58 var fullLayout = gd._fullLayout;
59 var options = fullLayout.annotations[index] || {};
60 var xa = Axes.getFromId(gd, options.xref);
61 var ya = Axes.getFromId(gd, options.yref);
62
63 if(xa) xa.setScale();
64 if(ya) ya.setScale();
65
66 drawRaw(gd, options, index, false, xa, ya);
67}
68
69// Convert pixels to the coordinates relevant for the axis referred to. For
70// example, for paper it would convert to a value normalized by the dimension of

Callers 1

drawFunction · 0.70

Calls 1

drawRawFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…