@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,171 @@
|
|
|
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 vizArgTypes} from "./Viz.args.jsx";
|
|
6
|
+
import {assign} from "@d3plus/dom";
|
|
7
|
+
|
|
8
|
+
import {Pack as D3plusPack} from "@d3plus/react";
|
|
9
|
+
export const Pack = ({ config }) => <D3plusPack config={config} />;
|
|
10
|
+
|
|
11
|
+
export const argTypes = assign(
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Filters out unused argTypes from the Viz primitive and
|
|
15
|
+
* overrides any defaults that have been changed in Pack
|
|
16
|
+
*/
|
|
17
|
+
Object.keys(vizArgTypes)
|
|
18
|
+
.filter(k => !k.match(/^(zoom.*)$/))
|
|
19
|
+
.reduce((obj, k) => (obj[k] = vizArgTypes[k], obj), {}),
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Pack-specific methods
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
{
|
|
26
|
+
hover: {
|
|
27
|
+
control: {},
|
|
28
|
+
table: {
|
|
29
|
+
defaultValue: {
|
|
30
|
+
summary: "undefined"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
type: {
|
|
34
|
+
required: false,
|
|
35
|
+
summary: "function"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
layoutPadding: {
|
|
39
|
+
control: {
|
|
40
|
+
type: "number"
|
|
41
|
+
},
|
|
42
|
+
defaultValue: 1,
|
|
43
|
+
table: {
|
|
44
|
+
defaultValue: {
|
|
45
|
+
summary: 1
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
type: {
|
|
49
|
+
required: false,
|
|
50
|
+
summary: "function | number"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
legend: {
|
|
54
|
+
control: {
|
|
55
|
+
type: "boolean"
|
|
56
|
+
},
|
|
57
|
+
defaultValue: "(config, arr) => {\n if (arr.length === this._filteredData.length) return false;\n return defaultLegend.bind(this)(config, arr);\n}",
|
|
58
|
+
table: {
|
|
59
|
+
defaultValue: {
|
|
60
|
+
detail: "(config, arr) => {\n if (arr.length === this._filteredData.length) return false;\n return defaultLegend.bind(this)(config, arr);\n}",
|
|
61
|
+
summary: "function"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
type: {
|
|
65
|
+
required: false,
|
|
66
|
+
summary: "boolean | function"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
on: {
|
|
70
|
+
control: {
|
|
71
|
+
type: "text"
|
|
72
|
+
},
|
|
73
|
+
defaultValue: {
|
|
74
|
+
mouseenter: "() => {\n }",
|
|
75
|
+
"mousemove.legend": "(d, i, x, event) => {\n defaultMouseMoveLegend(d, i, x, event);\n const ids = this._ids(d, i);\n const hoverData = recursionCircles(d);\n this.hover((h)=>{\n const hover = Object.keys(h).filter((key)=>key !== \"value\").every((key)=>d[key] && d[key].includes(h[key]));\n if (hover) hoverData.push(h);\n else if (ids.includes(h.key)) hoverData.push(...recursionCircles(h, [\n h\n ]));\n return hoverData.includes(h);\n });\n}",
|
|
76
|
+
"mousemove.shape": "(d, i, x, event) => {\n if (d.__d3plusTooltip__) defaultMouseMoveShape(d, i, x, event);\n const hoverData = recursionCircles(d, [\n d\n ]);\n this.hover((h)=>hoverData.includes(h));\n}"
|
|
77
|
+
},
|
|
78
|
+
table: {
|
|
79
|
+
defaultValue: {
|
|
80
|
+
summary: {
|
|
81
|
+
mouseenter: "() => {\n }",
|
|
82
|
+
"mousemove.legend": "(d, i, x, event) => {\n defaultMouseMoveLegend(d, i, x, event);\n const ids = this._ids(d, i);\n const hoverData = recursionCircles(d);\n this.hover((h)=>{\n const hover = Object.keys(h).filter((key)=>key !== \"value\").every((key)=>d[key] && d[key].includes(h[key]));\n if (hover) hoverData.push(h);\n else if (ids.includes(h.key)) hoverData.push(...recursionCircles(h, [\n h\n ]));\n return hoverData.includes(h);\n });\n}",
|
|
83
|
+
"mousemove.shape": "(d, i, x, event) => {\n if (d.__d3plusTooltip__) defaultMouseMoveShape(d, i, x, event);\n const hoverData = recursionCircles(d, [\n d\n ]);\n this.hover((h)=>hoverData.includes(h));\n}"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
type: {
|
|
88
|
+
required: false,
|
|
89
|
+
summary: "string"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
packOpacity: {
|
|
93
|
+
control: {
|
|
94
|
+
type: "number"
|
|
95
|
+
},
|
|
96
|
+
defaultValue: 0.25,
|
|
97
|
+
table: {
|
|
98
|
+
defaultValue: {
|
|
99
|
+
summary: 0.25
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
type: {
|
|
103
|
+
required: false,
|
|
104
|
+
summary: "function | number"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
shape: {
|
|
108
|
+
control: {
|
|
109
|
+
type: "text"
|
|
110
|
+
},
|
|
111
|
+
defaultValue: "Circle",
|
|
112
|
+
table: {
|
|
113
|
+
defaultValue: {
|
|
114
|
+
summary: "Circle"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
type: {
|
|
118
|
+
required: false,
|
|
119
|
+
summary: "function | string"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
shapeConfig: {
|
|
123
|
+
control: {
|
|
124
|
+
type: "object"
|
|
125
|
+
},
|
|
126
|
+
defaultValue: "assign(this._shapeConfig, {Circle: {label: (d) => d.parent && !d.children ? d.id : false, labelConfig: {fontResize: true}, opacity: (d) => d.__d3plusOpacity__}})",
|
|
127
|
+
table: {
|
|
128
|
+
defaultValue: {
|
|
129
|
+
detail: "assign(this._shapeConfig, {Circle: {label: (d) => d.parent && !d.children ? d.id : false, labelConfig: {fontResize: true}, opacity: (d) => d.__d3plusOpacity__}})",
|
|
130
|
+
summary: "function"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
type: {
|
|
134
|
+
required: false,
|
|
135
|
+
summary: "object"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
sort: {
|
|
139
|
+
control: {
|
|
140
|
+
type: "array"
|
|
141
|
+
},
|
|
142
|
+
defaultValue: "(a, b) => b.value - a.value",
|
|
143
|
+
table: {
|
|
144
|
+
defaultValue: {
|
|
145
|
+
detail: "(a, b) => b.value - a.value",
|
|
146
|
+
summary: "function"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
type: {
|
|
150
|
+
required: false,
|
|
151
|
+
summary: "array"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
sum: {
|
|
155
|
+
control: {
|
|
156
|
+
type: "number"
|
|
157
|
+
},
|
|
158
|
+
defaultValue: "d => d[\"value\"]",
|
|
159
|
+
table: {
|
|
160
|
+
defaultValue: {
|
|
161
|
+
detail: "d => d[\"value\"]",
|
|
162
|
+
summary: "function"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
type: {
|
|
166
|
+
required: false,
|
|
167
|
+
summary: "function | number"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
);
|
|
@@ -0,0 +1,148 @@
|
|
|
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 vizArgTypes} from "./Viz.args.jsx";
|
|
6
|
+
import {assign} from "@d3plus/dom";
|
|
7
|
+
|
|
8
|
+
import {Pie as D3plusPie} from "@d3plus/react";
|
|
9
|
+
export const Pie = ({ config }) => <D3plusPie config={config} />;
|
|
10
|
+
|
|
11
|
+
export const argTypes = assign(
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Filters out unused argTypes from the Viz primitive and
|
|
15
|
+
* overrides any defaults that have been changed in Pie
|
|
16
|
+
*/
|
|
17
|
+
Object.keys(vizArgTypes)
|
|
18
|
+
.filter(k => !k.match(/^(zoom.*)$/))
|
|
19
|
+
.reduce((obj, k) => (obj[k] = vizArgTypes[k], obj), {}),
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Pie-specific methods
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
{
|
|
26
|
+
innerRadius: {
|
|
27
|
+
control: {
|
|
28
|
+
type: "number"
|
|
29
|
+
},
|
|
30
|
+
defaultValue: 0,
|
|
31
|
+
table: {
|
|
32
|
+
defaultValue: {
|
|
33
|
+
summary: 0
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
type: {
|
|
37
|
+
required: false,
|
|
38
|
+
summary: "function | number"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
legend: {
|
|
42
|
+
control: {
|
|
43
|
+
type: "boolean"
|
|
44
|
+
},
|
|
45
|
+
defaultValue: "(config, arr) => {\n if (arr.length === this._filteredData.length) return false;\n return defaultLegend.bind(this)(config, arr);\n}",
|
|
46
|
+
table: {
|
|
47
|
+
defaultValue: {
|
|
48
|
+
detail: "(config, arr) => {\n if (arr.length === this._filteredData.length) return false;\n return defaultLegend.bind(this)(config, arr);\n}",
|
|
49
|
+
summary: "function"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
type: {
|
|
53
|
+
required: false,
|
|
54
|
+
summary: "boolean | function"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
legendSort: {
|
|
58
|
+
control: {},
|
|
59
|
+
defaultValue: "(a, b) => this._value(b) - this._value(a)",
|
|
60
|
+
table: {
|
|
61
|
+
defaultValue: {
|
|
62
|
+
detail: "(a, b) => this._value(b) - this._value(a)",
|
|
63
|
+
summary: "function"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
type: {
|
|
67
|
+
required: true,
|
|
68
|
+
summary: "function"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
padAngle: {
|
|
72
|
+
control: {
|
|
73
|
+
type: "number"
|
|
74
|
+
},
|
|
75
|
+
table: {
|
|
76
|
+
defaultValue: {
|
|
77
|
+
summary: "undefined"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
type: {
|
|
81
|
+
required: false,
|
|
82
|
+
summary: "number"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
padPixel: {
|
|
86
|
+
control: {
|
|
87
|
+
type: "number"
|
|
88
|
+
},
|
|
89
|
+
defaultValue: 0,
|
|
90
|
+
table: {
|
|
91
|
+
defaultValue: {
|
|
92
|
+
summary: 0
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
type: {
|
|
96
|
+
required: false,
|
|
97
|
+
summary: "number"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
shapeConfig: {
|
|
101
|
+
control: {
|
|
102
|
+
type: "object"
|
|
103
|
+
},
|
|
104
|
+
defaultValue: "assign(this._shapeConfig, {ariaLabel: (d, i) => this._pieData ? `${++this._pieData.i.index}. ${this._drawLabel(d, i)}, ${this._value(d, i)}.` : , Path: {labelConfig: {fontResize: true}}})",
|
|
105
|
+
table: {
|
|
106
|
+
defaultValue: {
|
|
107
|
+
detail: "assign(this._shapeConfig, {ariaLabel: (d, i) => this._pieData ? `${++this._pieData.i.index}. ${this._drawLabel(d, i)}, ${this._value(d, i)}.` : , Path: {labelConfig: {fontResize: true}}})",
|
|
108
|
+
summary: "function"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
type: {
|
|
112
|
+
required: false,
|
|
113
|
+
summary: "object"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
sort: {
|
|
117
|
+
control: {},
|
|
118
|
+
defaultValue: "(a, b) => this._value(b) - this._value(a)",
|
|
119
|
+
table: {
|
|
120
|
+
defaultValue: {
|
|
121
|
+
detail: "(a, b) => this._value(b) - this._value(a)",
|
|
122
|
+
summary: "function"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
type: {
|
|
126
|
+
required: false,
|
|
127
|
+
summary: "function"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
value: {
|
|
131
|
+
control: {
|
|
132
|
+
type: "text"
|
|
133
|
+
},
|
|
134
|
+
defaultValue: "d => d[\"value\"]",
|
|
135
|
+
description: "= d => d.value",
|
|
136
|
+
table: {
|
|
137
|
+
defaultValue: {
|
|
138
|
+
detail: "d => d[\"value\"]",
|
|
139
|
+
summary: "function"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
type: {
|
|
143
|
+
required: true,
|
|
144
|
+
summary: "function | string"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
);
|