|
9 | 9 | 'use strict'; |
10 | 10 |
|
11 | 11 | var fontAttrs = require('../../plots/font_attributes'); |
| 12 | +var hoverLabelAttrs = require('./layout_attributes').hoverlabel; |
| 13 | +var extendFlat = require('../../extend').extendFlat; |
12 | 14 |
|
13 | 15 | module.exports = { |
14 | 16 | hoverlabel: { |
15 | | - bgcolor: { |
16 | | - valType: 'color', |
17 | | - role: 'style', |
| 17 | + bgcolor: extendFlat({}, hoverLabelAttrs.bgcolor, { |
18 | 18 | arrayOk: true, |
19 | | - editType: 'none', |
20 | | - description: [ |
21 | | - 'Sets the background color of the hover labels for this trace' |
22 | | - ].join(' ') |
23 | | - }, |
24 | | - bordercolor: { |
25 | | - valType: 'color', |
26 | | - role: 'style', |
| 19 | + description: 'Sets the background color of the hover labels for this trace' |
| 20 | + }), |
| 21 | + bordercolor: extendFlat({}, hoverLabelAttrs.bordercolor, { |
27 | 22 | arrayOk: true, |
28 | | - editType: 'none', |
29 | | - description: [ |
30 | | - 'Sets the border color of the hover labels for this trace.' |
31 | | - ].join(' ') |
32 | | - }, |
| 23 | + description: 'Sets the border color of the hover labels for this trace.' |
| 24 | + }), |
33 | 25 | font: fontAttrs({ |
34 | 26 | arrayOk: true, |
35 | 27 | editType: 'none', |
36 | 28 | description: 'Sets the font used in hover labels.' |
37 | 29 | }), |
38 | | - namelength: { |
39 | | - valType: 'integer', |
40 | | - min: -1, |
41 | | - dflt: 15, |
42 | | - arrayOk: true, |
43 | | - role: 'style', |
44 | | - editType: 'none', |
45 | | - description: [ |
46 | | - 'Sets the length (in number of characters) of the trace name in', |
47 | | - 'the hover labels for this trace. -1 shows the whole name', |
48 | | - 'regardless of length. 0-3 shows the first 0-3 characters, and', |
49 | | - 'an integer >3 will show the whole name if it is less than that', |
50 | | - 'many characters, but if it is longer, will truncate to', |
51 | | - '`namelength - 3` characters and add an ellipsis.', |
52 | | - 'Note that when `hovertemplate` is set, `namelength` defaults to *-1*.' |
53 | | - ].join(' ') |
54 | | - }, |
55 | | - editType: 'calc' |
| 30 | + namelength: extendFlat({}, hoverLabelAttrs.namelength, {arrayOk: true}), |
| 31 | + editType: 'none' |
56 | 32 | } |
57 | 33 | }; |
0 commit comments