Skip to content

Commit 78bc2cf

Browse files
PR feedback
1 parent 67a11d7 commit 78bc2cf

File tree

9 files changed

+6
-57
lines changed

9 files changed

+6
-57
lines changed

src/traces/barpolar/attributes.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
'use strict';
1010

1111
var hovertemplateAttrs = require('../../components/fx/hovertemplate_attributes');
12-
var constants = require('./constants');
1312
var extendFlat = require('../../lib/extend').extendFlat;
1413
var scatterPolarAttrs = require('../scatterpolar/attributes');
1514
var barAttrs = require('../bar/attributes');
@@ -71,9 +70,7 @@ module.exports = {
7170
marker: barAttrs.marker,
7271

7372
hoverinfo: scatterPolarAttrs.hoverinfo,
74-
hovertemplate: hovertemplateAttrs({}, {
75-
keys: constants.eventDataKeys
76-
}),
73+
hovertemplate: hovertemplateAttrs(),
7774

7875
selected: barAttrs.selected,
7976
unselected: barAttrs.unselected

src/traces/barpolar/constants.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/traces/scatterpolar/attributes.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
'use strict';
1010

1111
var hovertemplateAttrs = require('../../components/fx/hovertemplate_attributes');
12-
var constants = require('./constants');
1312
var extendFlat = require('../../lib/extend').extendFlat;
1413
var scatterAttrs = require('../scatter/attributes');
1514
var plotAttrs = require('../../plots/attributes');
@@ -132,9 +131,7 @@ module.exports = {
132131
flags: ['r', 'theta', 'text', 'name']
133132
}),
134133
hoveron: scatterAttrs.hoveron,
135-
hovertemplate: hovertemplateAttrs({}, {
136-
keys: constants.eventDataKeys
137-
}),
134+
hovertemplate: hovertemplateAttrs(),
138135

139136
selected: scatterAttrs.selected,
140137
unselected: scatterAttrs.unselected

src/traces/scatterpolar/constants.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/traces/scatterpolar/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
3535
coerce('mode', len < PTS_LINESONLY ? 'lines+markers' : 'lines');
3636
coerce('text');
3737
coerce('hovertext');
38-
coerce('hovertemplate');
38+
if(traceOut.hoveron !== 'fills') coerce('hovertemplate');
3939

4040
if(subTypes.hasLines(traceOut)) {
4141
handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);

src/traces/scatterpolargl/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
3535
coerce('mode', len < PTS_LINESONLY ? 'lines+markers' : 'lines');
3636
coerce('text');
3737
coerce('hovertext');
38-
coerce('hovertemplate');
38+
if(traceOut.hoveron !== 'fills') coerce('hovertemplate');
3939

4040
if(subTypes.hasLines(traceOut)) {
4141
handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);

src/traces/scatterternary/attributes.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
'use strict';
1010

1111
var hovertemplateAttrs = require('../../components/fx/hovertemplate_attributes');
12-
var constants = require('./constants');
1312
var scatterAttrs = require('../scatter/attributes');
1413
var plotAttrs = require('../../plots/attributes');
1514
var colorAttributes = require('../../components/colorscale/attributes');
@@ -149,7 +148,5 @@ module.exports = {
149148
flags: ['a', 'b', 'c', 'text', 'name']
150149
}),
151150
hoveron: scatterAttrs.hoveron,
152-
hovertemplate: hovertemplateAttrs({}, {
153-
keys: constants.eventDataKeys
154-
}),
151+
hovertemplate: hovertemplateAttrs(),
155152
};

src/traces/scatterternary/constants.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/traces/scatterternary/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
6161

6262
coerce('text');
6363
coerce('hovertext');
64-
coerce('hovertemplate');
64+
if(traceOut.hoveron !== 'fills') coerce('hovertemplate');
6565

6666
var defaultMode = len < constants.PTS_LINESONLY ? 'lines+markers' : 'lines';
6767
coerce('mode', defaultMode);

0 commit comments

Comments
 (0)