Skip to content

Commit 3e5e53f

Browse files
committed
Clarify that pie legend and showlegend can only be arrays if values is provided.
1 parent 177dca3 commit 3e5e53f

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

src/traces/pie/attributes.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,22 @@ module.exports = {
181181
description: ['Determines whether outside text labels can push the margins.'].join(' ')
182182
},
183183
showlegend: extendFlat({}, baseAttrs.showlegend, {
184-
arrayOk: true
184+
arrayOk: true,
185+
description: [
186+
'Determines whether or not items corresponding to the pie slices are shown in the',
187+
'legend. Can be an array if `values` is set. In that case, each entry specifies',
188+
'appearance in the legend for one slice.'
189+
].join(' ')
185190
}),
186191
legend: extendFlat({}, baseAttrs.legend, {
187-
arrayOk: true
192+
arrayOk: true,
193+
description: [
194+
'Sets the reference to a legend to show the pie slices in. Can be an array if `values`',
195+
'is set. In that case, each entry specifies the legend reference for one slice.',
196+
'References to these legends are *legend*, *legend2*, *legend3*, etc.',
197+
'Settings for these legends are set in the layout, under',
198+
'`layout.legend`, `layout.legend2`, etc.'
199+
].join(' ')
188200
}),
189201
title: {
190202
text: {

test/plot-schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56615,7 +56615,7 @@
5661556615
},
5661656616
"legend": {
5661756617
"arrayOk": true,
56618-
"description": "Sets the reference to a legend to show this trace in. References to these legends are *legend*, *legend2*, *legend3*, etc. Settings for these legends are set in the layout, under `layout.legend`, `layout.legend2`, etc.",
56618+
"description": "Sets the reference to a legend to show the pie slices in. Can be an array if `values` is set. In that case, each entry specifies the legend reference for one slice. References to these legends are *legend*, *legend2*, *legend3*, etc. Settings for these legends are set in the layout, under `layout.legend`, `layout.legend2`, etc.",
5661956619
"dflt": "legend",
5662056620
"editType": "style",
5662156621
"valType": "subplotid"
@@ -57084,7 +57084,7 @@
5708457084
},
5708557085
"showlegend": {
5708657086
"arrayOk": true,
57087-
"description": "Determines whether or not an item corresponding to this trace is shown in the legend.",
57087+
"description": "Determines whether or not items corresponding to the pie slices are shown in the legend. Can be an array if `values` is set. In that case, each entry specifies appearance in the legend for one slice.",
5708857088
"dflt": true,
5708957089
"editType": "style",
5709057090
"valType": "boolean"

0 commit comments

Comments
 (0)