-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathattributes.js
112 lines (110 loc) · 3.67 KB
/
attributes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
'use strict';
exports.dash = {
valType: 'string',
// string type usually doesn't take values... this one should really be
// a special type or at least a special coercion function, from the GUI
// you only get these values but elsewhere the user can supply a list of
// dash lengths in px, and it will be honored
values: ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'],
dflt: 'solid',
editType: 'style',
description: [
'Sets the dash style of lines. Set to a dash type string',
'(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)',
'or a dash length list in px (eg *5px,10px,2px,2px*).'
].join(' ')
};
exports.pattern = {
shape: {
valType: 'enumerated',
values: ['', '/', '\\', 'x', '-', '|', '+', '.'],
dflt: '',
arrayOk: true,
editType: 'style',
description: [
'Sets the shape of the pattern fill.',
'By default, no pattern is used for filling the area.',
].join(' ')
},
path: {
valType: 'string',
arrayOk: true,
editType: 'style',
description: [
'Sets a custom path for pattern fill.',
'Use with no `shape` or `solidity`, provide an SVG path string for',
'the regions of the square from (0,0) to (`size`,`size`) to color.'
].join(' ')
},
fillmode: {
valType: 'enumerated',
values: ['replace', 'overlay'],
dflt: 'replace',
editType: 'style',
description: [
'Determines whether `marker.color` should be used',
'as a default to `bgcolor` or a `fgcolor`.'
].join(' ')
},
bgcolor: {
valType: 'color',
arrayOk: true,
editType: 'style',
description: [
'When there is no colorscale sets the color of background pattern fill.',
'Defaults to a `marker.color` background when `fillmode` is *overlay*.',
'Otherwise, defaults to a transparent background.'
].join(' ')
},
fgcolor: {
valType: 'color',
arrayOk: true,
editType: 'style',
description: [
'When there is no colorscale sets the color of foreground pattern fill.',
'Defaults to a `marker.color` background when `fillmode` is *replace*.',
'Otherwise, defaults to dark grey or white',
'to increase contrast with the `bgcolor`.',
].join(' ')
},
fgopacity: {
valType: 'number',
editType: 'style',
min: 0,
max: 1,
description: [
'Sets the opacity of the foreground pattern fill.',
'Defaults to a 0.5 when `fillmode` is *overlay*.',
'Otherwise, defaults to 1.'
].join(' ')
},
size: {
valType: 'number',
min: 0,
dflt: 8,
arrayOk: true,
editType: 'style',
description: [
'Sets the size of unit squares of the pattern fill in pixels,',
'which corresponds to the interval of repetition of the pattern.',
].join(' ')
},
solidity: {
valType: 'number',
min: 0,
max: 1,
dflt: 0.3,
arrayOk: true,
editType: 'style',
description: [
'Sets the solidity of the pattern fill.',
'Solidity is roughly the fraction of the area filled by the pattern.',
'Solidity of 0 shows only the background color without pattern',
'and solidty of 1 shows only the foreground color without pattern.',
].join(' ')
},
editType: 'style',
description: [
'Sets the pattern within the marker.'
].join(' '),
};