Skip to content

Commit 9e14777

Browse files
committed
make angle arrayOk and use it for marker.angle
1 parent da0234e commit 9e14777

File tree

3 files changed

+15
-38
lines changed

3 files changed

+15
-38
lines changed

src/lib/coerce.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ exports.valObjectMeta = {
171171
'A number (in degree) between -180 and 180.'
172172
].join(' '),
173173
requiredOpts: [],
174-
otherOpts: ['dflt'],
174+
otherOpts: ['dflt', 'arrayOk'],
175175
coerceFunction: function(v, propOut, dflt) {
176176
if(v === 'auto') propOut.set('auto');
177177
else if(!isNumeric(v)) propOut.set(dflt);

src/traces/scatter/attributes.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,7 @@ module.exports = {
390390
description: 'Sets the marker opacity.'
391391
},
392392
angle: {
393-
valType: 'number',
394-
min: -360,
395-
max: 360,
393+
valType: 'angle',
396394
dflt: 0,
397395
arrayOk: true,
398396
editType: 'plot',

test/plot-schema.json

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,8 @@
435435
"angle": {
436436
"description": "A number (in degree) between -180 and 180.",
437437
"otherOpts": [
438-
"dflt"
438+
"dflt",
439+
"arrayOk"
439440
],
440441
"requiredOpts": []
441442
},
@@ -15456,9 +15457,7 @@
1545615457
"description": "Sets the marker angle in respect to `angleref`.",
1545715458
"dflt": 0,
1545815459
"editType": "calc",
15459-
"max": 360,
15460-
"min": -360,
15461-
"valType": "number"
15460+
"valType": "angle"
1546215461
},
1546315462
"color": {
1546415463
"arrayOk": false,
@@ -43339,9 +43338,7 @@
4333943338
"description": "Sets the marker angle in respect to `angleref`.",
4334043339
"dflt": 0,
4334143340
"editType": "plot",
43342-
"max": 360,
43343-
"min": -360,
43344-
"valType": "number"
43341+
"valType": "angle"
4334543342
},
4334643343
"angleref": {
4334743344
"anim": false,
@@ -47618,9 +47615,7 @@
4761847615
"description": "Sets the marker angle in respect to `angleref`.",
4761947616
"dflt": 0,
4762047617
"editType": "plot",
47621-
"max": 360,
47622-
"min": -360,
47623-
"valType": "number"
47618+
"valType": "angle"
4762447619
},
4762547620
"angleref": {
4762647621
"description": "Sets the reference for marker angle. With *previous*, angle 0 points along the line from the previous point to this one. With *up*, angle 0 points toward the top of the screen.",
@@ -49502,9 +49497,7 @@
4950249497
"description": "Sets the marker angle in respect to `angleref`.",
4950349498
"dflt": 0,
4950449499
"editType": "calc",
49505-
"max": 360,
49506-
"min": -360,
49507-
"valType": "number"
49500+
"valType": "angle"
4950849501
},
4950949502
"angleref": {
4951049503
"description": "Sets the reference for marker angle. With *previous*, angle 0 points along the line from the previous point to this one. With *up*, angle 0 points toward the top of the screen. With *north*, angle 0 points north based on the current map projection.",
@@ -51533,9 +51526,7 @@
5153351526
"description": "Sets the marker angle in respect to `angleref`.",
5153451527
"dflt": 0,
5153551528
"editType": "calc",
51536-
"max": 360,
51537-
"min": -360,
51538-
"valType": "number"
51529+
"valType": "angle"
5153951530
},
5154051531
"anglesrc": {
5154151532
"description": "Sets the source reference on Chart Studio Cloud for `angle`.",
@@ -54628,9 +54619,7 @@
5462854619
"description": "Sets the marker angle in respect to `angleref`.",
5462954620
"dflt": 0,
5463054621
"editType": "plot",
54631-
"max": 360,
54632-
"min": -360,
54633-
"valType": "number"
54622+
"valType": "angle"
5463454623
},
5463554624
"angleref": {
5463654625
"description": "Sets the reference for marker angle. With *previous*, angle 0 points along the line from the previous point to this one. With *up*, angle 0 points toward the top of the screen.",
@@ -56515,9 +56504,7 @@
5651556504
"description": "Sets the marker angle in respect to `angleref`.",
5651656505
"dflt": 0,
5651756506
"editType": "calc",
56518-
"max": 360,
56519-
"min": -360,
56520-
"valType": "number"
56507+
"valType": "angle"
5652156508
},
5652256509
"anglesrc": {
5652356510
"description": "Sets the source reference on Chart Studio Cloud for `angle`.",
@@ -58356,9 +58343,7 @@
5835658343
"description": "Sets the marker angle in respect to `angleref`.",
5835758344
"dflt": 0,
5835858345
"editType": "plot",
58359-
"max": 360,
58360-
"min": -360,
58361-
"valType": "number"
58346+
"valType": "angle"
5836258347
},
5836358348
"angleref": {
5836458349
"description": "Sets the reference for marker angle. With *previous*, angle 0 points along the line from the previous point to this one. With *up*, angle 0 points toward the top of the screen.",
@@ -60246,9 +60231,7 @@
6024660231
"description": "Sets the marker angle in respect to `angleref`.",
6024760232
"dflt": 0,
6024860233
"editType": "plot",
60249-
"max": 360,
60250-
"min": -360,
60251-
"valType": "number"
60234+
"valType": "angle"
6025260235
},
6025360236
"angleref": {
6025460237
"description": "Sets the reference for marker angle. With *previous*, angle 0 points along the line from the previous point to this one. With *up*, angle 0 points toward the top of the screen.",
@@ -62090,9 +62073,7 @@
6209062073
"description": "Sets the marker angle in respect to `angleref`.",
6209162074
"dflt": 0,
6209262075
"editType": "plot",
62093-
"max": 360,
62094-
"min": -360,
62095-
"valType": "number"
62076+
"valType": "angle"
6209662077
},
6209762078
"anglesrc": {
6209862079
"description": "Sets the source reference on Chart Studio Cloud for `angle`.",
@@ -69516,9 +69497,7 @@
6951669497
"description": "Sets the marker angle in respect to `angleref`.",
6951769498
"dflt": 0,
6951869499
"editType": "calc",
69519-
"max": 360,
69520-
"min": -360,
69521-
"valType": "number"
69500+
"valType": "angle"
6952269501
},
6952369502
"color": {
6952469503
"arrayOk": false,

0 commit comments

Comments
 (0)