Skip to content

Commit beb33ed

Browse files
committed
Correct the legend maxheight description
1 parent 4a732b7 commit beb33ed

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎src/components/legend/attributes.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ module.exports = {
4040
editType: 'legend',
4141
description: [
4242
'Sets the max height (in px) of the legend, or max height ratio (reference height * ratio) if less than or equal to 1.',
43-
'Default value is: 0.5 for horizontal legends; 1 for vertical legends. The minimum allowed height is 30px.',
43+
'Default value is: 1 for vertically oriented legends with a `yref` of `"paper"`, located to the side of the plot;',
44+
'0.5 for all other legends. The minimum allowed height is 30px.',
4445
'For a ratio of 0.5, the legend will take up to 50% of the reference height before displaying a scrollbar.',
4546
'The reference height is the full layout height with the following exception: vertically oriented legends with',
46-
'a `yref` of `"paper", located to the side of the plot. In this case, the reference height is the plot height.'
47+
'a `yref` of `"paper"`, located to the side of the plot. In this case, the reference height is the plot height.',
48+
'For a legend with a `yref` of `"container"`, the max height is also limited to the space between',
49+
'the legend anchor and the container edge.'
4750
].join(' ')
4851
},
4952
borderwidth: {

‎src/types/generated/schema.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12803,7 +12803,7 @@ export interface Legend {
1280312803
*/
1280412804
itemwidth?: number;
1280512805
/**
12806-
* Sets the max height (in px) of the legend, or max height ratio (reference height * ratio) if less than or equal to 1. Default value is: 0.5 for horizontal legends; 1 for vertical legends. The minimum allowed height is 30px. For a ratio of 0.5, the legend will take up to 50% of the reference height before displaying a scrollbar. The reference height is the full layout height with the following exception: vertically oriented legends with a `yref` of `"paper", located to the side of the plot. In this case, the reference height is the plot height.
12806+
* Sets the max height (in px) of the legend, or max height ratio (reference height * ratio) if less than or equal to 1. Default value is: 1 for vertically oriented legends with a `yref` of `"paper"`, located to the side of the plot; 0.5 for all other legends. The minimum allowed height is 30px. For a ratio of 0.5, the legend will take up to 50% of the reference height before displaying a scrollbar. The reference height is the full layout height with the following exception: vertically oriented legends with a `yref` of `"paper"`, located to the side of the plot. In this case, the reference height is the plot height. For a legend with a `yref` of `"container"`, the max height is also limited to the space between the legend anchor and the container edge.
1280712807
* Minimum: 0
1280812808
*/
1280912809
maxheight?: number;

‎test/plot-schema.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3495,7 +3495,7 @@
34953495
"valType": "number"
34963496
},
34973497
"maxheight": {
3498-
"description": "Sets the max height (in px) of the legend, or max height ratio (reference height * ratio) if less than or equal to 1. Default value is: 0.5 for horizontal legends; 1 for vertical legends. The minimum allowed height is 30px. For a ratio of 0.5, the legend will take up to 50% of the reference height before displaying a scrollbar. The reference height is the full layout height with the following exception: vertically oriented legends with a `yref` of `\"paper\", located to the side of the plot. In this case, the reference height is the plot height.",
3498+
"description": "Sets the max height (in px) of the legend, or max height ratio (reference height * ratio) if less than or equal to 1. Default value is: 1 for vertically oriented legends with a `yref` of `\"paper\"`, located to the side of the plot; 0.5 for all other legends. The minimum allowed height is 30px. For a ratio of 0.5, the legend will take up to 50% of the reference height before displaying a scrollbar. The reference height is the full layout height with the following exception: vertically oriented legends with a `yref` of `\"paper\"`, located to the side of the plot. In this case, the reference height is the plot height. For a legend with a `yref` of `\"container\"`, the max height is also limited to the space between the legend anchor and the container edge.",
34993499
"editType": "legend",
35003500
"min": 0,
35013501
"valType": "number"

0 commit comments

Comments
 (0)