Skip to content

Commit 9e4f1a0

Browse files
committed
hide unsupported properties in sankey more safely
1 parent 1813d6c commit 9e4f1a0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/plot_api/edit_types.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
var Lib = require('../lib');
1212
var extendFlat = Lib.extendFlat;
13-
var extendDeepAll = Lib.extendDeepAll;
1413
var isPlainObject = Lib.isPlainObject;
1514

1615
var traceOpts = {
@@ -116,7 +115,7 @@ function falseObj(keys) {
116115
* @return {object} a new attributes object with `editType` modified as directed
117116
*/
118117
function overrideAll(attrs, editTypeOverride, overrideContainers) {
119-
var out = extendDeepAll({}, attrs);
118+
var out = extendFlat({}, attrs);
120119
for(var key in out) {
121120
var attr = out[key];
122121
if(isPlainObject(attr)) {

src/traces/sankey/attributes.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var domainAttrs = require('../../plots/domain').attributes;
1717
var extendFlat = require('../../lib/extend').extendFlat;
1818
var overrideAll = require('../../plot_api/edit_types').overrideAll;
1919

20-
module.exports = overrideAll({
20+
var attrs = module.exports = overrideAll({
2121
domain: domainAttrs({name: 'sankey', trace: true}),
2222

2323
orientation: {
@@ -186,6 +186,7 @@ module.exports = overrideAll({
186186
hoverlabel: fxAttrs.hoverlabel, // needs editType override,
187187
description: 'The links of the Sankey plot.'
188188
},
189-
hoverinfo: undefined,
190-
hoverlabel: undefined
191189
}, 'calc', 'nested');
190+
// hide unsupported top-level properties from plot-schema
191+
attrs.hoverinfo = undefined;
192+
attrs.hoverlabel = undefined;

0 commit comments

Comments
 (0)