@d3plus/docs 3.0.4 → 3.0.6

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 (72) hide show
  1. package/.storybook/preview-head.html +5 -0
  2. package/args/core/charts/AreaPlot.args.jsx +4 -1
  3. package/args/core/charts/BarChart.args.jsx +5 -1
  4. package/args/core/charts/BoxWhisker.args.jsx +4 -1
  5. package/args/core/charts/BumpChart.args.jsx +8 -1
  6. package/args/core/charts/Donut.args.jsx +4 -2
  7. package/args/core/charts/Geomap.args.jsx +29 -13
  8. package/args/core/charts/LinePlot.args.jsx +3 -1
  9. package/args/core/charts/Matrix.args.jsx +13 -2
  10. package/args/core/charts/Network.args.jsx +29 -16
  11. package/args/core/charts/Pack.args.jsx +11 -2
  12. package/args/core/charts/Pie.args.jsx +8 -1
  13. package/args/core/charts/Plot.args.jsx +56 -23
  14. package/args/core/charts/Priestley.args.jsx +6 -0
  15. package/args/core/charts/Radar.args.jsx +7 -1
  16. package/args/core/charts/RadialMatrix.args.jsx +15 -4
  17. package/args/core/charts/Rings.args.jsx +21 -10
  18. package/args/core/charts/Sankey.args.jsx +17 -5
  19. package/args/core/charts/Tree.args.jsx +46 -6
  20. package/args/core/charts/Treemap.args.jsx +15 -5
  21. package/args/core/charts/Viz.args.jsx +102 -24
  22. package/args/core/components/Axis.args.jsx +49 -12
  23. package/args/core/components/AxisBottom.args.jsx +1 -1
  24. package/args/core/components/AxisLeft.args.jsx +1 -1
  25. package/args/core/components/AxisRight.args.jsx +1 -1
  26. package/args/core/components/AxisTop.args.jsx +1 -1
  27. package/args/core/components/ColorScale.args.jsx +37 -10
  28. package/args/core/components/Legend.args.jsx +21 -5
  29. package/args/core/components/TextBox.args.jsx +40 -7
  30. package/args/core/components/Timeline.args.jsx +29 -5
  31. package/args/core/components/Tooltip.args.jsx +40 -12
  32. package/args/core/shapes/Area.args.jsx +11 -1
  33. package/args/core/shapes/Bar.args.jsx +10 -1
  34. package/args/core/shapes/Box.args.jsx +19 -5
  35. package/args/core/shapes/Circle.args.jsx +4 -1
  36. package/args/core/shapes/Image.args.jsx +13 -1
  37. package/args/core/shapes/Line.args.jsx +7 -1
  38. package/args/core/shapes/Path.args.jsx +4 -1
  39. package/args/core/shapes/Rect.args.jsx +4 -1
  40. package/args/core/shapes/Shape.args.jsx +49 -13
  41. package/args/core/shapes/Whisker.args.jsx +13 -2
  42. package/args/core/utils/BaseClass.args.jsx +4 -0
  43. package/args/core/utils/accessor.args.jsx +1 -3
  44. package/args/core/utils/constant.args.jsx +1 -1
  45. package/args/data/dataConcat.args.jsx +1 -1
  46. package/args/data/dataLoad.args.jsx +1 -1
  47. package/args/data/isData.args.jsx +1 -3
  48. package/args/data/merge.args.jsx +1 -1
  49. package/args/data/unique.args.jsx +1 -1
  50. package/args/dom/attrize.args.jsx +1 -3
  51. package/args/dom/elem.args.jsx +1 -3
  52. package/args/dom/fontExists.args.jsx +1 -1
  53. package/args/dom/isObject.args.jsx +1 -3
  54. package/args/dom/parseSides.args.jsx +1 -1
  55. package/args/dom/stylize.args.jsx +1 -3
  56. package/args/dom/textWidth.args.jsx +1 -1
  57. package/args/export/saveElement.args.jsx +1 -3
  58. package/args/format/formatDate.args.jsx +2 -4
  59. package/args/math/closest.args.jsx +1 -1
  60. package/args/math/largestRect.args.jsx +1 -1
  61. package/args/math/lineIntersection.args.jsx +4 -4
  62. package/args/math/pointDistance.args.jsx +2 -2
  63. package/args/math/pointDistanceSquared.args.jsx +2 -2
  64. package/args/math/pointRotate.args.jsx +2 -2
  65. package/args/math/polygonInside.args.jsx +2 -2
  66. package/args/math/polygonRayCast.args.jsx +2 -2
  67. package/args/math/polygonRotate.args.jsx +2 -2
  68. package/args/math/segmentBoxContains.args.jsx +3 -3
  69. package/args/math/segmentsIntersect.args.jsx +4 -4
  70. package/helpers/configify.js +2 -10
  71. package/package.json +6 -6
  72. package/packages/core/charts/Tree.stories.jsx +40 -0
