8000 adding hovertemplates to polar bar and scatter and ternary scatter by nicolaskruchten · Pull Request #3398 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

adding hovertemplates to polar bar and scatter and ternary scatter #3398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 14, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PR feedback
  • Loading branch information
nicolaskruchten committed Jan 7, 2019
commit 78bc2cfb13424b4f5669d233b705da134c9d1487
5 changes: 1 addition & 4 deletions src/traces/barpolar/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
'use strict';

var hovertemplateAttrs = require('../../components/fx/hovertemplate_attributes');
var constants = require('./constants');
var extendFlat = require('../../lib/extend').extendFlat;
var scatterPolarAttrs = require('../scatterpolar/attributes');
var barAttrs = require('../bar/attributes');
Expand Down Expand Up @@ -71,9 +70,7 @@ module.exports = {
marker: barAttrs.marker,

hoverinfo: scatterPolarAttrs.hoverinfo,
hovertemplate: hovertemplateAttrs({}, {
keys: constants.eventDataKeys
}),
hovertemplate: hovertemplateAttrs(),

selected: barAttrs.selected,
unselected: barAttrs.unselected
Expand Down
14 changes: 0 additions & 14 deletions src/traces/barpolar/constants.js

This file was deleted.

5 changes: 1 addition & 4 deletions src/traces/scatterpolar/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
'use strict';

var hovertemplateAttrs = require('../../components/fx/hovertemplate_attributes');
var constants = require('./constants');
var extendFlat = require('../../lib/extend').extendFlat;
var scatterAttrs = require('../scatter/attributes');
var plotAttrs = require('../../plots/attributes');
Expand Down Expand Up @@ -132,9 +131,7 @@ module.exports = {
flags: ['r', 'theta', 'text', 'name']
}),
hoveron: scatterAttrs.hoveron,
hovertemplate: hovertemplateAttrs({}, {
keys: constants.eventDataKeys
}),
hovertemplate: hovertemplateAttrs(),

selected: scatterAttrs.selected,
unselected: scatterAttrs.unselected
Expand Down
14 changes: 0 additions & 14 deletions src/traces/scatterpolar/constants.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/traces/scatterpolar/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
coerce('mode', len < PTS_LINESONLY ? 'lines+markers' : 'lines');
coerce('text');
coerce('hovertext');
coerce('hovertemplate');
if(traceOut.hoveron !== 'fills') coerce('hovertemplate');

if(subTypes.hasLines(traceOut)) {
handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);
Expand Down
2 changes: 1 addition & 1 deletion src/traces/scatterpolargl/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
coerce('mode', len < PTS_LINESONLY ? 'lines+markers' : 'lines');
coerce('text');
coerce('hovertext');
coerce('hovertemplate');
if(traceOut.hoveron !== 'fills') coerce('hovertemplate');

if(subTypes.hasLines(traceOut)) {
handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);
Expand Down
5 changes: 1 addition & 4 deletions src/traces/scatterternary/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
'use strict';

var hovertemplateAttrs = require('../../components/fx/hovertemplate_attributes');
var constants = require('./constants');
var scatterAttrs = require('../scatter/attributes');
var plotAttrs = require('../../plots/attributes');
var colorAttributes = require('../../components/colorscale/attributes');
Expand Down Expand Up @@ -149,7 +148,5 @@ module.exports = {
flags: ['a', 'b', 'c', 'text', 'name']
}),
hoveron: scatterAttrs.hoveron,
hovertemplate: hovertemplateAttrs({}, {
keys: constants.eventDataKeys
}),
hovertemplate: hovertemplateAttrs(),
};
14 changes: 0 additions & 14 deletions src/traces/scatterternary/constants.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/traces/scatterternary/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout

coerce('text');
coerce('hovertext');
coerce('hovertemplate');
if(traceOut.hoveron !== 'fills') coerce('hovertemplate');

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