Skip to content

Commit 56f2ee9

Browse files
committed
update scattergl & splom 'text' attr description
- scattergl 'text' now has the same behavior a scatter - splom 'text' is hover-only
1 parent 67a05c7 commit 56f2ee9

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/traces/scattergl/attributes.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,7 @@ var attrs = module.exports = overrideAll({
2828
y0: scatterAttrs.y0,
2929
dy: scatterAttrs.dy,
3030

31-
text: extendFlat({}, scatterAttrs.text, {
32-
description: [
33-
'Sets text elements associated with each (x,y) pair to appear on hover.',
34-
'If a single string, the same string appears over',
35-
'all the data points.',
36-
'If an array of string, the items are mapped in order to the',
37-
'this trace\'s (x,y) coordinates.'
38-
].join(' ')
39-
}),
31+
text: scatterAttrs.text,
4032
hovertext: scatterAttrs.hovertext,
4133

4234
textposition: scatterAttrs.textposition,

src/traces/splom/attributes.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
var scatterGlAttrs = require('../scattergl/attributes');
1212
var cartesianIdRegex = require('../../plots/cartesian/constants').idRegex;
1313
var templatedArray = require('../../plot_api/plot_template').templatedArray;
14+
var extendFlat = require('../../lib/extend').extendFlat;
1415

1516
function makeAxesValObject(axLetter) {
1617
return {
@@ -86,7 +87,15 @@ module.exports = {
8687

8788
// mode: {}, (only 'markers' for now)
8889

89-
text: scatterGlAttrs.text,
90+
text: extendFlat({}, scatterGlAttrs.text, {
91+
description: [
92+
'Sets text elements associated with each (x,y) pair to appear on hover.',
93+
'If a single string, the same string appears over',
94+
'all the data points.',
95+
'If an array of string, the items are mapped in order to the',
96+
'this trace\'s (x,y) coordinates.'
97+
].join(' ')
98+
}),
9099
marker: scatterGlAttrs.marker,
91100

92101
xaxes: makeAxesValObject('x'),

0 commit comments

Comments
 (0)