Skip to content

Commit d952713

Browse files
committed
update hovertemplate description
1 parent 6233297 commit d952713

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/components/fx/hovertemplate_attributes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = function(opts, extra) {
1919
for(var i = 0; i < keys.length; i++) {
2020
quotedKeys[i] = '`' + keys[i] + '`';
2121
}
22-
descPart = descPart + 'Finally, this trace also supports ';
22+
descPart = descPart + 'Finally, the template string has access to ';
2323
if(keys.length === 1) {
2424
descPart = 'variable ' + quotedKeys[0];
2525
} else {

src/traces/sankey/attributes.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ var attrs = module.exports = overrideAll({
148148
},
149149
hoverlabel: fxAttrs.hoverlabel, // needs editType override,
150150
hovertemplate: hovertemplateAttrs({}, {
151-
keys: []
151+
description: 'Variables `sourceLinks` and `targetLinks` are arrays of link objects.',
152+
keys: ['value', 'label']
152153
}),
153154
description: 'The nodes of the Sankey plot.'
154155
},
@@ -221,7 +222,8 @@ var attrs = module.exports = overrideAll({
221222
},
222223
hoverlabel: fxAttrs.hoverlabel, // needs editType override,
223224
hovertemplate: hovertemplateAttrs({}, {
224-
keys: []
225+
description: 'Variables `source` and `target` are node objects.',
226+
keys: ['value', 'label']
225227
}),
226228
description: 'The links of the Sankey plot.'
227229
}

0 commit comments

Comments
 (0)