Skip to content

Commit

Permalink
Merge pull request #5425 from plotly/remove-role
Browse files Browse the repository at this point in the history
Drop role key from attributes
  • Loading branch information
archmoj authored Jan 20, 2021
2 parents 5f51450 + bd47920 commit 2d801b4
Show file tree
Hide file tree
Showing 101 changed files with 10 additions and 1,073 deletions.
42 changes: 0 additions & 42 deletions src/components/annotations/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ function arrowCoordinateDescription(axis, lower, upper) {
module.exports = templatedArray('annotation', {
visible: {
valType: 'boolean',
role: 'info',
dflt: true,
editType: 'calc+arraydraw',
description: [
Expand All @@ -54,7 +53,6 @@ module.exports = templatedArray('annotation', {

text: {
valType: 'string',
role: 'info',
editType: 'calc+arraydraw',
description: [
'Sets the text associated with this annotation.',
Expand All @@ -67,7 +65,6 @@ module.exports = templatedArray('annotation', {
textangle: {
valType: 'angle',
dflt: 0,
role: 'style',
editType: 'calc+arraydraw',
description: [
'Sets the angle at which the `text` is drawn',
Expand All @@ -83,7 +80,6 @@ module.exports = templatedArray('annotation', {
valType: 'number',
min: 1,
dflt: null,
role: 'style',
editType: 'calc+arraydraw',
description: [
'Sets an explicit width for the text box. null (default) lets the',
Expand All @@ -95,7 +91,6 @@ module.exports = templatedArray('annotation', {
valType: 'number',
min: 1,
dflt: null,
role: 'style',
editType: 'calc+arraydraw',
description: [
'Sets an explicit height for the text box. null (default) lets the',
Expand All @@ -107,15 +102,13 @@ module.exports = templatedArray('annotation', {
min: 0,
max: 1,
dflt: 1,
role: 'style',
editType: 'arraydraw',
description: 'Sets the opacity of the annotation (text + arrow).'
},
align: {
valType: 'enumerated',
values: ['left', 'center', 'right'],
dflt: 'center',
role: 'style',
editType: 'arraydraw',
description: [
'Sets the horizontal alignment of the `text` within the box.',
Expand All @@ -128,7 +121,6 @@ module.exports = templatedArray('annotation', {
valType: 'enumerated',
values: ['top', 'middle', 'bottom'],
dflt: 'middle',
role: 'style',
editType: 'arraydraw',
description: [
'Sets the vertical alignment of the `text` within the box.',
Expand All @@ -139,14 +131,12 @@ module.exports = templatedArray('annotation', {
bgcolor: {
valType: 'color',
dflt: 'rgba(0,0,0,0)',
role: 'style',
editType: 'arraydraw',
description: 'Sets the background color of the annotation.'
},
bordercolor: {
valType: 'color',
dflt: 'rgba(0,0,0,0)',
role: 'style',
editType: 'arraydraw',
description: [
'Sets the color of the border enclosing the annotation `text`.'
Expand All @@ -156,7 +146,6 @@ module.exports = templatedArray('annotation', {
valType: 'number',
min: 0,
dflt: 1,
role: 'style',
editType: 'calc+arraydraw',
description: [
'Sets the padding (in px) between the `text`',
Expand All @@ -167,7 +156,6 @@ module.exports = templatedArray('annotation', {
valType: 'number',
min: 0,
dflt: 1,
role: 'style',
editType: 'calc+arraydraw',
description: [
'Sets the width (in px) of the border enclosing',
Expand All @@ -178,7 +166,6 @@ module.exports = templatedArray('annotation', {
showarrow: {
valType: 'boolean',
dflt: true,
role: 'style',
editType: 'calc+arraydraw',
description: [
'Determines whether or not the annotation is drawn with an arrow.',
Expand All @@ -188,7 +175,6 @@ module.exports = templatedArray('annotation', {
},
arrowcolor: {
valType: 'color',
role: 'style',
editType: 'arraydraw',
description: 'Sets the color of the annotation arrow.'
},
Expand All @@ -197,7 +183,6 @@ module.exports = templatedArray('annotation', {
min: 0,
max: ARROWPATHS.length,
dflt: 1,
role: 'style',
editType: 'arraydraw',
description: 'Sets the end annotation arrow head style.'
},
Expand All @@ -206,7 +191,6 @@ module.exports = templatedArray('annotation', {
min: 0,
max: ARROWPATHS.length,
dflt: 1,
role: 'style',
editType: 'arraydraw',
description: 'Sets the start annotation arrow head style.'
},
Expand All @@ -215,15 +199,13 @@ module.exports = templatedArray('annotation', {
flags: ['end', 'start'],
extras: ['none'],
dflt: 'end',
role: 'style',
editType: 'arraydraw',
description: 'Sets the annotation arrow head position.'
},
arrowsize: {
valType: 'number',
min: 0.3,
dflt: 1,
role: 'style',
editType: 'calc+arraydraw',
description: [
'Sets the size of the end annotation arrow head, relative to `arrowwidth`.',
Expand All @@ -234,7 +216,6 @@ module.exports = templatedArray('annotation', {
valType: 'number',
min: 0.3,
dflt: 1,
role: 'style',
editType: 'calc+arraydraw',
description: [
'Sets the size of the start annotation arrow head, relative to `arrowwidth`.',
Expand All @@ -244,15 +225,13 @@ module.exports = templatedArray('annotation', {
arrowwidth: {
valType: 'number',
min: 0.1,
role: 'style',
editType: 'calc+arraydraw',
description: 'Sets the width (in px) of annotation arrow line.'
},
standoff: {
valType: 'number',
min: 0,
dflt: 0,
role: 'style',
editType: 'calc+arraydraw',
description: [
'Sets a distance, in pixels, to move the end arrowhead away from the',
Expand All @@ -266,7 +245,6 @@ module.exports = templatedArray('annotation', {
valType: 'number',
min: 0,
dflt: 0,
role: 'style',
editType: 'calc+arraydraw',
description: [
'Sets a distance, in pixels, to move the start arrowhead away from the',
Expand All @@ -278,15 +256,13 @@ module.exports = templatedArray('annotation', {
},
ax: {
valType: 'any',
role: 'info',
editType: 'calc+arraydraw',
description: [
arrowCoordinateDescription('x', 'left', 'right')
].join(' ')
},
ay: {
valType: 'any',
role: 'info',
editType: 'calc+arraydraw',
description: [
arrowCoordinateDescription('y', 'top', 'bottom')
Expand All @@ -299,7 +275,6 @@ module.exports = templatedArray('annotation', {
'pixel',
cartesianConstants.idRegex.x.toString()
],
role: 'info',
editType: 'calc',
description: [
'Indicates in what coordinates the tail of the',
Expand All @@ -315,7 +290,6 @@ module.exports = templatedArray('annotation', {
'pixel',
cartesianConstants.idRegex.y.toString()
],
role: 'info',
editType: 'calc',
description: [
'Indicates in what coordinates the tail of the',
Expand All @@ -331,7 +305,6 @@ module.exports = templatedArray('annotation', {
'paper',
cartesianConstants.idRegex.x.toString()
],
role: 'info',
editType: 'calc',
description: [
'Sets the annotation\'s x coordinate axis.',
Expand All @@ -340,7 +313,6 @@ module.exports = templatedArray('annotation', {
},
x: {
valType: 'any',
role: 'info',
editType: 'calc+arraydraw',
description: [
'Sets the annotation\'s x position.',
Expand All @@ -358,7 +330,6 @@ module.exports = templatedArray('annotation', {
valType: 'enumerated',
values: ['auto', 'left', 'center', 'right'],
dflt: 'auto',
role: 'info',
editType: 'calc+arraydraw',
description: [
'Sets the text box\'s horizontal position anchor',
Expand All @@ -377,7 +348,6 @@ module.exports = templatedArray('annotation', {
xshift: {
valType: 'number',
dflt: 0,
role: 'style',
editType: 'calc+arraydraw',
description: [
'Shifts the position of the whole annotation and arrow to the',
Expand All @@ -390,7 +360,6 @@ module.exports = templatedArray('annotation', {
'paper',
cartesianConstants.idRegex.y.toString()
],
role: 'info',
editType: 'calc',
description: [
'Sets the annotation\'s y coordinate axis.',
Expand All @@ -399,7 +368,6 @@ module.exports = templatedArray('annotation', {
},
y: {
valType: 'any',
role: 'info',
editType: 'calc+arraydraw',
description: [
'Sets the annotation\'s y position.',
Expand All @@ -417,7 +385,6 @@ module.exports = templatedArray('annotation', {
valType: 'enumerated',
values: ['auto', 'top', 'middle', 'bottom'],
dflt: 'auto',
role: 'info',
editType: 'calc+arraydraw',
description: [
'Sets the text box\'s vertical position anchor',
Expand All @@ -436,7 +403,6 @@ module.exports = templatedArray('annotation', {
yshift: {
valType: 'number',
dflt: 0,
role: 'style',
editType: 'calc+arraydraw',
description: [
'Shifts the position of the whole annotation and arrow up',
Expand All @@ -447,7 +413,6 @@ module.exports = templatedArray('annotation', {
valType: 'enumerated',
values: [false, 'onoff', 'onout'],
dflt: false,
role: 'style',
editType: 'arraydraw',
description: [
'Makes this annotation respond to clicks on the plot.',
Expand All @@ -466,7 +431,6 @@ module.exports = templatedArray('annotation', {
},
xclick: {
valType: 'any',
role: 'info',
editType: 'arraydraw',
description: [
'Toggle this annotation when clicking a data point whose `x` value',
Expand All @@ -475,7 +439,6 @@ module.exports = templatedArray('annotation', {
},
yclick: {
valType: 'any',
role: 'info',
editType: 'arraydraw',
description: [
'Toggle this annotation when clicking a data point whose `y` value',
Expand All @@ -484,7 +447,6 @@ module.exports = templatedArray('annotation', {
},
hovertext: {
valType: 'string',
role: 'info',
editType: 'arraydraw',
description: [
'Sets text to appear when hovering over this annotation.',
Expand All @@ -494,7 +456,6 @@ module.exports = templatedArray('annotation', {
hoverlabel: {
bgcolor: {
valType: 'color',
role: 'style',
editType: 'arraydraw',
description: [
'Sets the background color of the hover label.',
Expand All @@ -504,7 +465,6 @@ module.exports = templatedArray('annotation', {
},
bordercolor: {
valType: 'color',
role: 'style',
editType: 'arraydraw',
description: [
'Sets the border color of the hover label.',
Expand All @@ -524,7 +484,6 @@ module.exports = templatedArray('annotation', {
},
captureevents: {
valType: 'boolean',
role: 'info',
editType: 'arraydraw',
description: [
'Determines whether the annotation text box captures mouse move',
Expand All @@ -540,7 +499,6 @@ module.exports = templatedArray('annotation', {
_deprecated: {
ref: {
valType: 'string',
role: 'info',
editType: 'calc',
description: [
'Obsolete. Set `xref` and `yref` separately instead.'
Expand Down
5 changes: 0 additions & 5 deletions src/components/annotations3d/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,30 @@ module.exports = overrideAll(templatedArray('annotation', {
visible: annAttrs.visible,
x: {
valType: 'any',
role: 'info',
description: [
'Sets the annotation\'s x position.'
].join(' ')
},
y: {
valType: 'any',
role: 'info',
description: [
'Sets the annotation\'s y position.'
].join(' ')
},
z: {
valType: 'any',
role: 'info',
description: [
'Sets the annotation\'s z position.'
].join(' ')
},
ax: {
valType: 'number',
role: 'info',
description: [
'Sets the x component of the arrow tail about the arrow head (in pixels).'
].join(' ')
},
ay: {
valType: 'number',
role: 'info',
description: [
'Sets the y component of the arrow tail about the arrow head (in pixels).'
].join(' ')
Expand Down
1 change: 0 additions & 1 deletion src/components/calendars/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ var ONEDAY = constants.ONEDAY;
var attributes = {
valType: 'enumerated',
values: Object.keys(calendars.calendars),
role: 'info',
editType: 'calc',
dflt: 'gregorian'
};
Expand Down
Loading

0 comments on commit 2d801b4

Please sign in to comment.