@d3plus/docs 3.0.5 → 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 +54 -21
  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
@@ -9,9 +9,10 @@ export const Image = ({ config }) => <D3plusImage config={config} />;
9
9
  export const argTypes = {
10
10
  data: {
11
11
  control: {
12
- type: "array"
12
+ type: "object"
13
13
  },
14
14
  defaultValue: "[]",
15
+ 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. An <image> tag will be drawn for each object in the array.",
15
16
  table: {
16
17
  defaultValue: {
17
18
  summary: "[]"
@@ -27,6 +28,7 @@ export const argTypes = {
27
28
  type: "number"
28
29
  },
29
30
  defaultValue: 600,
31
+ description: "If *ms* is specified, sets the animation duration to the specified number and returns the current class instance. If *ms* is not specified, returns the current animation duration.",
30
32
  table: {
31
33
  defaultValue: {
32
34
  summary: 600
@@ -41,6 +43,7 @@ export const argTypes = {
41
43
  control: {
42
44
  type: "number"
43
45
  },
46
+ description: "If *value* is specified, sets the height accessor to the specified function or number and returns the current class instance.",
44
47
  table: {
45
48
  defaultValue: {
46
49
  summary: "undefined"
@@ -53,6 +56,7 @@ export const argTypes = {
53
56
  },
54
57
  id: {
55
58
  control: {},
59
+ description: "If *value* is specified, sets the id accessor to the specified function and returns the current class instance.",
56
60
  table: {
57
61
  defaultValue: {
58
62
  summary: "undefined"
@@ -68,6 +72,7 @@ export const argTypes = {
68
72
  type: "number"
69
73
  },
70
74
  defaultValue: 1,
75
+ description: "Sets the opacity of the image.",
71
76
  table: {
72
77
  defaultValue: {
73
78
  summary: 1
@@ -83,6 +88,7 @@ export const argTypes = {
83
88
  type: "text"
84
89
  },
85
90
  defaultValue: "\"auto\"",
91
+ description: "If *value* is specified, sets the pointer-events accessor to the specified function or string and returns the current class instance.",
86
92
  table: {
87
93
  defaultValue: {
88
94
  summary: "\"auto\""
@@ -95,6 +101,7 @@ export const argTypes = {
95
101
  },
96
102
  render: {
97
103
  control: {},
104
+ description: "Renders the current Image to the page. If a *callback* is specified, it will be called once the images are done drawing.",
98
105
  table: {
99
106
  defaultValue: {
100
107
  summary: "undefined"
@@ -110,6 +117,7 @@ export const argTypes = {
110
117
  type: "text"
111
118
  },
112
119
  defaultValue: "d3.select(\"body\").append(\"svg\")",
120
+ 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.",
113
121
  table: {
114
122
  defaultValue: {
115
123
  summary: "d3.select(\"body\").append(\"svg\")"
@@ -122,6 +130,7 @@ export const argTypes = {
122
130
  },
123
131
  url: {
124
132
  control: {},
133
+ description: "If *value* is specified, sets the URL accessor to the specified function and returns the current class instance.",
125
134
  table: {
126
135
  defaultValue: {
127
136
  summary: "undefined"
@@ -136,6 +145,7 @@ export const argTypes = {
136
145
  control: {
137
146
  type: "number"
138
147
  },
148
+ description: "If *value* is specified, sets the width accessor to the specified function or number and returns the current class instance.",
139
149
  table: {
140
150
  defaultValue: {
141
151
  summary: "undefined"
@@ -150,6 +160,7 @@ export const argTypes = {
150
160
  control: {
151
161
  type: "number"
152
162
  },
163
+ description: "If *value* is specified, sets the x accessor to the specified function or number and returns the current class instance.",
153
164
  table: {
154
165
  defaultValue: {
155
166
  summary: "undefined"
@@ -164,6 +175,7 @@ export const argTypes = {
164
175
  control: {
165
176
  type: "number"
166
177
  },
178
+ description: "If *value* is specified, sets the y accessor to the specified function or number and returns the current class instance.",
167
179
  table: {
168
180
  defaultValue: {
169
181
  summary: "undefined"
@@ -27,6 +27,7 @@ export const argTypes = assign(
27
27
  type: "text"
28
28
  },
29
29
  defaultValue: "linear",
30
+ description: "If *value* is specified, sets the area curve to the specified string and returns the current class instance. If *value* is not specified, returns the current area curve.",
30
31
  table: {
31
32
  defaultValue: {
32
33
  summary: "linear"
@@ -40,6 +41,7 @@ export const argTypes = assign(
40
41
  defined: {
41
42
  control: {},
42
43
  defaultValue: "(d) => d",
44
+ description: "If *value* is specified, sets the defined accessor to the specified function and returns the current class instance. If *value* is not specified, returns the current defined accessor.",
43
45
  table: {
44
46
  defaultValue: {
45
47
  detail: "(d) => d",
@@ -56,6 +58,7 @@ export const argTypes = assign(
56
58
  type: "text"
57
59
  },
58
60
  defaultValue: "none",
61
+ description: "If *value* is specified, sets the fill accessor to the specified function or string and returns the current class instance.",
59
62
  table: {
60
63
  defaultValue: {
61
64
  summary: "none"
@@ -69,7 +72,7 @@ export const argTypes = assign(
69
72
  hitArea: {
70
73
  control: {},
71
74
  defaultValue: "{d: (d) => this._path(d.values), fill: none, stroke-width: 10, transform: null}",
72
- 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`.",
75
+ description: "If *bounds* is specified, sets the mouse hit area to the specified function and returns the current class instance. If *bounds* is not specified, returns the current mouse hit area accessor.",
73
76
  table: {
74
77
  defaultValue: {
75
78
  detail: "{d: (d) => this._path(d.values), fill: none, stroke-width: 10, transform: null}",
@@ -83,6 +86,7 @@ export const argTypes = assign(
83
86
  },
84
87
  render: {
85
88
  control: {},
89
+ description: "Draws the lines.",
86
90
  table: {
87
91
  defaultValue: {
88
92
  summary: "undefined"
@@ -98,6 +102,7 @@ export const argTypes = assign(
98
102
  type: "text"
99
103
  },
100
104
  defaultValue: "black",
105
+ description: "If *value* is specified, sets the stroke accessor to the specified function or string and returns the current class instance.",
101
106
  table: {
102
107
  defaultValue: {
103
108
  summary: "black"
@@ -113,6 +118,7 @@ export const argTypes = assign(
113
118
  type: "number"
114
119
  },
115
120
  defaultValue: 1,
121
+ description: "If *value* is specified, sets the stroke-width accessor to the specified function or string and returns the current class instance.",
116
122
  table: {
117
123
  defaultValue: {
118
124
  summary: 1
@@ -27,6 +27,7 @@ export const argTypes = assign(
27
27
  type: "text"
28
28
  },
29
29
  defaultValue: "d => d[\"path\"]",
30
+ description: "If *value* is specified, sets the \"d\" attribute accessor to the specified function or number and returns the current class instance.",
30
31
  table: {
31
32
  defaultValue: {
32
33
  detail: "d => d[\"path\"]",
@@ -41,7 +42,7 @@ export const argTypes = assign(
41
42
  labelBounds: {
42
43
  control: {},
43
44
  defaultValue: "(d, i, aes) => {\n const r = largestRect(aes.points, {\n angle: this._labelConfig.rotate ? this._labelConfig.rotate(d, i) : 0\n });\n return r ? {\n angle: r.angle,\n width: r.width,\n height: r.height,\n x: r.cx - r.width / 2,\n y: r.cy - r.height / 2\n } : false;\n}",
44
- 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.",
45
+ description: "If *bounds* is specified, sets the label bounds to the specified function and returns the current class instance. If *bounds* is not specified, returns the current inner bounds accessor.",
45
46
  table: {
46
47
  defaultValue: {
47
48
  detail: "(d, i, aes) => {\n const r = largestRect(aes.points, {\n angle: this._labelConfig.rotate ? this._labelConfig.rotate(d, i) : 0\n });\n return r ? {\n angle: r.angle,\n width: r.width,\n height: r.height,\n x: r.cx - r.width / 2,\n y: r.cy - r.height / 2\n } : false;\n}",
@@ -58,6 +59,7 @@ export const argTypes = assign(
58
59
  type: "object"
59
60
  },
60
61
  defaultValue: "Object.assign(this._labelConfig, {textAnchor: middle, verticalAlign: middle})",
62
+ description: "A pass-through to the config method of the TextBox class used to create a shape's labels.",
61
63
  table: {
62
64
  defaultValue: {
63
65
  summary: "Object.assign(this._labelConfig, {textAnchor: middle, verticalAlign: middle})"
@@ -70,6 +72,7 @@ export const argTypes = assign(
70
72
  },
71
73
  render: {
72
74
  control: {},
75
+ description: "Draws the paths.",
73
76
  table: {
74
77
  defaultValue: {
75
78
  summary: "undefined"
@@ -27,6 +27,7 @@ export const argTypes = assign(
27
27
  type: "number"
28
28
  },
29
29
  defaultValue: "d => d[\"height\"]",
30
+ description: "If *value* is specified, sets the height accessor to the specified function or number and returns the current class instance.",
30
31
  table: {
31
32
  defaultValue: {
32
33
  detail: "d => d[\"height\"]",
@@ -41,7 +42,7 @@ export const argTypes = assign(
41
42
  labelBounds: {
42
43
  control: {},
43
44
  defaultValue: "(d, i, s) => ({width: s.width, height: s.height, x: -s.width / 2, y: -s.height / 2})",
44
- 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.",
45
+ description: "If *bounds* is specified, sets the label bounds to the specified function and returns the current class instance. If *bounds* is not specified, returns the current inner bounds accessor.",
45
46
  table: {
46
47
  defaultValue: {
47
48
  detail: "(d, i, s) => ({width: s.width, height: s.height, x: -s.width / 2, y: -s.height / 2})",
@@ -55,6 +56,7 @@ export const argTypes = assign(
55
56
  },
56
57
  render: {
57
58
  control: {},
59
+ description: "Draws the rectangles.",
58
60
  table: {
59
61
  defaultValue: {
60
62
  summary: "undefined"
@@ -70,6 +72,7 @@ export const argTypes = assign(
70
72
  type: "number"
71
73
  },
72
74
  defaultValue: "d => d[\"width\"]",
75
+ description: "If *value* is specified, sets the width accessor to the specified function or number and returns the current class instance.",
73
76
  table: {
74
77
  defaultValue: {
75
78
  detail: "d => d[\"width\"]",
@@ -24,6 +24,7 @@ export const argTypes = assign(
24
24
  {
25
25
  active: {
26
26
  control: {},
27
+ description: "If *value* is specified, sets the highlight accessor to the specified function and returns the current class instance.",
27
28
  table: {
28
29
  defaultValue: {
29
30
  summary: "undefined"
@@ -39,7 +40,7 @@ export const argTypes = assign(
39
40
  type: "number"
40
41
  },
41
42
  defaultValue: 0.25,
42
- description: "= 0.25",
43
+ description: "When shapes are active, this is the opacity of any shape that is not active.",
43
44
  table: {
44
45
  defaultValue: {
45
46
  summary: 0.25
@@ -55,6 +56,7 @@ export const argTypes = assign(
55
56
  type: "object"
56
57
  },
57
58
  defaultValue: "{stroke: (d, i) => {\n let c = this._fill(d, i);\n if ([\n \"transparent\",\n \"none\"\n ].includes(c)) c = this._stroke(d, i);\n return color(c).darker(1);\n}, stroke-width: (d, i) => {\n const s = this._strokeWidth(d, i) || 1;\n return s * 3;\n}}",
59
+ description: "The style to apply to active shapes.",
58
60
  table: {
59
61
  defaultValue: {
60
62
  detail: "{stroke: (d, i) => {\n let c = this._fill(d, i);\n if ([\n \"transparent\",\n \"none\"\n ].includes(c)) c = this._stroke(d, i);\n return color(c).darker(1);\n}, stroke-width: (d, i) => {\n const s = this._strokeWidth(d, i) || 1;\n return s * 3;\n}}",
@@ -71,6 +73,7 @@ export const argTypes = assign(
71
73
  type: "text"
72
74
  },
73
75
  defaultValue: "",
76
+ description: "If *value* is specified, sets the aria-label attribute to the specified function or string and returns the current class instance.",
74
77
  table: {
75
78
  defaultValue: {
76
79
  summary: ""
@@ -86,6 +89,7 @@ export const argTypes = assign(
86
89
  type: "text"
87
90
  },
88
91
  defaultValue: false,
92
+ description: "If *value* is specified, sets the background-image accessor to the specified function or string and returns the current class instance.",
89
93
  table: {
90
94
  defaultValue: {
91
95
  summary: false
@@ -98,12 +102,13 @@ export const argTypes = assign(
98
102
  },
99
103
  data: {
100
104
  control: {
101
- type: "array"
105
+ type: "object"
102
106
  },
103
- defaultValue: "[\n\n]",
107
+ defaultValue: "[ ]",
108
+ 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 will be drawn for each object in the array.",
104
109
  table: {
105
110
  defaultValue: {
106
- summary: "[\n\n]"
111
+ summary: "[ ]"
107
112
  }
108
113
  },
109
114
  type: {
@@ -115,6 +120,7 @@ export const argTypes = assign(
115
120
  control: {
116
121
  type: "text"
117
122
  },
123
+ description: "Determines if either the X or Y position is discrete along a Line, which helps in determining the nearest data point on a line for a hit area event.",
118
124
  table: {
119
125
  defaultValue: {
120
126
  summary: "undefined"
@@ -130,6 +136,7 @@ export const argTypes = assign(
130
136
  type: "number"
131
137
  },
132
138
  defaultValue: 600,
139
+ description: "If *ms* is specified, sets the animation duration to the specified number and returns the current class instance. If *ms* is not specified, returns the current animation duration.",
133
140
  table: {
134
141
  defaultValue: {
135
142
  summary: 600
@@ -145,6 +152,7 @@ export const argTypes = assign(
145
152
  type: "text"
146
153
  },
147
154
  defaultValue: "black",
155
+ description: "If *value* is specified, sets the fill accessor to the specified function or string and returns the current class instance.",
148
156
  table: {
149
157
  defaultValue: {
150
158
  summary: "black"
@@ -160,6 +168,7 @@ export const argTypes = assign(
160
168
  type: "number"
161
169
  },
162
170
  defaultValue: 1,
171
+ description: "Defines the \"fill-opacity\" attribute for the shapes.",
163
172
  table: {
164
173
  defaultValue: {
165
174
  summary: 1
@@ -172,7 +181,7 @@ export const argTypes = assign(
172
181
  },
173
182
  hitArea: {
174
183
  control: {},
175
- 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`.",
184
+ description: "If *bounds* is specified, sets the mouse hit area to the specified function and returns the current class instance. If *bounds* is not specified, returns the current mouse hit area accessor.",
176
185
  table: {
177
186
  defaultValue: {
178
187
  summary: "undefined"
@@ -185,6 +194,7 @@ export const argTypes = assign(
185
194
  },
186
195
  hover: {
187
196
  control: {},
197
+ description: "If *value* is specified, sets the highlight accessor to the specified function and returns the current class instance.",
188
198
  table: {
189
199
  defaultValue: {
190
200
  summary: "undefined"
@@ -200,6 +210,7 @@ export const argTypes = assign(
200
210
  type: "number"
201
211
  },
202
212
  defaultValue: 0.5,
213
+ description: "If *value* is specified, sets the hover opacity to the specified function and returns the current class instance.",
203
214
  table: {
204
215
  defaultValue: {
205
216
  summary: 0.5
@@ -215,6 +226,7 @@ export const argTypes = assign(
215
226
  type: "object"
216
227
  },
217
228
  defaultValue: "{stroke: (d, i) => {\n let c = this._fill(d, i);\n if ([\n \"transparent\",\n \"none\"\n ].includes(c)) c = this._stroke(d, i);\n return color(c).darker(0.5);\n}, stroke-width: (d, i) => {\n const s = this._strokeWidth(d, i) || 1;\n return s * 2;\n}}",
229
+ description: "The style to apply to hovered shapes.",
218
230
  table: {
219
231
  defaultValue: {
220
232
  detail: "{stroke: (d, i) => {\n let c = this._fill(d, i);\n if ([\n \"transparent\",\n \"none\"\n ].includes(c)) c = this._stroke(d, i);\n return color(c).darker(0.5);\n}, stroke-width: (d, i) => {\n const s = this._strokeWidth(d, i) || 1;\n return s * 2;\n}}",
@@ -229,6 +241,7 @@ export const argTypes = assign(
229
241
  id: {
230
242
  control: {},
231
243
  defaultValue: "(d, i) => d.id !== void0 ? d.id : i",
244
+ description: "If *value* is specified, sets the id accessor to the specified function and returns the current class instance.",
232
245
  table: {
233
246
  defaultValue: {
234
247
  detail: "(d, i) => d.id !== void0 ? d.id : i",
@@ -242,9 +255,10 @@ export const argTypes = assign(
242
255
  },
243
256
  label: {
244
257
  control: {
245
- type: "text"
258
+ type: "object"
246
259
  },
247
260
  defaultValue: false,
261
+ description: "If *value* is specified, sets the label accessor to the specified function or string and returns the current class instance.",
248
262
  table: {
249
263
  defaultValue: {
250
264
  summary: false
@@ -257,7 +271,7 @@ export const argTypes = assign(
257
271
  },
258
272
  labelBounds: {
259
273
  control: {},
260
- 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.",
274
+ description: "If *bounds* is specified, sets the label bounds to the specified function and returns the current class instance. If *bounds* is not specified, returns the current inner bounds accessor.",
261
275
  table: {
262
276
  defaultValue: {
263
277
  summary: "undefined"
@@ -273,6 +287,7 @@ export const argTypes = assign(
273
287
  type: "object"
274
288
  },
275
289
  defaultValue: "{fontColor: (d, i) => colorContrast(this._fill(d, i)), fontSize: 12, padding: 5}",
290
+ description: "A pass-through to the config method of the TextBox class used to create a shape's labels.",
276
291
  table: {
277
292
  defaultValue: {
278
293
  detail: "{fontColor: (d, i) => colorContrast(this._fill(d, i)), fontSize: 12, padding: 5}",
@@ -289,6 +304,7 @@ export const argTypes = assign(
289
304
  type: "number"
290
305
  },
291
306
  defaultValue: 1,
307
+ description: "If *value* is specified, sets the opacity accessor to the specified function or number and returns the current class instance.",
292
308
  table: {
293
309
  defaultValue: {
294
310
  summary: 1
@@ -304,6 +320,7 @@ export const argTypes = assign(
304
320
  type: "text"
305
321
  },
306
322
  defaultValue: "visiblePainted",
323
+ description: "If *value* is specified, sets the pointerEvents accessor to the specified function or string and returns the current class instance.",
307
324
  table: {
308
325
  defaultValue: {
309
326
  summary: "visiblePainted"
@@ -316,6 +333,7 @@ export const argTypes = assign(
316
333
  },
317
334
  render: {
318
335
  control: {},
336
+ description: "Renders the current Shape to the page. If a *callback* is specified, it will be called once the shapes are done drawing.",
319
337
  table: {
320
338
  defaultValue: {
321
339
  summary: "undefined"
@@ -331,6 +349,7 @@ export const argTypes = assign(
331
349
  type: "text"
332
350
  },
333
351
  defaultValue: "presentation",
352
+ description: "If *value* is specified, sets the role attribute to the specified function or string and returns the current class instance.",
334
353
  table: {
335
354
  defaultValue: {
336
355
  summary: "presentation"
@@ -346,6 +365,7 @@ export const argTypes = assign(
346
365
  type: "number"
347
366
  },
348
367
  defaultValue: 0,
368
+ description: "If *value* is specified, sets the rotate accessor to the specified function or number and returns the current class instance.",
349
369
  table: {
350
370
  defaultValue: {
351
371
  summary: 0
@@ -361,6 +381,7 @@ export const argTypes = assign(
361
381
  type: "number"
362
382
  },
363
383
  defaultValue: 0,
384
+ description: "Defines the \"rx\" attribute for the shapes.",
364
385
  table: {
365
386
  defaultValue: {
366
387
  summary: 0
@@ -376,6 +397,7 @@ export const argTypes = assign(
376
397
  type: "number"
377
398
  },
378
399
  defaultValue: 0,
400
+ description: "Defines the \"rx\" attribute for the shapes.",
379
401
  table: {
380
402
  defaultValue: {
381
403
  summary: 0
@@ -391,6 +413,7 @@ export const argTypes = assign(
391
413
  type: "number"
392
414
  },
393
415
  defaultValue: 1,
416
+ description: "If *value* is specified, sets the scale accessor to the specified function or string and returns the current class instance.",
394
417
  table: {
395
418
  defaultValue: {
396
419
  summary: 1
@@ -406,6 +429,7 @@ export const argTypes = assign(
406
429
  type: "text"
407
430
  },
408
431
  defaultValue: "d3.select(\"body\").append(\"svg\")",
432
+ 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.",
409
433
  table: {
410
434
  defaultValue: {
411
435
  summary: "d3.select(\"body\").append(\"svg\")"
@@ -421,6 +445,7 @@ export const argTypes = assign(
421
445
  type: "text"
422
446
  },
423
447
  defaultValue: "geometricPrecision",
448
+ description: "If *value* is specified, sets the shape-rendering accessor to the specified function or string and returns the current class instance.",
424
449
  table: {
425
450
  defaultValue: {
426
451
  summary: "geometricPrecision"
@@ -432,10 +457,9 @@ export const argTypes = assign(
432
457
  }
433
458
  },
434
459
  sort: {
435
- control: {
436
- type: "false"
437
- },
460
+ control: {},
438
461
  defaultValue: "[]",
462
+ description: "If *value* is specified, sets the sort comparator to the specified function and returns the current class instance.",
439
463
  table: {
440
464
  defaultValue: {
441
465
  summary: "[]"
@@ -451,6 +475,7 @@ export const argTypes = assign(
451
475
  type: "text"
452
476
  },
453
477
  defaultValue: "(d, i) => color(this._fill(d, i)).darker(1).formatHex()",
478
+ description: "If *value* is specified, sets the stroke accessor to the specified function or string and returns the current class instance.",
454
479
  table: {
455
480
  defaultValue: {
456
481
  detail: "(d, i) => color(this._fill(d, i)).darker(1).formatHex()",
@@ -467,6 +492,7 @@ export const argTypes = assign(
467
492
  type: "text"
468
493
  },
469
494
  defaultValue: "0",
495
+ description: "Defines the \"stroke-dasharray\" attribute for the shapes.",
470
496
  table: {
471
497
  defaultValue: {
472
498
  summary: "0"
@@ -482,6 +508,7 @@ export const argTypes = assign(
482
508
  type: "text"
483
509
  },
484
510
  defaultValue: "butt",
511
+ description: "Defines the \"stroke-linecap\" attribute for the shapes. Accepted values are `\"butt\"`, `\"round\"`, and `\"square\"`.",
485
512
  table: {
486
513
  defaultValue: {
487
514
  summary: "butt"
@@ -497,6 +524,7 @@ export const argTypes = assign(
497
524
  type: "number"
498
525
  },
499
526
  defaultValue: 1,
527
+ description: "Defines the \"stroke-opacity\" attribute for the shapes.",
500
528
  table: {
501
529
  defaultValue: {
502
530
  summary: 1
@@ -512,6 +540,7 @@ export const argTypes = assign(
512
540
  type: "number"
513
541
  },
514
542
  defaultValue: 0,
543
+ description: "If *value* is specified, sets the stroke-width accessor to the specified function or string and returns the current class instance.",
515
544
  table: {
516
545
  defaultValue: {
517
546
  summary: 0
@@ -524,9 +553,10 @@ export const argTypes = assign(
524
553
  },
525
554
  textAnchor: {
526
555
  control: {
527
- type: "text"
556
+ type: "object"
528
557
  },
529
558
  defaultValue: "start",
559
+ description: "If *value* is specified, sets the text-anchor accessor to the specified function or string and returns the current class instance.",
530
560
  table: {
531
561
  defaultValue: {
532
562
  summary: "start"
@@ -539,9 +569,10 @@ export const argTypes = assign(
539
569
  },
540
570
  texture: {
541
571
  control: {
542
- type: "text"
572
+ type: "object"
543
573
  },
544
574
  defaultValue: false,
575
+ description: "Defines the texture used inside of each shape. This uses the [textures.js](https://riccardoscalco.it/textures/) package, and expects either a simple string (`\"lines\"` or `\"circles\"`) or a more complex Object containing the various properties of the texture (ie. `{texture: \"lines\", orientation: \"3/8\", stroke: \"darkorange\"}`). If multiple textures are necessary, provide an accsesor Function that returns the correct String/Object for each given data point and index.",
545
576
  table: {
546
577
  defaultValue: {
547
578
  summary: false
@@ -557,6 +588,7 @@ export const argTypes = assign(
557
588
  type: "object"
558
589
  },
559
590
  defaultValue: "{}",
591
+ description: "A series of global texture methods to be used for all textures (ie. `{stroke: \"darkorange\", strokeWidth: 2}`).",
560
592
  table: {
561
593
  defaultValue: {
562
594
  summary: "{}"
@@ -572,6 +604,7 @@ export const argTypes = assign(
572
604
  type: "text"
573
605
  },
574
606
  defaultValue: "non-scaling-stroke",
607
+ description: "If *value* is specified, sets the vector-effect accessor to the specified function or string and returns the current class instance.",
575
608
  table: {
576
609
  defaultValue: {
577
610
  summary: "non-scaling-stroke"
@@ -584,9 +617,10 @@ export const argTypes = assign(
584
617
  },
585
618
  verticalAlign: {
586
619
  control: {
587
- type: "text"
620
+ type: "object"
588
621
  },
589
622
  defaultValue: "top",
623
+ description: "If *value* is specified, sets the vertical alignment accessor to the specified function or string and returns the current class instance.",
590
624
  table: {
591
625
  defaultValue: {
592
626
  summary: "top"
@@ -602,6 +636,7 @@ export const argTypes = assign(
602
636
  type: "number"
603
637
  },
604
638
  defaultValue: "d => d[\"x\"]",
639
+ description: "If *value* is specified, sets the x accessor to the specified function or number and returns the current class instance.",
605
640
  table: {
606
641
  defaultValue: {
607
642
  detail: "d => d[\"x\"]",
@@ -618,6 +653,7 @@ export const argTypes = assign(
618
653
  type: "number"
619
654
  },
620
655
  defaultValue: "d => d[\"y\"]",
656
+ description: "If *value* is specified, sets the y accessor to the specified function or number and returns the current class instance.",
621
657
  table: {
622
658
  defaultValue: {
623
659
  detail: "d => d[\"y\"]",
@@ -24,6 +24,7 @@ export const argTypes = assign(
24
24
  {
25
25
  active: {
26
26
  control: {},
27
+ description: "Sets the highlight accessor to the Shape class's active function.",
27
28
  table: {
28
29
  defaultValue: {
29
30
  summary: "undefined"
@@ -36,9 +37,10 @@ export const argTypes = assign(
36
37
  },
37
38
  data: {
38
39
  control: {
39
- type: "array"
40
+ type: "object"
40
41
  },
41
42
  defaultValue: "[]",
43
+ 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.",
42
44
  table: {
43
45
  defaultValue: {
44
46
  summary: "[]"
@@ -54,6 +56,7 @@ export const argTypes = assign(
54
56
  type: "text"
55
57
  },
56
58
  defaultValue: "d => d[\"endpoint\"] || Rect",
59
+ description: "If *value* is specified, sets the endpoint accessor to the specified function or string and returns the current class instance.",
57
60
  table: {
58
61
  defaultValue: {
59
62
  detail: "d => d[\"endpoint\"] || Rect",
@@ -70,6 +73,7 @@ export const argTypes = assign(
70
73
  type: "object"
71
74
  },
72
75
  defaultValue: "{Circle: {r: d => d[\"r\"] || 5}}",
76
+ description: "If *value* is specified, sets the config method for each endpoint and returns the current class instance.",
73
77
  table: {
74
78
  defaultValue: {
75
79
  detail: "{Circle: {r: d => d[\"r\"] || 5}}",
@@ -83,6 +87,7 @@ export const argTypes = assign(
83
87
  },
84
88
  hover: {
85
89
  control: {},
90
+ description: "Sets the highlight accessor to the Shape class's hover function.",
86
91
  table: {
87
92
  defaultValue: {
88
93
  summary: "undefined"
@@ -98,6 +103,7 @@ export const argTypes = assign(
98
103
  type: "number"
99
104
  },
100
105
  defaultValue: "d => d[\"length\"] || 25",
106
+ description: "If *value* is specified, sets the length accessor for whisker and returns the current class instance.",
101
107
  table: {
102
108
  defaultValue: {
103
109
  detail: "d => d[\"length\"] || 25",
@@ -114,6 +120,7 @@ export const argTypes = assign(
114
120
  type: "object"
115
121
  },
116
122
  defaultValue: "{}",
123
+ description: "If *value* is specified, sets the config method for line shape and returns the current class instance.",
117
124
  table: {
118
125
  defaultValue: {
119
126
  summary: "{}"
@@ -129,7 +136,7 @@ export const argTypes = assign(
129
136
  type: "text"
130
137
  },
131
138
  defaultValue: "d => d[\"orient\"] || top",
132
- description: "Accepts \"top\", \"right\", \"bottom\" or \"left\"",
139
+ description: "If *value* is specified, sets the orientation to the specified value. If *value* is not specified, returns the current orientation.",
133
140
  table: {
134
141
  defaultValue: {
135
142
  detail: "d => d[\"orient\"] || top",
@@ -143,6 +150,7 @@ export const argTypes = assign(
143
150
  },
144
151
  render: {
145
152
  control: {},
153
+ description: "Draws the whisker.",
146
154
  table: {
147
155
  defaultValue: {
148
156
  summary: "undefined"
@@ -158,6 +166,7 @@ export const argTypes = assign(
158
166
  type: "text"
159
167
  },
160
168
  defaultValue: "d3.select(\"body\").append(\"svg\")",
169
+ 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.",
161
170
  table: {
162
171
  defaultValue: {
163
172
  summary: "d3.select(\"body\").append(\"svg\")"
@@ -173,6 +182,7 @@ export const argTypes = assign(
173
182
  type: "number"
174
183
  },
175
184
  defaultValue: "d => d[\"x\"]",
185
+ description: "If *value* is specified, sets the x axis to the specified function or number and returns the current class instance.",
176
186
  table: {
177
187
  defaultValue: {
178
188
  detail: "d => d[\"x\"]",
@@ -189,6 +199,7 @@ export const argTypes = assign(
189
199
  type: "number"
190
200
  },
191
201
  defaultValue: "d => d[\"y\"]",
202
+ description: "If *value* is specified, sets the y axis to the specified function or number and returns the current class instance.",
192
203
  table: {
193
204
  defaultValue: {
194
205
  detail: "d => d[\"y\"]",