@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.
Files changed (225) hide show
  1. package/.storybook/main.js +51 -0
  2. package/.storybook/manager-head.html +46 -0
  3. package/.storybook/manager.js +10 -0
  4. package/.storybook/preview-head.html +69 -0
  5. package/.storybook/preview.jsx +134 -0
  6. package/.storybook/theme.js +16 -0
  7. package/README.md +1 -0
  8. package/args/color/colorAdd.args.jsx +71 -0
  9. package/args/color/colorAssign.args.jsx +40 -0
  10. package/args/color/colorContrast.args.jsx +40 -0
  11. package/args/color/colorDefaults.args.jsx +8 -0
  12. package/args/color/colorLegible.args.jsx +24 -0
  13. package/args/color/colorLighter.args.jsx +40 -0
  14. package/args/color/colorSubtract.args.jsx +71 -0
  15. package/args/core/charts/AreaPlot.args.jsx +72 -0
  16. package/args/core/charts/BarChart.args.jsx +88 -0
  17. package/args/core/charts/BoxWhisker.args.jsx +73 -0
  18. package/args/core/charts/BumpChart.args.jsx +133 -0
  19. package/args/core/charts/Donut.args.jsx +58 -0
  20. package/args/core/charts/Geomap.args.jsx +363 -0
  21. package/args/core/charts/LinePlot.args.jsx +57 -0
  22. package/args/core/charts/Matrix.args.jsx +194 -0
  23. package/args/core/charts/Network.args.jsx +310 -0
  24. package/args/core/charts/Pack.args.jsx +171 -0
  25. package/args/core/charts/Pie.args.jsx +148 -0
  26. package/args/core/charts/Plot.args.jsx +685 -0
  27. package/args/core/charts/Priestley.args.jsx +118 -0
  28. package/args/core/charts/Radar.args.jsx +120 -0
  29. package/args/core/charts/RadialMatrix.args.jsx +197 -0
  30. package/args/core/charts/Rings.args.jsx +228 -0
  31. package/args/core/charts/Sankey.args.jsx +248 -0
  32. package/args/core/charts/StackedArea.args.jsx +26 -0
  33. package/args/core/charts/Tree.args.jsx +88 -0
  34. package/args/core/charts/Treemap.args.jsx +181 -0
  35. package/args/core/charts/Viz.args.jsx +1383 -0
  36. package/args/core/components/Axis.args.jsx +600 -0
  37. package/args/core/components/AxisBottom.args.jsx +42 -0
  38. package/args/core/components/AxisLeft.args.jsx +42 -0
  39. package/args/core/components/AxisRight.args.jsx +42 -0
  40. package/args/core/components/AxisTop.args.jsx +42 -0
  41. package/args/core/components/ColorScale.args.jsx +456 -0
  42. package/args/core/components/Legend.args.jsx +289 -0
  43. package/args/core/components/TextBox.args.jsx +554 -0
  44. package/args/core/components/Timeline.args.jsx +401 -0
  45. package/args/core/components/Tooltip.args.jsx +453 -0
  46. package/args/core/shapes/Area.args.jsx +190 -0
  47. package/args/core/shapes/Bar.args.jsx +176 -0
  48. package/args/core/shapes/Box.args.jsx +248 -0
  49. package/args/core/shapes/Circle.args.jsx +84 -0
  50. package/args/core/shapes/Image.args.jsx +177 -0
  51. package/args/core/shapes/Line.args.jsx +127 -0
  52. package/args/core/shapes/Path.args.jsx +84 -0
  53. package/args/core/shapes/Rect.args.jsx +85 -0
  54. package/args/core/shapes/Shape.args.jsx +633 -0
  55. package/args/core/shapes/Whisker.args.jsx +204 -0
  56. package/args/core/utils/BaseClass.args.jsx +65 -0
  57. package/args/core/utils/RESET.args.jsx +8 -0
  58. package/args/core/utils/accessor.args.jsx +39 -0
  59. package/args/core/utils/configPrep.args.jsx +56 -0
  60. package/args/core/utils/constant.args.jsx +24 -0
  61. package/args/core/utils/uuid.args.jsx +8 -0
  62. package/args/data/dataConcat.args.jsx +40 -0
  63. package/args/data/dataFold.args.jsx +56 -0
  64. package/args/data/dataLoad.args.jsx +65 -0
  65. package/args/data/isData.args.jsx +24 -0
  66. package/args/data/merge.args.jsx +39 -0
  67. package/args/data/unique.args.jsx +37 -0
  68. package/args/dom/assign.args.jsx +23 -0
  69. package/args/dom/attrize.args.jsx +39 -0
  70. package/args/dom/date.args.jsx +23 -0
  71. package/args/dom/elem.args.jsx +135 -0
  72. package/args/dom/fontExists.args.jsx +24 -0
  73. package/args/dom/htmlDecode.args.jsx +23 -0
  74. package/args/dom/isObject.args.jsx +23 -0
  75. package/args/dom/parseSides.args.jsx +24 -0
  76. package/args/dom/prefix.args.jsx +8 -0
  77. package/args/dom/rtl.args.jsx +8 -0
  78. package/args/dom/stylize.args.jsx +39 -0
  79. package/args/dom/textWidth.args.jsx +39 -0
  80. package/args/export/saveElement.args.jsx +99 -0
  81. package/args/format/format.args.jsx +24 -0
  82. package/args/format/formatAbbreviate.args.jsx +39 -0
  83. package/args/format/formatDate.args.jsx +53 -0
  84. package/args/format/formatDefaultLocale.args.jsx +24 -0
  85. package/args/locales/dictionaries/formatLocale.args.jsx +8 -0
  86. package/args/math/closest.args.jsx +39 -0
  87. package/args/math/largestRect.args.jsx +56 -0
  88. package/args/math/lineIntersection.args.jsx +69 -0
  89. package/args/math/path2polygon.args.jsx +40 -0
  90. package/args/math/pointDistance.args.jsx +39 -0
  91. package/args/math/pointDistanceSquared.args.jsx +39 -0
  92. package/args/math/pointRotate.args.jsx +55 -0
  93. package/args/math/polygonInside.args.jsx +39 -0
  94. package/args/math/polygonRayCast.args.jsx +55 -0
  95. package/args/math/polygonRotate.args.jsx +55 -0
  96. package/args/math/segmentBoxContains.args.jsx +54 -0
  97. package/args/math/segmentsIntersect.args.jsx +69 -0
  98. package/args/math/shapeEdgePoint.args.jsx +39 -0
  99. package/args/react/D3plusContext.args.jsx +8 -0
  100. package/args/react/Renderer.args.jsx +53 -0
  101. package/args/text/fontFamily.args.jsx +8 -0
  102. package/args/text/fontFamilyStringify.args.jsx +23 -0
  103. package/args/text/stringify.args.jsx +23 -0
  104. package/args/text/strip.args.jsx +38 -0
  105. package/args/text/textSplit.args.jsx +23 -0
  106. package/args/text/textWrap.args.jsx +8 -0
  107. package/args/text/titleCase.args.jsx +24 -0
  108. package/args/text/trim.args.jsx +23 -0
  109. package/args/text/trimLeft.args.jsx +23 -0
  110. package/args/text/trimRight.args.jsx +23 -0
  111. package/docs/Accessibility.mdx +70 -0
  112. package/docs/HomeChart.jsx +38 -0
  113. package/docs/Introduction.mdx +130 -0
  114. package/docs/Logo-Frames.js +352 -0
  115. package/docs/Logo.jsx +30 -0
  116. package/helpers/configify.js +18 -0
  117. package/helpers/funcify.js +14 -0
  118. package/helpers/stringify.js +30 -0
  119. package/package.json +44 -0
  120. package/packages/color/colorAdd.stories.jsx +23 -0
  121. package/packages/color/colorAssign.stories.jsx +23 -0
  122. package/packages/color/colorContrast.stories.jsx +23 -0
  123. package/packages/color/colorDefaults.stories.jsx +23 -0
  124. package/packages/color/colorLegible.stories.jsx +23 -0
  125. package/packages/color/colorLighter.stories.jsx +23 -0
  126. package/packages/color/colorSubtract.stories.jsx +23 -0
  127. package/packages/core/charts/AreaPlot.stories.jsx +74 -0
  128. package/packages/core/charts/BarChart.stories.jsx +307 -0
  129. package/packages/core/charts/BoxWhisker.stories.jsx +204 -0
  130. package/packages/core/charts/BumpChart.stories.jsx +52 -0
  131. package/packages/core/charts/Donut.stories.jsx +41 -0
  132. package/packages/core/charts/Geomap.stories.jsx +186 -0
  133. package/packages/core/charts/LinePlot.stories.jsx +564 -0
  134. package/packages/core/charts/Matrix.stories.jsx +36 -0
  135. package/packages/core/charts/Network.stories.jsx +99 -0
  136. package/packages/core/charts/Pack.stories.jsx +40 -0
  137. package/packages/core/charts/Pie.stories.jsx +40 -0
  138. package/packages/core/charts/Plot.stories.jsx +180 -0
  139. package/packages/core/charts/Priestley.stories.jsx +60 -0
  140. package/packages/core/charts/Radar.stories.jsx +60 -0
  141. package/packages/core/charts/RadialMatrix.stories.jsx +36 -0
  142. package/packages/core/charts/Rings.stories.jsx +41 -0
  143. package/packages/core/charts/Sankey.stories.jsx +41 -0
  144. package/packages/core/charts/StackedArea.stories.jsx +107 -0
  145. package/packages/core/charts/Tree.stories.jsx +27 -0
  146. package/packages/core/charts/Treemap.stories.jsx +81 -0
  147. package/packages/core/charts/Viz.stories.jsx +27 -0
  148. package/packages/core/components/Axis.stories.jsx +27 -0
  149. package/packages/core/components/AxisBottom.stories.jsx +27 -0
  150. package/packages/core/components/AxisLeft.stories.jsx +27 -0
  151. package/packages/core/components/AxisRight.stories.jsx +27 -0
  152. package/packages/core/components/AxisTop.stories.jsx +27 -0
  153. package/packages/core/components/ColorScale.stories.jsx +44 -0
  154. package/packages/core/components/Legend.stories.jsx +49 -0
  155. package/packages/core/components/TextBox.stories.jsx +222 -0
  156. package/packages/core/components/Timeline.stories.jsx +37 -0
  157. package/packages/core/components/Tooltip.stories.jsx +40 -0
  158. package/packages/core/shapes/Area.stories.jsx +27 -0
  159. package/packages/core/shapes/Bar.stories.jsx +27 -0
  160. package/packages/core/shapes/Box.stories.jsx +27 -0
  161. package/packages/core/shapes/Circle.stories.jsx +27 -0
  162. package/packages/core/shapes/Image.stories.jsx +27 -0
  163. package/packages/core/shapes/Line.stories.jsx +27 -0
  164. package/packages/core/shapes/Path.stories.jsx +27 -0
  165. package/packages/core/shapes/Rect.stories.jsx +27 -0
  166. package/packages/core/shapes/Shape.stories.jsx +27 -0
  167. package/packages/core/shapes/Whisker.stories.jsx +27 -0
  168. package/packages/core/utils/BaseClass.stories.jsx +27 -0
  169. package/packages/core/utils/RESET.stories.jsx +23 -0
  170. package/packages/core/utils/accessor.stories.jsx +23 -0
  171. package/packages/core/utils/configPrep.stories.jsx +23 -0
  172. package/packages/core/utils/constant.stories.jsx +23 -0
  173. package/packages/core/utils/uuid.stories.jsx +23 -0
  174. package/packages/data/dataConcat.stories.jsx +23 -0
  175. package/packages/data/dataFold.stories.jsx +23 -0
  176. package/packages/data/dataLoad.stories.jsx +23 -0
  177. package/packages/data/isData.stories.jsx +23 -0
  178. package/packages/data/merge.stories.jsx +23 -0
  179. package/packages/data/unique.stories.jsx +23 -0
  180. package/packages/dom/assign.stories.jsx +23 -0
  181. package/packages/dom/attrize.stories.jsx +23 -0
  182. package/packages/dom/date.stories.jsx +23 -0
  183. package/packages/dom/elem.stories.jsx +23 -0
  184. package/packages/dom/fontExists.stories.jsx +23 -0
  185. package/packages/dom/htmlDecode.stories.jsx +23 -0
  186. package/packages/dom/isObject.stories.jsx +23 -0
  187. package/packages/dom/parseSides.stories.jsx +23 -0
  188. package/packages/dom/prefix.stories.jsx +23 -0
  189. package/packages/dom/rtl.stories.jsx +23 -0
  190. package/packages/dom/stylize.stories.jsx +23 -0
  191. package/packages/dom/textWidth.stories.jsx +23 -0
  192. package/packages/export/saveElement.stories.jsx +23 -0
  193. package/packages/format/format.stories.jsx +23 -0
  194. package/packages/format/formatAbbreviate.stories.jsx +23 -0
  195. package/packages/format/formatDate.stories.jsx +23 -0
  196. package/packages/format/formatDefaultLocale.stories.jsx +23 -0
  197. package/packages/locales/dictionaries/formatLocale.stories.jsx +23 -0
  198. package/packages/math/closest.stories.jsx +23 -0
  199. package/packages/math/largestRect.stories.jsx +23 -0
  200. package/packages/math/lineIntersection.stories.jsx +23 -0
  201. package/packages/math/path2polygon.stories.jsx +23 -0
  202. package/packages/math/pointDistance.stories.jsx +23 -0
  203. package/packages/math/pointDistanceSquared.stories.jsx +23 -0
  204. package/packages/math/pointRotate.stories.jsx +23 -0
  205. package/packages/math/polygonInside.stories.jsx +23 -0
  206. package/packages/math/polygonRayCast.stories.jsx +23 -0
  207. package/packages/math/polygonRotate.stories.jsx +23 -0
  208. package/packages/math/segmentBoxContains.stories.jsx +23 -0
  209. package/packages/math/segmentsIntersect.stories.jsx +23 -0
  210. package/packages/math/shapeEdgePoint.stories.jsx +23 -0
  211. package/packages/react/D3plusContext.stories.jsx +23 -0
  212. package/packages/react/Renderer.stories.jsx +23 -0
  213. package/packages/text/fontFamily.stories.jsx +23 -0
  214. package/packages/text/fontFamilyStringify.stories.jsx +23 -0
  215. package/packages/text/stringify.stories.jsx +23 -0
  216. package/packages/text/strip.stories.jsx +23 -0
  217. package/packages/text/textSplit.stories.jsx +23 -0
  218. package/packages/text/textWrap.stories.jsx +23 -0
  219. package/packages/text/titleCase.stories.jsx +23 -0
  220. package/packages/text/trim.stories.jsx +23 -0
  221. package/packages/text/trimLeft.stories.jsx +23 -0
  222. package/packages/text/trimRight.stories.jsx +23 -0
  223. package/static/data/city_coords.json +224 -0
  224. package/static/images/favicon.ico +0 -0
  225. package/static/images/touchicon.png +0 -0
