@d3plus/docs 3.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.js +51 -0
- package/.storybook/manager-head.html +46 -0
- package/.storybook/manager.js +10 -0
- package/.storybook/preview-head.html +69 -0
- package/.storybook/preview.jsx +134 -0
- package/.storybook/theme.js +16 -0
- package/README.md +1 -0
- package/args/color/colorAdd.args.jsx +71 -0
- package/args/color/colorAssign.args.jsx +40 -0
- package/args/color/colorContrast.args.jsx +40 -0
- package/args/color/colorDefaults.args.jsx +8 -0
- package/args/color/colorLegible.args.jsx +24 -0
- package/args/color/colorLighter.args.jsx +40 -0
- package/args/color/colorSubtract.args.jsx +71 -0
- package/args/core/charts/AreaPlot.args.jsx +72 -0
- package/args/core/charts/BarChart.args.jsx +88 -0
- package/args/core/charts/BoxWhisker.args.jsx +73 -0
- package/args/core/charts/BumpChart.args.jsx +133 -0
- package/args/core/charts/Donut.args.jsx +58 -0
- package/args/core/charts/Geomap.args.jsx +363 -0
- package/args/core/charts/LinePlot.args.jsx +57 -0
- package/args/core/charts/Matrix.args.jsx +194 -0
- package/args/core/charts/Network.args.jsx +310 -0
- package/args/core/charts/Pack.args.jsx +171 -0
- package/args/core/charts/Pie.args.jsx +148 -0
- package/args/core/charts/Plot.args.jsx +685 -0
- package/args/core/charts/Priestley.args.jsx +118 -0
- package/args/core/charts/Radar.args.jsx +120 -0
- package/args/core/charts/RadialMatrix.args.jsx +197 -0
- package/args/core/charts/Rings.args.jsx +228 -0
- package/args/core/charts/Sankey.args.jsx +248 -0
- package/args/core/charts/StackedArea.args.jsx +26 -0
- package/args/core/charts/Tree.args.jsx +88 -0
- package/args/core/charts/Treemap.args.jsx +181 -0
- package/args/core/charts/Viz.args.jsx +1383 -0
- package/args/core/components/Axis.args.jsx +600 -0
- package/args/core/components/AxisBottom.args.jsx +42 -0
- package/args/core/components/AxisLeft.args.jsx +42 -0
- package/args/core/components/AxisRight.args.jsx +42 -0
- package/args/core/components/AxisTop.args.jsx +42 -0
- package/args/core/components/ColorScale.args.jsx +456 -0
- package/args/core/components/Legend.args.jsx +289 -0
- package/args/core/components/TextBox.args.jsx +554 -0
- package/args/core/components/Timeline.args.jsx +401 -0
- package/args/core/components/Tooltip.args.jsx +453 -0
- package/args/core/shapes/Area.args.jsx +190 -0
- package/args/core/shapes/Bar.args.jsx +176 -0
- package/args/core/shapes/Box.args.jsx +248 -0
- package/args/core/shapes/Circle.args.jsx +84 -0
- package/args/core/shapes/Image.args.jsx +177 -0
- package/args/core/shapes/Line.args.jsx +127 -0
- package/args/core/shapes/Path.args.jsx +84 -0
- package/args/core/shapes/Rect.args.jsx +85 -0
- package/args/core/shapes/Shape.args.jsx +633 -0
- package/args/core/shapes/Whisker.args.jsx +204 -0
- package/args/core/utils/BaseClass.args.jsx +65 -0
- package/args/core/utils/RESET.args.jsx +8 -0
- package/args/core/utils/accessor.args.jsx +39 -0
- package/args/core/utils/configPrep.args.jsx +56 -0
- package/args/core/utils/constant.args.jsx +24 -0
- package/args/core/utils/uuid.args.jsx +8 -0
- package/args/data/dataConcat.args.jsx +40 -0
- package/args/data/dataFold.args.jsx +56 -0
- package/args/data/dataLoad.args.jsx +65 -0
- package/args/data/isData.args.jsx +24 -0
- package/args/data/merge.args.jsx +39 -0
- package/args/data/unique.args.jsx +37 -0
- package/args/dom/assign.args.jsx +23 -0
- package/args/dom/attrize.args.jsx +39 -0
- package/args/dom/date.args.jsx +23 -0
- package/args/dom/elem.args.jsx +135 -0
- package/args/dom/fontExists.args.jsx +24 -0
- package/args/dom/htmlDecode.args.jsx +23 -0
- package/args/dom/isObject.args.jsx +23 -0
- package/args/dom/parseSides.args.jsx +24 -0
- package/args/dom/prefix.args.jsx +8 -0
- package/args/dom/rtl.args.jsx +8 -0
- package/args/dom/stylize.args.jsx +39 -0
- package/args/dom/textWidth.args.jsx +39 -0
- package/args/export/saveElement.args.jsx +99 -0
- package/args/format/format.args.jsx +24 -0
- package/args/format/formatAbbreviate.args.jsx +39 -0
- package/args/format/formatDate.args.jsx +53 -0
- package/args/format/formatDefaultLocale.args.jsx +24 -0
- package/args/locales/dictionaries/formatLocale.args.jsx +8 -0
- package/args/math/closest.args.jsx +39 -0
- package/args/math/largestRect.args.jsx +56 -0
- package/args/math/lineIntersection.args.jsx +69 -0
- package/args/math/path2polygon.args.jsx +40 -0
- package/args/math/pointDistance.args.jsx +39 -0
- package/args/math/pointDistanceSquared.args.jsx +39 -0
- package/args/math/pointRotate.args.jsx +55 -0
- package/args/math/polygonInside.args.jsx +39 -0
- package/args/math/polygonRayCast.args.jsx +55 -0
- package/args/math/polygonRotate.args.jsx +55 -0
- package/args/math/segmentBoxContains.args.jsx +54 -0
- package/args/math/segmentsIntersect.args.jsx +69 -0
- package/args/math/shapeEdgePoint.args.jsx +39 -0
- package/args/react/D3plusContext.args.jsx +8 -0
- package/args/react/Renderer.args.jsx +53 -0
- package/args/text/fontFamily.args.jsx +8 -0
- package/args/text/fontFamilyStringify.args.jsx +23 -0
- package/args/text/stringify.args.jsx +23 -0
- package/args/text/strip.args.jsx +38 -0
- package/args/text/textSplit.args.jsx +23 -0
- package/args/text/textWrap.args.jsx +8 -0
- package/args/text/titleCase.args.jsx +24 -0
- package/args/text/trim.args.jsx +23 -0
- package/args/text/trimLeft.args.jsx +23 -0
- package/args/text/trimRight.args.jsx +23 -0
- package/docs/Accessibility.mdx +70 -0
- package/docs/HomeChart.jsx +38 -0
- package/docs/Introduction.mdx +130 -0
- package/docs/Logo-Frames.js +352 -0
- package/docs/Logo.jsx +30 -0
- package/helpers/configify.js +18 -0
- package/helpers/funcify.js +14 -0
- package/helpers/stringify.js +30 -0
- package/package.json +44 -0
- package/packages/color/colorAdd.stories.jsx +23 -0
- package/packages/color/colorAssign.stories.jsx +23 -0
- package/packages/color/colorContrast.stories.jsx +23 -0
- package/packages/color/colorDefaults.stories.jsx +23 -0
- package/packages/color/colorLegible.stories.jsx +23 -0
- package/packages/color/colorLighter.stories.jsx +23 -0
- package/packages/color/colorSubtract.stories.jsx +23 -0
- package/packages/core/charts/AreaPlot.stories.jsx +74 -0
- package/packages/core/charts/BarChart.stories.jsx +307 -0
- package/packages/core/charts/BoxWhisker.stories.jsx +204 -0
- package/packages/core/charts/BumpChart.stories.jsx +52 -0
- package/packages/core/charts/Donut.stories.jsx +41 -0
- package/packages/core/charts/Geomap.stories.jsx +186 -0
- package/packages/core/charts/LinePlot.stories.jsx +564 -0
- package/packages/core/charts/Matrix.stories.jsx +36 -0
- package/packages/core/charts/Network.stories.jsx +99 -0
- package/packages/core/charts/Pack.stories.jsx +40 -0
- package/packages/core/charts/Pie.stories.jsx +40 -0
- package/packages/core/charts/Plot.stories.jsx +180 -0
- package/packages/core/charts/Priestley.stories.jsx +60 -0
- package/packages/core/charts/Radar.stories.jsx +60 -0
- package/packages/core/charts/RadialMatrix.stories.jsx +36 -0
- package/packages/core/charts/Rings.stories.jsx +41 -0
- package/packages/core/charts/Sankey.stories.jsx +41 -0
- package/packages/core/charts/StackedArea.stories.jsx +107 -0
- package/packages/core/charts/Tree.stories.jsx +27 -0
- package/packages/core/charts/Treemap.stories.jsx +81 -0
- package/packages/core/charts/Viz.stories.jsx +27 -0
- package/packages/core/components/Axis.stories.jsx +27 -0
- package/packages/core/components/AxisBottom.stories.jsx +27 -0
- package/packages/core/components/AxisLeft.stories.jsx +27 -0
- package/packages/core/components/AxisRight.stories.jsx +27 -0
- package/packages/core/components/AxisTop.stories.jsx +27 -0
- package/packages/core/components/ColorScale.stories.jsx +44 -0
- package/packages/core/components/Legend.stories.jsx +49 -0
- package/packages/core/components/TextBox.stories.jsx +222 -0
- package/packages/core/components/Timeline.stories.jsx +37 -0
- package/packages/core/components/Tooltip.stories.jsx +40 -0
- package/packages/core/shapes/Area.stories.jsx +27 -0
- package/packages/core/shapes/Bar.stories.jsx +27 -0
- package/packages/core/shapes/Box.stories.jsx +27 -0
- package/packages/core/shapes/Circle.stories.jsx +27 -0
- package/packages/core/shapes/Image.stories.jsx +27 -0
- package/packages/core/shapes/Line.stories.jsx +27 -0
- package/packages/core/shapes/Path.stories.jsx +27 -0
- package/packages/core/shapes/Rect.stories.jsx +27 -0
- package/packages/core/shapes/Shape.stories.jsx +27 -0
- package/packages/core/shapes/Whisker.stories.jsx +27 -0
- package/packages/core/utils/BaseClass.stories.jsx +27 -0
- package/packages/core/utils/RESET.stories.jsx +23 -0
- package/packages/core/utils/accessor.stories.jsx +23 -0
- package/packages/core/utils/configPrep.stories.jsx +23 -0
- package/packages/core/utils/constant.stories.jsx +23 -0
- package/packages/core/utils/uuid.stories.jsx +23 -0
- package/packages/data/dataConcat.stories.jsx +23 -0
- package/packages/data/dataFold.stories.jsx +23 -0
- package/packages/data/dataLoad.stories.jsx +23 -0
- package/packages/data/isData.stories.jsx +23 -0
- package/packages/data/merge.stories.jsx +23 -0
- package/packages/data/unique.stories.jsx +23 -0
- package/packages/dom/assign.stories.jsx +23 -0
- package/packages/dom/attrize.stories.jsx +23 -0
- package/packages/dom/date.stories.jsx +23 -0
- package/packages/dom/elem.stories.jsx +23 -0
- package/packages/dom/fontExists.stories.jsx +23 -0
- package/packages/dom/htmlDecode.stories.jsx +23 -0
- package/packages/dom/isObject.stories.jsx +23 -0
- package/packages/dom/parseSides.stories.jsx +23 -0
- package/packages/dom/prefix.stories.jsx +23 -0
- package/packages/dom/rtl.stories.jsx +23 -0
- package/packages/dom/stylize.stories.jsx +23 -0
- package/packages/dom/textWidth.stories.jsx +23 -0
- package/packages/export/saveElement.stories.jsx +23 -0
- package/packages/format/format.stories.jsx +23 -0
- package/packages/format/formatAbbreviate.stories.jsx +23 -0
- package/packages/format/formatDate.stories.jsx +23 -0
- package/packages/format/formatDefaultLocale.stories.jsx +23 -0
- package/packages/locales/dictionaries/formatLocale.stories.jsx +23 -0
- package/packages/math/closest.stories.jsx +23 -0
- package/packages/math/largestRect.stories.jsx +23 -0
- package/packages/math/lineIntersection.stories.jsx +23 -0
- package/packages/math/path2polygon.stories.jsx +23 -0
- package/packages/math/pointDistance.stories.jsx +23 -0
- package/packages/math/pointDistanceSquared.stories.jsx +23 -0
- package/packages/math/pointRotate.stories.jsx +23 -0
- package/packages/math/polygonInside.stories.jsx +23 -0
- package/packages/math/polygonRayCast.stories.jsx +23 -0
- package/packages/math/polygonRotate.stories.jsx +23 -0
- package/packages/math/segmentBoxContains.stories.jsx +23 -0
- package/packages/math/segmentsIntersect.stories.jsx +23 -0
- package/packages/math/shapeEdgePoint.stories.jsx +23 -0
- package/packages/react/D3plusContext.stories.jsx +23 -0
- package/packages/react/Renderer.stories.jsx +23 -0
- package/packages/text/fontFamily.stories.jsx +23 -0
- package/packages/text/fontFamilyStringify.stories.jsx +23 -0
- package/packages/text/stringify.stories.jsx +23 -0
- package/packages/text/strip.stories.jsx +23 -0
- package/packages/text/textSplit.stories.jsx +23 -0
- package/packages/text/textWrap.stories.jsx +23 -0
- package/packages/text/titleCase.stories.jsx +23 -0
- package/packages/text/trim.stories.jsx +23 -0
- package/packages/text/trimLeft.stories.jsx +23 -0
- package/packages/text/trimRight.stories.jsx +23 -0
- package/static/data/city_coords.json +224 -0
- package/static/images/favicon.ico +0 -0
- package/static/images/touchicon.png +0 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// WARNING: do not edit this file directly, it is generated dynamically from
|
|
2
|
+
// the source JSDOC comments using the npm run docs script.
|
|
3
|
+
|
|
4
|
+
import React from "react";
|
|
5
|
+
import {argTypes as shapeArgTypes} from "./Shape.args.jsx";
|
|
6
|
+
import {assign} from "@d3plus/dom";
|
|
7
|
+
|
|
8
|
+
import {Line as D3plusLine} from "@d3plus/react";
|
|
9
|
+
export const Line = ({ config }) => <D3plusLine config={config} />;
|
|
10
|
+
|
|
11
|
+
export const argTypes = assign(
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Filters out unused argTypes from the Shape primitive and
|
|
15
|
+
* overrides any defaults that have been changed in Line
|
|
16
|
+
*/
|
|
17
|
+
Object.keys(shapeArgTypes)
|
|
18
|
+
.reduce((obj, k) => (obj[k] = shapeArgTypes[k], obj), {}),
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Line-specific methods
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
{
|
|
25
|
+
curve: {
|
|
26
|
+
control: {
|
|
27
|
+
type: "text"
|
|
28
|
+
},
|
|
29
|
+
defaultValue: "linear",
|
|
30
|
+
table: {
|
|
31
|
+
defaultValue: {
|
|
32
|
+
summary: "linear"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
type: {
|
|
36
|
+
required: false,
|
|
37
|
+
summary: "function | string"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
defined: {
|
|
41
|
+
control: {},
|
|
42
|
+
defaultValue: "(d) => d",
|
|
43
|
+
table: {
|
|
44
|
+
defaultValue: {
|
|
45
|
+
detail: "(d) => d",
|
|
46
|
+
summary: "function"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
type: {
|
|
50
|
+
required: false,
|
|
51
|
+
summary: "function"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
fill: {
|
|
55
|
+
control: {
|
|
56
|
+
type: "text"
|
|
57
|
+
},
|
|
58
|
+
defaultValue: "none",
|
|
59
|
+
table: {
|
|
60
|
+
defaultValue: {
|
|
61
|
+
summary: "none"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
type: {
|
|
65
|
+
required: false,
|
|
66
|
+
summary: "function | string"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
hitArea: {
|
|
70
|
+
control: {},
|
|
71
|
+
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`.",
|
|
73
|
+
table: {
|
|
74
|
+
defaultValue: {
|
|
75
|
+
detail: "{d: (d) => this._path(d.values), fill: none, stroke-width: 10, transform: null}",
|
|
76
|
+
summary: "function"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
type: {
|
|
80
|
+
required: false,
|
|
81
|
+
summary: "function"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
render: {
|
|
85
|
+
control: {},
|
|
86
|
+
table: {
|
|
87
|
+
defaultValue: {
|
|
88
|
+
summary: "undefined"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
type: {
|
|
92
|
+
required: false,
|
|
93
|
+
summary: "function"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
stroke: {
|
|
97
|
+
control: {
|
|
98
|
+
type: "text"
|
|
99
|
+
},
|
|
100
|
+
defaultValue: "black",
|
|
101
|
+
table: {
|
|
102
|
+
defaultValue: {
|
|
103
|
+
summary: "black"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
type: {
|
|
107
|
+
required: false,
|
|
108
|
+
summary: "function | string"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
strokeWidth: {
|
|
112
|
+
control: {
|
|
113
|
+
type: "number"
|
|
114
|
+
},
|
|
115
|
+
defaultValue: 1,
|
|
116
|
+
table: {
|
|
117
|
+
defaultValue: {
|
|
118
|
+
summary: 1
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
type: {
|
|
122
|
+
required: false,
|
|
123
|
+
summary: "function | number"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
);
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// WARNING: do not edit this file directly, it is generated dynamically from
|
|
2
|
+
// the source JSDOC comments using the npm run docs script.
|
|
3
|
+
|
|
4
|
+
import React from "react";
|
|
5
|
+
import {argTypes as shapeArgTypes} from "./Shape.args.jsx";
|
|
6
|
+
import {assign} from "@d3plus/dom";
|
|
7
|
+
|
|
8
|
+
import {Path as D3plusPath} from "@d3plus/react";
|
|
9
|
+
export const Path = ({ config }) => <D3plusPath config={config} />;
|
|
10
|
+
|
|
11
|
+
export const argTypes = assign(
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Filters out unused argTypes from the Shape primitive and
|
|
15
|
+
* overrides any defaults that have been changed in Path
|
|
16
|
+
*/
|
|
17
|
+
Object.keys(shapeArgTypes)
|
|
18
|
+
.reduce((obj, k) => (obj[k] = shapeArgTypes[k], obj), {}),
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Path-specific methods
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
{
|
|
25
|
+
d: {
|
|
26
|
+
control: {
|
|
27
|
+
type: "text"
|
|
28
|
+
},
|
|
29
|
+
defaultValue: "d => d[\"path\"]",
|
|
30
|
+
table: {
|
|
31
|
+
defaultValue: {
|
|
32
|
+
detail: "d => d[\"path\"]",
|
|
33
|
+
summary: "function"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
type: {
|
|
37
|
+
required: false,
|
|
38
|
+
summary: "function | string"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
labelBounds: {
|
|
42
|
+
control: {},
|
|
43
|
+
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
|
+
table: {
|
|
46
|
+
defaultValue: {
|
|
47
|
+
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}",
|
|
48
|
+
summary: "function"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
type: {
|
|
52
|
+
required: false,
|
|
53
|
+
summary: "function"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
labelConfig: {
|
|
57
|
+
control: {
|
|
58
|
+
type: "object"
|
|
59
|
+
},
|
|
60
|
+
defaultValue: "Object.assign(this._labelConfig, {textAnchor: middle, verticalAlign: middle})",
|
|
61
|
+
table: {
|
|
62
|
+
defaultValue: {
|
|
63
|
+
summary: "Object.assign(this._labelConfig, {textAnchor: middle, verticalAlign: middle})"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
type: {
|
|
67
|
+
required: false,
|
|
68
|
+
summary: "object"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
render: {
|
|
72
|
+
control: {},
|
|
73
|
+
table: {
|
|
74
|
+
defaultValue: {
|
|
75
|
+
summary: "undefined"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
type: {
|
|
79
|
+
required: false,
|
|
80
|
+
summary: "function"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// WARNING: do not edit this file directly, it is generated dynamically from
|
|
2
|
+
// the source JSDOC comments using the npm run docs script.
|
|
3
|
+
|
|
4
|
+
import React from "react";
|
|
5
|
+
import {argTypes as shapeArgTypes} from "./Shape.args.jsx";
|
|
6
|
+
import {assign} from "@d3plus/dom";
|
|
7
|
+
|
|
8
|
+
import {Rect as D3plusRect} from "@d3plus/react";
|
|
9
|
+
export const Rect = ({ config }) => <D3plusRect config={config} />;
|
|
10
|
+
|
|
11
|
+
export const argTypes = assign(
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Filters out unused argTypes from the Shape primitive and
|
|
15
|
+
* overrides any defaults that have been changed in Rect
|
|
16
|
+
*/
|
|
17
|
+
Object.keys(shapeArgTypes)
|
|
18
|
+
.reduce((obj, k) => (obj[k] = shapeArgTypes[k], obj), {}),
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Rect-specific methods
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
{
|
|
25
|
+
height: {
|
|
26
|
+
control: {
|
|
27
|
+
type: "number"
|
|
28
|
+
},
|
|
29
|
+
defaultValue: "d => d[\"height\"]",
|
|
30
|
+
table: {
|
|
31
|
+
defaultValue: {
|
|
32
|
+
detail: "d => d[\"height\"]",
|
|
33
|
+
summary: "function"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
type: {
|
|
37
|
+
required: false,
|
|
38
|
+
summary: "function | number"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
labelBounds: {
|
|
42
|
+
control: {},
|
|
43
|
+
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
|
+
table: {
|
|
46
|
+
defaultValue: {
|
|
47
|
+
detail: "(d, i, s) => ({width: s.width, height: s.height, x: -s.width / 2, y: -s.height / 2})",
|
|
48
|
+
summary: "function"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
type: {
|
|
52
|
+
required: false,
|
|
53
|
+
summary: "function"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
render: {
|
|
57
|
+
control: {},
|
|
58
|
+
table: {
|
|
59
|
+
defaultValue: {
|
|
60
|
+
summary: "undefined"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
type: {
|
|
64
|
+
required: false,
|
|
65
|
+
summary: "function"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
width: {
|
|
69
|
+
control: {
|
|
70
|
+
type: "number"
|
|
71
|
+
},
|
|
72
|
+
defaultValue: "d => d[\"width\"]",
|
|
73
|
+
table: {
|
|
74
|
+
defaultValue: {
|
|
75
|
+
detail: "d => d[\"width\"]",
|
|
76
|
+
summary: "function"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
type: {
|
|
80
|
+
required: false,
|
|
81
|
+
summary: "function | number"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
);
|