Skip to content

Commit 5c94e46

Browse files
committed
Add attributes to plot schema
1 parent a4ce2b7 commit 5c94e46

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

src/components/legend/attributes.js

+22
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,17 @@ module.exports = {
168168
'defaults to *0* for horizontal legends.'
169169
].join(' ')
170170
},
171+
xref: {
172+
valType: 'enumerated',
173+
dflt: 'container',
174+
values: ['container', 'paper'],
175+
editType: 'layoutstyle',
176+
description: [
177+
'Sets the container `x` refers to.',
178+
'*container* spans the entire `width` of the plot.',
179+
'*paper* refers to the width of the plotting area only.'
180+
].join(' ')
181+
},
171182
xanchor: {
172183
valType: 'enumerated',
173184
values: ['auto', 'left', 'center', 'right'],
@@ -194,6 +205,17 @@ module.exports = {
194205
'defaults to *1.1* for horizontal legends on graph with one or multiple range sliders.'
195206
].join(' ')
196207
},
208+
yref: {
209+
valType: 'enumerated',
210+
dflt: 'container',
211+
values: ['container', 'paper'],
212+
editType: 'layoutstyle',
213+
description: [
214+
'Sets the container `y` refers to.',
215+
'*container* spans the entire `height` of the plot.',
216+
'*paper* refers to the height of the plotting area only.'
217+
].join(' ')
218+
},
197219
yanchor: {
198220
valType: 'enumerated',
199221
values: ['auto', 'top', 'middle', 'bottom'],

test/plot-schema.json

+20
Original file line numberDiff line numberDiff line change
@@ -2982,6 +2982,16 @@
29822982
"right"
29832983
]
29842984
},
2985+
"xref": {
2986+
"description": "Sets the container `x` refers to. *container* spans the entire `width` of the plot. *paper* refers to the width of the plotting area only.",
2987+
"dflt": "container",
2988+
"editType": "layoutstyle",
2989+
"valType": "enumerated",
2990+
"values": [
2991+
"container",
2992+
"paper"
2993+
]
2994+
},
29852995
"y": {
29862996
"description": "Sets the y position (in normalized coordinates) of the legend. Defaults to *1* for vertical legends, defaults to *-0.1* for horizontal legends on graphs w/o range sliders and defaults to *1.1* for horizontal legends on graph with one or multiple range sliders.",
29872997
"editType": "legend",
@@ -2999,6 +3009,16 @@
29993009
"middle",
30003010
"bottom"
30013011
]
3012+
},
3013+
"yref": {
3014+
"description": "Sets the container `y` refers to. *container* spans the entire `height` of the plot. *paper* refers to the height of the plotting area only.",
3015+
"dflt": "container",
3016+
"editType": "layoutstyle",
3017+
"valType": "enumerated",
3018+
"values": [
3019+
"container",
3020+
"paper"
3021+
]
30023022
}
30033023
},
30043024
"mapbox": {

0 commit comments

Comments
 (0)