Skip to content

Commit 4f68cba

Browse files
committed
make splom (x|y)axes items by 'subplotid'
- to ensure that all items are coerced correctly
1 parent f442f59 commit 4f68cba

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/lib/coerce.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,10 @@ exports.valObjectMeta = {
196196
'\'geo\', \'geo2\', \'geo3\', ...'
197197
].join(' '),
198198
requiredOpts: ['dflt'],
199-
otherOpts: [],
200-
coerceFunction: function(v, propOut, dflt) {
201-
if(typeof v === 'string' && counterRegex(dflt).test(v)) {
199+
otherOpts: ['regex'],
200+
coerceFunction: function(v, propOut, dflt, opts) {
201+
var regex = opts.regex || counterRegex(dflt);
202+
if(typeof v === 'string' && regex.test(v)) {
202203
propOut.set(v);
203204
return;
204205
}

src/traces/splom/attributes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ function makeAxesValObject(axLetter) {
1818
role: 'info',
1919
editType: 'calc',
2020
items: {
21-
valType: 'enumerated',
22-
values: [cartesianIdRegex[axLetter].toString(), ''],
21+
valType: 'subplotid',
22+
regex: cartesianIdRegex[axLetter],
2323
editType: 'plot'
2424
},
2525
description: [

0 commit comments

Comments
 (0)