@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.
- package/.storybook/preview-head.html +5 -0
- package/args/core/charts/AreaPlot.args.jsx +4 -1
- package/args/core/charts/BarChart.args.jsx +5 -1
- package/args/core/charts/BoxWhisker.args.jsx +4 -1
- package/args/core/charts/BumpChart.args.jsx +8 -1
- package/args/core/charts/Donut.args.jsx +4 -2
- package/args/core/charts/Geomap.args.jsx +29 -13
- package/args/core/charts/LinePlot.args.jsx +3 -1
- package/args/core/charts/Matrix.args.jsx +13 -2
- package/args/core/charts/Network.args.jsx +29 -16
- package/args/core/charts/Pack.args.jsx +11 -2
- package/args/core/charts/Pie.args.jsx +8 -1
- package/args/core/charts/Plot.args.jsx +56 -23
- package/args/core/charts/Priestley.args.jsx +6 -0
- package/args/core/charts/Radar.args.jsx +7 -1
- package/args/core/charts/RadialMatrix.args.jsx +15 -4
- package/args/core/charts/Rings.args.jsx +21 -10
- package/args/core/charts/Sankey.args.jsx +17 -5
- package/args/core/charts/Tree.args.jsx +46 -6
- package/args/core/charts/Treemap.args.jsx +15 -5
- package/args/core/charts/Viz.args.jsx +102 -24
- package/args/core/components/Axis.args.jsx +49 -12
- package/args/core/components/AxisBottom.args.jsx +1 -1
- package/args/core/components/AxisLeft.args.jsx +1 -1
- package/args/core/components/AxisRight.args.jsx +1 -1
- package/args/core/components/AxisTop.args.jsx +1 -1
- package/args/core/components/ColorScale.args.jsx +37 -10
- package/args/core/components/Legend.args.jsx +21 -5
- package/args/core/components/TextBox.args.jsx +40 -7
- package/args/core/components/Timeline.args.jsx +29 -5
- package/args/core/components/Tooltip.args.jsx +40 -12
- package/args/core/shapes/Area.args.jsx +11 -1
- package/args/core/shapes/Bar.args.jsx +10 -1
- package/args/core/shapes/Box.args.jsx +19 -5
- package/args/core/shapes/Circle.args.jsx +4 -1
- package/args/core/shapes/Image.args.jsx +13 -1
- package/args/core/shapes/Line.args.jsx +7 -1
- package/args/core/shapes/Path.args.jsx +4 -1
- package/args/core/shapes/Rect.args.jsx +4 -1
- package/args/core/shapes/Shape.args.jsx +49 -13
- package/args/core/shapes/Whisker.args.jsx +13 -2
- package/args/core/utils/BaseClass.args.jsx +4 -0
- package/args/core/utils/accessor.args.jsx +1 -3
- package/args/core/utils/constant.args.jsx +1 -1
- package/args/data/dataConcat.args.jsx +1 -1
- package/args/data/dataLoad.args.jsx +1 -1
- package/args/data/isData.args.jsx +1 -3
- package/args/data/merge.args.jsx +1 -1
- package/args/data/unique.args.jsx +1 -1
- package/args/dom/attrize.args.jsx +1 -3
- package/args/dom/elem.args.jsx +1 -3
- package/args/dom/fontExists.args.jsx +1 -1
- package/args/dom/isObject.args.jsx +1 -3
- package/args/dom/parseSides.args.jsx +1 -1
- package/args/dom/stylize.args.jsx +1 -3
- package/args/dom/textWidth.args.jsx +1 -1
- package/args/export/saveElement.args.jsx +1 -3
- package/args/format/formatDate.args.jsx +2 -4
- package/args/math/closest.args.jsx +1 -1
- package/args/math/largestRect.args.jsx +1 -1
- package/args/math/lineIntersection.args.jsx +4 -4
- package/args/math/pointDistance.args.jsx +2 -2
- package/args/math/pointDistanceSquared.args.jsx +2 -2
- package/args/math/pointRotate.args.jsx +2 -2
- package/args/math/polygonInside.args.jsx +2 -2
- package/args/math/polygonRayCast.args.jsx +2 -2
- package/args/math/polygonRotate.args.jsx +2 -2
- package/args/math/segmentBoxContains.args.jsx +3 -3
- package/args/math/segmentsIntersect.args.jsx +4 -4
- package/helpers/configify.js +2 -10
- package/package.json +6 -6
- package/packages/core/charts/Tree.stories.jsx +40 -0
|
@@ -25,13 +25,13 @@ export const argTypes = assign(
|
|
|
25
25
|
{
|
|
26
26
|
annotations: {
|
|
27
27
|
control: {
|
|
28
|
-
type: "
|
|
28
|
+
type: "object"
|
|
29
29
|
},
|
|
30
|
-
defaultValue: "[
|
|
31
|
-
description: "
|
|
30
|
+
defaultValue: "[ ]",
|
|
31
|
+
description: "Allows drawing custom shapes to be used as annotations in the provided x/y plot. This method accepts custom config objects for the [Shape](http://d3plus.org/docs/#Shape) class, either a single config object or an array of config objects. Each config object requires an additional parameter, the \"shape\", which denotes which [Shape](http://d3plus.org/docs/#Shape) sub-class to use ([Rect](http://d3plus.org/docs/#Rect), [Line](http://d3plus.org/docs/#Line), etc).\n\nAdditionally, each config object can also contain an optional \"layer\" key, which defines whether the annotations will be displayed in \"front\" or in \"back\" of the primary visualization shapes. This value defaults to \"back\" if not present.",
|
|
32
32
|
table: {
|
|
33
33
|
defaultValue: {
|
|
34
|
-
summary: "[
|
|
34
|
+
summary: "[ ]"
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
type: {
|
|
@@ -44,6 +44,7 @@ export const argTypes = assign(
|
|
|
44
44
|
type: "boolean"
|
|
45
45
|
},
|
|
46
46
|
defaultValue: false,
|
|
47
|
+
description: "Determines whether the x and y axes should have their scales persist while users filter the data, the timeline being the prime example (set this to `true` to make the axes stay consistent when the timeline changes).",
|
|
47
48
|
table: {
|
|
48
49
|
defaultValue: {
|
|
49
50
|
summary: false
|
|
@@ -59,6 +60,7 @@ export const argTypes = assign(
|
|
|
59
60
|
type: "object"
|
|
60
61
|
},
|
|
61
62
|
defaultValue: "{duration: 0, fill: transparent}",
|
|
63
|
+
description: "A d3plus-shape configuration Object used for styling the background rectangle of the inner x/y plot (behind all of the shapes and gridlines).",
|
|
62
64
|
table: {
|
|
63
65
|
defaultValue: {
|
|
64
66
|
summary: "{duration: 0, fill: transparent}"
|
|
@@ -74,7 +76,7 @@ export const argTypes = assign(
|
|
|
74
76
|
type: "number"
|
|
75
77
|
},
|
|
76
78
|
defaultValue: 0,
|
|
77
|
-
description: "
|
|
79
|
+
description: "Sets the pixel space between each bar in a group of bars.",
|
|
78
80
|
table: {
|
|
79
81
|
defaultValue: {
|
|
80
82
|
summary: 0
|
|
@@ -89,6 +91,7 @@ export const argTypes = assign(
|
|
|
89
91
|
control: {
|
|
90
92
|
type: "number"
|
|
91
93
|
},
|
|
94
|
+
description: "Sets the baseline for the x/y plot. If *value* is not specified, returns the current baseline.",
|
|
92
95
|
table: {
|
|
93
96
|
defaultValue: {
|
|
94
97
|
summary: "undefined"
|
|
@@ -104,6 +107,7 @@ export const argTypes = assign(
|
|
|
104
107
|
type: "object"
|
|
105
108
|
},
|
|
106
109
|
defaultValue: "assign({}, defaultBuffers, {Bar: false, Line: false})",
|
|
110
|
+
description: "Determines whether or not to add additional padding at the ends of x or y scales. The most commone use for this is in Scatter Plots, so that the shapes do not appear directly on the axis itself. The value provided can either be `true` or `false` to toggle the behavior for all shape types, or a keyed Object for each shape type (ie. `{Bar: false, Circle: true, Line: false}`).",
|
|
107
111
|
table: {
|
|
108
112
|
defaultValue: {
|
|
109
113
|
summary: "assign({}, defaultBuffers, {Bar: false, Line: false})"
|
|
@@ -115,9 +119,8 @@ export const argTypes = assign(
|
|
|
115
119
|
}
|
|
116
120
|
},
|
|
117
121
|
confidence: {
|
|
118
|
-
control: {
|
|
119
|
-
|
|
120
|
-
},
|
|
122
|
+
control: {},
|
|
123
|
+
description: "Sets the confidence to the specified array of lower and upper bounds.",
|
|
121
124
|
table: {
|
|
122
125
|
defaultValue: {
|
|
123
126
|
summary: "undefined"
|
|
@@ -133,6 +136,7 @@ export const argTypes = assign(
|
|
|
133
136
|
type: "object"
|
|
134
137
|
},
|
|
135
138
|
defaultValue: "{fill: (d, i) => {\n const c = typeof this._shapeConfig.Line.stroke === \"function\" ? this._shapeConfig.Line.stroke(d, i) : this._shapeConfig.Line.stroke;\n return c;\n}, fillOpacity: 0.5}",
|
|
139
|
+
description: "If *value* is specified, sets the config method for each shape rendered as a confidence interval and returns the current class instance.",
|
|
136
140
|
table: {
|
|
137
141
|
defaultValue: {
|
|
138
142
|
detail: "{fill: (d, i) => {\n const c = typeof this._shapeConfig.Line.stroke === \"function\" ? this._shapeConfig.Line.stroke(d, i) : this._shapeConfig.Line.stroke;\n return c;\n}, fillOpacity: 0.5}",
|
|
@@ -149,6 +153,7 @@ export const argTypes = assign(
|
|
|
149
153
|
type: "number"
|
|
150
154
|
},
|
|
151
155
|
defaultValue: 100,
|
|
156
|
+
description: "When the width or height of the chart is less than or equal to this pixel value, the discrete axis will not be shown. This helps produce slick sparklines. Set this value to `0` to disable the behavior entirely.",
|
|
152
157
|
table: {
|
|
153
158
|
defaultValue: {
|
|
154
159
|
summary: 100
|
|
@@ -164,6 +169,7 @@ export const argTypes = assign(
|
|
|
164
169
|
type: "number"
|
|
165
170
|
},
|
|
166
171
|
defaultValue: 5,
|
|
172
|
+
description: "Sets the pixel space between groups of bars.",
|
|
167
173
|
table: {
|
|
168
174
|
defaultValue: {
|
|
169
175
|
summary: 5
|
|
@@ -179,6 +185,7 @@ export const argTypes = assign(
|
|
|
179
185
|
type: "object"
|
|
180
186
|
},
|
|
181
187
|
defaultValue: "{strokeDasharray: 1 1}",
|
|
188
|
+
description: "The d3plus-shape config used on the Line shapes created to connect lineLabels to the end of their associated Line path.",
|
|
182
189
|
table: {
|
|
183
190
|
defaultValue: {
|
|
184
191
|
summary: "{strokeDasharray: 1 1}"
|
|
@@ -194,6 +201,7 @@ export const argTypes = assign(
|
|
|
194
201
|
type: "text"
|
|
195
202
|
},
|
|
196
203
|
defaultValue: "auto",
|
|
204
|
+
description: "The behavior to be used when calculating the position and size of each shape's label(s). The value passed can either be the _String_ name of the behavior to be used for all shapes, or an accessor _Function_ that will be provided each data point and will be expected to return the behavior to be used for that data point. The availability and options for this method depend on the default logic for each Shape. As an example, the values \"outside\" or \"inside\" can be set for Bar shapes, whose \"auto\" default will calculate the best position dynamically based on the available space.",
|
|
197
205
|
table: {
|
|
198
206
|
defaultValue: {
|
|
199
207
|
summary: "auto"
|
|
@@ -209,6 +217,7 @@ export const argTypes = assign(
|
|
|
209
217
|
type: "boolean"
|
|
210
218
|
},
|
|
211
219
|
defaultValue: false,
|
|
220
|
+
description: "Draws labels on the right side of any Line shapes that are drawn on the plot.",
|
|
212
221
|
table: {
|
|
213
222
|
defaultValue: {
|
|
214
223
|
summary: false
|
|
@@ -224,6 +233,7 @@ export const argTypes = assign(
|
|
|
224
233
|
type: "object"
|
|
225
234
|
},
|
|
226
235
|
defaultValue: "{fill: (d, i) => colorAssign(this._id(d, i)), r: 3}",
|
|
236
|
+
description: "Shape config for the Circle shapes drawn by the lineMarkers method.",
|
|
227
237
|
table: {
|
|
228
238
|
defaultValue: {
|
|
229
239
|
detail: "{fill: (d, i) => colorAssign(this._id(d, i)), r: 3}",
|
|
@@ -240,6 +250,7 @@ export const argTypes = assign(
|
|
|
240
250
|
type: "boolean"
|
|
241
251
|
},
|
|
242
252
|
defaultValue: false,
|
|
253
|
+
description: "Draws circle markers on each vertex of a Line.",
|
|
243
254
|
table: {
|
|
244
255
|
defaultValue: {
|
|
245
256
|
summary: false
|
|
@@ -255,6 +266,7 @@ export const argTypes = assign(
|
|
|
255
266
|
type: "text"
|
|
256
267
|
},
|
|
257
268
|
defaultValue: "Circle",
|
|
269
|
+
description: "Changes the primary shape used to represent each data point in a visualization. Not all visualizations support changing shapes, this method can be provided the String name of a D3plus shape class (for example, \"Rect\" or \"Circle\"), or an accessor Function that returns the String class name to be used for each individual data point.",
|
|
258
270
|
table: {
|
|
259
271
|
defaultValue: {
|
|
260
272
|
summary: "Circle"
|
|
@@ -262,7 +274,7 @@ export const argTypes = assign(
|
|
|
262
274
|
},
|
|
263
275
|
type: {
|
|
264
276
|
required: false,
|
|
265
|
-
summary: "
|
|
277
|
+
summary: "string | function"
|
|
266
278
|
}
|
|
267
279
|
},
|
|
268
280
|
shapeConfig: {
|
|
@@ -270,6 +282,7 @@ export const argTypes = assign(
|
|
|
270
282
|
type: "object"
|
|
271
283
|
},
|
|
272
284
|
defaultValue: "assign(this._shapeConfig, {Area: {label: (d, i) => this._stacked ? this._drawLabel(d, i) : false, labelBounds: (d, i, aes) => {\n let r = largestRect(aes.points, {\n angle: range(-20, 20, 5)\n });\n if (!r || r.height < 20 || r.width < 50) r = largestRect(aes.points, {\n angle: range(-80, 80, 5)\n });\n if (!r) return null;\n const x = min(aes.points, (d)=>d[0]);\n const y = max(aes.points.filter((d)=>d[0] === x), (d)=>d[1]);\n return {\n angle: r.angle,\n width: r.width,\n height: r.height,\n x: r.cx - r.width / 2 - x,\n y: r.cy - r.height / 2 - y\n };\n}, labelConfig: {fontMin: 6, fontResize: true, padding: 10}}, ariaLabel: (d, i) => {\n let ariaLabelStr = \"\";\n if (d.nested) ariaLabelStr = `${this._drawLabel(d.data, d.i)}`;\n else {\n ariaLabelStr = `${this._drawLabel(d, i)}`;\n if (this._x(d, i) !== undefined) ariaLabelStr += `, x: ${this._x(d, i)}`;\n if (this._y(d, i) !== undefined) ariaLabelStr += `, y: ${this._y(d, i)}`;\n if (this._x2(d, i) !== undefined) ariaLabelStr += `, x2: ${this._x2(d, i)}`;\n if (this._y2(d, i) !== undefined) ariaLabelStr += `, y2: ${this._y2(d, i)}`;\n }\n return `${ariaLabelStr}.`;\n}, Bar: {labelBounds(, , ) {\n{\n const padding = 1;\n const width = this._discrete === \"y\" ? \"width\" : \"height\";\n const height = this._discrete === \"y\" ? \"height\" : \"width\";\n const other = this._discrete.charAt(0) === \"x\" ? \"y\" : \"x\";\n const invert = other === \"y\";\n const nonDiscrete = this._discrete.replace(this._discrete.charAt(0), other);\n const range = this[`_${nonDiscrete}Axis`]._d3Scale.range();\n const space = Math.abs(range[1] - range[0]);\n const negative = this[`_${nonDiscrete}`](d, i) < 0;\n if (outside.bind(this)(d, i)) {\n return {\n [width]: space - s[width],\n [height]: s[height],\n x: invert ? -s.width / 2 : negative ? -space : s.width + padding,\n y: invert ? negative ? s.height + padding : -space : -s.height / 2 + 1\n };\n }\n return {\n [width]: s[width],\n [height]: s[height],\n x: invert ? -s.width / 2 : negative ? this._stacked ? padding - s.width : padding - s.width : -padding,\n y: invert ? negative ? this._stacked ? padding : padding : -s.height + padding : -s.height / 2 + padding\n };\n}\n}, labelConfig: {fontMax: 16, fontMin: 6, fontResize: true, fontColor(, ) {\n{\n return outside.bind(this)(d, i) ? this._backgroundConfig.fill === \"transparent\" ? colorDefaults.dark : colorContrast(this._backgroundConfig.fill) : colorContrast(typeof this._shapeConfig.fill === \"function\" ? this._shapeConfig.fill(d, i) : this._shapeConfig.fill);\n}\n}, fontStroke(, ) {\n{\n return outside.bind(this)(d, i) ? this._backgroundConfig.fill === \"transparent\" ? colorDefaults.dark : colorContrast(this._backgroundConfig.fill) : \"transparent\";\n}\n}, fontStrokeWidth(, ) {\n{\n return outside.bind(this)(d, i) ? 0.1 : 0;\n}\n}, padding: 3, textAnchor(, ) {\n{\n const other = this._discrete.charAt(0) === \"x\" ? \"y\" : \"x\";\n const invert = other === \"y\";\n const nonDiscrete = this._discrete.replace(this._discrete.charAt(0), other);\n const negative = this[`_${nonDiscrete}`](d, i) < 0;\n const anchor = invert ? \"middle\" : outside.bind(this)(d, i) ? negative ? \"end\" : \"start\" : negative ? \"start\" : \"end\";\n return rtl() ? anchor === \"start\" ? \"end\" : anchor === \"end\" ? \"start\" : anchor : anchor;\n}\n}, verticalAlign(, ) {\n{\n const other = this._discrete.charAt(0) === \"x\" ? \"y\" : \"x\";\n const invert = other === \"y\";\n const nonDiscrete = this._discrete.replace(this._discrete.charAt(0), other);\n const negative = this[`_${nonDiscrete}`](d, i) < 0;\n return invert ? outside.bind(this)(d, i) ? negative ? \"top\" : \"bottom\" : negative ? \"bottom\" : \"top\" : \"middle\";\n}\n}}}, Circle: {r: defaultSize.bind(this)}, Line: {curve: () => this._discrete ? `monotone${this._discrete.charAt(0).toUpperCase()}` : linear, fill: none, labelConfig: {fontColor: (d, i) => {\n const c = typeof this._shapeConfig.Line.stroke === \"function\" ? this._shapeConfig.Line.stroke(d, i) : this._shapeConfig.Line.stroke;\n return colorLegible(c);\n}, fontResize: false, padding: 5, textAnchor: start, verticalAlign: middle}, strokeWidth: 2}, Rect: {height: (d) => defaultSize.bind(this)(d) * 2, width: (d) => defaultSize.bind(this)(d) * 2}})",
|
|
285
|
+
description: "If *value* is specified, sets the config method for each shape and returns the current class instance.",
|
|
273
286
|
table: {
|
|
274
287
|
defaultValue: {
|
|
275
288
|
detail: "assign(this._shapeConfig, {Area: {label: (d, i) => this._stacked ? this._drawLabel(d, i) : false, labelBounds: (d, i, aes) => {\n let r = largestRect(aes.points, {\n angle: range(-20, 20, 5)\n });\n if (!r || r.height < 20 || r.width < 50) r = largestRect(aes.points, {\n angle: range(-80, 80, 5)\n });\n if (!r) return null;\n const x = min(aes.points, (d)=>d[0]);\n const y = max(aes.points.filter((d)=>d[0] === x), (d)=>d[1]);\n return {\n angle: r.angle,\n width: r.width,\n height: r.height,\n x: r.cx - r.width / 2 - x,\n y: r.cy - r.height / 2 - y\n };\n}, labelConfig: {fontMin: 6, fontResize: true, padding: 10}}, ariaLabel: (d, i) => {\n let ariaLabelStr = \"\";\n if (d.nested) ariaLabelStr = `${this._drawLabel(d.data, d.i)}`;\n else {\n ariaLabelStr = `${this._drawLabel(d, i)}`;\n if (this._x(d, i) !== undefined) ariaLabelStr += `, x: ${this._x(d, i)}`;\n if (this._y(d, i) !== undefined) ariaLabelStr += `, y: ${this._y(d, i)}`;\n if (this._x2(d, i) !== undefined) ariaLabelStr += `, x2: ${this._x2(d, i)}`;\n if (this._y2(d, i) !== undefined) ariaLabelStr += `, y2: ${this._y2(d, i)}`;\n }\n return `${ariaLabelStr}.`;\n}, Bar: {labelBounds(, , ) {\n{\n const padding = 1;\n const width = this._discrete === \"y\" ? \"width\" : \"height\";\n const height = this._discrete === \"y\" ? \"height\" : \"width\";\n const other = this._discrete.charAt(0) === \"x\" ? \"y\" : \"x\";\n const invert = other === \"y\";\n const nonDiscrete = this._discrete.replace(this._discrete.charAt(0), other);\n const range = this[`_${nonDiscrete}Axis`]._d3Scale.range();\n const space = Math.abs(range[1] - range[0]);\n const negative = this[`_${nonDiscrete}`](d, i) < 0;\n if (outside.bind(this)(d, i)) {\n return {\n [width]: space - s[width],\n [height]: s[height],\n x: invert ? -s.width / 2 : negative ? -space : s.width + padding,\n y: invert ? negative ? s.height + padding : -space : -s.height / 2 + 1\n };\n }\n return {\n [width]: s[width],\n [height]: s[height],\n x: invert ? -s.width / 2 : negative ? this._stacked ? padding - s.width : padding - s.width : -padding,\n y: invert ? negative ? this._stacked ? padding : padding : -s.height + padding : -s.height / 2 + padding\n };\n}\n}, labelConfig: {fontMax: 16, fontMin: 6, fontResize: true, fontColor(, ) {\n{\n return outside.bind(this)(d, i) ? this._backgroundConfig.fill === \"transparent\" ? colorDefaults.dark : colorContrast(this._backgroundConfig.fill) : colorContrast(typeof this._shapeConfig.fill === \"function\" ? this._shapeConfig.fill(d, i) : this._shapeConfig.fill);\n}\n}, fontStroke(, ) {\n{\n return outside.bind(this)(d, i) ? this._backgroundConfig.fill === \"transparent\" ? colorDefaults.dark : colorContrast(this._backgroundConfig.fill) : \"transparent\";\n}\n}, fontStrokeWidth(, ) {\n{\n return outside.bind(this)(d, i) ? 0.1 : 0;\n}\n}, padding: 3, textAnchor(, ) {\n{\n const other = this._discrete.charAt(0) === \"x\" ? \"y\" : \"x\";\n const invert = other === \"y\";\n const nonDiscrete = this._discrete.replace(this._discrete.charAt(0), other);\n const negative = this[`_${nonDiscrete}`](d, i) < 0;\n const anchor = invert ? \"middle\" : outside.bind(this)(d, i) ? negative ? \"end\" : \"start\" : negative ? \"start\" : \"end\";\n return rtl() ? anchor === \"start\" ? \"end\" : anchor === \"end\" ? \"start\" : anchor : anchor;\n}\n}, verticalAlign(, ) {\n{\n const other = this._discrete.charAt(0) === \"x\" ? \"y\" : \"x\";\n const invert = other === \"y\";\n const nonDiscrete = this._discrete.replace(this._discrete.charAt(0), other);\n const negative = this[`_${nonDiscrete}`](d, i) < 0;\n return invert ? outside.bind(this)(d, i) ? negative ? \"top\" : \"bottom\" : negative ? \"bottom\" : \"top\" : \"middle\";\n}\n}}}, Circle: {r: defaultSize.bind(this)}, Line: {curve: () => this._discrete ? `monotone${this._discrete.charAt(0).toUpperCase()}` : linear, fill: none, labelConfig: {fontColor: (d, i) => {\n const c = typeof this._shapeConfig.Line.stroke === \"function\" ? this._shapeConfig.Line.stroke(d, i) : this._shapeConfig.Line.stroke;\n return colorLegible(c);\n}, fontResize: false, padding: 5, textAnchor: start, verticalAlign: middle}, strokeWidth: 2}, Rect: {height: (d) => defaultSize.bind(this)(d) * 2, width: (d) => defaultSize.bind(this)(d) * 2}})",
|
|
@@ -284,6 +297,7 @@ export const argTypes = assign(
|
|
|
284
297
|
shapeSort: {
|
|
285
298
|
control: {},
|
|
286
299
|
defaultValue: "(a, b) => this._shapeOrder.indexOf(a) - this._shapeOrder.indexOf(b)",
|
|
300
|
+
description: "A JavaScript [sort comparator function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) that receives each shape Class (ie. \"Circle\", \"Line\", etc) as it's comparator arguments. Shapes are drawn in groups based on their type, so you are defining the layering order for all shapes of said type.",
|
|
287
301
|
table: {
|
|
288
302
|
defaultValue: {
|
|
289
303
|
detail: "(a, b) => this._shapeOrder.indexOf(a) - this._shapeOrder.indexOf(b)",
|
|
@@ -299,7 +313,7 @@ export const argTypes = assign(
|
|
|
299
313
|
control: {
|
|
300
314
|
type: "number"
|
|
301
315
|
},
|
|
302
|
-
description: "
|
|
316
|
+
description: "Sets the size of bubbles to the given Number, data key, or function.",
|
|
303
317
|
table: {
|
|
304
318
|
defaultValue: {
|
|
305
319
|
summary: "undefined"
|
|
@@ -315,7 +329,7 @@ export const argTypes = assign(
|
|
|
315
329
|
type: "number"
|
|
316
330
|
},
|
|
317
331
|
defaultValue: 20,
|
|
318
|
-
description: "
|
|
332
|
+
description: "Sets the size scale maximum to the specified number.",
|
|
319
333
|
table: {
|
|
320
334
|
defaultValue: {
|
|
321
335
|
summary: 20
|
|
@@ -331,7 +345,7 @@ export const argTypes = assign(
|
|
|
331
345
|
type: "number"
|
|
332
346
|
},
|
|
333
347
|
defaultValue: 5,
|
|
334
|
-
description: "
|
|
348
|
+
description: "Sets the size scale minimum to the specified number.",
|
|
335
349
|
table: {
|
|
336
350
|
defaultValue: {
|
|
337
351
|
summary: 5
|
|
@@ -347,7 +361,7 @@ export const argTypes = assign(
|
|
|
347
361
|
type: "text"
|
|
348
362
|
},
|
|
349
363
|
defaultValue: "sqrt",
|
|
350
|
-
description: "
|
|
364
|
+
description: "Sets the size scale to the specified string.",
|
|
351
365
|
table: {
|
|
352
366
|
defaultValue: {
|
|
353
367
|
summary: "sqrt"
|
|
@@ -363,7 +377,7 @@ export const argTypes = assign(
|
|
|
363
377
|
type: "text"
|
|
364
378
|
},
|
|
365
379
|
defaultValue: "stackOffsetDiverging",
|
|
366
|
-
description: "
|
|
380
|
+
description: "Sets the stack offset. If *value* is not specified, returns the current stack offset function.",
|
|
367
381
|
table: {
|
|
368
382
|
defaultValue: {
|
|
369
383
|
summary: "stackOffsetDiverging"
|
|
@@ -376,10 +390,10 @@ export const argTypes = assign(
|
|
|
376
390
|
},
|
|
377
391
|
stackOrder: {
|
|
378
392
|
control: {
|
|
379
|
-
type: "
|
|
393
|
+
type: "object"
|
|
380
394
|
},
|
|
381
395
|
defaultValue: "stackOrderDescending",
|
|
382
|
-
description: "
|
|
396
|
+
description: "Sets the stack order. If *value* is not specified, returns the current stack order function.",
|
|
383
397
|
table: {
|
|
384
398
|
defaultValue: {
|
|
385
399
|
summary: "stackOrderDescending"
|
|
@@ -394,7 +408,7 @@ export const argTypes = assign(
|
|
|
394
408
|
control: {
|
|
395
409
|
type: "boolean"
|
|
396
410
|
},
|
|
397
|
-
description: "
|
|
411
|
+
description: "If *value* is specified, toggles shape stacking. If *value* is not specified, returns the current stack value.",
|
|
398
412
|
table: {
|
|
399
413
|
defaultValue: {
|
|
400
414
|
summary: "undefined"
|
|
@@ -410,6 +424,7 @@ export const argTypes = assign(
|
|
|
410
424
|
type: "object"
|
|
411
425
|
},
|
|
412
426
|
defaultValue: "assign(this._timelineConfig, {brushing: true, brushMin: () => this._xTime || this._yTime || this._x2Time || this._y2Time ? 2 : 1})",
|
|
427
|
+
description: "If *value* is specified, sets the config method for the timeline and returns the current class instance.",
|
|
413
428
|
table: {
|
|
414
429
|
defaultValue: {
|
|
415
430
|
detail: "assign(this._timelineConfig, {brushing: true, brushMin: () => this._xTime || this._yTime || this._x2Time || this._y2Time ? 2 : 1})",
|
|
@@ -426,6 +441,7 @@ export const argTypes = assign(
|
|
|
426
441
|
type: "text"
|
|
427
442
|
},
|
|
428
443
|
defaultValue: "d => d[\"x\"]",
|
|
444
|
+
description: "Sets the x accessor to the specified accessor Function or String representing which key in the data to reference. If *value* is not specified, returns the current x accessor.",
|
|
429
445
|
table: {
|
|
430
446
|
defaultValue: {
|
|
431
447
|
detail: "d => d[\"x\"]",
|
|
@@ -442,6 +458,7 @@ export const argTypes = assign(
|
|
|
442
458
|
type: "text"
|
|
443
459
|
},
|
|
444
460
|
defaultValue: "d => d[\"x2\"]",
|
|
461
|
+
description: "Sets the x2 accessor to the specified accessor Function or String representing which key in the data to reference. If *value* is not specified, returns the current x2 accessor.",
|
|
445
462
|
table: {
|
|
446
463
|
defaultValue: {
|
|
447
464
|
detail: "d => d[\"x2\"]",
|
|
@@ -457,10 +474,11 @@ export const argTypes = assign(
|
|
|
457
474
|
control: {
|
|
458
475
|
type: "object"
|
|
459
476
|
},
|
|
460
|
-
defaultValue: "{
|
|
477
|
+
defaultValue: "{}",
|
|
478
|
+
description: "A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the secondary x-axis. Includes additional functionality where passing \"auto\" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be \"linear\" or \"log\" based on the provided data.",
|
|
461
479
|
table: {
|
|
462
480
|
defaultValue: {
|
|
463
|
-
summary: "{
|
|
481
|
+
summary: "{}"
|
|
464
482
|
}
|
|
465
483
|
},
|
|
466
484
|
type: {
|
|
@@ -470,8 +488,9 @@ export const argTypes = assign(
|
|
|
470
488
|
},
|
|
471
489
|
x2Domain: {
|
|
472
490
|
control: {
|
|
473
|
-
type: "
|
|
491
|
+
type: "object"
|
|
474
492
|
},
|
|
493
|
+
description: "Sets the x2 domain to the specified array. If *value* is not specified, returns the current x2 domain. Additionally, if either value of the array is undefined, it will be calculated from the data.",
|
|
475
494
|
table: {
|
|
476
495
|
defaultValue: {
|
|
477
496
|
summary: "undefined"
|
|
@@ -484,6 +503,7 @@ export const argTypes = assign(
|
|
|
484
503
|
},
|
|
485
504
|
x2Sort: {
|
|
486
505
|
control: {},
|
|
506
|
+
description: "Defines a custom sorting comparitor function to be used for discrete x2 axes.",
|
|
487
507
|
table: {
|
|
488
508
|
defaultValue: {
|
|
489
509
|
summary: "undefined"
|
|
@@ -499,6 +519,7 @@ export const argTypes = assign(
|
|
|
499
519
|
type: "object"
|
|
500
520
|
},
|
|
501
521
|
defaultValue: "{gridConfig: {stroke: (d) => {\n if (this._discrete && this._discrete.charAt(0) === \"x\") return \"transparent\";\n const range = this._xAxis.range();\n return range[0] === this._xAxis._getPosition.bind(this._xAxis)(d.id) ? \"transparent\" : openColor.colors.gray[200];\n}}}",
|
|
522
|
+
description: "A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the x-axis. Includes additional functionality where passing \"auto\" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be \"linear\" or \"log\" based on the provided data.",
|
|
502
523
|
table: {
|
|
503
524
|
defaultValue: {
|
|
504
525
|
detail: "{gridConfig: {stroke: (d) => {\n if (this._discrete && this._discrete.charAt(0) === \"x\") return \"transparent\";\n const range = this._xAxis.range();\n return range[0] === this._xAxis._getPosition.bind(this._xAxis)(d.id) ? \"transparent\" : openColor.colors.gray[200];\n}}}",
|
|
@@ -515,6 +536,7 @@ export const argTypes = assign(
|
|
|
515
536
|
type: "number"
|
|
516
537
|
},
|
|
517
538
|
defaultValue: 150,
|
|
539
|
+
description: "When the width of the chart is less than or equal to this pixel value, and the x-axis is not the discrete axis, it will not be shown. This helps produce slick sparklines. Set this value to `0` to disable the behavior entirely.",
|
|
518
540
|
table: {
|
|
519
541
|
defaultValue: {
|
|
520
542
|
summary: 150
|
|
@@ -527,8 +549,9 @@ export const argTypes = assign(
|
|
|
527
549
|
},
|
|
528
550
|
xDomain: {
|
|
529
551
|
control: {
|
|
530
|
-
type: "
|
|
552
|
+
type: "object"
|
|
531
553
|
},
|
|
554
|
+
description: "Sets the x domain to the specified array. If *value* is not specified, returns the current x domain. Additionally, if either value of the array is undefined, it will be calculated from the data.",
|
|
532
555
|
table: {
|
|
533
556
|
defaultValue: {
|
|
534
557
|
summary: "undefined"
|
|
@@ -541,6 +564,7 @@ export const argTypes = assign(
|
|
|
541
564
|
},
|
|
542
565
|
xSort: {
|
|
543
566
|
control: {},
|
|
567
|
+
description: "Defines a custom sorting comparitor function to be used for discrete x axes.",
|
|
544
568
|
table: {
|
|
545
569
|
defaultValue: {
|
|
546
570
|
summary: "undefined"
|
|
@@ -556,6 +580,7 @@ export const argTypes = assign(
|
|
|
556
580
|
type: "text"
|
|
557
581
|
},
|
|
558
582
|
defaultValue: "d => d[\"y\"]",
|
|
583
|
+
description: "Sets the y accessor to the specified accessor Function or String representing which key in the data to reference. If *value* is not specified, returns the current y accessor.",
|
|
559
584
|
table: {
|
|
560
585
|
defaultValue: {
|
|
561
586
|
detail: "d => d[\"y\"]",
|
|
@@ -572,6 +597,7 @@ export const argTypes = assign(
|
|
|
572
597
|
type: "text"
|
|
573
598
|
},
|
|
574
599
|
defaultValue: "d => d[\"y2\"]",
|
|
600
|
+
description: "Sets the y2 accessor to the specified accessor Function or String representing which key in the data to reference. If *value* is not specified, returns the current y2 accessor.",
|
|
575
601
|
table: {
|
|
576
602
|
defaultValue: {
|
|
577
603
|
detail: "d => d[\"y2\"]",
|
|
@@ -588,6 +614,7 @@ export const argTypes = assign(
|
|
|
588
614
|
type: "object"
|
|
589
615
|
},
|
|
590
616
|
defaultValue: "{}",
|
|
617
|
+
description: "A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the secondary y-axis. Includes additional functionality where passing \"auto\" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be \"linear\" or \"log\" based on the provided data.",
|
|
591
618
|
table: {
|
|
592
619
|
defaultValue: {
|
|
593
620
|
summary: "{}"
|
|
@@ -600,8 +627,9 @@ export const argTypes = assign(
|
|
|
600
627
|
},
|
|
601
628
|
y2Domain: {
|
|
602
629
|
control: {
|
|
603
|
-
type: "
|
|
630
|
+
type: "object"
|
|
604
631
|
},
|
|
632
|
+
description: "Sets the y2 domain to the specified array. If *value* is not specified, returns the current y2 domain. Additionally, if either value of the array is undefined, it will be calculated from the data.",
|
|
605
633
|
table: {
|
|
606
634
|
defaultValue: {
|
|
607
635
|
summary: "undefined"
|
|
@@ -614,6 +642,7 @@ export const argTypes = assign(
|
|
|
614
642
|
},
|
|
615
643
|
y2Sort: {
|
|
616
644
|
control: {},
|
|
645
|
+
description: "Defines a custom sorting comparitor function to be used for discrete y2 axes.",
|
|
617
646
|
table: {
|
|
618
647
|
defaultValue: {
|
|
619
648
|
summary: "undefined"
|
|
@@ -629,6 +658,7 @@ export const argTypes = assign(
|
|
|
629
658
|
type: "object"
|
|
630
659
|
},
|
|
631
660
|
defaultValue: "{gridConfig: {stroke: (d) => {\n if (this._discrete && this._discrete.charAt(0) === \"y\") return \"transparent\";\n const range = this._yAxis.range();\n return range[range.length - 1] === this._yAxis._getPosition.bind(this._yAxis)(d.id) ? \"transparent\" : openColor.colors.gray[200];\n}}}",
|
|
661
|
+
description: "A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the y-axis. Includes additional functionality where passing \"auto\" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be \"linear\" or \"log\" based on the provided data.\nNote:* If a \"domain\" array is passed to the y-axis config, it will be reversed.",
|
|
632
662
|
table: {
|
|
633
663
|
defaultValue: {
|
|
634
664
|
detail: "{gridConfig: {stroke: (d) => {\n if (this._discrete && this._discrete.charAt(0) === \"y\") return \"transparent\";\n const range = this._yAxis.range();\n return range[range.length - 1] === this._yAxis._getPosition.bind(this._yAxis)(d.id) ? \"transparent\" : openColor.colors.gray[200];\n}}}",
|
|
@@ -645,6 +675,7 @@ export const argTypes = assign(
|
|
|
645
675
|
type: "number"
|
|
646
676
|
},
|
|
647
677
|
defaultValue: 150,
|
|
678
|
+
description: "When the height of the chart is less than or equal to this pixel value, and the y-axis is not the discrete axis, it will not be shown. This helps produce slick sparklines. Set this value to `0` to disable the behavior entirely.",
|
|
648
679
|
table: {
|
|
649
680
|
defaultValue: {
|
|
650
681
|
summary: 150
|
|
@@ -657,8 +688,9 @@ export const argTypes = assign(
|
|
|
657
688
|
},
|
|
658
689
|
yDomain: {
|
|
659
690
|
control: {
|
|
660
|
-
type: "
|
|
691
|
+
type: "object"
|
|
661
692
|
},
|
|
693
|
+
description: "Sets the y domain to the specified array. If *value* is not specified, returns the current y domain. Additionally, if either value of the array is undefined, it will be calculated from the data.",
|
|
662
694
|
table: {
|
|
663
695
|
defaultValue: {
|
|
664
696
|
summary: "undefined"
|
|
@@ -671,6 +703,7 @@ export const argTypes = assign(
|
|
|
671
703
|
},
|
|
672
704
|
ySort: {
|
|
673
705
|
control: {},
|
|
706
|
+
description: "Defines a custom sorting comparitor function to be used for discrete y axes.",
|
|
674
707
|
table: {
|
|
675
708
|
defaultValue: {
|
|
676
709
|
summary: "undefined"
|
|
@@ -28,6 +28,7 @@ export const argTypes = assign(
|
|
|
28
28
|
type: "object"
|
|
29
29
|
},
|
|
30
30
|
defaultValue: "{scale: time}",
|
|
31
|
+
description: "If *value* is specified, sets the config method for the axis and returns the current class instance. If *value* is not specified, returns the current axis configuration.",
|
|
31
32
|
table: {
|
|
32
33
|
defaultValue: {
|
|
33
34
|
summary: "{scale: time}"
|
|
@@ -43,6 +44,7 @@ export const argTypes = assign(
|
|
|
43
44
|
type: "text"
|
|
44
45
|
},
|
|
45
46
|
defaultValue: "end",
|
|
47
|
+
description: "If *value* is specified, sets the end accessor to the specified function or key and returns the current class instance. If *value* is not specified, returns the current end accessor.",
|
|
46
48
|
table: {
|
|
47
49
|
defaultValue: {
|
|
48
50
|
summary: "end"
|
|
@@ -58,6 +60,7 @@ export const argTypes = assign(
|
|
|
58
60
|
type: "number"
|
|
59
61
|
},
|
|
60
62
|
defaultValue: 0.05,
|
|
63
|
+
description: "Sets the [paddingInner](https://github.com/d3/d3-scale#band_paddingInner) value of the underlining [Band Scale](https://github.com/d3/d3-scale#band-scales) used to determine the height of each bar. Values should be a ratio between 0 and 1 representing the space in between each rectangle.",
|
|
61
64
|
table: {
|
|
62
65
|
defaultValue: {
|
|
63
66
|
summary: 0.05
|
|
@@ -73,6 +76,7 @@ export const argTypes = assign(
|
|
|
73
76
|
type: "number"
|
|
74
77
|
},
|
|
75
78
|
defaultValue: 0.05,
|
|
79
|
+
description: "Sets the [paddingOuter](https://github.com/d3/d3-scale#band_paddingOuter) value of the underlining [Band Scale](https://github.com/d3/d3-scale#band-scales) used to determine the height of each bar. Values should be a ratio between 0 and 1 representing the space around the outer rectangles.",
|
|
76
80
|
table: {
|
|
77
81
|
defaultValue: {
|
|
78
82
|
summary: 0.05
|
|
@@ -88,6 +92,7 @@ export const argTypes = assign(
|
|
|
88
92
|
type: "object"
|
|
89
93
|
},
|
|
90
94
|
defaultValue: "assign({}, this._shapeConfig, {ariaLabel: (d, i) => `${this._drawLabel(d, i)}, ${this._start(d, i)} - ${this._end(d, i)}.`})",
|
|
95
|
+
description: "If *value* is specified, sets the config method for each shape and returns the current class instance.",
|
|
91
96
|
table: {
|
|
92
97
|
defaultValue: {
|
|
93
98
|
detail: "assign({}, this._shapeConfig, {ariaLabel: (d, i) => `${this._drawLabel(d, i)}, ${this._start(d, i)} - ${this._end(d, i)}.`})",
|
|
@@ -104,6 +109,7 @@ export const argTypes = assign(
|
|
|
104
109
|
type: "text"
|
|
105
110
|
},
|
|
106
111
|
defaultValue: "start",
|
|
112
|
+
description: "If *value* is specified, sets the start accessor to the specified function or key and returns the current class instance. If *value* is not specified, returns the current start accessor.",
|
|
107
113
|
table: {
|
|
108
114
|
defaultValue: {
|
|
109
115
|
summary: "start"
|
|
@@ -28,6 +28,7 @@ export const argTypes = assign(
|
|
|
28
28
|
type: "object"
|
|
29
29
|
},
|
|
30
30
|
defaultValue: "{shapeConfig: {fill: none, labelConfig: {fontColor: #999, padding: 0, textAnchor: (d, i, x) => x.textAnchor, verticalAlign: middle}, stroke: #eee, strokeWidth: 1}}",
|
|
31
|
+
description: "Sets the config method used for the radial spokes, circles, and labels.",
|
|
31
32
|
table: {
|
|
32
33
|
defaultValue: {
|
|
33
34
|
detail: "{shapeConfig: {fill: none, labelConfig: {fontColor: #999, padding: 0, textAnchor: (d, i, x) => x.textAnchor, verticalAlign: middle}, stroke: #eee, strokeWidth: 1}}",
|
|
@@ -44,6 +45,7 @@ export const argTypes = assign(
|
|
|
44
45
|
type: "text"
|
|
45
46
|
},
|
|
46
47
|
defaultValue: "metric",
|
|
48
|
+
description: "If *value* is specified, sets the discrete accessor to the specified method name (usually an axis) and returns the current class instance.",
|
|
47
49
|
table: {
|
|
48
50
|
defaultValue: {
|
|
49
51
|
summary: "metric"
|
|
@@ -59,6 +61,7 @@ export const argTypes = assign(
|
|
|
59
61
|
type: "text"
|
|
60
62
|
},
|
|
61
63
|
defaultValue: "d => d[\"metric\"]",
|
|
64
|
+
description: "Defines the value used as axis. If *value* is specified, sets the accessor to the specified metric function. If *value* is not specified, returns the current metric accessor.",
|
|
62
65
|
table: {
|
|
63
66
|
defaultValue: {
|
|
64
67
|
detail: "d => d[\"metric\"]",
|
|
@@ -75,6 +78,7 @@ export const argTypes = assign(
|
|
|
75
78
|
type: "number"
|
|
76
79
|
},
|
|
77
80
|
defaultValue: 100,
|
|
81
|
+
description: "Determines how much pixel spaces to give the outer labels.",
|
|
78
82
|
table: {
|
|
79
83
|
defaultValue: {
|
|
80
84
|
summary: 100
|
|
@@ -90,6 +94,7 @@ export const argTypes = assign(
|
|
|
90
94
|
type: "text"
|
|
91
95
|
},
|
|
92
96
|
defaultValue: "Path",
|
|
97
|
+
description: "Changes the primary shape used to represent each data point in a visualization. Not all visualizations support changing shapes, this method can be provided the String name of a D3plus shape class (for example, \"Rect\" or \"Circle\"), or an accessor Function that returns the String class name to be used for each individual data point.",
|
|
93
98
|
table: {
|
|
94
99
|
defaultValue: {
|
|
95
100
|
summary: "Path"
|
|
@@ -97,7 +102,7 @@ export const argTypes = assign(
|
|
|
97
102
|
},
|
|
98
103
|
type: {
|
|
99
104
|
required: false,
|
|
100
|
-
summary: "
|
|
105
|
+
summary: "string | function"
|
|
101
106
|
}
|
|
102
107
|
},
|
|
103
108
|
value: {
|
|
@@ -105,6 +110,7 @@ export const argTypes = assign(
|
|
|
105
110
|
type: "text"
|
|
106
111
|
},
|
|
107
112
|
defaultValue: "d => d[\"value\"]",
|
|
113
|
+
description: "If *value* is specified, sets the value accessor to the specified function or number and returns the current class instance. If *value* is not specified, returns the current value accessor.",
|
|
108
114
|
table: {
|
|
109
115
|
defaultValue: {
|
|
110
116
|
detail: "d => d[\"value\"]",
|
|
@@ -28,6 +28,7 @@ export const argTypes = assign(
|
|
|
28
28
|
type: "number"
|
|
29
29
|
},
|
|
30
30
|
defaultValue: 2,
|
|
31
|
+
description: "The pixel padding in between each cell.",
|
|
31
32
|
table: {
|
|
32
33
|
defaultValue: {
|
|
33
34
|
summary: 2
|
|
@@ -43,6 +44,7 @@ export const argTypes = assign(
|
|
|
43
44
|
type: "text"
|
|
44
45
|
},
|
|
45
46
|
defaultValue: "d => d[\"column\"]",
|
|
47
|
+
description: "Determines which key in your data should be used for each column in the matrix. Can be either a String that matches a key used in every data point, or an accessor function that receives a data point and it's index in the data array, and is expected to return it's column value.",
|
|
46
48
|
table: {
|
|
47
49
|
defaultValue: {
|
|
48
50
|
detail: "d => d[\"column\"]",
|
|
@@ -58,10 +60,11 @@ export const argTypes = assign(
|
|
|
58
60
|
control: {
|
|
59
61
|
type: "object"
|
|
60
62
|
},
|
|
61
|
-
defaultValue: "{shapeConfig: {labelConfig: {fontColor: #000, padding: 5, textAnchor: (d) => [\
|
|
63
|
+
defaultValue: "{shapeConfig: {labelConfig: {fontColor: #000, padding: 5, textAnchor: (d) => [\n 0,\n180\n].includes(d.angle) ? middle : [\n 2,\n3\n].includes(d.quadrant) ? end : start, verticalAlign: (d) => [\n 90,\n270\n].includes(d.angle) ? middle : [\n 2,\n1\n].includes(d.quadrant) ? bottom : top}}}",
|
|
64
|
+
description: "A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the column labels.",
|
|
62
65
|
table: {
|
|
63
66
|
defaultValue: {
|
|
64
|
-
detail: "{shapeConfig: {labelConfig: {fontColor: #000, padding: 5, textAnchor: (d) => [\
|
|
67
|
+
detail: "{shapeConfig: {labelConfig: {fontColor: #000, padding: 5, textAnchor: (d) => [\n 0,\n180\n].includes(d.angle) ? middle : [\n 2,\n3\n].includes(d.quadrant) ? end : start, verticalAlign: (d) => [\n 90,\n270\n].includes(d.angle) ? middle : [\n 2,\n1\n].includes(d.quadrant) ? bottom : top}}}",
|
|
65
68
|
summary: "function"
|
|
66
69
|
}
|
|
67
70
|
},
|
|
@@ -72,8 +75,9 @@ export const argTypes = assign(
|
|
|
72
75
|
},
|
|
73
76
|
columnList: {
|
|
74
77
|
control: {
|
|
75
|
-
type: "
|
|
78
|
+
type: "object"
|
|
76
79
|
},
|
|
80
|
+
description: "A manual list of IDs to be used for columns.",
|
|
77
81
|
table: {
|
|
78
82
|
defaultValue: {
|
|
79
83
|
summary: "undefined"
|
|
@@ -87,6 +91,7 @@ export const argTypes = assign(
|
|
|
87
91
|
columnSort: {
|
|
88
92
|
control: {},
|
|
89
93
|
defaultValue: "(a, b) => `${a}`.localeCompare(`${b}`)",
|
|
94
|
+
description: "A sort comparator function that is run on the unique set of column values.",
|
|
90
95
|
table: {
|
|
91
96
|
defaultValue: {
|
|
92
97
|
detail: "(a, b) => `${a}`.localeCompare(`${b}`)",
|
|
@@ -103,6 +108,7 @@ export const argTypes = assign(
|
|
|
103
108
|
type: "number"
|
|
104
109
|
},
|
|
105
110
|
defaultValue: "(radius) => radius / 5",
|
|
111
|
+
description: "The radius (in pixels) for the inner donut hole of the diagram. Can either be a static Number, or an accessor function that receives the outer radius as it's only argument.",
|
|
106
112
|
table: {
|
|
107
113
|
defaultValue: {
|
|
108
114
|
detail: "(radius) => radius / 5",
|
|
@@ -119,6 +125,7 @@ export const argTypes = assign(
|
|
|
119
125
|
type: "text"
|
|
120
126
|
},
|
|
121
127
|
defaultValue: "(d, i) => `${getProp.bind(this)(row, d, i)} / ${getProp.bind(this)(column, d, i)}`",
|
|
128
|
+
description: "If *value* is specified, sets the label accessor to the specified function or string and returns the current class instance.",
|
|
122
129
|
table: {
|
|
123
130
|
defaultValue: {
|
|
124
131
|
detail: "(d, i) => `${getProp.bind(this)(row, d, i)} / ${getProp.bind(this)(column, d, i)}`",
|
|
@@ -137,6 +144,7 @@ export const argTypes = assign(
|
|
|
137
144
|
defaultValue: {
|
|
138
145
|
"mousemove.shape": "(d, i, x, event) => {\n defaultMouseMoveShape(d, i, x, event);\n const row = getProp.bind(this)(\"row\", d, i);\n const column = getProp.bind(this)(\"column\", d, i);\n this.hover((h, ii)=>getProp.bind(this)(\"row\", h, ii) === row || getProp.bind(this)(\"column\", h, ii) === column);\n}"
|
|
139
146
|
},
|
|
147
|
+
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.",
|
|
140
148
|
table: {
|
|
141
149
|
defaultValue: {
|
|
142
150
|
summary: {
|
|
@@ -154,6 +162,7 @@ export const argTypes = assign(
|
|
|
154
162
|
type: "text"
|
|
155
163
|
},
|
|
156
164
|
defaultValue: "d => d[\"row\"]",
|
|
165
|
+
description: "Determines which key in your data should be used for each row in the matrix. Can be either a String that matches a key used in every data point, or an accessor function that receives a data point and it's index in the data array, and is expected to return it's row value.",
|
|
157
166
|
table: {
|
|
158
167
|
defaultValue: {
|
|
159
168
|
detail: "d => d[\"row\"]",
|
|
@@ -167,8 +176,9 @@ export const argTypes = assign(
|
|
|
167
176
|
},
|
|
168
177
|
rowList: {
|
|
169
178
|
control: {
|
|
170
|
-
type: "
|
|
179
|
+
type: "object"
|
|
171
180
|
},
|
|
181
|
+
description: "A manual list of IDs to be used for rows.",
|
|
172
182
|
table: {
|
|
173
183
|
defaultValue: {
|
|
174
184
|
summary: "undefined"
|
|
@@ -182,6 +192,7 @@ export const argTypes = assign(
|
|
|
182
192
|
rowSort: {
|
|
183
193
|
control: {},
|
|
184
194
|
defaultValue: "(a, b) => `${a}`.localeCompare(`${b}`)",
|
|
195
|
+
description: "A sort comparator function that is run on the unique set of row values.",
|
|
185
196
|
table: {
|
|
186
197
|
defaultValue: {
|
|
187
198
|
detail: "(a, b) => `${a}`.localeCompare(`${b}`)",
|