@@ -0,0 +1,81 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, Treemap} from "../../../args/core/charts/Treemap.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Charts/Treemap",
12
+ component: Treemap,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "Uses the [d3 treemap layout](https://github.com/mbostock/d3/wiki/Treemap-Layout) to creates SVG rectangles based on an array of data. See [this example](https://d3plus.org/examples/d3plus-hierarchy/getting-started/) for help getting started using the treemap generator.",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <Treemap config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+
28
+ export const BasicExample = Template.bind({});
29
+ BasicExample.args = {
30
+ data: [
31
+ {id: "alpha", value: 29},
32
+ {id: "beta", value: 10},
33
+ {id: "gamma", value: 2},
34
+ {id: "delta", value: 29},
35
+ {id: "eta", value: 25}
36
+ ],
37
+ groupBy: "id",
38
+ sum: "value"
39
+ };
40
+ BasicExample.parameters = {controls: {include: ["sum"]}};
41
+
42
+ export const NestedData = Template.bind({});
43
+ NestedData.args = {
44
+ data: [
45
+ {parent: "Group 1", id: "alpha", value: 29},
46
+ {parent: "Group 1", id: "beta", value: 10},
47
+ {parent: "Group 1", id: "gamma", value: 2},
48
+ {parent: "Group 2", id: "delta", value: 29},
49
+ {parent: "Group 2", id: "eta", value: 25}
50
+ ],
51
+ groupBy: ["parent", "id"],
52
+ sum: "value"
53
+ };
54
+ NestedData.parameters = {controls: {include: ["groupBy"]}};
55
+
56
+ export const ChangingTilingMethod = Template.bind({});
57
+ ChangingTilingMethod.args = {
58
+ data: [
59
+ {"Group": "Store", "Sub-Group": "Convenience Store", "Number of Stores": 100},
60
+ {"Group": "Store", "Sub-Group": "Grocery Store", "Number of Food Stores": 150},
61
+ {"Group": "Store", "Sub-Group": "Supercenters", "Number of Food Stores": 30},
62
+ {"Group": "Other", "Sub-Group": "Farmer's Market", "Number of Food Stores": 50},
63
+ {"Group": "Restaurant", "Sub-Group": "Fast-Food Restaurant", "Number of Food Stores": 60},
64
+ {"Group": "Restaurant", "Sub-Group": "Full-Service Restaurant", "Number of Food Stores": 120}
65
+ ],
66
+ groupBy: ["Group", "Sub-Group"],
67
+ sum: "Number of Food Stores",
68
+ tile: "slice"
69
+ };
70
+ ChangingTilingMethod.parameters = {controls: {include: ["tile"]}};
71
+
72
+ export const SmallDataThreshold = Template.bind({});
73
+ SmallDataThreshold.args = {
74
+ colorScale: "Population",
75
+ data: "https://datausa.io/api/data?measures=Population&drilldowns=State&Year=2018",
76
+ groupBy: "State",
77
+ sum: "Population",
78
+ threshold: 0.0025,
79
+ thresholdName: "States"
80
+ };
81
+ SmallDataThreshold.parameters = {controls: {include: ["threshold", "thresholdName"]}};
@@ -0,0 +1,27 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, Viz} from "../../../args/core/charts/Viz.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Charts/Viz",
12
+ component: Viz,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "Creates an x/y plot based on an array of data. If *data* is specified, immediately draws the tree map based on the specified array and returns the current class instance. If *data* is not specified on instantiation, it can be passed/updated after instantiation using the [data](#treemap.data) method. See [this example](https://d3plus.org/examples/d3plus-treemap/getting-started/) for help getting started using the treemap generator.",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <Viz config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+
@@ -0,0 +1,27 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, Axis} from "../../../args/core/components/Axis.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Components/Axis",
12
+ component: Axis,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "Creates an SVG scale based on an array of data.",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <Axis config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+
@@ -0,0 +1,27 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, AxisBottom} from "../../../args/core/components/AxisBottom.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Components/AxisBottom",
12
+ component: AxisBottom,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "Shorthand method for creating an axis where the ticks are drawn below the horizontal domain path. Extends all functionality of the base [Axis](#Axis) class.",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <AxisBottom config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+
@@ -0,0 +1,27 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, AxisLeft} from "../../../args/core/components/AxisLeft.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Components/AxisLeft",
12
+ component: AxisLeft,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "Shorthand method for creating an axis where the ticks are drawn to the left of the vertical domain path. Extends all functionality of the base [Axis](#Axis) class.",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <AxisLeft config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+
@@ -0,0 +1,27 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, AxisRight} from "../../../args/core/components/AxisRight.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Components/AxisRight",
12
+ component: AxisRight,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "Shorthand method for creating an axis where the ticks are drawn to the right of the vertical domain path. Extends all functionality of the base [Axis](#Axis) class.",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <AxisRight config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+
@@ -0,0 +1,27 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, AxisTop} from "../../../args/core/components/AxisTop.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Components/AxisTop",
12
+ component: AxisTop,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "Shorthand method for creating an axis where the ticks are drawn above the vertical domain path. Extends all functionality of the base [Axis](#Axis) class.",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <AxisTop config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+
@@ -0,0 +1,44 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, ColorScale} from "../../../args/core/components/ColorScale.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Components/ColorScale",
12
+ component: ColorScale,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "Creates an SVG scale based on an array of data. If *data* is specified, immediately draws based on the specified array and returns the current class instance. If *data* is not specified on instantiation, it can be passed/updated after instantiation using the [data](#shape.data) method.",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <ColorScale config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+
28
+ export const LinearScale = Template.bind({});
29
+ LinearScale.args = {
30
+ data: [
31
+ {value: 200},
32
+ {value: 1000},
33
+ {value: 2000},
34
+ {value: 2010},
35
+ {value: 2020},
36
+ {value: 2030},
37
+ {value: 2040},
38
+ {value: 2100},
39
+ {value: 6400}
40
+ ],
41
+ height: 100,
42
+ width: 500
43
+ };
44
+ LinearScale.parameters = {controls: {include: []}};
@@ -0,0 +1,49 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, Legend} from "../../../args/core/components/Legend.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Components/Legend",
12
+ component: Legend,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "Creates an SVG scale based on an array of data. If *data* is specified, immediately draws based on the specified array and returns the current class instance. If *data* is not specified on instantiation, it can be passed/updated after instantiation using the [data](#shape.data) method.",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <Legend config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+
28
+ export const BasicExample = Template.bind({});
29
+ BasicExample.args = {
30
+ data: [
31
+ {color: "red", id: "alpha"},
32
+ {color: "orange", id: "beta"},
33
+ {color: "green", id: "gamma"},
34
+ {color: "blue", id: "delta"},
35
+ {color: "purple", id: "epsilon"}
36
+ ],
37
+ label: d => d.id,
38
+ shapeConfig: {
39
+ fill: d => d.color,
40
+ r: 10,
41
+ height: 20,
42
+ width: 20
43
+ },
44
+ shape: "Rect",
45
+ title: "A Basic Legend",
46
+ height: 100,
47
+ width: 500,
48
+ };
49
+ BasicExample.parameters = {controls: {include: ["shape", "title"]}};
@@ -0,0 +1,222 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, TextBox} from "../../../args/core/components/TextBox.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Components/TextBox",
12
+ component: TextBox,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "Creates a wrapped text box for each point in an array of data. See [this example](https://d3plus.org/examples/d3plus-text/getting-started/) for help getting started using the TextBox class.",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <TextBox config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+
28
+ export const BasicExample = Template.bind({});
29
+ BasicExample.args = {
30
+ data: [
31
+ {text: "Here is text rendered in <i>SVG</i> that is <u>wrapped</u> and contains <b>HTML</b> tags."},
32
+ {text: "这是句子 2。即使包装器中没有空格,它也有效!"},
33
+ {text: "၎င်းသည် ချိတ်ဆက်ထားသော စာလုံးများပင်လျှင် ဘာသာစကားအများစုတွင် အလုပ်လုပ်သည်။"},
34
+ ],
35
+ duration: 500,
36
+ fontSize: 16,
37
+ height: 200,
38
+ lineHeight: 18,
39
+ text: d => d.text,
40
+ width: 200,
41
+ x: (d, i) => i * (200 + 50)
42
+ };
43
+ BasicExample.parameters = {controls: {include: ["fontSize", "lineHeight", "width"]}};
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
@@ -0,0 +1,37 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, Timeline} from "../../../args/core/components/Timeline.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Components/Timeline",
12
+ component: Timeline,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <Timeline config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+
28
+ export const BasicExample = Template.bind({});
29
+ BasicExample.args = {
30
+ align: "start",
31
+ brushing: false,
32
+ domain: [2012, 2020],
33
+ height: 100,
34
+ playButton: true,
35
+ width: 400
36
+ };
37
+ BasicExample.parameters = {controls: {include: ["domain", "playButton"]}};
@@ -0,0 +1,40 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, Tooltip} from "../../../args/core/components/Tooltip.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Components/Tooltip",
12
+ component: Tooltip,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "Creates HTML tooltips in the body of a webpage.",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <Tooltip config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+
28
+ // export const BasicExample = Template.bind({});
29
+ // BasicExample.args = {
30
+ // data: [
31
+ // {"title": "D3plus Tooltip", "body": "Check out this cool table:", "position": "mouse", "label": "Position"}
32
+ // ],
33
+ // thead: ["Axis", d => d.label],
34
+ // tbody: [
35
+ // ["x", d => d.x],
36
+ // ["y", d => d.y]
37
+ // ],
38
+ // position: d => [0, 0]
39
+ // };
40
+ // BasicExample.parameters = {controls: {include: ["footer"]}};
@@ -0,0 +1,27 @@
1
+ // WARNING: do not edit the top part of this file directly, it is generated
2
+ // from the source code. Scroll down to the next WARNING and places stories below it.
3
+
4
+ import React from "react";
5
+
6
+ import {argTypes, Area} from "../../../args/core/shapes/Area.args";
7
+ import configify from "../../../helpers/configify";
8
+ import funcify from "../../../helpers/funcify";
9
+
10
+ export default {
11
+ title: "Core/Shapes/Area",
12
+ component: Area,
13
+ argTypes,
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: "Creates SVG areas based on an array of data.",
18
+ },
19
+ },
20
+ }
21
+ };
22
+
23
+ const Template = (args) => <Area config={configify(args, argTypes)} />;
24
+
25
+ // WARNING: do not edit above this line of code directly, it is generated
26
+ // from the source code. Stories below this line can be modified.
27
+