@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,401 @@
|
|
|
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 axisArgTypes} from "./Axis.args.jsx";
|
|
6
|
+
import {assign} from "@d3plus/dom";
|
|
7
|
+
|
|
8
|
+
import {Timeline as D3plusTimeline} from "@d3plus/react";
|
|
9
|
+
export const Timeline = ({ config }) => <D3plusTimeline config={config} />;
|
|
10
|
+
|
|
11
|
+
export const argTypes = assign(
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Filters out unused argTypes from the Axis primitive and
|
|
15
|
+
* overrides any defaults that have been changed in Timeline
|
|
16
|
+
*/
|
|
17
|
+
Object.keys(axisArgTypes)
|
|
18
|
+
.reduce((obj, k) => (obj[k] = axisArgTypes[k], obj), {}),
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Timeline-specific methods
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
{
|
|
25
|
+
barConfig: {
|
|
26
|
+
control: {
|
|
27
|
+
type: "object"
|
|
28
|
+
},
|
|
29
|
+
defaultValue: "assign({}, this._barConfig, {stroke: () => this._buttonBehaviorCurrent === buttons ? transparent : colorMid, stroke-width: () => this._buttonBehaviorCurrent === buttons ? 0 : 1})",
|
|
30
|
+
table: {
|
|
31
|
+
defaultValue: {
|
|
32
|
+
detail: "assign({}, this._barConfig, {stroke: () => this._buttonBehaviorCurrent === buttons ? transparent : colorMid, stroke-width: () => this._buttonBehaviorCurrent === buttons ? 0 : 1})",
|
|
33
|
+
summary: "function"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
type: {
|
|
37
|
+
required: false,
|
|
38
|
+
summary: "object"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
brushFilter: {
|
|
42
|
+
control: {},
|
|
43
|
+
defaultValue: "(event) => !event.button && event.detail < 2",
|
|
44
|
+
table: {
|
|
45
|
+
defaultValue: {
|
|
46
|
+
detail: "(event) => !event.button && event.detail < 2",
|
|
47
|
+
summary: "function"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
type: {
|
|
51
|
+
required: false,
|
|
52
|
+
summary: "function"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
brushMin: {
|
|
56
|
+
control: {
|
|
57
|
+
type: "number"
|
|
58
|
+
},
|
|
59
|
+
defaultValue: 1,
|
|
60
|
+
table: {
|
|
61
|
+
defaultValue: {
|
|
62
|
+
summary: 1
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
type: {
|
|
66
|
+
required: false,
|
|
67
|
+
summary: "number | function"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
brushing: {
|
|
71
|
+
control: {
|
|
72
|
+
type: "boolean"
|
|
73
|
+
},
|
|
74
|
+
defaultValue: true,
|
|
75
|
+
table: {
|
|
76
|
+
defaultValue: {
|
|
77
|
+
summary: true
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
type: {
|
|
81
|
+
required: false,
|
|
82
|
+
summary: "boolean"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
buttonAlign: {
|
|
86
|
+
control: {
|
|
87
|
+
type: "text"
|
|
88
|
+
},
|
|
89
|
+
defaultValue: "middle",
|
|
90
|
+
table: {
|
|
91
|
+
defaultValue: {
|
|
92
|
+
summary: "middle"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
type: {
|
|
96
|
+
required: false,
|
|
97
|
+
summary: "string"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
buttonBehavior: {
|
|
101
|
+
control: {
|
|
102
|
+
type: "text"
|
|
103
|
+
},
|
|
104
|
+
defaultValue: "auto",
|
|
105
|
+
table: {
|
|
106
|
+
defaultValue: {
|
|
107
|
+
summary: "auto"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
type: {
|
|
111
|
+
required: false,
|
|
112
|
+
summary: "string"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
buttonHeight: {
|
|
116
|
+
control: {
|
|
117
|
+
type: "number"
|
|
118
|
+
},
|
|
119
|
+
defaultValue: 24,
|
|
120
|
+
table: {
|
|
121
|
+
defaultValue: {
|
|
122
|
+
summary: 24
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
type: {
|
|
126
|
+
required: false,
|
|
127
|
+
summary: "number"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
buttonPadding: {
|
|
131
|
+
control: {
|
|
132
|
+
type: "number"
|
|
133
|
+
},
|
|
134
|
+
defaultValue: 10,
|
|
135
|
+
table: {
|
|
136
|
+
defaultValue: {
|
|
137
|
+
summary: 10
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
type: {
|
|
141
|
+
required: false,
|
|
142
|
+
summary: "number"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
domain: {
|
|
146
|
+
control: {
|
|
147
|
+
type: "array"
|
|
148
|
+
},
|
|
149
|
+
defaultValue: "[\n2001,\n2010\n]",
|
|
150
|
+
table: {
|
|
151
|
+
defaultValue: {
|
|
152
|
+
summary: "[\n2001,\n2010\n]"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
type: {
|
|
156
|
+
required: false,
|
|
157
|
+
summary: "array"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
gridSize: {
|
|
161
|
+
control: {
|
|
162
|
+
type: "number"
|
|
163
|
+
},
|
|
164
|
+
defaultValue: 0,
|
|
165
|
+
table: {
|
|
166
|
+
defaultValue: {
|
|
167
|
+
summary: 0
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
type: {
|
|
171
|
+
required: false,
|
|
172
|
+
summary: "number"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
handleConfig: {
|
|
176
|
+
control: {
|
|
177
|
+
type: "object"
|
|
178
|
+
},
|
|
179
|
+
defaultValue: "{fill: colorDefaults.light, stroke: #228be6, stroke-width: 2, rx: 2, ry: 2}",
|
|
180
|
+
table: {
|
|
181
|
+
defaultValue: {
|
|
182
|
+
summary: "{fill: colorDefaults.light, stroke: #228be6, stroke-width: 2, rx: 2, ry: 2}"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
type: {
|
|
186
|
+
required: false,
|
|
187
|
+
summary: "object"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
handleSize: {
|
|
191
|
+
control: {
|
|
192
|
+
type: "number"
|
|
193
|
+
},
|
|
194
|
+
defaultValue: 6,
|
|
195
|
+
table: {
|
|
196
|
+
defaultValue: {
|
|
197
|
+
summary: 6
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
type: {
|
|
201
|
+
required: false,
|
|
202
|
+
summary: "number"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
height: {
|
|
206
|
+
control: {
|
|
207
|
+
type: "number"
|
|
208
|
+
},
|
|
209
|
+
defaultValue: 100,
|
|
210
|
+
table: {
|
|
211
|
+
defaultValue: {
|
|
212
|
+
summary: 100
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
type: {
|
|
216
|
+
required: false,
|
|
217
|
+
summary: "number"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
labelOffset: {
|
|
221
|
+
control: {
|
|
222
|
+
type: "boolean"
|
|
223
|
+
},
|
|
224
|
+
defaultValue: false,
|
|
225
|
+
table: {
|
|
226
|
+
defaultValue: {
|
|
227
|
+
summary: false
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
type: {
|
|
231
|
+
required: false,
|
|
232
|
+
summary: "boolean"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
on: {
|
|
236
|
+
control: {
|
|
237
|
+
type: "text"
|
|
238
|
+
},
|
|
239
|
+
defaultValue: "{}",
|
|
240
|
+
table: {
|
|
241
|
+
defaultValue: {
|
|
242
|
+
summary: "{}"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
type: {
|
|
246
|
+
required: false,
|
|
247
|
+
summary: "string"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
orient: {
|
|
251
|
+
control: {
|
|
252
|
+
type: "text"
|
|
253
|
+
},
|
|
254
|
+
defaultValue: "bottom",
|
|
255
|
+
description: "Supports `\"top\"`, `\"right\"`, `\"bottom\"`, and `\"left\"` orientations.",
|
|
256
|
+
table: {
|
|
257
|
+
defaultValue: {
|
|
258
|
+
summary: "bottom"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
type: {
|
|
262
|
+
required: false,
|
|
263
|
+
summary: "string"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
playButton: {
|
|
267
|
+
control: {
|
|
268
|
+
type: "boolean"
|
|
269
|
+
},
|
|
270
|
+
defaultValue: true,
|
|
271
|
+
table: {
|
|
272
|
+
defaultValue: {
|
|
273
|
+
summary: true
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
type: {
|
|
277
|
+
required: false,
|
|
278
|
+
summary: "boolean"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
playButtonConfig: {
|
|
282
|
+
control: {
|
|
283
|
+
type: "object"
|
|
284
|
+
},
|
|
285
|
+
defaultValue: "{fontColor: colorDefaults.dark, fontSize: 15, text: () => this._playTimer ? ⏸︎ : ⏵, textAnchor: middle, verticalAlign: middle}",
|
|
286
|
+
table: {
|
|
287
|
+
defaultValue: {
|
|
288
|
+
detail: "{fontColor: colorDefaults.dark, fontSize: 15, text: () => this._playTimer ? ⏸︎ : ⏵, textAnchor: middle, verticalAlign: middle}",
|
|
289
|
+
summary: "function"
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
type: {
|
|
293
|
+
required: false,
|
|
294
|
+
summary: "object"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
playButtonInterval: {
|
|
298
|
+
control: {
|
|
299
|
+
type: "number"
|
|
300
|
+
},
|
|
301
|
+
defaultValue: 1000,
|
|
302
|
+
table: {
|
|
303
|
+
defaultValue: {
|
|
304
|
+
summary: 1000
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
type: {
|
|
308
|
+
required: false,
|
|
309
|
+
summary: "number"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
render: {
|
|
313
|
+
control: {},
|
|
314
|
+
table: {
|
|
315
|
+
defaultValue: {
|
|
316
|
+
summary: "undefined"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
type: {
|
|
320
|
+
required: false,
|
|
321
|
+
summary: "function"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
selection: {
|
|
325
|
+
control: {
|
|
326
|
+
type: "array"
|
|
327
|
+
},
|
|
328
|
+
table: {
|
|
329
|
+
defaultValue: {
|
|
330
|
+
summary: "undefined"
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
type: {
|
|
334
|
+
required: false,
|
|
335
|
+
summary: "array | date | number | string"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
selectionConfig: {
|
|
339
|
+
control: {
|
|
340
|
+
type: "object"
|
|
341
|
+
},
|
|
342
|
+
defaultValue: "{fill: #228be6, fill-opacity: () => this._buttonBehaviorCurrent === buttons ? 0.3 : 1, stroke-width: 0}",
|
|
343
|
+
table: {
|
|
344
|
+
defaultValue: {
|
|
345
|
+
detail: "{fill: #228be6, fill-opacity: () => this._buttonBehaviorCurrent === buttons ? 0.3 : 1, stroke-width: 0}",
|
|
346
|
+
summary: "function"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
type: {
|
|
350
|
+
required: false,
|
|
351
|
+
summary: "object"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
shape: {
|
|
355
|
+
control: {
|
|
356
|
+
type: "text"
|
|
357
|
+
},
|
|
358
|
+
defaultValue: "Rect",
|
|
359
|
+
table: {
|
|
360
|
+
defaultValue: {
|
|
361
|
+
summary: "Rect"
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
type: {
|
|
365
|
+
required: false,
|
|
366
|
+
summary: "string"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
shapeConfig: {
|
|
370
|
+
control: {
|
|
371
|
+
type: "object"
|
|
372
|
+
},
|
|
373
|
+
defaultValue: "assign({}, this._shapeConfig, {labelBounds: (d) => this._buttonBehaviorCurrent === buttons ? {x: d.labelBounds.x, y: -this._buttonHeight / 2 + 1, width: d.labelBounds.width, height: this._buttonHeight} : d.labelBounds, labelConfig: {fontColor: colorDefaults.dark, fontSize: () => 12, verticalAlign: () => this._buttonBehaviorCurrent === buttons ? middle : top}, fill: () => this._buttonBehaviorCurrent === buttons ? #fff : colorMid, stroke: () => this._buttonBehaviorCurrent === buttons ? colorMid : transparent, height: (d) => this._buttonBehaviorCurrent === buttons ? this._buttonHeight : d.tick ? this._handleSize : 0, width: (d) => this._buttonBehaviorCurrent === buttons ? this._ticksWidth / this._availableTicks.length : d.tick ? this._domain.map(Number).includes(d.id) ? 2 : 1 : 0, y: (d) => this._buttonBehaviorCurrent === buttons ? this._align === middle ? this._height / 2 : this._align === start ? this._margin.top + this._buttonHeight / 2 : this._height - this._buttonHeight / 2 - this._margin.bottom : d.y, rx: (d) => this._buttonBehaviorCurrent === buttons ? 0 : this._domain.map(Number).includes(d.id) ? 1 : 0, ry: (d) => this._buttonBehaviorCurrent === buttons ? 0 : this._domain.map(Number).includes(d.id) ? 1 : 0})",
|
|
374
|
+
table: {
|
|
375
|
+
defaultValue: {
|
|
376
|
+
detail: "assign({}, this._shapeConfig, {labelBounds: (d) => this._buttonBehaviorCurrent === buttons ? {x: d.labelBounds.x, y: -this._buttonHeight / 2 + 1, width: d.labelBounds.width, height: this._buttonHeight} : d.labelBounds, labelConfig: {fontColor: colorDefaults.dark, fontSize: () => 12, verticalAlign: () => this._buttonBehaviorCurrent === buttons ? middle : top}, fill: () => this._buttonBehaviorCurrent === buttons ? #fff : colorMid, stroke: () => this._buttonBehaviorCurrent === buttons ? colorMid : transparent, height: (d) => this._buttonBehaviorCurrent === buttons ? this._buttonHeight : d.tick ? this._handleSize : 0, width: (d) => this._buttonBehaviorCurrent === buttons ? this._ticksWidth / this._availableTicks.length : d.tick ? this._domain.map(Number).includes(d.id) ? 2 : 1 : 0, y: (d) => this._buttonBehaviorCurrent === buttons ? this._align === middle ? this._height / 2 : this._align === start ? this._margin.top + this._buttonHeight / 2 : this._height - this._buttonHeight / 2 - this._margin.bottom : d.y, rx: (d) => this._buttonBehaviorCurrent === buttons ? 0 : this._domain.map(Number).includes(d.id) ? 1 : 0, ry: (d) => this._buttonBehaviorCurrent === buttons ? 0 : this._domain.map(Number).includes(d.id) ? 1 : 0})",
|
|
377
|
+
summary: "function"
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
type: {
|
|
381
|
+
required: false,
|
|
382
|
+
summary: "object"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
snapping: {
|
|
386
|
+
control: {
|
|
387
|
+
type: "boolean"
|
|
388
|
+
},
|
|
389
|
+
defaultValue: true,
|
|
390
|
+
table: {
|
|
391
|
+
defaultValue: {
|
|
392
|
+
summary: true
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
type: {
|
|
396
|
+
required: false,
|
|
397
|
+
summary: "boolean"
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
);
|