@d3plus/docs 3.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/.storybook/main.js +51 -0
  2. package/.storybook/manager-head.html +46 -0
  3. package/.storybook/manager.js +10 -0
  4. package/.storybook/preview-head.html +69 -0
  5. package/.storybook/preview.jsx +134 -0
  6. package/.storybook/theme.js +16 -0
  7. package/README.md +1 -0
  8. package/args/color/colorAdd.args.jsx +71 -0
  9. package/args/color/colorAssign.args.jsx +40 -0
  10. package/args/color/colorContrast.args.jsx +40 -0
  11. package/args/color/colorDefaults.args.jsx +8 -0
  12. package/args/color/colorLegible.args.jsx +24 -0
  13. package/args/color/colorLighter.args.jsx +40 -0
  14. package/args/color/colorSubtract.args.jsx +71 -0
  15. package/args/core/charts/AreaPlot.args.jsx +72 -0
  16. package/args/core/charts/BarChart.args.jsx +88 -0
  17. package/args/core/charts/BoxWhisker.args.jsx +73 -0
  18. package/args/core/charts/BumpChart.args.jsx +133 -0
  19. package/args/core/charts/Donut.args.jsx +58 -0
  20. package/args/core/charts/Geomap.args.jsx +363 -0
  21. package/args/core/charts/LinePlot.args.jsx +57 -0
  22. package/args/core/charts/Matrix.args.jsx +194 -0
  23. package/args/core/charts/Network.args.jsx +310 -0
  24. package/args/core/charts/Pack.args.jsx +171 -0
  25. package/args/core/charts/Pie.args.jsx +148 -0
  26. package/args/core/charts/Plot.args.jsx +685 -0
  27. package/args/core/charts/Priestley.args.jsx +118 -0
  28. package/args/core/charts/Radar.args.jsx +120 -0
  29. package/args/core/charts/RadialMatrix.args.jsx +197 -0
  30. package/args/core/charts/Rings.args.jsx +228 -0
  31. package/args/core/charts/Sankey.args.jsx +248 -0
  32. package/args/core/charts/StackedArea.args.jsx +26 -0
  33. package/args/core/charts/Tree.args.jsx +88 -0
  34. package/args/core/charts/Treemap.args.jsx +181 -0
  35. package/args/core/charts/Viz.args.jsx +1383 -0
  36. package/args/core/components/Axis.args.jsx +600 -0
  37. package/args/core/components/AxisBottom.args.jsx +42 -0
  38. package/args/core/components/AxisLeft.args.jsx +42 -0
  39. package/args/core/components/AxisRight.args.jsx +42 -0
  40. package/args/core/components/AxisTop.args.jsx +42 -0
  41. package/args/core/components/ColorScale.args.jsx +456 -0
  42. package/args/core/components/Legend.args.jsx +289 -0
  43. package/args/core/components/TextBox.args.jsx +554 -0
  44. package/args/core/components/Timeline.args.jsx +401 -0
  45. package/args/core/components/Tooltip.args.jsx +453 -0
  46. package/args/core/shapes/Area.args.jsx +190 -0
  47. package/args/core/shapes/Bar.args.jsx +176 -0
  48. package/args/core/shapes/Box.args.jsx +248 -0
  49. package/args/core/shapes/Circle.args.jsx +84 -0
  50. package/args/core/shapes/Image.args.jsx +177 -0
  51. package/args/core/shapes/Line.args.jsx +127 -0
  52. package/args/core/shapes/Path.args.jsx +84 -0
  53. package/args/core/shapes/Rect.args.jsx +85 -0
  54. package/args/core/shapes/Shape.args.jsx +633 -0
  55. package/args/core/shapes/Whisker.args.jsx +204 -0
  56. package/args/core/utils/BaseClass.args.jsx +65 -0
  57. package/args/core/utils/RESET.args.jsx +8 -0
  58. package/args/core/utils/accessor.args.jsx +39 -0
  59. package/args/core/utils/configPrep.args.jsx +56 -0
  60. package/args/core/utils/constant.args.jsx +24 -0
  61. package/args/core/utils/uuid.args.jsx +8 -0
  62. package/args/data/dataConcat.args.jsx +40 -0
  63. package/args/data/dataFold.args.jsx +56 -0
  64. package/args/data/dataLoad.args.jsx +65 -0
  65. package/args/data/isData.args.jsx +24 -0
  66. package/args/data/merge.args.jsx +39 -0
  67. package/args/data/unique.args.jsx +37 -0
  68. package/args/dom/assign.args.jsx +23 -0
  69. package/args/dom/attrize.args.jsx +39 -0
  70. package/args/dom/date.args.jsx +23 -0
  71. package/args/dom/elem.args.jsx +135 -0
  72. package/args/dom/fontExists.args.jsx +24 -0
  73. package/args/dom/htmlDecode.args.jsx +23 -0
  74. package/args/dom/isObject.args.jsx +23 -0
  75. package/args/dom/parseSides.args.jsx +24 -0
  76. package/args/dom/prefix.args.jsx +8 -0
  77. package/args/dom/rtl.args.jsx +8 -0
  78. package/args/dom/stylize.args.jsx +39 -0
  79. package/args/dom/textWidth.args.jsx +39 -0
  80. package/args/export/saveElement.args.jsx +99 -0
  81. package/args/format/format.args.jsx +24 -0
  82. package/args/format/formatAbbreviate.args.jsx +39 -0
  83. package/args/format/formatDate.args.jsx +53 -0
  84. package/args/format/formatDefaultLocale.args.jsx +24 -0
  85. package/args/locales/dictionaries/formatLocale.args.jsx +8 -0
  86. package/args/math/closest.args.jsx +39 -0
  87. package/args/math/largestRect.args.jsx +56 -0
  88. package/args/math/lineIntersection.args.jsx +69 -0
  89. package/args/math/path2polygon.args.jsx +40 -0
  90. package/args/math/pointDistance.args.jsx +39 -0
  91. package/args/math/pointDistanceSquared.args.jsx +39 -0
  92. package/args/math/pointRotate.args.jsx +55 -0
  93. package/args/math/polygonInside.args.jsx +39 -0
  94. package/args/math/polygonRayCast.args.jsx +55 -0
  95. package/args/math/polygonRotate.args.jsx +55 -0
  96. package/args/math/segmentBoxContains.args.jsx +54 -0
  97. package/args/math/segmentsIntersect.args.jsx +69 -0
  98. package/args/math/shapeEdgePoint.args.jsx +39 -0
  99. package/args/react/D3plusContext.args.jsx +8 -0
  100. package/args/react/Renderer.args.jsx +53 -0
  101. package/args/text/fontFamily.args.jsx +8 -0
  102. package/args/text/fontFamilyStringify.args.jsx +23 -0
  103. package/args/text/stringify.args.jsx +23 -0
  104. package/args/text/strip.args.jsx +38 -0
  105. package/args/text/textSplit.args.jsx +23 -0
  106. package/args/text/textWrap.args.jsx +8 -0
  107. package/args/text/titleCase.args.jsx +24 -0
  108. package/args/text/trim.args.jsx +23 -0
  109. package/args/text/trimLeft.args.jsx +23 -0
  110. package/args/text/trimRight.args.jsx +23 -0
  111. package/docs/Accessibility.mdx +70 -0
  112. package/docs/HomeChart.jsx +38 -0
  113. package/docs/Introduction.mdx +130 -0
  114. package/docs/Logo-Frames.js +352 -0
  115. package/docs/Logo.jsx +30 -0
  116. package/helpers/configify.js +18 -0
  117. package/helpers/funcify.js +14 -0
  118. package/helpers/stringify.js +30 -0
  119. package/package.json +44 -0
  120. package/packages/color/colorAdd.stories.jsx +23 -0
  121. package/packages/color/colorAssign.stories.jsx +23 -0
  122. package/packages/color/colorContrast.stories.jsx +23 -0
  123. package/packages/color/colorDefaults.stories.jsx +23 -0
  124. package/packages/color/colorLegible.stories.jsx +23 -0
  125. package/packages/color/colorLighter.stories.jsx +23 -0
  126. package/packages/color/colorSubtract.stories.jsx +23 -0
  127. package/packages/core/charts/AreaPlot.stories.jsx +74 -0
  128. package/packages/core/charts/BarChart.stories.jsx +307 -0
  129. package/packages/core/charts/BoxWhisker.stories.jsx +204 -0
  130. package/packages/core/charts/BumpChart.stories.jsx +52 -0
  131. package/packages/core/charts/Donut.stories.jsx +41 -0
  132. package/packages/core/charts/Geomap.stories.jsx +186 -0
  133. package/packages/core/charts/LinePlot.stories.jsx +564 -0
  134. package/packages/core/charts/Matrix.stories.jsx +36 -0
  135. package/packages/core/charts/Network.stories.jsx +99 -0
  136. package/packages/core/charts/Pack.stories.jsx +40 -0
  137. package/packages/core/charts/Pie.stories.jsx +40 -0
  138. package/packages/core/charts/Plot.stories.jsx +180 -0
  139. package/packages/core/charts/Priestley.stories.jsx +60 -0
  140. package/packages/core/charts/Radar.stories.jsx +60 -0
  141. package/packages/core/charts/RadialMatrix.stories.jsx +36 -0
  142. package/packages/core/charts/Rings.stories.jsx +41 -0
  143. package/packages/core/charts/Sankey.stories.jsx +41 -0
  144. package/packages/core/charts/StackedArea.stories.jsx +107 -0
  145. package/packages/core/charts/Tree.stories.jsx +27 -0
  146. package/packages/core/charts/Treemap.stories.jsx +81 -0
  147. package/packages/core/charts/Viz.stories.jsx +27 -0
  148. package/packages/core/components/Axis.stories.jsx +27 -0
  149. package/packages/core/components/AxisBottom.stories.jsx +27 -0
  150. package/packages/core/components/AxisLeft.stories.jsx +27 -0
  151. package/packages/core/components/AxisRight.stories.jsx +27 -0
  152. package/packages/core/components/AxisTop.stories.jsx +27 -0
  153. package/packages/core/components/ColorScale.stories.jsx +44 -0
  154. package/packages/core/components/Legend.stories.jsx +49 -0
  155. package/packages/core/components/TextBox.stories.jsx +222 -0
  156. package/packages/core/components/Timeline.stories.jsx +37 -0
  157. package/packages/core/components/Tooltip.stories.jsx +40 -0
  158. package/packages/core/shapes/Area.stories.jsx +27 -0
  159. package/packages/core/shapes/Bar.stories.jsx +27 -0
  160. package/packages/core/shapes/Box.stories.jsx +27 -0
  161. package/packages/core/shapes/Circle.stories.jsx +27 -0
  162. package/packages/core/shapes/Image.stories.jsx +27 -0
  163. package/packages/core/shapes/Line.stories.jsx +27 -0
  164. package/packages/core/shapes/Path.stories.jsx +27 -0
  165. package/packages/core/shapes/Rect.stories.jsx +27 -0
  166. package/packages/core/shapes/Shape.stories.jsx +27 -0
  167. package/packages/core/shapes/Whisker.stories.jsx +27 -0
  168. package/packages/core/utils/BaseClass.stories.jsx +27 -0
  169. package/packages/core/utils/RESET.stories.jsx +23 -0
  170. package/packages/core/utils/accessor.stories.jsx +23 -0
  171. package/packages/core/utils/configPrep.stories.jsx +23 -0
  172. package/packages/core/utils/constant.stories.jsx +23 -0
  173. package/packages/core/utils/uuid.stories.jsx +23 -0
  174. package/packages/data/dataConcat.stories.jsx +23 -0
  175. package/packages/data/dataFold.stories.jsx +23 -0
  176. package/packages/data/dataLoad.stories.jsx +23 -0
  177. package/packages/data/isData.stories.jsx +23 -0
  178. package/packages/data/merge.stories.jsx +23 -0
  179. package/packages/data/unique.stories.jsx +23 -0
  180. package/packages/dom/assign.stories.jsx +23 -0
  181. package/packages/dom/attrize.stories.jsx +23 -0
  182. package/packages/dom/date.stories.jsx +23 -0
  183. package/packages/dom/elem.stories.jsx +23 -0
  184. package/packages/dom/fontExists.stories.jsx +23 -0
  185. package/packages/dom/htmlDecode.stories.jsx +23 -0
  186. package/packages/dom/isObject.stories.jsx +23 -0
  187. package/packages/dom/parseSides.stories.jsx +23 -0
  188. package/packages/dom/prefix.stories.jsx +23 -0
  189. package/packages/dom/rtl.stories.jsx +23 -0
  190. package/packages/dom/stylize.stories.jsx +23 -0
  191. package/packages/dom/textWidth.stories.jsx +23 -0
  192. package/packages/export/saveElement.stories.jsx +23 -0
  193. package/packages/format/format.stories.jsx +23 -0
  194. package/packages/format/formatAbbreviate.stories.jsx +23 -0
  195. package/packages/format/formatDate.stories.jsx +23 -0
  196. package/packages/format/formatDefaultLocale.stories.jsx +23 -0
  197. package/packages/locales/dictionaries/formatLocale.stories.jsx +23 -0
  198. package/packages/math/closest.stories.jsx +23 -0
  199. package/packages/math/largestRect.stories.jsx +23 -0
  200. package/packages/math/lineIntersection.stories.jsx +23 -0
  201. package/packages/math/path2polygon.stories.jsx +23 -0
  202. package/packages/math/pointDistance.stories.jsx +23 -0
  203. package/packages/math/pointDistanceSquared.stories.jsx +23 -0
  204. package/packages/math/pointRotate.stories.jsx +23 -0
  205. package/packages/math/polygonInside.stories.jsx +23 -0
  206. package/packages/math/polygonRayCast.stories.jsx +23 -0
  207. package/packages/math/polygonRotate.stories.jsx +23 -0
  208. package/packages/math/segmentBoxContains.stories.jsx +23 -0
  209. package/packages/math/segmentsIntersect.stories.jsx +23 -0
  210. package/packages/math/shapeEdgePoint.stories.jsx +23 -0
  211. package/packages/react/D3plusContext.stories.jsx +23 -0
  212. package/packages/react/Renderer.stories.jsx +23 -0
  213. package/packages/text/fontFamily.stories.jsx +23 -0
  214. package/packages/text/fontFamilyStringify.stories.jsx +23 -0
  215. package/packages/text/stringify.stories.jsx +23 -0
  216. package/packages/text/strip.stories.jsx +23 -0
  217. package/packages/text/textSplit.stories.jsx +23 -0
  218. package/packages/text/textWrap.stories.jsx +23 -0
  219. package/packages/text/titleCase.stories.jsx +23 -0
  220. package/packages/text/trim.stories.jsx +23 -0
  221. package/packages/text/trimLeft.stories.jsx +23 -0
  222. package/packages/text/trimRight.stories.jsx +23 -0
  223. package/static/data/city_coords.json +224 -0
  224. package/static/images/favicon.ico +0 -0
  225. package/static/images/touchicon.png +0 -0
