Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2k
Support adding text labels to lines and shapes#6454
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 ourterms of service andprivacy 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.
Changes from1 commit
7ee2e85932fa651d0e471e46e1bc60823dc2f8c810e405293e31de9e0bcfff39972dc96d5709a072edf68bee9798528561b4a457697ee8c4674abd83743de4c3cc5ed45a0564b8085c28c0476e95dd9b658e39cb488318fc8d20f2dad6ea53134869f17e21801ef185d8c47905f39a621ab9e24b9ea2511f366a8f1087f3f1570cfbaec66dd83e0cda91d12f4948d67a5e19d3e55953e44d5f085424ac58769cfff192a167ca5cf8822fe0dd50da338cec65136771a83f9727a9a4a121e493873a17a315d9bef04f54f102f642a52dfb608ec20370afeb2f3811b3421ea9493e52463fa394b48f1325b7c63bb5d961e3df740933d08d35f6ed5d1927c34d6deffea962ebe85c4d113bcfc703c11468363ecdf2d379eb7c903d2c792394555ceaf270d095561fb0b8ab1d927b6aFile 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
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| 'use strict'; | ||
| var annAttrs = require('../annotations/attributes'); | ||
| var fontAttrs = require('../../plots/font_attributes'); | ||
| var scatterLineAttrs = require('../../traces/scatter/attributes').line; | ||
| var dash = require('../drawing/attributes').dash; | ||
| var extendFlat = require('../../lib/extend').extendFlat; | ||
| @@ -224,26 +225,47 @@ module.exports = templatedArray('shape', { | ||
| '`config.editable` or `config.edits.shapePosition`.' | ||
| ].join(' ') | ||
| }, | ||
| label: { | ||
archmoj marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| text: { | ||
| valType: 'string', | ||
| dflt: null, | ||
emilykl marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| editType: 'arraydraw', | ||
| description: 'Sets the text to display with shape.' | ||
| }, | ||
| font: fontAttrs({ | ||
| editType: 'calc+arraydraw', | ||
| colorEditType: 'arraydraw', | ||
| description: 'Sets the shape label text font.' | ||
| }), | ||
| position: { | ||
| valType: 'enumerated', | ||
| values: [ | ||
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. It looks like we need to have ContributorAuthor 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. @archmoj What would be the use case for an 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.
Hmm.. that's a good idea. But as far as I recall we don't have such an option for | ||
| 'top left', 'top center', 'top right', | ||
| 'middle left', 'middle center', 'middle right', | ||
| 'bottom left', 'bottom center', 'bottom right' | ||
| ], | ||
| dflt: 'top left', | ||
| editType: 'arraydraw', | ||
| description: 'Sets the position of the label relative to she shape.' | ||
| }, | ||
| angle: { | ||
| valType: 'number', | ||
| min: -180, | ||
| max: 180, | ||
| dflt: 0, | ||
| editType: 'arraydraw', | ||
| description: 'Sets label angle.' | ||
| }, | ||
| xanchor: annAttrs.xanchor, | ||
| yanchor: annAttrs.yanchor, | ||
| padding: { | ||
| valType: 'number', | ||
| dflt: 0, | ||
alexcjohnson marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| editType: 'arraydraw', | ||
| description: 'Sets padding between edge of label and xanchor / yanchor.' | ||
archmoj marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| }, | ||
| dflt: null, | ||
alexcjohnson marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| editType: 'arraydraw' | ||
| }, | ||
archmoj marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| editType: 'arraydraw' | ||
| }); | ||