|
1 | 1 | { |
2 | 2 | "data": [ |
3 | 3 | { |
4 | | - "x": [ |
5 | | - "Area 1", |
6 | | - "Area 2", |
7 | | - "Area 3", |
8 | | - "Area 4", |
9 | | - "Area 5" |
10 | | - ], |
11 | | - "y": [ |
12 | | - 20, |
13 | | - 14, |
14 | | - 23, |
15 | | - 30, |
16 | | - 5 |
17 | | - ], |
18 | | - "name": "Product A", |
| 4 | + "x": ["a", "b", "c", "d", "e"], |
| 5 | + "y": [1, 2, 3, 4, 5], |
| 6 | + "name": "Bar 1", |
19 | 7 | "type": "bar", |
| 8 | + "textposition": "outside", |
| 9 | + "text": "bgcolor", |
20 | 10 | "marker": { |
21 | | - "color": "#4477AA", |
22 | | - "line": { |
23 | | - "color": "#4477AA", |
24 | | - "width": 1 |
25 | | - }, |
26 | 11 | "pattern": { |
27 | | - "shape": "/" |
| 12 | + "shape": "/", |
| 13 | + "bgcolor": ["", "lightblue", "blue", "darkblue", "black"] |
28 | 14 | } |
29 | 15 | } |
30 | 16 | }, |
31 | 17 | { |
32 | | - "x": [ |
33 | | - "Area 1", |
34 | | - "Area 2", |
35 | | - "Area 3", |
36 | | - "Area 4", |
37 | | - "Area 5" |
38 | | - ], |
39 | | - "y": [ |
40 | | - 12, |
41 | | - 18, |
42 | | - 29, |
43 | | - 10, |
44 | | - 23 |
45 | | - ], |
46 | | - "name": "Product B", |
| 18 | + "x": ["a", "b", "c", "d", "e"], |
| 19 | + "y": [2, 3, 4, 5, 6], |
| 20 | + "name": "Bar 2", |
47 | 21 | "type": "bar", |
| 22 | + "textposition": "outside", |
| 23 | + "text": "shape", |
48 | 24 | "marker": { |
49 | | - "color": "#CCBB44", |
50 | | - "line": { |
51 | | - "color": "#CCBB44", |
52 | | - "width": 1 |
53 | | - }, |
54 | 25 | "pattern": { |
55 | | - "shape": "\\" |
| 26 | + "shape": ["|", "/", "-", "\\", "|"] |
56 | 27 | } |
57 | 28 | } |
58 | 29 | }, |
59 | 30 | { |
60 | | - "x": [ |
61 | | - "Area 1", |
62 | | - "Area 2", |
63 | | - "Area 3", |
64 | | - "Area 4", |
65 | | - "Area 5" |
66 | | - ], |
67 | | - "y": [ |
68 | | - 30, |
69 | | - 23, |
70 | | - 22, |
71 | | - 33, |
72 | | - 15 |
73 | | - ], |
74 | | - "name": "Product C", |
| 31 | + "x": ["a", "b", "c", "d", "e"], |
| 32 | + "y": [3, 4, 5, 6, 7], |
| 33 | + "name": "Bar 3", |
75 | 34 | "type": "bar", |
| 35 | + "textposition": "outside", |
| 36 | + "text": "size", |
| 37 | + "marker": { |
| 38 | + "pattern": { |
| 39 | + "shape": "x", |
| 40 | + "size": [4, 6, 8, 10, 12] |
| 41 | + } |
| 42 | + } |
| 43 | + }, |
| 44 | + { |
| 45 | + "x": ["a", "b", "c", "d", "e"], |
| 46 | + "y": [6, 7, 8, 9, 10], |
| 47 | + "name": "Bar 4", |
| 48 | + "type": "bar", |
| 49 | + "textposition": "outside", |
| 50 | + "text": "solidity", |
| 51 | + "marker": { |
| 52 | + "pattern": { |
| 53 | + "shape": ".", |
| 54 | + "bgcolor": "yellow", |
| 55 | + "solidity": [0.1, 0.3, 0.5, 0.7, 0.9] |
| 56 | + } |
| 57 | + } |
| 58 | + }, |
| 59 | + |
| 60 | + { |
| 61 | + "t": ["M", "N", "O", "P"], |
| 62 | + "r": [1, 2, 3, 4], |
| 63 | + "type": "barpolar", |
| 64 | + "name": "polar-1", |
| 65 | + "marker": { |
| 66 | + "color": "red", |
| 67 | + "pattern": { |
| 68 | + "shape": "+", |
| 69 | + "size": [1, 2, 3, 4] |
| 70 | + } |
| 71 | + } |
| 72 | + }, |
| 73 | + { |
| 74 | + "t": ["M", "N", "O", "P"], |
| 75 | + "r": [2, 3, 4, 1], |
| 76 | + "type": "barpolar", |
| 77 | + "name": "polar-2", |
| 78 | + "marker": { |
| 79 | + "color": "rgba(0,127,0,0.5)", |
| 80 | + "pattern": { |
| 81 | + "shape": "x", |
| 82 | + "solidity": 0.75 |
| 83 | + } |
| 84 | + } |
| 85 | + }, |
| 86 | + { |
| 87 | + "t": ["M", "N", "O", "P"], |
| 88 | + "r": [3, 4, 1, 2], |
| 89 | + "type": "barpolar", |
| 90 | + "name": "polar-3", |
| 91 | + "marker": { |
| 92 | + "color": "blue", |
| 93 | + "pattern": { |
| 94 | + "shape": ["|", "-", "|", "-"], |
| 95 | + "solidity": 0.5 |
| 96 | + } |
| 97 | + } |
| 98 | + }, |
| 99 | + { |
| 100 | + "t": ["M", "N", "O", "P"], |
| 101 | + "r": [4, 1, 2, 3], |
| 102 | + "type": "barpolar", |
| 103 | + "name": "polar-4", |
76 | 104 | "marker": { |
77 | | - "color": "#EE6677", |
| 105 | + "color": "orange", |
| 106 | + "pattern": { |
| 107 | + "shape": ".", |
| 108 | + "bgcolor": "yellow", |
| 109 | + "solidity": [0.2, 0.8, 0.6, 0.4] |
| 110 | + } |
| 111 | + } |
| 112 | + }, |
| 113 | + |
| 114 | + { |
| 115 | + "xaxis": "x2", |
| 116 | + "yaxis": "y2", |
| 117 | + "y": ["A", "A", "A", "A", "B", "B", "C"], |
| 118 | + "name": "Night", |
| 119 | + "type": "histogram", |
| 120 | + "marker": { |
| 121 | + "color": "yellow", |
78 | 122 | "line": { |
79 | | - "color": "#EE6677", |
80 | | - "width": 1 |
| 123 | + "color": "black", |
| 124 | + "width": 2 |
81 | 125 | }, |
82 | 126 | "pattern": { |
83 | | - "shape": ["|", "-", "+", "x", "."] |
| 127 | + "bgcolor": "blue", |
| 128 | + "shape": "." |
84 | 129 | } |
85 | 130 | } |
86 | 131 | }, |
87 | 132 | { |
88 | | - "x": [ |
89 | | - "Area 1", |
90 | | - "Area 2", |
91 | | - "Area 3", |
92 | | - "Area 4", |
93 | | - "Area 5" |
94 | | - ], |
95 | | - "y": [ |
96 | | - 18, |
97 | | - 29, |
98 | | - 31, |
99 | | - 20, |
100 | | - 23 |
101 | | - ], |
102 | | - "name": "Product D", |
103 | | - "type": "bar", |
| 133 | + "xaxis": "x2", |
| 134 | + "yaxis": "y2", |
| 135 | + "y": ["C", "C", "C", "C", "B", "B", "A"], |
| 136 | + "name": "Day", |
| 137 | + "type": "histogram", |
104 | 138 | "marker": { |
105 | | - "color": ["#061a0a", "#124d1d", "#1d802f", "#29b342", "#35e655"], |
| 139 | + "color": "yellow", |
106 | 140 | "line": { |
107 | | - "color": ["#061a0a", "#124d1d", "#1d802f", "#29b342", "#35e655"], |
108 | | - "width": 1 |
| 141 | + "color": "red", |
| 142 | + "width": 4 |
109 | 143 | }, |
110 | 144 | "pattern": { |
111 | | - "shape": ["/", "\\", "x", ".", "+"], |
112 | | - "bgcolor": "#c6eff5", |
113 | | - "size": [4, 6, 8, 10, 12], |
114 | | - "solidity": [0.1, 0.3, 0.5, 0.7, 0.9] |
| 145 | + "bgcolor": "rgba(255, 127,0,0.5)", |
| 146 | + "shape": "x" |
| 147 | + } |
| 148 | + } |
| 149 | + }, |
| 150 | + |
| 151 | + { |
| 152 | + "xaxis": "x3", |
| 153 | + "yaxis": "y3", |
| 154 | + "x": [3, 2, 1], |
| 155 | + "y": ["U", "V", "W"], |
| 156 | + "name": "Funnel", |
| 157 | + "type": "funnel", |
| 158 | + "marker": { |
| 159 | + "pattern": { |
| 160 | + "solidity": [0.25, 0.5, 0.75], |
| 161 | + "shape": ["|", "", "-"], |
| 162 | + "bgcolor": "black" |
115 | 163 | } |
116 | 164 | } |
117 | 165 | } |
118 | 166 | ], |
119 | 167 | "layout": { |
| 168 | + "title": { |
| 169 | + "text": "pattern options" |
| 170 | + }, |
| 171 | + "width": 1000, |
| 172 | + "height": 600, |
| 173 | + |
120 | 174 | "xaxis": { |
121 | | - "type": "category" |
| 175 | + "domain": [0, 1] |
122 | 176 | }, |
123 | | - "barmode": "stack" |
| 177 | + "yaxis": { |
| 178 | + "range": [0, 11], |
| 179 | + "domain": [0, 0.475] |
| 180 | + }, |
| 181 | + |
| 182 | + "polar": { |
| 183 | + "domain": { |
| 184 | + "x": [0.35, 0.65], |
| 185 | + "y": [0.525, 1] |
| 186 | + } |
| 187 | + }, |
| 188 | + |
| 189 | + "xaxis2": { |
| 190 | + "anchor": "y2", |
| 191 | + "gridcolor": "black", |
| 192 | + "gridwidth": 2, |
| 193 | + "domain": [0, 0.3] |
| 194 | + }, |
| 195 | + "yaxis2": { |
| 196 | + "anchor": "x2", |
| 197 | + "domain": [0.525, 1] |
| 198 | + }, |
| 199 | + |
| 200 | + "xaxis3": { |
| 201 | + "anchor": "y3", |
| 202 | + "domain": [0.65, 1] |
| 203 | + }, |
| 204 | + "yaxis3": { |
| 205 | + "anchor": "x3", |
| 206 | + "domain": [0.525, 1] |
| 207 | + } |
124 | 208 | } |
125 | 209 | } |
0 commit comments