@@ -0,0 +1,453 @@
1
+ // WARNING: do not edit this file directly, it is generated dynamically from
2
+ // the source JSDOC comments using the npm run docs script.
3
+
4
+ import React from "react";
5
+ import {argTypes as baseClassArgTypes} from "../utils/BaseClass.args.jsx";
6
+ import {assign} from "@d3plus/dom";
7
+
8
+ import {Tooltip as D3plusTooltip} from "@d3plus/react";
9
+ export const Tooltip = ({ config }) => <D3plusTooltip config={config} />;
10
+
11
+ export const argTypes = assign(
12
+
13
+ /**
14
+ * Filters out unused argTypes from the BaseClass primitive and
15
+ * overrides any defaults that have been changed in Tooltip
16
+ */
17
+ Object.keys(baseClassArgTypes)
18
+ .reduce((obj, k) => (obj[k] = baseClassArgTypes[k], obj), {}),
19
+
20
+ /**
21
+ * Tooltip-specific methods
22
+ */
23
+
24
+ {
25
+ arrow: {
26
+ control: {
27
+ type: "text"
28
+ },
29
+ defaultValue: "d => d[\"arrow\"]",
30
+ table: {
31
+ defaultValue: {
32
+ detail: "d => d[\"arrow\"]",
33
+ summary: "function"
34
+ }
35
+ },
36
+ type: {
37
+ required: false,
38
+ summary: "function | string"
39
+ }
40
+ },
41
+ arrowStyle: {
42
+ control: {
43
+ type: "object"
44
+ },
45
+ defaultValue: "{content: , background: inherit, border: inherit, border-width: 0 1px 1px 0, height: 10px, position: absolute, transform: rotate(45deg), width: 10px, z-index: -1}",
46
+ table: {
47
+ defaultValue: {
48
+ summary: "{content: , background: inherit, border: inherit, border-width: 0 1px 1px 0, height: 10px, position: absolute, transform: rotate(45deg), width: 10px, z-index: -1}"
49
+ }
50
+ },
51
+ type: {
52
+ required: false,
53
+ summary: "object"
54
+ }
55
+ },
56
+ background: {
57
+ control: {
58
+ type: "text"
59
+ },
60
+ defaultValue: "colorDefaults.light",
61
+ table: {
62
+ defaultValue: {
63
+ summary: "colorDefaults.light"
64
+ }
65
+ },
66
+ type: {
67
+ required: false,
68
+ summary: "function | string"
69
+ }
70
+ },
71
+ body: {
72
+ control: {
73
+ type: "text"
74
+ },
75
+ defaultValue: "d => d[\"body\"]",
76
+ table: {
77
+ defaultValue: {
78
+ detail: "d => d[\"body\"]",
79
+ summary: "function"
80
+ }
81
+ },
82
+ type: {
83
+ required: false,
84
+ summary: "function | string"
85
+ }
86
+ },
87
+ bodyStyle: {
88
+ control: {
89
+ type: "object"
90
+ },
91
+ defaultValue: "{font-size: 12px, font-weight: 400, z-index: 1}",
92
+ table: {
93
+ defaultValue: {
94
+ summary: "{font-size: 12px, font-weight: 400, z-index: 1}"
95
+ }
96
+ },
97
+ type: {
98
+ required: false,
99
+ summary: "object"
100
+ }
101
+ },
102
+ border: {
103
+ control: {
104
+ type: "text"
105
+ },
106
+ defaultValue: "1px solid rgba(0, 0, 0, 0.25)",
107
+ table: {
108
+ defaultValue: {
109
+ summary: "1px solid rgba(0, 0, 0, 0.25)"
110
+ }
111
+ },
112
+ type: {
113
+ required: false,
114
+ summary: "function | string"
115
+ }
116
+ },
117
+ borderRadius: {
118
+ control: {
119
+ type: "text"
120
+ },
121
+ defaultValue: "4px",
122
+ table: {
123
+ defaultValue: {
124
+ summary: "4px"
125
+ }
126
+ },
127
+ type: {
128
+ required: false,
129
+ summary: "function | string"
130
+ }
131
+ },
132
+ className: {
133
+ control: {
134
+ type: "text"
135
+ },
136
+ defaultValue: "d3plus-tooltip",
137
+ table: {
138
+ defaultValue: {
139
+ summary: "d3plus-tooltip"
140
+ }
141
+ },
142
+ type: {
143
+ required: false,
144
+ summary: "string"
145
+ }
146
+ },
147
+ data: {
148
+ control: {
149
+ type: "array"
150
+ },
151
+ defaultValue: "[\n\n]",
152
+ table: {
153
+ defaultValue: {
154
+ summary: "[\n\n]"
155
+ }
156
+ },
157
+ type: {
158
+ required: false,
159
+ summary: "array"
160
+ }
161
+ },
162
+ footer: {
163
+ control: {
164
+ type: "text"
165
+ },
166
+ defaultValue: "d => d[\"footer\"]",
167
+ table: {
168
+ defaultValue: {
169
+ detail: "d => d[\"footer\"]",
170
+ summary: "function"
171
+ }
172
+ },
173
+ type: {
174
+ required: false,
175
+ summary: "function | string"
176
+ }
177
+ },
178
+ footerStyle: {
179
+ control: {
180
+ type: "object"
181
+ },
182
+ defaultValue: "{font-size: 9px, font-weight: 400, margin-top: 5px, z-index: 1}",
183
+ table: {
184
+ defaultValue: {
185
+ summary: "{font-size: 9px, font-weight: 400, margin-top: 5px, z-index: 1}"
186
+ }
187
+ },
188
+ type: {
189
+ required: false,
190
+ summary: "object"
191
+ }
192
+ },
193
+ height: {
194
+ control: {
195
+ type: "text"
196
+ },
197
+ defaultValue: "auto",
198
+ table: {
199
+ defaultValue: {
200
+ summary: "auto"
201
+ }
202
+ },
203
+ type: {
204
+ required: false,
205
+ summary: "function | string"
206
+ }
207
+ },
208
+ id: {
209
+ control: {
210
+ type: "text"
211
+ },
212
+ defaultValue: "(d, i) => `${i}`",
213
+ table: {
214
+ defaultValue: {
215
+ detail: "(d, i) => `${i}`",
216
+ summary: "function"
217
+ }
218
+ },
219
+ type: {
220
+ required: false,
221
+ summary: "function | string"
222
+ }
223
+ },
224
+ offset: {
225
+ control: {
226
+ type: "number"
227
+ },
228
+ defaultValue: 5,
229
+ table: {
230
+ defaultValue: {
231
+ summary: 5
232
+ }
233
+ },
234
+ type: {
235
+ required: false,
236
+ summary: "function | number"
237
+ }
238
+ },
239
+ padding: {
240
+ control: {
241
+ type: "text"
242
+ },
243
+ defaultValue: "10px",
244
+ table: {
245
+ defaultValue: {
246
+ summary: "10px"
247
+ }
248
+ },
249
+ type: {
250
+ required: false,
251
+ summary: "function | string"
252
+ }
253
+ },
254
+ pointerEvents: {
255
+ control: {
256
+ type: "text"
257
+ },
258
+ defaultValue: "auto",
259
+ table: {
260
+ defaultValue: {
261
+ summary: "auto"
262
+ }
263
+ },
264
+ type: {
265
+ required: false,
266
+ summary: "function | string"
267
+ }
268
+ },
269
+ position: {
270
+ control: {
271
+ type: "array"
272
+ },
273
+ defaultValue: "(d) => [\nd.x,\nd.y\n]",
274
+ table: {
275
+ defaultValue: {
276
+ detail: "(d) => [\nd.x,\nd.y\n]",
277
+ summary: "function"
278
+ }
279
+ },
280
+ type: {
281
+ required: false,
282
+ summary: "function | array | htmlelement | string"
283
+ }
284
+ },
285
+ tableStyle: {
286
+ control: {
287
+ type: "object"
288
+ },
289
+ defaultValue: "{border-collapse: collapse, border-spacing: 0, width: 100%}",
290
+ table: {
291
+ defaultValue: {
292
+ summary: "{border-collapse: collapse, border-spacing: 0, width: 100%}"
293
+ }
294
+ },
295
+ type: {
296
+ required: false,
297
+ summary: "object"
298
+ }
299
+ },
300
+ tbody: {
301
+ control: {
302
+ type: "array"
303
+ },
304
+ defaultValue: "[\n\n]",
305
+ table: {
306
+ defaultValue: {
307
+ summary: "[\n\n]"
308
+ }
309
+ },
310
+ type: {
311
+ required: false,
312
+ summary: "array"
313
+ }
314
+ },
315
+ tbodyStyle: {
316
+ control: {
317
+ type: "object"
318
+ },
319
+ defaultValue: "{font-size: 12px, text-align: center}",
320
+ table: {
321
+ defaultValue: {
322
+ summary: "{font-size: 12px, text-align: center}"
323
+ }
324
+ },
325
+ type: {
326
+ required: false,
327
+ summary: "object"
328
+ }
329
+ },
330
+ tdStyle: {
331
+ control: {
332
+ type: "object"
333
+ },
334
+ defaultValue: "{}",
335
+ table: {
336
+ defaultValue: {
337
+ summary: "{}"
338
+ }
339
+ },
340
+ type: {
341
+ required: false,
342
+ summary: "object"
343
+ }
344
+ },
345
+ thead: {
346
+ control: {
347
+ type: "array"
348
+ },
349
+ defaultValue: "[\n\n]",
350
+ table: {
351
+ defaultValue: {
352
+ summary: "[\n\n]"
353
+ }
354
+ },
355
+ type: {
356
+ required: false,
357
+ summary: "array"
358
+ }
359
+ },
360
+ theadStyle: {
361
+ control: {
362
+ type: "object"
363
+ },
364
+ defaultValue: "{font-size: 12px, font-weight: 600, text-align: center}",
365
+ table: {
366
+ defaultValue: {
367
+ summary: "{font-size: 12px, font-weight: 600, text-align: center}"
368
+ }
369
+ },
370
+ type: {
371
+ required: false,
372
+ summary: "object"
373
+ }
374
+ },
375
+ title: {
376
+ control: {
377
+ type: "text"
378
+ },
379
+ defaultValue: "d => d[\"title\"]",
380
+ table: {
381
+ defaultValue: {
382
+ detail: "d => d[\"title\"]",
383
+ summary: "function"
384
+ }
385
+ },
386
+ type: {
387
+ required: false,
388
+ summary: "function | string"
389
+ }
390
+ },
391
+ titleStyle: {
392
+ control: {
393
+ type: "object"
394
+ },
395
+ defaultValue: "{font-size: 14px, font-weight: 600, margin-bottom: 5px}",
396
+ table: {
397
+ defaultValue: {
398
+ summary: "{font-size: 14px, font-weight: 600, margin-bottom: 5px}"
399
+ }
400
+ },
401
+ type: {
402
+ required: false,
403
+ summary: "object"
404
+ }
405
+ },
406
+ tooltipStyle: {
407
+ control: {
408
+ type: "object"
409
+ },
410
+ defaultValue: "{box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25), color: colorDefaults.dark, font-family: fontFamilyStringify(fontFamily)}",
411
+ table: {
412
+ defaultValue: {
413
+ summary: "{box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25), color: colorDefaults.dark, font-family: fontFamilyStringify(fontFamily)}"
414
+ }
415
+ },
416
+ type: {
417
+ required: false,
418
+ summary: "object"
419
+ }
420
+ },
421
+ trStyle: {
422
+ control: {
423
+ type: "object"
424
+ },
425
+ defaultValue: "{border-top: (d, i) => i ? 1px solid rgba(0, 0, 0, 0.1) : none}",
426
+ table: {
427
+ defaultValue: {
428
+ detail: "{border-top: (d, i) => i ? 1px solid rgba(0, 0, 0, 0.1) : none}",
429
+ summary: "function"
430
+ }
431
+ },
432
+ type: {
433
+ required: false,
434
+ summary: "object"
435
+ }
436
+ },
437
+ width: {
438
+ control: {
439
+ type: "text"
440
+ },
441
+ defaultValue: "150px",
442
+ table: {
443
+ defaultValue: {
444
+ summary: "150px"
445
+ }
446
+ },
447
+ type: {
448
+ required: false,
449
+ summary: "function | string"
450
+ }
451
+ }
452
+ }
453
+ );
@@ -0,0 +1,190 @@
1
+ // WARNING: do not edit this file directly, it is generated dynamically from
2
+ // the source JSDOC comments using the npm run docs script.
3
+
4
+ import React from "react";
5
+ import {argTypes as shapeArgTypes} from "./Shape.args.jsx";
6
+ import {assign} from "@d3plus/dom";
7
+
8
+ import {Area as D3plusArea} from "@d3plus/react";
9
+ export const Area = ({ config }) => <D3plusArea config={config} />;
10
+
11
+ export const argTypes = assign(
12
+
13
+ /**
14
+ * Filters out unused argTypes from the Shape primitive and
15
+ * overrides any defaults that have been changed in Area
16
+ */
17
+ Object.keys(shapeArgTypes)
18
+ .reduce((obj, k) => (obj[k] = shapeArgTypes[k], obj), {}),
19
+
20
+ /**
21
+ * Area-specific methods
22
+ */
23
+
24
+ {
25
+ curve: {
26
+ control: {
27
+ type: "text"
28
+ },
29
+ defaultValue: "linear",
30
+ table: {
31
+ defaultValue: {
32
+ summary: "linear"
33
+ }
34
+ },
35
+ type: {
36
+ required: false,
37
+ summary: "function | string"
38
+ }
39
+ },
40
+ defined: {
41
+ control: {},
42
+ defaultValue: "() => true",
43
+ table: {
44
+ defaultValue: {
45
+ detail: "() => true",
46
+ summary: "function"
47
+ }
48
+ },
49
+ type: {
50
+ required: false,
51
+ summary: "function"
52
+ }
53
+ },
54
+ labelBounds: {
55
+ control: {},
56
+ defaultValue: "(d, i, aes) => {\n const r = largestRect(aes.points);\n if (!r) return null;\n return {\n angle: r.angle,\n width: r.width,\n height: r.height,\n x: r.cx - r.width / 2 - this._x(d, i),\n y: r.cy - r.height / 2 - this._y(d, i)\n };\n}",
57
+ description: "The given function is passed the data point, index, and internally defined properties of the shape and should return an object containing the following values: `width`, `height`, `x`, `y`. If an array is returned from the function, each value will be used in conjunction with each label.",
58
+ table: {
59
+ defaultValue: {
60
+ detail: "(d, i, aes) => {\n const r = largestRect(aes.points);\n if (!r) return null;\n return {\n angle: r.angle,\n width: r.width,\n height: r.height,\n x: r.cx - r.width / 2 - this._x(d, i),\n y: r.cy - r.height / 2 - this._y(d, i)\n };\n}",
61
+ summary: "function"
62
+ }
63
+ },
64
+ type: {
65
+ required: false,
66
+ summary: "function"
67
+ }
68
+ },
69
+ labelConfig: {
70
+ control: {
71
+ type: "object"
72
+ },
73
+ defaultValue: "Object.assign(this._labelConfig, {textAnchor: middle, verticalAlign: middle})",
74
+ table: {
75
+ defaultValue: {
76
+ summary: "Object.assign(this._labelConfig, {textAnchor: middle, verticalAlign: middle})"
77
+ }
78
+ },
79
+ type: {
80
+ required: false,
81
+ summary: "object"
82
+ }
83
+ },
84
+ render: {
85
+ control: {},
86
+ table: {
87
+ defaultValue: {
88
+ summary: "undefined"
89
+ }
90
+ },
91
+ type: {
92
+ required: false,
93
+ summary: "function"
94
+ }
95
+ },
96
+ x: {
97
+ control: {
98
+ type: "number"
99
+ },
100
+ defaultValue: "d => d[\"x\"]",
101
+ table: {
102
+ defaultValue: {
103
+ detail: "d => d[\"x\"]",
104
+ summary: "function"
105
+ }
106
+ },
107
+ type: {
108
+ required: false,
109
+ summary: "function | number"
110
+ }
111
+ },
112
+ x0: {
113
+ control: {
114
+ type: "number"
115
+ },
116
+ defaultValue: "d => d[\"x\"]",
117
+ table: {
118
+ defaultValue: {
119
+ detail: "d => d[\"x\"]",
120
+ summary: "function"
121
+ }
122
+ },
123
+ type: {
124
+ required: false,
125
+ summary: "function | number"
126
+ }
127
+ },
128
+ x1: {
129
+ control: {
130
+ type: "number"
131
+ },
132
+ defaultValue: "null",
133
+ table: {
134
+ defaultValue: {
135
+ summary: "null"
136
+ }
137
+ },
138
+ type: {
139
+ required: false,
140
+ summary: "function | number | null"
141
+ }
142
+ },
143
+ y: {
144
+ control: {
145
+ type: "number"
146
+ },
147
+ defaultValue: 0,
148
+ table: {
149
+ defaultValue: {
150
+ summary: 0
151
+ }
152
+ },
153
+ type: {
154
+ required: false,
155
+ summary: "function | number"
156
+ }
157
+ },
158
+ y0: {
159
+ control: {
160
+ type: "number"
161
+ },
162
+ defaultValue: 0,
163
+ table: {
164
+ defaultValue: {
165
+ summary: 0
166
+ }
167
+ },
168
+ type: {
169
+ required: false,
170
+ summary: "function | number"
171
+ }
172
+ },
173
+ y1: {
174
+ control: {
175
+ type: "number"
176
+ },
177
+ defaultValue: "d => d[\"y\"]",
178
+ table: {
179
+ defaultValue: {
180
+ detail: "d => d[\"y\"]",
181
+ summary: "function"
182
+ }
183
+ },
184
+ type: {
185
+ required: false,
186
+ summary: "function | number | null"
187
+ }
188
+ }
189
+ }
190
+ );