Skip to content

Reuse font_attributes in table #2070

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

Merged
merged 2 commits into from
Oct 6, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 2 additions & 31 deletions src/traces/table/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
var annAttrs = require('../../components/annotations/attributes');
var extendFlat = require('../../lib/extend').extendFlat;
var overrideAll = require('../../plot_api/edit_types').overrideAll;
var fontAttrs = require('../../plots/font_attributes');

module.exports = overrideAll({
domain: {
Expand Down Expand Up @@ -135,37 +136,7 @@ module.exports = overrideAll({
}
},

font: {
family: {
valType: 'string',
arrayOk: true,
role: 'style',
noBlank: true,
strict: true,
description: [
'HTML font family - the typeface that will be applied by the web browser.',
'The web browser will only be able to apply a font if it is available on the system',
'which it operates. Provide multiple font families, separated by commas, to indicate',
'the preference in which to apply fonts if they aren\'t available on the system.',
'The plotly service (at https://plot.ly or on-premise) generates images on a server,',
'where only a select number of',
'fonts are installed and supported.',
'These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,',
'*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,',
'*PT Sans Narrow*, *Raleway*, *Times New Roman*.'
].join(' ')
},
size: {
valType: 'number',
arrayOk: true,
role: 'style'
},
color: {
valType: 'color',
arrayOk: true,
role: 'style'
}
}
font: extendFlat({}, fontAttrs({arrayOk: true}))
},

cells: {
Expand Down