@@ -24,6 +24,7 @@ export const argTypes = assign(
24
24
  {
25
25
  active: {
26
26
  control: {},
27
+ description: "If *value* is specified, sets the active method for all shapes to the specified function and returns the current class instance. If *value* is not specified, returns the current active method.",
27
28
  table: {
28
29
  defaultValue: {
29
30
  summary: "undefined"
@@ -39,7 +40,7 @@ export const argTypes = assign(
39
40
  type: "text"
40
41
  },
41
42
  defaultValue: "center",
42
- description: "Supports `\"left\"` and `\"center\"` and `\"right\"`.",
43
+ description: "If *value* is specified, sets the horizontal alignment to the specified value and returns the current class instance. If *value* is not specified, returns the current horizontal alignment.",
43
44
  table: {
44
45
  defaultValue: {
45
46
  summary: "center"
@@ -52,12 +53,13 @@ export const argTypes = assign(
52
53
  },
53
54
  data: {
54
55
  control: {
55
- type: "array"
56
+ type: "object"
56
57
  },
57
- defaultValue: "[\n\n]",
58
+ defaultValue: "[ ]",
59
+ description: "If *data* is specified, sets the data array to the specified array and returns the current class instance. If *data* is not specified, returns the current data array. A shape key will be drawn for each object in the array.",
58
60
  table: {
59
61
  defaultValue: {
60
- summary: "[\n\n]"
62
+ summary: "[ ]"
61
63
  }
62
64
  },
63
65
  type: {
@@ -70,6 +72,7 @@ export const argTypes = assign(
70
72
  type: "text"
71
73
  },
72
74
  defaultValue: "row",
75
+ description: "Sets the flow of the items inside the legend. If no value is passed, the current flow will be returned.",
73
76
  table: {
74
77
  defaultValue: {
75
78
  summary: "row"
@@ -85,6 +88,7 @@ export const argTypes = assign(
85
88
  type: "number"
86
89
  },
87
90
  defaultValue: 600,
91
+ description: "If *value* is specified, sets the transition duration of the legend and returns the current class instance. If *value* is not specified, returns the current duration.",
88
92
  table: {
89
93
  defaultValue: {
90
94
  summary: 600
@@ -100,6 +104,7 @@ export const argTypes = assign(
100
104
  type: "number"
101
105
  },
102
106
  defaultValue: 200,
107
+ description: "If *value* is specified, sets the overall height of the legend and returns the current class instance. If *value* is not specified, returns the current height value.",
103
108
  table: {
104
109
  defaultValue: {
105
110
  summary: 200
@@ -112,6 +117,7 @@ export const argTypes = assign(
112
117
  },
113
118
  hover: {
114
119
  control: {},
120
+ description: "If *value* is specified, sets the hover method for all shapes to the specified function and returns the current class instance. If *value* is not specified, returns the current hover method.",
115
121
  table: {
116
122
  defaultValue: {
117
123
  summary: "undefined"
@@ -125,6 +131,7 @@ export const argTypes = assign(
125
131
  id: {
126
132
  control: {},
127
133
  defaultValue: "d => d[\"id\"]",
134
+ description: "If *value* is specified, sets the id accessor to the specified function and returns the current class instance. If *value* is not specified, returns the current id accessor.",
128
135
  table: {
129
136
  defaultValue: {
130
137
  detail: "d => d[\"id\"]",
@@ -141,6 +148,7 @@ export const argTypes = assign(
141
148
  type: "text"
142
149
  },
143
150
  defaultValue: "d => d[\"id\"]",
151
+ description: "If *value* is specified, sets the label accessor to the specified function or string and returns the current class instance. If *value* is not specified, returns the current label accessor, which is the [id](#shape.id) accessor by default.",
144
152
  table: {
145
153
  defaultValue: {
146
154
  detail: "d => d[\"id\"]",
@@ -157,6 +165,7 @@ export const argTypes = assign(
157
165
  type: "number"
158
166
  },
159
167
  defaultValue: 5,
168
+ description: "If *value* is specified, sets the padding between each key to the specified number and returns the current class instance. If *value* is not specified, returns the current padding value.",
160
169
  table: {
161
170
  defaultValue: {
162
171
  summary: 5
@@ -169,6 +178,7 @@ export const argTypes = assign(
169
178
  },
170
179
  render: {
171
180
  control: {},
181
+ description: "Renders the current Legend to the page. If a *callback* is specified, it will be called once the legend is done drawing.",
172
182
  table: {
173
183
  defaultValue: {
174
184
  summary: "undefined"
@@ -184,6 +194,7 @@ export const argTypes = assign(
184
194
  type: "text"
185
195
  },
186
196
  defaultValue: "d3.select(\"body\").append(\"svg\")",
197
+ description: "If *selector* is specified, sets the SVG container element to the specified d3 selector or DOM element and returns the current class instance. If *selector* is not specified, returns the current SVG container element.",
187
198
  table: {
188
199
  defaultValue: {
189
200
  summary: "d3.select(\"body\").append(\"svg\")"
@@ -199,6 +210,7 @@ export const argTypes = assign(
199
210
  type: "text"
200
211
  },
201
212
  defaultValue: "Rect",
213
+ description: "If *value* is specified, sets the shape accessor to the specified function or string and returns the current class instance. If *value* is not specified, returns the current shape accessor.",
202
214
  table: {
203
215
  defaultValue: {
204
216
  summary: "Rect"
@@ -214,6 +226,7 @@ export const argTypes = assign(
214
226
  type: "object"
215
227
  },
216
228
  defaultValue: "{fill: d => d[\"color\"], height: 12, hitArea: (dd, i) => {\n const d = this._lineData[i], h = max([\n d.height,\n d.shapeHeight\n ]);\n return {\n width: d.width + d.shapeWidth,\n height: h,\n x: -d.shapeWidth / 2,\n y: -h / 2\n };\n}, labelBounds: (dd, i) => {\n const d = this._lineData[i];\n let x = d.shapeWidth / 2;\n if (d.shape === \"Circle\") x -= d.shapeR / 2;\n const height = max([\n d.shapeHeight,\n d.height\n ]);\n const rtlMod = this._rtl ? d.shapeWidth + d.width + this._padding * 2 : 0;\n return {\n width: d.width,\n height,\n x: x + padding - rtlMod,\n y: -height / 2\n };\n}, labelConfig: {fontColor: colorDefaults.dark, fontFamily: this._titleClass.fontFamily(), fontResize: false, fontSize: 10, verticalAlign: middle}, opacity: 1, r: 6, width: 12, x: (d, i) => {\n const datum = this._lineData[i];\n const y = datum.y;\n const pad = this._align === \"left\" || this._align === \"right\" && this._direction === \"column\" ? 0 : this._align === \"center\" ? (this._outerBounds.width - this._rowWidth(this._lineData.filter((l)=>y === l.y))) / 2 : this._outerBounds.width - this._rowWidth(this._lineData.filter((l)=>y === l.y));\n const prevWords = this._lineData.slice(0, i).filter((l)=>y === l.y);\n const rtlMod = this._rtl ? datum.width + this._padding : 0;\n return this._rowWidth(prevWords) + this._padding * (prevWords.length ? datum.sentence ? 2 : 1 : 0) + this._outerBounds.x + datum.shapeWidth / 2 + pad + rtlMod;\n}, y: (d, i) => {\n const ld = this._lineData[i];\n return ld.y + this._titleHeight + this._outerBounds.y + max(this._lineData.filter((l)=>ld.y === l.y).map((l)=>l.height).concat(this._data.map((l, x)=>this._fetchConfig(\"height\", l, x)))) / 2;\n}}",
229
+ description: "If *config* is specified, sets the methods that correspond to the key/value pairs for each shape and returns the current class instance. If *config* is not specified, returns the current shape configuration.",
217
230
  table: {
218
231
  defaultValue: {
219
232
  detail: "{fill: d => d[\"color\"], height: 12, hitArea: (dd, i) => {\n const d = this._lineData[i], h = max([\n d.height,\n d.shapeHeight\n ]);\n return {\n width: d.width + d.shapeWidth,\n height: h,\n x: -d.shapeWidth / 2,\n y: -h / 2\n };\n}, labelBounds: (dd, i) => {\n const d = this._lineData[i];\n let x = d.shapeWidth / 2;\n if (d.shape === \"Circle\") x -= d.shapeR / 2;\n const height = max([\n d.shapeHeight,\n d.height\n ]);\n const rtlMod = this._rtl ? d.shapeWidth + d.width + this._padding * 2 : 0;\n return {\n width: d.width,\n height,\n x: x + padding - rtlMod,\n y: -height / 2\n };\n}, labelConfig: {fontColor: colorDefaults.dark, fontFamily: this._titleClass.fontFamily(), fontResize: false, fontSize: 10, verticalAlign: middle}, opacity: 1, r: 6, width: 12, x: (d, i) => {\n const datum = this._lineData[i];\n const y = datum.y;\n const pad = this._align === \"left\" || this._align === \"right\" && this._direction === \"column\" ? 0 : this._align === \"center\" ? (this._outerBounds.width - this._rowWidth(this._lineData.filter((l)=>y === l.y))) / 2 : this._outerBounds.width - this._rowWidth(this._lineData.filter((l)=>y === l.y));\n const prevWords = this._lineData.slice(0, i).filter((l)=>y === l.y);\n const rtlMod = this._rtl ? datum.width + this._padding : 0;\n return this._rowWidth(prevWords) + this._padding * (prevWords.length ? datum.sentence ? 2 : 1 : 0) + this._outerBounds.x + datum.shapeWidth / 2 + pad + rtlMod;\n}, y: (d, i) => {\n const ld = this._lineData[i];\n return ld.y + this._titleHeight + this._outerBounds.y + max(this._lineData.filter((l)=>ld.y === l.y).map((l)=>l.height).concat(this._data.map((l, x)=>this._fetchConfig(\"height\", l, x)))) / 2;\n}}",
@@ -229,6 +242,7 @@ export const argTypes = assign(
229
242
  control: {
230
243
  type: "text"
231
244
  },
245
+ description: "If *value* is specified, sets the title of the legend and returns the current class instance. If *value* is not specified, returns the current title.",
232
246
  table: {
233
247
  defaultValue: {
234
248
  summary: "undefined"
@@ -244,6 +258,7 @@ export const argTypes = assign(
244
258
  type: "object"
245
259
  },
246
260
  defaultValue: "{fontSize: 12}",
261
+ description: "If *value* is specified, sets the title configuration of the legend and returns the current class instance. If *value* is not specified, returns the current title configuration.",
247
262
  table: {
248
263
  defaultValue: {
249
264
  summary: "{fontSize: 12}"
@@ -259,7 +274,7 @@ export const argTypes = assign(
259
274
  type: "text"
260
275
  },
261
276
  defaultValue: "middle",
262
- description: "Supports `\"top\"` and `\"middle\"` and `\"bottom\"`.",
277
+ description: "If *value* is specified, sets the vertical alignment to the specified value and returns the current class instance. If *value* is not specified, returns the current vertical alignment.",
263
278
  table: {
264
279
  defaultValue: {
265
280
  summary: "middle"
@@ -275,6 +290,7 @@ export const argTypes = assign(
275
290
  type: "number"
276
291
  },
277
292
  defaultValue: 400,
293
+ description: "If *value* is specified, sets the overall width of the legend and returns the current class instance. If *value* is not specified, returns the current width value.",
278
294
  table: {
279
295
  defaultValue: {
280
296
  summary: 400
@@ -27,6 +27,7 @@ export const argTypes = assign(
27
27
  type: "text"
28
28
  },
29
29
  defaultValue: "false",
30
+ description: "If *value* is specified, sets the aria-hidden attribute to the specified function or string and returns the current class instance.",
30
31
  table: {
31
32
  defaultValue: {
32
33
  summary: "false"
@@ -39,9 +40,10 @@ export const argTypes = assign(
39
40
  },
40
41
  data: {
41
42
  control: {
42
- type: "array"
43
+ type: "object"
43
44
  },
44
45
  defaultValue: "[]",
46
+ description: "Sets the data array to the specified array. A text box will be drawn for each object in the array.",
45
47
  table: {
46
48
  defaultValue: {
47
49
  summary: "[]"
@@ -57,6 +59,7 @@ export const argTypes = assign(
57
59
  type: "number"
58
60
  },
59
61
  defaultValue: 0,
62
+ description: "Sets the animation delay to the specified number in milliseconds.",
60
63
  table: {
61
64
  defaultValue: {
62
65
  summary: 0
@@ -72,6 +75,7 @@ export const argTypes = assign(
72
75
  type: "number"
73
76
  },
74
77
  defaultValue: 0,
78
+ description: "Sets the animation duration to the specified number in milliseconds.",
75
79
  table: {
76
80
  defaultValue: {
77
81
  summary: 0
@@ -87,6 +91,7 @@ export const argTypes = assign(
87
91
  type: "text"
88
92
  },
89
93
  defaultValue: "(text, line) => line ? `${text.replace(/\\.|,$/g, )}...` : ",
94
+ description: "Sets the function that handles what to do when a line is truncated. It should return the new value for the line, and is passed 2 arguments: the String of text for the line in question, and the number of the line. By default, an ellipsis is added to the end of any line except if it is the first word that cannot fit (in that case, an empty string is returned).",
90
95
  table: {
91
96
  defaultValue: {
92
97
  detail: "(text, line) => line ? `${text.replace(/\\.|,$/g, )}...` : ",
@@ -103,6 +108,7 @@ export const argTypes = assign(
103
108
  type: "text"
104
109
  },
105
110
  defaultValue: "black",
111
+ description: "Sets the font color to the specified accessor function or static string, which is inferred from the [DOM selection](#textBox.select) by default.",
106
112
  table: {
107
113
  defaultValue: {
108
114
  summary: "black"
@@ -115,9 +121,10 @@ export const argTypes = assign(
115
121
  },
116
122
  fontFamily: {
117
123
  control: {
118
- type: "array"
124
+ type: "object"
119
125
  },
120
126
  defaultValue: "fontFamily",
127
+ description: "Defines the font-family to be used. The value passed can be either a *String* name of a font, a comma-separated list of font-family fallbacks, an *Array* of fallbacks, or a *Function* that returns either a *String* or an *Array*. If supplying multiple fallback fonts, the [fontExists](#fontExists) function will be used to determine the first available font on the client's machine.",
121
128
  table: {
122
129
  defaultValue: {
123
130
  summary: "fontFamily"
@@ -133,6 +140,7 @@ export const argTypes = assign(
133
140
  type: "number"
134
141
  },
135
142
  defaultValue: 50,
143
+ description: "Sets the maximum font size to the specified accessor function or static number (which corresponds to pixel units), which is used when [dynamically resizing fonts](#textBox.fontResize).",
136
144
  table: {
137
145
  defaultValue: {
138
146
  summary: 50
@@ -148,6 +156,7 @@ export const argTypes = assign(
148
156
  type: "number"
149
157
  },
150
158
  defaultValue: 8,
159
+ description: "Sets the minimum font size to the specified accessor function or static number (which corresponds to pixel units), which is used when [dynamically resizing fonts](#textBox.fontResize).",
151
160
  table: {
152
161
  defaultValue: {
153
162
  summary: 8
@@ -163,6 +172,7 @@ export const argTypes = assign(
163
172
  type: "number"
164
173
  },
165
174
  defaultValue: 1,
175
+ description: "Sets the font opacity to the specified accessor function or static number between 0 and 1.",
166
176
  table: {
167
177
  defaultValue: {
168
178
  summary: 1
@@ -178,6 +188,7 @@ export const argTypes = assign(
178
188
  type: "boolean"
179
189
  },
180
190
  defaultValue: false,
191
+ description: "Toggles font resizing, which can either be defined as a static boolean for all data points, or an accessor function that returns a boolean. See [this example](http://d3plus.org/examples/d3plus-text/resizing-text/) for a side-by-side comparison.",
181
192
  table: {
182
193
  defaultValue: {
183
194
  summary: false
@@ -193,6 +204,7 @@ export const argTypes = assign(
193
204
  type: "number"
194
205
  },
195
206
  defaultValue: 10,
207
+ description: "Sets the font size to the specified accessor function or static number (which corresponds to pixel units), which is inferred from the [DOM selection](#textBox.select) by default.",
196
208
  table: {
197
209
  defaultValue: {
198
210
  summary: 10
@@ -208,6 +220,7 @@ export const argTypes = assign(
208
220
  type: "text"
209
221
  },
210
222
  defaultValue: "transparent",
223
+ description: "Sets the font stroke color for the rendered text.",
211
224
  table: {
212
225
  defaultValue: {
213
226
  summary: "transparent"
@@ -223,6 +236,7 @@ export const argTypes = assign(
223
236
  type: "number"
224
237
  },
225
238
  defaultValue: 0,
239
+ description: "Sets the font stroke width for the rendered text.",
226
240
  table: {
227
241
  defaultValue: {
228
242
  summary: 0
@@ -238,6 +252,7 @@ export const argTypes = assign(
238
252
  type: "number"
239
253
  },
240
254
  defaultValue: 400,
255
+ description: "Sets the font weight to the specified accessor function or static number, which is inferred from the [DOM selection](#textBox.select) by default.",
241
256
  table: {
242
257
  defaultValue: {
243
258
  summary: 400
@@ -253,6 +268,7 @@ export const argTypes = assign(
253
268
  type: "number"
254
269
  },
255
270
  defaultValue: "d => d[\"height\"] || 200",
271
+ description: "Sets the height for each box to the specified accessor function or static number.",
256
272
  table: {
257
273
  defaultValue: {
258
274
  detail: "d => d[\"height\"] || 200",
@@ -269,6 +285,7 @@ export const argTypes = assign(
269
285
  type: "object"
270
286
  },
271
287
  defaultValue: "defaultHtmlLookup",
288
+ description: "Configures the ability to render simple HTML tags. Defaults to supporting `<b>`, `<strong>`, `<i>`, and `<em>`, set to false to disable or provide a mapping of tags to svg styles",
272
289
  table: {
273
290
  defaultValue: {
274
291
  summary: "defaultHtmlLookup"
@@ -284,6 +301,7 @@ export const argTypes = assign(
284
301
  type: "number"
285
302
  },
286
303
  defaultValue: "(d, i) => d.id || `${i}`",
304
+ description: "Defines the unique id for each box to the specified accessor function or static number.",
287
305
  table: {
288
306
  defaultValue: {
289
307
  detail: "(d, i) => d.id || `${i}`",
@@ -300,6 +318,7 @@ export const argTypes = assign(
300
318
  type: "number"
301
319
  },
302
320
  defaultValue: "(d, i) => this._fontSize(d, i) * 1.2",
321
+ description: "Sets the line height to the specified accessor function or static number, which is 1.2 times the [font size](#textBox.fontSize) by default.",
303
322
  table: {
304
323
  defaultValue: {
305
324
  detail: "(d, i) => this._fontSize(d, i) * 1.2",
@@ -316,6 +335,7 @@ export const argTypes = assign(
316
335
  type: "number"
317
336
  },
318
337
  defaultValue: "null",
338
+ description: "Restricts the maximum number of lines to wrap onto, which is null (unlimited) by default.",
319
339
  table: {
320
340
  defaultValue: {
321
341
  summary: "null"
@@ -331,6 +351,7 @@ export const argTypes = assign(
331
351
  type: "text"
332
352
  },
333
353
  defaultValue: "{}",
354
+ description: "Adds or removes a *listener* to each object for the specified event *typenames*. If a *listener* is not specified, returns the currently assigned listener for the specified event *typename*. Mirrors the core [d3-selection](https://github.com/d3/d3-selection#selection_on) behavior.",
334
355
  table: {
335
356
  defaultValue: {
336
357
  summary: "{}"
@@ -346,6 +367,7 @@ export const argTypes = assign(
346
367
  type: "boolean"
347
368
  },
348
369
  defaultValue: false,
370
+ description: "Sets the text overflow to the specified accessor function or static boolean.",
349
371
  table: {
350
372
  defaultValue: {
351
373
  summary: false
@@ -361,6 +383,7 @@ export const argTypes = assign(
361
383
  type: "number"
362
384
  },
363
385
  defaultValue: 0,
386
+ description: "Sets the padding to the specified accessor function, CSS shorthand string, or static number, which is 0 by default.",
364
387
  table: {
365
388
  defaultValue: {
366
389
  summary: 0
@@ -376,6 +399,7 @@ export const argTypes = assign(
376
399
  type: "text"
377
400
  },
378
401
  defaultValue: "auto",
402
+ description: "Sets the pointer-events to the specified accessor function or static string.",
379
403
  table: {
380
404
  defaultValue: {
381
405
  summary: "auto"
@@ -388,6 +412,7 @@ export const argTypes = assign(
388
412
  },
389
413
  render: {
390
414
  control: {},
415
+ description: "Renders the text boxes. If a *callback* is specified, it will be called once the shapes are done drawing.",
391
416
  table: {
392
417
  defaultValue: {
393
418
  summary: "undefined"
@@ -403,6 +428,7 @@ export const argTypes = assign(
403
428
  type: "number"
404
429
  },
405
430
  defaultValue: 0,
431
+ description: "Sets the rotate percentage for each box to the specified accessor function or static string.",
406
432
  table: {
407
433
  defaultValue: {
408
434
  summary: 0
@@ -414,13 +440,12 @@ export const argTypes = assign(
414
440
  }
415
441
  },
416
442
  rotateAnchor: {
417
- control: {
418
- type: "array.<number>"
419
- },
420
- defaultValue: "(d) => [\nd.w / 2,\nd.h / 2\n]",
443
+ control: {},
444
+ defaultValue: "(d) => [\n d.w / 2,\nd.h / 2\n]",
445
+ description: "Sets the anchor point around which to rotate the text box.",
421
446
  table: {
422
447
  defaultValue: {
423
- detail: "(d) => [\nd.w / 2,\nd.h / 2\n]",
448
+ detail: "(d) => [\n d.w / 2,\nd.h / 2\n]",
424
449
  summary: "function"
425
450
  }
426
451
  },
@@ -433,6 +458,7 @@ export const argTypes = assign(
433
458
  control: {
434
459
  type: "text"
435
460
  },
461
+ description: "Sets the SVG container element to the specified d3 selector or DOM element. If not explicitly specified, an SVG element will be added to the page for use.",
436
462
  table: {
437
463
  defaultValue: {
438
464
  summary: "undefined"
@@ -446,6 +472,7 @@ export const argTypes = assign(
446
472
  split: {
447
473
  control: {},
448
474
  defaultValue: "textSplit",
475
+ description: "Sets the word split behavior to the specified function, which when passed a string is expected to return that string split into an array of words.",
449
476
  table: {
450
477
  defaultValue: {
451
478
  summary: "textSplit"
@@ -461,6 +488,7 @@ export const argTypes = assign(
461
488
  type: "text"
462
489
  },
463
490
  defaultValue: "d => d[\"text\"]",
491
+ description: "Sets the text for each box to the specified accessor function or static string.",
464
492
  table: {
465
493
  defaultValue: {
466
494
  detail: "d => d[\"text\"]",
@@ -477,6 +505,7 @@ export const argTypes = assign(
477
505
  type: "text"
478
506
  },
479
507
  defaultValue: "start",
508
+ description: "Sets the horizontal text anchor to the specified accessor function or static string, whose values are analagous to the SVG [text-anchor](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/text-anchor) property.",
480
509
  table: {
481
510
  defaultValue: {
482
511
  summary: "start"
@@ -492,6 +521,7 @@ export const argTypes = assign(
492
521
  type: "text"
493
522
  },
494
523
  defaultValue: "top",
524
+ description: "Sets the vertical alignment to the specified accessor function or static string. Accepts `\"top\"`, `\"middle\"`, and `\"bottom\"`.",
495
525
  table: {
496
526
  defaultValue: {
497
527
  summary: "top"
@@ -507,6 +537,7 @@ export const argTypes = assign(
507
537
  type: "number"
508
538
  },
509
539
  defaultValue: "d => d[\"width\"] || 200",
540
+ description: "Sets the width for each box to the specified accessor function or static number.",
510
541
  table: {
511
542
  defaultValue: {
512
543
  detail: "d => d[\"width\"] || 200",
@@ -523,6 +554,7 @@ export const argTypes = assign(
523
554
  type: "number"
524
555
  },
525
556
  defaultValue: "d => d[\"x\"]",
557
+ description: "Sets the x position for each box to the specified accessor function or static number. The number given should correspond to the left side of the textBox.",
526
558
  table: {
527
559
  defaultValue: {
528
560
  detail: "d => d[\"x\"]",
@@ -539,6 +571,7 @@ export const argTypes = assign(
539
571
  type: "number"
540
572
  },
541
573
  defaultValue: "d => d[\"y\"]",
574
+ description: "Sets the y position for each box to the specified accessor function or static number. The number given should correspond to the top side of the textBox.",
542
575
  table: {
543
576
  defaultValue: {
544
577
  detail: "d => d[\"y\"]",
@@ -27,6 +27,7 @@ export const argTypes = assign(
27
27
  type: "object"
28
28
  },
29
29
  defaultValue: "assign({}, this._barConfig, {stroke: () => this._buttonBehaviorCurrent === buttons ? transparent : colorMid, stroke-width: () => this._buttonBehaviorCurrent === buttons ? 0 : 1})",
30
+ description: "If *value* is specified, sets the axis line style and returns the current class instance.",
30
31
  table: {
31
32
  defaultValue: {
32
33
  detail: "assign({}, this._barConfig, {stroke: () => this._buttonBehaviorCurrent === buttons ? transparent : colorMid, stroke-width: () => this._buttonBehaviorCurrent === buttons ? 0 : 1})",
@@ -41,6 +42,7 @@ export const argTypes = assign(
41
42
  brushFilter: {
42
43
  control: {},
43
44
  defaultValue: "(event) => !event.button && event.detail < 2",
45
+ description: "If *value* is specified, sets the brush event filter and returns the current class instance. If *value* is not specified, returns the current brush event filter.",
44
46
  table: {
45
47
  defaultValue: {
46
48
  detail: "(event) => !event.button && event.detail < 2",
@@ -57,6 +59,7 @@ export const argTypes = assign(
57
59
  type: "number"
58
60
  },
59
61
  defaultValue: 1,
62
+ description: "Sets the minimum number of \"ticks\" to allow to be highlighted when using \"ticks\" buttonBehavior. Helpful when using x/y plots where you don't want the user to select less than 2 time periods. Value passed can either be a static Number, or a function that is expected to return a Number.",
60
63
  table: {
61
64
  defaultValue: {
62
65
  summary: 1
@@ -72,6 +75,7 @@ export const argTypes = assign(
72
75
  type: "boolean"
73
76
  },
74
77
  defaultValue: true,
78
+ description: "If *value* is specified, toggles the brushing value and returns the current class instance. If *value* is not specified, returns the current brushing value.",
75
79
  table: {
76
80
  defaultValue: {
77
81
  summary: true
@@ -87,6 +91,7 @@ export const argTypes = assign(
87
91
  type: "text"
88
92
  },
89
93
  defaultValue: "middle",
94
+ description: "If *value* is specified, toggles the horizontal alignment of the button timeline. Accepted values are `\"start\"`, `\"middle\"` and `\"end\"`. If *value* is not specified, returns the current button value.",
90
95
  table: {
91
96
  defaultValue: {
92
97
  summary: "middle"
@@ -102,6 +107,7 @@ export const argTypes = assign(
102
107
  type: "text"
103
108
  },
104
109
  defaultValue: "auto",
110
+ description: "If *value* is specified, toggles the style of the timeline. Accepted values are `\"auto\"`, `\"buttons\"` and `\"ticks\"`. If *value* is not specified, returns the current button value.",
105
111
  table: {
106
112
  defaultValue: {
107
113
  summary: "auto"
@@ -117,6 +123,7 @@ export const argTypes = assign(
117
123
  type: "number"
118
124
  },
119
125
  defaultValue: 24,
126
+ description: "If *value* is specified, sets the button height and returns the current class instance. If *value* is not specified, returns the current button height.",
120
127
  table: {
121
128
  defaultValue: {
122
129
  summary: 24
@@ -132,6 +139,7 @@ export const argTypes = assign(
132
139
  type: "number"
133
140
  },
134
141
  defaultValue: 10,
142
+ description: "If *value* is specified, sets the button padding and returns the current class instance. If *value* is not specified, returns the current button padding.",
135
143
  table: {
136
144
  defaultValue: {
137
145
  summary: 10
@@ -144,12 +152,13 @@ export const argTypes = assign(
144
152
  },
145
153
  domain: {
146
154
  control: {
147
- type: "array"
155
+ type: "object"
148
156
  },
149
- defaultValue: "[\n2001,\n2010\n]",
157
+ defaultValue: "[\n 2001,\n2010\n]",
158
+ description: "If *value* is specified, sets the scale domain of the axis and returns the current class instance.",
150
159
  table: {
151
160
  defaultValue: {
152
- summary: "[\n2001,\n2010\n]"
161
+ summary: "[\n 2001,\n2010\n]"
153
162
  }
154
163
  },
155
164
  type: {
@@ -162,6 +171,7 @@ export const argTypes = assign(
162
171
  type: "number"
163
172
  },
164
173
  defaultValue: 0,
174
+ description: "If *value* is specified, sets the grid size of the axis and returns the current class instance.",
165
175
  table: {
166
176
  defaultValue: {
167
177
  summary: 0
@@ -177,6 +187,7 @@ export const argTypes = assign(
177
187
  type: "object"
178
188
  },
179
189
  defaultValue: "{fill: colorDefaults.light, stroke: #228be6, stroke-width: 2, rx: 2, ry: 2}",
190
+ description: "If *value* is specified, sets the handle style and returns the current class instance. If *value* is not specified, returns the current handle style.",
180
191
  table: {
181
192
  defaultValue: {
182
193
  summary: "{fill: colorDefaults.light, stroke: #228be6, stroke-width: 2, rx: 2, ry: 2}"
@@ -192,6 +203,7 @@ export const argTypes = assign(
192
203
  type: "number"
193
204
  },
194
205
  defaultValue: 6,
206
+ description: "If *value* is specified, sets the handle size and returns the current class instance. If *value* is not specified, returns the current handle size.",
195
207
  table: {
196
208
  defaultValue: {
197
209
  summary: 6
@@ -207,6 +219,7 @@ export const argTypes = assign(
207
219
  type: "number"
208
220
  },
209
221
  defaultValue: 100,
222
+ description: "If *value* is specified, sets the overall height of the axis and returns the current class instance.",
210
223
  table: {
211
224
  defaultValue: {
212
225
  summary: 100
@@ -222,6 +235,7 @@ export const argTypes = assign(
222
235
  type: "boolean"
223
236
  },
224
237
  defaultValue: false,
238
+ description: "If *value* is specified, sets whether offsets will be used to position some labels further away from the axis in order to allow space for the text.",
225
239
  table: {
226
240
  defaultValue: {
227
241
  summary: false
@@ -237,6 +251,7 @@ export const argTypes = assign(
237
251
  type: "text"
238
252
  },
239
253
  defaultValue: "{}",
254
+ description: "Adds or removes a *listener* to each object for the specified event *typenames*. If a *listener* is not specified, returns the currently assigned listener for the specified event *typename*. Mirrors the core [d3-selection](https://github.com/d3/d3-selection#selection_on) behavior.",
240
255
  table: {
241
256
  defaultValue: {
242
257
  summary: "{}"
@@ -252,7 +267,7 @@ export const argTypes = assign(
252
267
  type: "text"
253
268
  },
254
269
  defaultValue: "bottom",
255
- description: "Supports `\"top\"`, `\"right\"`, `\"bottom\"`, and `\"left\"` orientations.",
270
+ description: "If *orient* is specified, sets the orientation of the shape and returns the current class instance. If *orient* is not specified, returns the current orientation.",
256
271
  table: {
257
272
  defaultValue: {
258
273
  summary: "bottom"
@@ -268,6 +283,7 @@ export const argTypes = assign(
268
283
  type: "boolean"
269
284
  },
270
285
  defaultValue: true,
286
+ description: "Determines the visibility of the play button to the left the of timeline, which will cycle through the available periods at a rate defined by the playButtonInterval method.",
271
287
  table: {
272
288
  defaultValue: {
273
289
  summary: true
@@ -283,6 +299,7 @@ export const argTypes = assign(
283
299
  type: "object"
284
300
  },
285
301
  defaultValue: "{fontColor: colorDefaults.dark, fontSize: 15, text: () => this._playTimer ? &#x23f8;&#xFE0E; : ⏵, textAnchor: middle, verticalAlign: middle}",
302
+ description: "The config Object for the Rect class used to create the playButton.",
286
303
  table: {
287
304
  defaultValue: {
288
305
  detail: "{fontColor: colorDefaults.dark, fontSize: 15, text: () => this._playTimer ? &#x23f8;&#xFE0E; : ⏵, textAnchor: middle, verticalAlign: middle}",
@@ -299,6 +316,7 @@ export const argTypes = assign(
299
316
  type: "number"
300
317
  },
301
318
  defaultValue: 1000,
319
+ description: "The value, in milliseconds, to use when cycling through the available time periods when the user clicks the playButton.",
302
320
  table: {
303
321
  defaultValue: {
304
322
  summary: 1000
@@ -311,6 +329,7 @@ export const argTypes = assign(
311
329
  },
312
330
  render: {
313
331
  control: {},
332
+ description: "Draws the timeline.",
314
333
  table: {
315
334
  defaultValue: {
316
335
  summary: "undefined"
@@ -323,8 +342,9 @@ export const argTypes = assign(
323
342
  },
324
343
  selection: {
325
344
  control: {
326
- type: "array"
345
+ type: "object"
327
346
  },
347
+ description: "If *value* is specified, sets the selection and returns the current class instance. If *value* is not specified, returns the current selection. Defaults to the most recent year in the timeline.",
328
348
  table: {
329
349
  defaultValue: {
330
350
  summary: "undefined"
@@ -340,6 +360,7 @@ export const argTypes = assign(
340
360
  type: "object"
341
361
  },
342
362
  defaultValue: "{fill: #228be6, fill-opacity: () => this._buttonBehaviorCurrent === buttons ? 0.3 : 1, stroke-width: 0}",
363
+ description: "If *value* is specified, sets the selection style and returns the current class instance. If *value* is not specified, returns the current selection style.",
343
364
  table: {
344
365
  defaultValue: {
345
366
  detail: "{fill: #228be6, fill-opacity: () => this._buttonBehaviorCurrent === buttons ? 0.3 : 1, stroke-width: 0}",
@@ -356,6 +377,7 @@ export const argTypes = assign(
356
377
  type: "text"
357
378
  },
358
379
  defaultValue: "Rect",
380
+ description: "If *value* is specified, sets the tick shape constructor and returns the current class instance.",
359
381
  table: {
360
382
  defaultValue: {
361
383
  summary: "Rect"
@@ -371,6 +393,7 @@ export const argTypes = assign(
371
393
  type: "object"
372
394
  },
373
395
  defaultValue: "assign({}, this._shapeConfig, {labelBounds: (d) => this._buttonBehaviorCurrent === buttons ? {x: d.labelBounds.x, y: -this._buttonHeight / 2 + 1, width: d.labelBounds.width, height: this._buttonHeight} : d.labelBounds, labelConfig: {fontColor: colorDefaults.dark, fontSize: () => 12, verticalAlign: () => this._buttonBehaviorCurrent === buttons ? middle : top}, fill: () => this._buttonBehaviorCurrent === buttons ? #fff : colorMid, stroke: () => this._buttonBehaviorCurrent === buttons ? colorMid : transparent, height: (d) => this._buttonBehaviorCurrent === buttons ? this._buttonHeight : d.tick ? this._handleSize : 0, width: (d) => this._buttonBehaviorCurrent === buttons ? this._ticksWidth / this._availableTicks.length : d.tick ? this._domain.map(Number).includes(d.id) ? 2 : 1 : 0, y: (d) => this._buttonBehaviorCurrent === buttons ? this._align === middle ? this._height / 2 : this._align === start ? this._margin.top + this._buttonHeight / 2 : this._height - this._buttonHeight / 2 - this._margin.bottom : d.y, rx: (d) => this._buttonBehaviorCurrent === buttons ? 0 : this._domain.map(Number).includes(d.id) ? 1 : 0, ry: (d) => this._buttonBehaviorCurrent === buttons ? 0 : this._domain.map(Number).includes(d.id) ? 1 : 0})",
396
+ description: "If *value* is specified, sets the tick style of the axis and returns the current class instance.",
374
397
  table: {
375
398
  defaultValue: {
376
399
  detail: "assign({}, this._shapeConfig, {labelBounds: (d) => this._buttonBehaviorCurrent === buttons ? {x: d.labelBounds.x, y: -this._buttonHeight / 2 + 1, width: d.labelBounds.width, height: this._buttonHeight} : d.labelBounds, labelConfig: {fontColor: colorDefaults.dark, fontSize: () => 12, verticalAlign: () => this._buttonBehaviorCurrent === buttons ? middle : top}, fill: () => this._buttonBehaviorCurrent === buttons ? #fff : colorMid, stroke: () => this._buttonBehaviorCurrent === buttons ? colorMid : transparent, height: (d) => this._buttonBehaviorCurrent === buttons ? this._buttonHeight : d.tick ? this._handleSize : 0, width: (d) => this._buttonBehaviorCurrent === buttons ? this._ticksWidth / this._availableTicks.length : d.tick ? this._domain.map(Number).includes(d.id) ? 2 : 1 : 0, y: (d) => this._buttonBehaviorCurrent === buttons ? this._align === middle ? this._height / 2 : this._align === start ? this._margin.top + this._buttonHeight / 2 : this._height - this._buttonHeight / 2 - this._margin.bottom : d.y, rx: (d) => this._buttonBehaviorCurrent === buttons ? 0 : this._domain.map(Number).includes(d.id) ? 1 : 0, ry: (d) => this._buttonBehaviorCurrent === buttons ? 0 : this._domain.map(Number).includes(d.id) ? 1 : 0})",
@@ -387,6 +410,7 @@ export const argTypes = assign(
387
410
  type: "boolean"
388
411
  },
389
412
  defaultValue: true,
413
+ description: "If *value* is specified, toggles the snapping value and returns the current class instance. If *value* is not specified, returns the current snapping value.",
390
414
  table: {
391
415
  defaultValue: {
392
416
  summary: true