|
11 | 11 | var annAttrs = require('../../components/annotations/attributes'); |
12 | 12 | var extendFlat = require('../../lib/extend').extendFlat; |
13 | 13 | var overrideAll = require('../../plot_api/edit_types').overrideAll; |
| 14 | +var fontAttrs = require('../../plots/font_attributes'); |
14 | 15 |
|
15 | 16 | module.exports = overrideAll({ |
16 | 17 | domain: { |
@@ -135,37 +136,7 @@ module.exports = overrideAll({ |
135 | 136 | } |
136 | 137 | }, |
137 | 138 |
|
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})) |
169 | 140 | }, |
170 | 141 |
|
171 | 142 | cells: { |
@@ -243,36 +214,6 @@ module.exports = overrideAll({ |
243 | 214 | } |
244 | 215 | }, |
245 | 216 |
|
246 | | - font: { |
247 | | - family: { |
248 | | - valType: 'string', |
249 | | - arrayOk: true, |
250 | | - role: 'style', |
251 | | - noBlank: true, |
252 | | - strict: true, |
253 | | - description: [ |
254 | | - 'HTML font family - the typeface that will be applied by the web browser.', |
255 | | - 'The web browser will only be able to apply a font if it is available on the system', |
256 | | - 'which it operates. Provide multiple font families, separated by commas, to indicate', |
257 | | - 'the preference in which to apply fonts if they aren\'t available on the system.', |
258 | | - 'The plotly service (at https://plot.ly or on-premise) generates images on a server,', |
259 | | - 'where only a select number of', |
260 | | - 'fonts are installed and supported.', |
261 | | - 'These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,', |
262 | | - '*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,', |
263 | | - '*PT Sans Narrow*, *Raleway*, *Times New Roman*.' |
264 | | - ].join(' ') |
265 | | - }, |
266 | | - size: { |
267 | | - valType: 'number', |
268 | | - arrayOk: true, |
269 | | - role: 'style' |
270 | | - }, |
271 | | - color: { |
272 | | - valType: 'color', |
273 | | - arrayOk: true, |
274 | | - role: 'style' |
275 | | - } |
276 | | - } |
| 217 | + font: extendFlat({}, fontAttrs({arrayOk: true})) |
277 | 218 | } |
278 | 219 | }, 'calc', 'from-root'); |
0 commit comments