@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,289 @@
|
|
|
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 baseClassArgTypes} from "../utils/BaseClass.args.jsx";
|
|
6
|
+
import {assign} from "@d3plus/dom";
|
|
7
|
+
|
|
8
|
+
import {Legend as D3plusLegend} from "@d3plus/react";
|
|
9
|
+
export const Legend = ({ config }) => <D3plusLegend config={config} />;
|
|
10
|
+
|
|
11
|
+
export const argTypes = assign(
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Filters out unused argTypes from the BaseClass primitive and
|
|
15
|
+
* overrides any defaults that have been changed in Legend
|
|
16
|
+
*/
|
|
17
|
+
Object.keys(baseClassArgTypes)
|
|
18
|
+
.reduce((obj, k) => (obj[k] = baseClassArgTypes[k], obj), {}),
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Legend-specific methods
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
{
|
|
25
|
+
active: {
|
|
26
|
+
control: {},
|
|
27
|
+
table: {
|
|
28
|
+
defaultValue: {
|
|
29
|
+
summary: "undefined"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
type: {
|
|
33
|
+
required: false,
|
|
34
|
+
summary: "function"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
align: {
|
|
38
|
+
control: {
|
|
39
|
+
type: "text"
|
|
40
|
+
},
|
|
41
|
+
defaultValue: "center",
|
|
42
|
+
description: "Supports `\"left\"` and `\"center\"` and `\"right\"`.",
|
|
43
|
+
table: {
|
|
44
|
+
defaultValue: {
|
|
45
|
+
summary: "center"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
type: {
|
|
49
|
+
required: false,
|
|
50
|
+
summary: "string"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
data: {
|
|
54
|
+
control: {
|
|
55
|
+
type: "array"
|
|
56
|
+
},
|
|
57
|
+
defaultValue: "[\n\n]",
|
|
58
|
+
table: {
|
|
59
|
+
defaultValue: {
|
|
60
|
+
summary: "[\n\n]"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
type: {
|
|
64
|
+
required: false,
|
|
65
|
+
summary: "array"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
direction: {
|
|
69
|
+
control: {
|
|
70
|
+
type: "text"
|
|
71
|
+
},
|
|
72
|
+
defaultValue: "row",
|
|
73
|
+
table: {
|
|
74
|
+
defaultValue: {
|
|
75
|
+
summary: "row"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
type: {
|
|
79
|
+
required: false,
|
|
80
|
+
summary: "string"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
duration: {
|
|
84
|
+
control: {
|
|
85
|
+
type: "number"
|
|
86
|
+
},
|
|
87
|
+
defaultValue: 600,
|
|
88
|
+
table: {
|
|
89
|
+
defaultValue: {
|
|
90
|
+
summary: 600
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
type: {
|
|
94
|
+
required: false,
|
|
95
|
+
summary: "number"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
height: {
|
|
99
|
+
control: {
|
|
100
|
+
type: "number"
|
|
101
|
+
},
|
|
102
|
+
defaultValue: 200,
|
|
103
|
+
table: {
|
|
104
|
+
defaultValue: {
|
|
105
|
+
summary: 200
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
type: {
|
|
109
|
+
required: false,
|
|
110
|
+
summary: "number"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
hover: {
|
|
114
|
+
control: {},
|
|
115
|
+
table: {
|
|
116
|
+
defaultValue: {
|
|
117
|
+
summary: "undefined"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
type: {
|
|
121
|
+
required: false,
|
|
122
|
+
summary: "function"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
id: {
|
|
126
|
+
control: {},
|
|
127
|
+
defaultValue: "d => d[\"id\"]",
|
|
128
|
+
table: {
|
|
129
|
+
defaultValue: {
|
|
130
|
+
detail: "d => d[\"id\"]",
|
|
131
|
+
summary: "function"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
type: {
|
|
135
|
+
required: false,
|
|
136
|
+
summary: "function"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
label: {
|
|
140
|
+
control: {
|
|
141
|
+
type: "text"
|
|
142
|
+
},
|
|
143
|
+
defaultValue: "d => d[\"id\"]",
|
|
144
|
+
table: {
|
|
145
|
+
defaultValue: {
|
|
146
|
+
detail: "d => d[\"id\"]",
|
|
147
|
+
summary: "function"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
type: {
|
|
151
|
+
required: false,
|
|
152
|
+
summary: "function | string"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
padding: {
|
|
156
|
+
control: {
|
|
157
|
+
type: "number"
|
|
158
|
+
},
|
|
159
|
+
defaultValue: 5,
|
|
160
|
+
table: {
|
|
161
|
+
defaultValue: {
|
|
162
|
+
summary: 5
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
type: {
|
|
166
|
+
required: false,
|
|
167
|
+
summary: "number"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
render: {
|
|
171
|
+
control: {},
|
|
172
|
+
table: {
|
|
173
|
+
defaultValue: {
|
|
174
|
+
summary: "undefined"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
type: {
|
|
178
|
+
required: false,
|
|
179
|
+
summary: "function"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
select: {
|
|
183
|
+
control: {
|
|
184
|
+
type: "text"
|
|
185
|
+
},
|
|
186
|
+
defaultValue: "d3.select(\"body\").append(\"svg\")",
|
|
187
|
+
table: {
|
|
188
|
+
defaultValue: {
|
|
189
|
+
summary: "d3.select(\"body\").append(\"svg\")"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
type: {
|
|
193
|
+
required: false,
|
|
194
|
+
summary: "string | htmlelement"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
shape: {
|
|
198
|
+
control: {
|
|
199
|
+
type: "text"
|
|
200
|
+
},
|
|
201
|
+
defaultValue: "Rect",
|
|
202
|
+
table: {
|
|
203
|
+
defaultValue: {
|
|
204
|
+
summary: "Rect"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
type: {
|
|
208
|
+
required: false,
|
|
209
|
+
summary: "function | string"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
shapeConfig: {
|
|
213
|
+
control: {
|
|
214
|
+
type: "object"
|
|
215
|
+
},
|
|
216
|
+
defaultValue: "{fill: d => d[\"color\"], height: 12, hitArea: (dd, i) => {\n const d = this._lineData[i], h = max([\n d.height,\n d.shapeHeight\n ]);\n return {\n width: d.width + d.shapeWidth,\n height: h,\n x: -d.shapeWidth / 2,\n y: -h / 2\n };\n}, labelBounds: (dd, i) => {\n const d = this._lineData[i];\n let x = d.shapeWidth / 2;\n if (d.shape === \"Circle\") x -= d.shapeR / 2;\n const height = max([\n d.shapeHeight,\n d.height\n ]);\n const rtlMod = this._rtl ? d.shapeWidth + d.width + this._padding * 2 : 0;\n return {\n width: d.width,\n height,\n x: x + padding - rtlMod,\n y: -height / 2\n };\n}, labelConfig: {fontColor: colorDefaults.dark, fontFamily: this._titleClass.fontFamily(), fontResize: false, fontSize: 10, verticalAlign: middle}, opacity: 1, r: 6, width: 12, x: (d, i) => {\n const datum = this._lineData[i];\n const y = datum.y;\n const pad = this._align === \"left\" || this._align === \"right\" && this._direction === \"column\" ? 0 : this._align === \"center\" ? (this._outerBounds.width - this._rowWidth(this._lineData.filter((l)=>y === l.y))) / 2 : this._outerBounds.width - this._rowWidth(this._lineData.filter((l)=>y === l.y));\n const prevWords = this._lineData.slice(0, i).filter((l)=>y === l.y);\n const rtlMod = this._rtl ? datum.width + this._padding : 0;\n return this._rowWidth(prevWords) + this._padding * (prevWords.length ? datum.sentence ? 2 : 1 : 0) + this._outerBounds.x + datum.shapeWidth / 2 + pad + rtlMod;\n}, y: (d, i) => {\n const ld = this._lineData[i];\n return ld.y + this._titleHeight + this._outerBounds.y + max(this._lineData.filter((l)=>ld.y === l.y).map((l)=>l.height).concat(this._data.map((l, x)=>this._fetchConfig(\"height\", l, x)))) / 2;\n}}",
|
|
217
|
+
table: {
|
|
218
|
+
defaultValue: {
|
|
219
|
+
detail: "{fill: d => d[\"color\"], height: 12, hitArea: (dd, i) => {\n const d = this._lineData[i], h = max([\n d.height,\n d.shapeHeight\n ]);\n return {\n width: d.width + d.shapeWidth,\n height: h,\n x: -d.shapeWidth / 2,\n y: -h / 2\n };\n}, labelBounds: (dd, i) => {\n const d = this._lineData[i];\n let x = d.shapeWidth / 2;\n if (d.shape === \"Circle\") x -= d.shapeR / 2;\n const height = max([\n d.shapeHeight,\n d.height\n ]);\n const rtlMod = this._rtl ? d.shapeWidth + d.width + this._padding * 2 : 0;\n return {\n width: d.width,\n height,\n x: x + padding - rtlMod,\n y: -height / 2\n };\n}, labelConfig: {fontColor: colorDefaults.dark, fontFamily: this._titleClass.fontFamily(), fontResize: false, fontSize: 10, verticalAlign: middle}, opacity: 1, r: 6, width: 12, x: (d, i) => {\n const datum = this._lineData[i];\n const y = datum.y;\n const pad = this._align === \"left\" || this._align === \"right\" && this._direction === \"column\" ? 0 : this._align === \"center\" ? (this._outerBounds.width - this._rowWidth(this._lineData.filter((l)=>y === l.y))) / 2 : this._outerBounds.width - this._rowWidth(this._lineData.filter((l)=>y === l.y));\n const prevWords = this._lineData.slice(0, i).filter((l)=>y === l.y);\n const rtlMod = this._rtl ? datum.width + this._padding : 0;\n return this._rowWidth(prevWords) + this._padding * (prevWords.length ? datum.sentence ? 2 : 1 : 0) + this._outerBounds.x + datum.shapeWidth / 2 + pad + rtlMod;\n}, y: (d, i) => {\n const ld = this._lineData[i];\n return ld.y + this._titleHeight + this._outerBounds.y + max(this._lineData.filter((l)=>ld.y === l.y).map((l)=>l.height).concat(this._data.map((l, x)=>this._fetchConfig(\"height\", l, x)))) / 2;\n}}",
|
|
220
|
+
summary: "function"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
type: {
|
|
224
|
+
required: false,
|
|
225
|
+
summary: "object"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
title: {
|
|
229
|
+
control: {
|
|
230
|
+
type: "text"
|
|
231
|
+
},
|
|
232
|
+
table: {
|
|
233
|
+
defaultValue: {
|
|
234
|
+
summary: "undefined"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
type: {
|
|
238
|
+
required: false,
|
|
239
|
+
summary: "string"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
titleConfig: {
|
|
243
|
+
control: {
|
|
244
|
+
type: "object"
|
|
245
|
+
},
|
|
246
|
+
defaultValue: "{fontSize: 12}",
|
|
247
|
+
table: {
|
|
248
|
+
defaultValue: {
|
|
249
|
+
summary: "{fontSize: 12}"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
type: {
|
|
253
|
+
required: false,
|
|
254
|
+
summary: "object"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
verticalAlign: {
|
|
258
|
+
control: {
|
|
259
|
+
type: "text"
|
|
260
|
+
},
|
|
261
|
+
defaultValue: "middle",
|
|
262
|
+
description: "Supports `\"top\"` and `\"middle\"` and `\"bottom\"`.",
|
|
263
|
+
table: {
|
|
264
|
+
defaultValue: {
|
|
265
|
+
summary: "middle"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
type: {
|
|
269
|
+
required: false,
|
|
270
|
+
summary: "string"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
width: {
|
|
274
|
+
control: {
|
|
275
|
+
type: "number"
|
|
276
|
+
},
|
|
277
|
+
defaultValue: 400,
|
|
278
|
+
table: {
|
|
279
|
+
defaultValue: {
|
|
280
|
+
summary: 400
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
type: {
|
|
284
|
+
required: false,
|
|
285
|
+
summary: "number"
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
);
|