Skip to content

Commit f7b2447

Browse files
committed
jsdoc for titles.draw
1 parent 042cf3a commit f7b2447

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

src/components/titles/index.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,31 @@ var Titles = module.exports = {};
2424

2525
/**
2626
* Titles - (re)draw titles on the axes and plot:
27-
* title can be 'xtitle', 'ytitle', 'gtitle'
27+
* @param {DOM element} gd - the graphDiv
28+
* @param {string} titleClass - the css class of this title
29+
* @param {object} options - how and what to draw
30+
* propContainer - the layout object containing `title` and `titlefont`
31+
* attributes that apply to this title
32+
* propName - the full name of the title property (for Plotly.relayout)
33+
* [traceIndex] - include only if this property applies to one trace
34+
* (such as a colorbar title) - then editing pipes to Plotly.restyle
35+
* instead of Plotly.relayout
36+
* dfltName - the name of the title in placeholder text
37+
* [avoid] {object} - include if this title should move to avoid other elements
38+
* selection - d3 selection of elements to avoid
39+
* side - which direction to move if there is a conflict
40+
* [offsetLeft] - if these elements are subject to a translation
41+
* wrt the title element
42+
* [offsetTop]
43+
* attributes {object} - position and alignment attributes
44+
* x - pixels
45+
* y - pixels
46+
* text-anchor - start|middle|end
47+
* transform {object} - how to transform the title after positioning
48+
* rotate - degrees
49+
* offset - shift up/down in the rotated frame (unused?)
50+
* containerGroup - if an svg <g> element already exists to hold this
51+
* title, include here. Otherwise it will go in fullLayout._infolayer
2852
*/
2953
Titles.draw = function(gd, titleClass, options) {
3054
var cont = options.propContainer,

0 commit comments

Comments
 (0)