Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2k
Plotly.react#2341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Plotly.react #2341
Changes from all commits
54b6969aab4f1145c56b0e58b74d10748040548db3698fa4f3c56243f01bab92fbd97cf873b265aaa0df7a3b07558146428fbe06eafc05c9898c39de9270fc414a9b8e982ca1b856ad888ad7f2ade3cca4b98be63178b2e564dff6be4932d0752aa59ba4be99795b6957c7d6c3a11062896471ce12ce1b46c66424197c32f9d6151c8a07e82a7d6405d6a4a0File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -20,7 +20,7 @@ module.exports = { | ||
| valType: 'boolean', | ||
| role: 'info', | ||
| dflt: true, | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you clarify why we now need CollaboratorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Here we're letting the user do their own editing, so there's much less of that complexity. So now I use Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very clear. Thanks 📚 | ||
| description: [ | ||
| 'Determines whether or not this annotation is visible.' | ||
| ].join(' ') | ||
| @@ -29,7 +29,7 @@ module.exports = { | ||
| text: { | ||
| valType: 'string', | ||
| role: 'info', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets the text associated with this annotation.', | ||
| 'Plotly uses a subset of HTML tags to do things like', | ||
| @@ -42,14 +42,14 @@ module.exports = { | ||
| valType: 'angle', | ||
| dflt: 0, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets the angle at which the `text` is drawn', | ||
| 'with respect to the horizontal.' | ||
| ].join(' ') | ||
| }, | ||
| font: fontAttrs({ | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| colorEditType: 'arraydraw', | ||
| description: 'Sets the annotation text font.' | ||
| }), | ||
| @@ -58,7 +58,7 @@ module.exports = { | ||
| min: 1, | ||
| dflt: null, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets an explicit width for the text box. null (default) lets the', | ||
| 'text set the box width. Wider text will be clipped.', | ||
| @@ -70,7 +70,7 @@ module.exports = { | ||
| min: 1, | ||
| dflt: null, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets an explicit height for the text box. null (default) lets the', | ||
| 'text set the box height. Taller text will be clipped.' | ||
| @@ -131,7 +131,7 @@ module.exports = { | ||
| min: 0, | ||
| dflt: 1, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets the padding (in px) between the `text`', | ||
| 'and the enclosing border.' | ||
| @@ -142,7 +142,7 @@ module.exports = { | ||
| min: 0, | ||
| dflt: 1, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets the width (in px) of the border enclosing', | ||
| 'the annotation `text`.' | ||
| @@ -153,7 +153,7 @@ module.exports = { | ||
| valType: 'boolean', | ||
| dflt: true, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Determines whether or not the annotation is drawn with an arrow.', | ||
| 'If *true*, `text` is placed near the arrow\'s tail.', | ||
| @@ -198,7 +198,7 @@ module.exports = { | ||
| min: 0.3, | ||
| dflt: 1, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets the size of the end annotation arrow head, relative to `arrowwidth`.', | ||
| 'A value of 1 (default) gives a head about 3x as wide as the line.' | ||
| @@ -209,7 +209,7 @@ module.exports = { | ||
| min: 0.3, | ||
| dflt: 1, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets the size of the start annotation arrow head, relative to `arrowwidth`.', | ||
| 'A value of 1 (default) gives a head about 3x as wide as the line.' | ||
| @@ -219,15 +219,15 @@ module.exports = { | ||
| valType: 'number', | ||
| min: 0.1, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: 'Sets the width (in px) of annotation arrow line.' | ||
| }, | ||
| standoff: { | ||
| valType: 'number', | ||
| min: 0, | ||
| dflt: 0, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets a distance, in pixels, to move the end arrowhead away from the', | ||
| 'position it is pointing at, for example to point at the edge of', | ||
| @@ -241,7 +241,7 @@ module.exports = { | ||
| min: 0, | ||
| dflt: 0, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets a distance, in pixels, to move the start arrowhead away from the', | ||
| 'position it is pointing at, for example to point at the edge of', | ||
| @@ -253,7 +253,7 @@ module.exports = { | ||
| ax: { | ||
| valType: 'any', | ||
| role: 'info', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets the x component of the arrow tail about the arrow head.', | ||
| 'If `axref` is `pixel`, a positive (negative) ', | ||
| @@ -266,7 +266,7 @@ module.exports = { | ||
| ay: { | ||
| valType: 'any', | ||
| role: 'info', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets the y component of the arrow tail about the arrow head.', | ||
| 'If `ayref` is `pixel`, a positive (negative) ', | ||
| @@ -333,7 +333,7 @@ module.exports = { | ||
| x: { | ||
| valType: 'any', | ||
| role: 'info', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets the annotation\'s x position.', | ||
| 'If the axis `type` is *log*, then you must take the', | ||
| @@ -351,7 +351,7 @@ module.exports = { | ||
| values: ['auto', 'left', 'center', 'right'], | ||
| dflt: 'auto', | ||
| role: 'info', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets the text box\'s horizontal position anchor', | ||
| 'This anchor binds the `x` position to the *left*, *center*', | ||
| @@ -370,7 +370,7 @@ module.exports = { | ||
| valType: 'number', | ||
| dflt: 0, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Shifts the position of the whole annotation and arrow to the', | ||
| 'right (positive) or left (negative) by this many pixels.' | ||
| @@ -396,7 +396,7 @@ module.exports = { | ||
| y: { | ||
| valType: 'any', | ||
| role: 'info', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets the annotation\'s y position.', | ||
| 'If the axis `type` is *log*, then you must take the', | ||
| @@ -414,7 +414,7 @@ module.exports = { | ||
| values: ['auto', 'top', 'middle', 'bottom'], | ||
| dflt: 'auto', | ||
| role: 'info', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Sets the text box\'s vertical position anchor', | ||
| 'This anchor binds the `y` position to the *top*, *middle*', | ||
| @@ -433,7 +433,7 @@ module.exports = { | ||
| valType: 'number', | ||
| dflt: 0, | ||
| role: 'style', | ||
| editType: 'calcIfAutorange', | ||
| editType: 'calcIfAutorange+arraydraw', | ||
| description: [ | ||
| 'Shifts the position of the whole annotation and arrow up', | ||
| '(positive) or down (negative) by this many pixels.' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -18,15 +18,13 @@ var helpers = require('./helpers'); | ||
| module.exports = function legendDefaults(layoutIn, layoutOut, fullData) { | ||
| var containerIn = layoutIn.legend || {}, | ||
| containerOut = layoutOut.legend = {}; | ||
| var containerIn = layoutIn.legend || {}; | ||
| var containerOut = {}; | ||
| var visibleTraces = 0, | ||
| defaultOrder = 'normal', | ||
| defaultX, | ||
| defaultY, | ||
| defaultXAnchor, | ||
| defaultYAnchor; | ||
| var visibleTraces = 0; | ||
| var defaultOrder = 'normal'; | ||
| var defaultX, defaultY, defaultXAnchor, defaultYAnchor; | ||
| for(var i = 0; i < fullData.length; i++) { | ||
| var trace = fullData[i]; | ||
| @@ -58,6 +56,8 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) { | ||
| if(showLegend === false) return; | ||
| layoutOut.legend = containerOut; | ||
CollaboratorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. legend's visibility is controlled by Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very nice catch.
I'd vote +1 here. CollaboratorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added to #420 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
so by default, in _fullLayout, the .legend key wouldn't be there? We could have a work around, but it's kind of one of the basic premises of widget visibility in the editor.. CollaboratorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @VeraZab you must not have been dependent on the existence of a | ||
| coerce('bgcolor', layoutOut.paper_bgcolor); | ||
| coerce('bordercolor'); | ||
| coerce('borderwidth'); | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI just added this so I could click through the list of mocks and not lose track of which one I'm on... Something I'd wanted to do for a long time but now that I'm trying to load EVERY mock in sequence it became important enough to actually implement.