Skip to content

Commit 6075d86

Browse files
committed
reuse font_attributes
1 parent 63c163c commit 6075d86

File tree

1 file changed

+2
-31
lines changed

1 file changed

+2
-31
lines changed

Diff for: src/traces/table/attributes.js

+2-31
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
var annAttrs = require('../../components/annotations/attributes');
1212
var extendFlat = require('../../lib/extend').extendFlat;
1313
var overrideAll = require('../../plot_api/edit_types').overrideAll;
14+
var fontAttrs = require('../../plots/font_attributes');
1415

1516
module.exports = overrideAll({
1617
domain: {
@@ -135,37 +136,7 @@ module.exports = overrideAll({
135136
}
136137
},
137138

138-
font: {
139-
family: {
140-
valType: 'string',
141-
arrayOk: true,
142-
role: 'style',
143-
noBlank: true,
144-
strict: true,
145-
description: [
146-
'HTML font family - the typeface that will be applied by the web browser.',
147-
'The web browser will only be able to apply a font if it is available on the system',
148-
'which it operates. Provide multiple font families, separated by commas, to indicate',
149-
'the preference in which to apply fonts if they aren\'t available on the system.',
150-
'The plotly service (at https://plot.ly or on-premise) generates images on a server,',
151-
'where only a select number of',
152-
'fonts are installed and supported.',
153-
'These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,',
154-
'*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,',
155-
'*PT Sans Narrow*, *Raleway*, *Times New Roman*.'
156-
].join(' ')
157-
},
158-
size: {
159-
valType: 'number',
160-
arrayOk: true,
161-
role: 'style'
162-
},
163-
color: {
164-
valType: 'color',
165-
arrayOk: true,
166-
role: 'style'
167-
}
168-
}
139+
font: extendFlat({}, fontAttrs({arrayOk: true}))
169140
},
170141

171142
cells: {

0 commit comments

Comments
 (0)