Skip to content

Commit

Permalink
Refine description for x0shift/x1shift/y0shift/y1shift
Browse files Browse the repository at this point in the history
  • Loading branch information
my-tien committed Jul 16, 2024
1 parent 7de45c3 commit 9ac970a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
20 changes: 12 additions & 8 deletions src/components/shapes/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ module.exports = templatedArray('shape', {
max: 1,
editType: 'calc',
description: [
'Only relevant if `xref` is a (multi-)category axes. Shifts `x0` by a fraction of the',
'reference unit. E.g. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.'
'Shifts `x0` away from the center of the category when `xref` is a *category* or',
'*multicategory* axis. -0.5 corresponds to the start of the category and 0.5',
'corresponds to the end of the category.'
].join(' ')
},
x1shift: {
Expand All @@ -187,8 +188,9 @@ module.exports = templatedArray('shape', {
max: 1,
editType: 'calc',
description: [
'Only relevant if `xref` is a (multi-)category axes. Shifts `x1` by a fraction of the',
'reference unit. E.g. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.'
'Shifts `x1` away from the center of the category when `xref` is a *category* or',
'*multicategory* axis. -0.5 corresponds to the start of the category and 0.5',
'corresponds to the end of the category.'
].join(' ')
},
yref: extendFlat({}, annAttrs.yref, {
Expand Down Expand Up @@ -248,8 +250,9 @@ module.exports = templatedArray('shape', {
max: 1,
editType: 'calc',
description: [
'Only relevant if `yref` is a (multi-)category axes. Shifts `y0` by a fraction of the',
'reference unit. E.g. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.'
'Shifts `y0` away from the center of the category when `yref` is a *category* or',
'*multicategory* axis. -0.5 corresponds to the start of the category and 0.5',
'corresponds to the end of the category.'
].join(' ')
},
y1shift: {
Expand All @@ -259,8 +262,9 @@ module.exports = templatedArray('shape', {
max: 1,
editType: 'calc',
description: [
'Only relevant if `yref` is a (multi-)category axes. Shifts `y1` by a fraction of the',
'reference unit. E.g. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.'
'Shifts `y1` away from the center of the category when `yref` is a *category* or',
'*multicategory* axis. -0.5 corresponds to the start of the category and 0.5',
'corresponds to the end of the category.'
].join(' ')
},
path: {
Expand Down
8 changes: 4 additions & 4 deletions test/plot-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10006,7 +10006,7 @@
"valType": "any"
},
"x0shift": {
"description": "Only relevant if `xref` is a (multi-)category axes. Shifts `x0` by a fraction of the reference unit. E.g. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.",
"description": "Shifts `x0` away from the center of the category when `xref` is a *category* or *multicategory* axis. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.",
"dflt": 0,
"editType": "calc",
"max": 1,
Expand All @@ -10019,7 +10019,7 @@
"valType": "any"
},
"x1shift": {
"description": "Only relevant if `xref` is a (multi-)category axes. Shifts `x1` by a fraction of the reference unit. E.g. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.",
"description": "Shifts `x1` away from the center of the category when `xref` is a *category* or *multicategory* axis. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.",
"dflt": 0,
"editType": "calc",
"max": 1,
Expand Down Expand Up @@ -10056,7 +10056,7 @@
"valType": "any"
},
"y0shift": {
"description": "Only relevant if `yref` is a (multi-)category axes. Shifts `y0` by a fraction of the reference unit. E.g. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.",
"description": "Shifts `y0` away from the center of the category when `yref` is a *category* or *multicategory* axis. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.",
"dflt": 0,
"editType": "calc",
"max": 1,
Expand All @@ -10069,7 +10069,7 @@
"valType": "any"
},
"y1shift": {
"description": "Only relevant if `yref` is a (multi-)category axes. Shifts `y1` by a fraction of the reference unit. E.g. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.",
"description": "Shifts `y1` away from the center of the category when `yref` is a *category* or *multicategory* axis. -0.5 corresponds to the start of the category and 0.5 corresponds to the end of the category.",
"dflt": 0,
"editType": "calc",
"max": 1,
Expand Down

0 comments on commit 9ac970a

Please sign in to comment.