@d3plus/core 3.1.5 → 4.0.0

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 (579) hide show
  1. package/README.md +9922 -78537
  2. package/es/index.js +8 -0
  3. package/es/index.js.map +1 -1
  4. package/es/internal.js +54 -0
  5. package/es/internal.js.map +1 -0
  6. package/es/src/charts/AreaPlot/index.js +36 -0
  7. package/es/src/charts/AreaPlot/index.js.map +1 -0
  8. package/es/src/charts/BarChart/index.js +48 -0
  9. package/es/src/charts/BarChart/index.js.map +1 -0
  10. package/es/src/charts/BoxWhisker/index.js +52 -0
  11. package/es/src/charts/BoxWhisker/index.js.map +1 -0
  12. package/es/src/charts/BumpChart/index.js +81 -0
  13. package/es/src/charts/BumpChart/index.js.map +1 -0
  14. package/es/src/charts/Donut/index.js +42 -0
  15. package/es/src/charts/Donut/index.js.map +1 -0
  16. package/es/src/charts/Geomap/applyLayout.js +208 -0
  17. package/es/src/charts/Geomap/applyLayout.js.map +1 -0
  18. package/es/src/charts/Geomap/emit.js +169 -0
  19. package/es/src/charts/Geomap/emit.js.map +1 -0
  20. package/es/src/charts/Geomap/index.js +521 -0
  21. package/es/src/charts/Geomap/index.js.map +1 -0
  22. package/es/src/charts/LinePlot/index.js +32 -0
  23. package/es/src/charts/LinePlot/index.js.map +1 -0
  24. package/es/src/charts/Matrix/applyLayout.js +92 -0
  25. package/es/src/charts/Matrix/applyLayout.js.map +1 -0
  26. package/es/src/charts/Matrix/emit.js +44 -0
  27. package/es/src/charts/Matrix/emit.js.map +1 -0
  28. package/es/src/charts/Matrix/index.js +154 -0
  29. package/es/src/charts/Matrix/index.js.map +1 -0
  30. package/es/src/charts/Network/applyLayout.js +322 -0
  31. package/es/src/charts/Network/applyLayout.js.map +1 -0
  32. package/es/src/charts/Network/emit.js +273 -0
  33. package/es/src/charts/Network/emit.js.map +1 -0
  34. package/es/src/charts/Network/index.js +422 -0
  35. package/es/src/charts/Network/index.js.map +1 -0
  36. package/es/src/charts/Pack/applyLayout.js +46 -0
  37. package/es/src/charts/Pack/applyLayout.js.map +1 -0
  38. package/es/src/charts/Pack/emit.js +116 -0
  39. package/es/src/charts/Pack/emit.js.map +1 -0
  40. package/es/src/charts/Pack/index.js +194 -0
  41. package/es/src/charts/Pack/index.js.map +1 -0
  42. package/es/src/charts/Pack/recursionCircles.js +18 -0
  43. package/es/src/charts/Pack/recursionCircles.js.map +1 -0
  44. package/es/src/charts/Pie/applyLayout.js +44 -0
  45. package/es/src/charts/Pie/applyLayout.js.map +1 -0
  46. package/es/src/charts/Pie/emit.js +111 -0
  47. package/es/src/charts/Pie/emit.js.map +1 -0
  48. package/es/src/charts/Pie/index.js +134 -0
  49. package/es/src/charts/Pie/index.js.map +1 -0
  50. package/es/src/charts/Plot/draw.js +424 -0
  51. package/es/src/charts/Plot/draw.js.map +1 -0
  52. package/es/src/charts/Plot/index.js +827 -0
  53. package/es/src/charts/Plot/index.js.map +1 -0
  54. package/es/src/charts/Plot/labelPlacement.js +36 -0
  55. package/es/src/charts/Plot/labelPlacement.js.map +1 -0
  56. package/es/src/charts/Plot/pipeline.js +594 -0
  57. package/es/src/charts/Plot/pipeline.js.map +1 -0
  58. package/es/src/charts/Plot/pipelineDomains.js +254 -0
  59. package/es/src/charts/Plot/pipelineDomains.js.map +1 -0
  60. package/es/src/charts/Plot/pipelineLineLabels.js +210 -0
  61. package/es/src/charts/Plot/pipelineLineLabels.js.map +1 -0
  62. package/es/src/charts/Plot/shapeDefaults.js +189 -0
  63. package/es/src/charts/Plot/shapeDefaults.js.map +1 -0
  64. package/es/src/charts/Plot/stackHelpers.js +52 -0
  65. package/es/src/charts/Plot/stackHelpers.js.map +1 -0
  66. package/es/src/charts/Priestley/applyLayout.js +121 -0
  67. package/es/src/charts/Priestley/applyLayout.js.map +1 -0
  68. package/es/src/charts/Priestley/emit.js +129 -0
  69. package/es/src/charts/Priestley/emit.js.map +1 -0
  70. package/es/src/charts/Priestley/index.js +97 -0
  71. package/es/src/charts/Priestley/index.js.map +1 -0
  72. package/es/src/charts/Radar/applyLayout.js +326 -0
  73. package/es/src/charts/Radar/applyLayout.js.map +1 -0
  74. package/es/src/charts/Radar/emit.js +28 -0
  75. package/es/src/charts/Radar/emit.js.map +1 -0
  76. package/es/src/charts/Radar/index.js +98 -0
  77. package/es/src/charts/Radar/index.js.map +1 -0
  78. package/es/src/charts/RadialMatrix/applyLayout.js +132 -0
  79. package/es/src/charts/RadialMatrix/applyLayout.js.map +1 -0
  80. package/es/src/charts/RadialMatrix/emit.js +33 -0
  81. package/es/src/charts/RadialMatrix/emit.js.map +1 -0
  82. package/es/src/charts/RadialMatrix/index.js +144 -0
  83. package/es/src/charts/RadialMatrix/index.js.map +1 -0
  84. package/es/src/charts/Rings/applyLayout.js +508 -0
  85. package/es/src/charts/Rings/applyLayout.js.map +1 -0
  86. package/es/src/charts/Rings/emit.js +222 -0
  87. package/es/src/charts/Rings/emit.js.map +1 -0
  88. package/es/src/charts/Rings/index.js +245 -0
  89. package/es/src/charts/Rings/index.js.map +1 -0
  90. package/es/src/charts/Sankey/applyLayout.js +107 -0
  91. package/es/src/charts/Sankey/applyLayout.js.map +1 -0
  92. package/es/src/charts/Sankey/emit.js +134 -0
  93. package/es/src/charts/Sankey/emit.js.map +1 -0
  94. package/es/src/charts/Sankey/index.js +219 -0
  95. package/es/src/charts/Sankey/index.js.map +1 -0
  96. package/es/src/charts/StackedArea/index.js +27 -0
  97. package/es/src/charts/StackedArea/index.js.map +1 -0
  98. package/es/src/charts/Tree/applyLayout.js +233 -0
  99. package/es/src/charts/Tree/applyLayout.js.map +1 -0
  100. package/es/src/charts/Tree/emit.js +257 -0
  101. package/es/src/charts/Tree/emit.js.map +1 -0
  102. package/es/src/charts/Tree/index.js +105 -0
  103. package/es/src/charts/Tree/index.js.map +1 -0
  104. package/es/src/charts/Treemap/applyLayout.js +85 -0
  105. package/es/src/charts/Treemap/applyLayout.js.map +1 -0
  106. package/es/src/charts/Treemap/emit.js +141 -0
  107. package/es/src/charts/Treemap/emit.js.map +1 -0
  108. package/es/src/charts/Treemap/index.js +177 -0
  109. package/es/src/charts/Treemap/index.js.map +1 -0
  110. package/es/src/charts/Treemap/thresholdFunction.js +112 -0
  111. package/es/src/charts/Treemap/thresholdFunction.js.map +1 -0
  112. package/es/src/charts/definition/ChartDefinition.js +12 -0
  113. package/es/src/charts/definition/ChartDefinition.js.map +1 -0
  114. package/es/src/charts/definition/applyDefinition.js +107 -0
  115. package/es/src/charts/definition/applyDefinition.js.map +1 -0
  116. package/es/src/charts/definition/makeChart.js +153 -0
  117. package/es/src/charts/definition/makeChart.js.map +1 -0
  118. package/es/src/charts/drawSteps/zoomControls.js +231 -96
  119. package/es/src/charts/drawSteps/zoomControls.js.map +1 -1
  120. package/es/src/charts/events/click.legend.js +2 -2
  121. package/es/src/charts/events/click.legend.js.map +1 -1
  122. package/es/src/charts/events/click.shape.js +5 -5
  123. package/es/src/charts/events/click.shape.js.map +1 -1
  124. package/es/src/charts/events/mouseenter.js +20 -1
  125. package/es/src/charts/events/mouseenter.js.map +1 -1
  126. package/es/src/charts/events/mouseleave.js +19 -4
  127. package/es/src/charts/events/mouseleave.js.map +1 -1
  128. package/es/src/charts/events/mousemove.legend.js +10 -10
  129. package/es/src/charts/events/mousemove.legend.js.map +1 -1
  130. package/es/src/charts/events/mousemove.shape.js +14 -8
  131. package/es/src/charts/events/mousemove.shape.js.map +1 -1
  132. package/es/src/charts/events/touchstart.body.js.map +1 -1
  133. package/es/src/charts/features/axes.js +432 -0
  134. package/es/src/charts/features/axes.js.map +1 -0
  135. package/es/src/charts/features/chartGeometry.js +66 -0
  136. package/es/src/charts/features/chartGeometry.js.map +1 -0
  137. package/es/src/charts/features/colorScaleBucket.js +92 -0
  138. package/es/src/charts/features/colorScaleBucket.js.map +1 -0
  139. package/es/src/charts/features/emitHelpers.js +217 -0
  140. package/es/src/charts/features/emitHelpers.js.map +1 -0
  141. package/es/src/charts/features/ensureZoomDom.js +71 -0
  142. package/es/src/charts/features/ensureZoomDom.js.map +1 -0
  143. package/es/src/charts/features/features.js +650 -0
  144. package/es/src/charts/features/features.js.map +1 -0
  145. package/es/src/charts/features/featuresLegend.js +180 -0
  146. package/es/src/charts/features/featuresLegend.js.map +1 -0
  147. package/es/src/charts/features/legendLabel.js +12 -0
  148. package/es/src/charts/features/legendLabel.js.map +1 -0
  149. package/es/src/charts/features/lineLabels.js +154 -0
  150. package/es/src/charts/features/lineLabels.js.map +1 -0
  151. package/es/src/charts/features/plotPaint.js +512 -0
  152. package/es/src/charts/features/plotPaint.js.map +1 -0
  153. package/es/src/charts/features/shapeEmit.js +273 -0
  154. package/es/src/charts/features/shapeEmit.js.map +1 -0
  155. package/es/src/charts/helpers/matrixData.js +3 -3
  156. package/es/src/charts/helpers/matrixData.js.map +1 -1
  157. package/es/src/charts/index.js +21 -21
  158. package/es/src/charts/index.js.map +1 -1
  159. package/es/src/charts/pipeline/resolveSpec.js +44 -0
  160. package/es/src/charts/pipeline/resolveSpec.js.map +1 -0
  161. package/es/src/charts/pipeline/runChartDraw.js +109 -0
  162. package/es/src/charts/pipeline/runChartDraw.js.map +1 -0
  163. package/es/src/charts/pipeline/runVizPipeline.js +84 -0
  164. package/es/src/charts/pipeline/runVizPipeline.js.map +1 -0
  165. package/es/src/charts/pipeline/stages.js +103 -0
  166. package/es/src/charts/pipeline/stages.js.map +1 -0
  167. package/es/src/charts/pipeline/vizContext.js +29 -0
  168. package/es/src/charts/pipeline/vizContext.js.map +1 -0
  169. package/es/src/charts/pipeline/vizDraw.js +37 -0
  170. package/es/src/charts/pipeline/vizDraw.js.map +1 -0
  171. package/es/src/charts/pipeline/vizDrawPure.js +174 -0
  172. package/es/src/charts/pipeline/vizDrawPure.js.map +1 -0
  173. package/es/src/charts/pipeline/vizPreDraw.js +145 -0
  174. package/es/src/charts/pipeline/vizPreDraw.js.map +1 -0
  175. package/es/src/charts/pipeline/vizPreDrawPure.js +279 -0
  176. package/es/src/charts/pipeline/vizPreDrawPure.js.map +1 -0
  177. package/es/src/charts/plotBuffers/Bar.js +4 -4
  178. package/es/src/charts/plotBuffers/Bar.js.map +1 -1
  179. package/es/src/charts/plotBuffers/Box.js +4 -4
  180. package/es/src/charts/plotBuffers/Box.js.map +1 -1
  181. package/es/src/charts/plotBuffers/Circle.js +2 -2
  182. package/es/src/charts/plotBuffers/Circle.js.map +1 -1
  183. package/es/src/charts/plotBuffers/Line.js +5 -5
  184. package/es/src/charts/plotBuffers/Line.js.map +1 -1
  185. package/es/src/charts/plotBuffers/Rect.js +2 -2
  186. package/es/src/charts/plotBuffers/Rect.js.map +1 -1
  187. package/es/src/charts/plotBuffers/discreteBuffer.js +1 -2
  188. package/es/src/charts/plotBuffers/discreteBuffer.js.map +1 -1
  189. package/es/src/charts/plotBuffers/numericBuffer.js +1 -2
  190. package/es/src/charts/plotBuffers/numericBuffer.js.map +1 -1
  191. package/es/src/charts/viz/Viz.js +985 -0
  192. package/es/src/charts/viz/Viz.js.map +1 -0
  193. package/es/src/charts/viz/VizBase.js +447 -0
  194. package/es/src/charts/viz/VizBase.js.map +1 -0
  195. package/es/src/charts/viz/VizBaseConfig.js +504 -0
  196. package/es/src/charts/viz/VizBaseConfig.js.map +1 -0
  197. package/es/src/charts/viz/interactionOpacity.js +247 -0
  198. package/es/src/charts/viz/interactionOpacity.js.map +1 -0
  199. package/es/src/charts/viz/ordinalColor.js +71 -0
  200. package/es/src/charts/viz/ordinalColor.js.map +1 -0
  201. package/es/src/charts/viz/trailCatchup.js +127 -0
  202. package/es/src/charts/viz/trailCatchup.js.map +1 -0
  203. package/es/src/charts/viz/vizDefaults.js +602 -0
  204. package/es/src/charts/viz/vizDefaults.js.map +1 -0
  205. package/es/src/charts/viz/vizRender.js +251 -0
  206. package/es/src/charts/viz/vizRender.js.map +1 -0
  207. package/es/src/charts/viz/vizTypes.js +28 -0
  208. package/es/src/charts/viz/vizTypes.js.map +1 -0
  209. package/es/src/components/Axis/Axis.js +691 -0
  210. package/es/src/components/Axis/Axis.js.map +1 -0
  211. package/es/src/components/Axis/AxisBottom.js.map +1 -0
  212. package/es/src/components/Axis/AxisLeft.js.map +1 -0
  213. package/es/src/components/Axis/AxisRight.js.map +1 -0
  214. package/es/src/components/Axis/AxisTop.js.map +1 -0
  215. package/es/src/components/Axis/axisLayout.js +208 -0
  216. package/es/src/components/Axis/axisLayout.js.map +1 -0
  217. package/es/src/components/Axis/axisLayoutLabels.js +177 -0
  218. package/es/src/components/Axis/axisLayoutLabels.js.map +1 -0
  219. package/es/src/components/Axis/axisLayoutScale.js +374 -0
  220. package/es/src/components/Axis/axisLayoutScale.js.map +1 -0
  221. package/es/src/components/Axis/axisRender.js +535 -0
  222. package/es/src/components/Axis/axisRender.js.map +1 -0
  223. package/es/src/components/ColorScale/ColorScale.js +506 -0
  224. package/es/src/components/ColorScale/ColorScale.js.map +1 -0
  225. package/es/src/components/ColorScale/colorScaleRender.js +277 -0
  226. package/es/src/components/ColorScale/colorScaleRender.js.map +1 -0
  227. package/es/src/components/ColorScale/colorScaleScale.js +274 -0
  228. package/es/src/components/ColorScale/colorScaleScale.js.map +1 -0
  229. package/es/src/components/Legend/Legend.js +445 -0
  230. package/es/src/components/Legend/Legend.js.map +1 -0
  231. package/es/src/components/Legend/legendConfig.js +87 -0
  232. package/es/src/components/Legend/legendConfig.js.map +1 -0
  233. package/es/src/components/Legend/legendRender.js +245 -0
  234. package/es/src/components/Legend/legendRender.js.map +1 -0
  235. package/es/src/components/Message.js.map +1 -1
  236. package/es/src/components/TextBox.js +639 -453
  237. package/es/src/components/TextBox.js.map +1 -1
  238. package/es/src/components/Timeline/Timeline.js +674 -0
  239. package/es/src/components/Timeline/Timeline.js.map +1 -0
  240. package/es/src/components/Timeline/timelineConfig.js +115 -0
  241. package/es/src/components/Timeline/timelineConfig.js.map +1 -0
  242. package/es/src/components/Timeline/timelineRender.js +267 -0
  243. package/es/src/components/Timeline/timelineRender.js.map +1 -0
  244. package/es/src/components/Tooltip.js +288 -249
  245. package/es/src/components/Tooltip.js.map +1 -1
  246. package/es/src/components/index.js +8 -8
  247. package/es/src/components/index.js.map +1 -1
  248. package/es/src/fluent.js +265 -0
  249. package/es/src/fluent.js.map +1 -0
  250. package/es/src/shapes/Area.js +96 -114
  251. package/es/src/shapes/Area.js.map +1 -1
  252. package/es/src/shapes/Bar.js +71 -86
  253. package/es/src/shapes/Bar.js.map +1 -1
  254. package/es/src/shapes/Box.js +295 -190
  255. package/es/src/shapes/Box.js.map +1 -1
  256. package/es/src/shapes/Circle.js +72 -31
  257. package/es/src/shapes/Circle.js.map +1 -1
  258. package/es/src/shapes/Image.js +164 -85
  259. package/es/src/shapes/Image.js.map +1 -1
  260. package/es/src/shapes/Line.js +51 -94
  261. package/es/src/shapes/Line.js.map +1 -1
  262. package/es/src/shapes/Path.js +33 -41
  263. package/es/src/shapes/Path.js.map +1 -1
  264. package/es/src/shapes/Rect.js +86 -37
  265. package/es/src/shapes/Rect.js.map +1 -1
  266. package/es/src/shapes/Shape.js +655 -678
  267. package/es/src/shapes/Shape.js.map +1 -1
  268. package/es/src/shapes/Whisker.js +156 -61
  269. package/es/src/shapes/Whisker.js.map +1 -1
  270. package/es/src/shapes/buildLabelData.js +70 -0
  271. package/es/src/shapes/buildLabelData.js.map +1 -0
  272. package/es/src/shapes/emitLabels.js +84 -0
  273. package/es/src/shapes/emitLabels.js.map +1 -0
  274. package/es/src/shapes/hitAreaNode.js +37 -0
  275. package/es/src/shapes/hitAreaNode.js.map +1 -0
  276. package/es/src/shapes/sceneSort.js +57 -0
  277. package/es/src/shapes/sceneSort.js.map +1 -0
  278. package/es/src/shapes/shapeConfig.js +31 -0
  279. package/es/src/shapes/shapeConfig.js.map +1 -0
  280. package/es/src/utils/BaseClass.js +35 -19
  281. package/es/src/utils/BaseClass.js.map +1 -1
  282. package/es/src/utils/D3Scale.js +16 -0
  283. package/es/src/utils/D3Scale.js.map +1 -0
  284. package/es/src/utils/D3plusConfig.js.map +1 -1
  285. package/es/src/utils/configPrep.js +8 -3
  286. package/es/src/utils/configPrep.js.map +1 -1
  287. package/es/src/utils/getProp.js +1 -1
  288. package/es/src/utils/getProp.js.map +1 -1
  289. package/es/src/utils/index.js +1 -0
  290. package/es/src/utils/index.js.map +1 -1
  291. package/es/src/utils/paintComponentScene.js +59 -0
  292. package/es/src/utils/paintComponentScene.js.map +1 -0
  293. package/es/umd-entry.js +16 -0
  294. package/es/umd-entry.js.map +1 -0
  295. package/package.json +17 -9
  296. package/types/index.d.ts +3 -1
  297. package/types/internal.d.ts +54 -0
  298. package/types/src/charts/AreaPlot/index.d.ts +10 -0
  299. package/types/src/charts/BarChart/index.d.ts +10 -0
  300. package/types/src/charts/BoxWhisker/index.d.ts +11 -0
  301. package/types/src/charts/BumpChart/index.d.ts +11 -0
  302. package/types/src/charts/ChartDefinition.d.ts +75 -0
  303. package/types/src/charts/Donut/index.d.ts +13 -0
  304. package/types/src/charts/Geomap/applyLayout.d.ts +7 -0
  305. package/types/src/charts/Geomap/emit.d.ts +7 -0
  306. package/types/src/charts/Geomap/index.d.ts +14 -0
  307. package/types/src/charts/Geomap.d.ts +6 -0
  308. package/types/src/charts/LinePlot/index.d.ts +10 -0
  309. package/types/src/charts/Matrix/applyLayout.d.ts +9 -0
  310. package/types/src/charts/Matrix/emit.d.ts +6 -0
  311. package/types/src/charts/Matrix/index.d.ts +14 -0
  312. package/types/src/charts/Matrix.d.ts +0 -26
  313. package/types/src/charts/Network/applyLayout.d.ts +10 -0
  314. package/types/src/charts/Network/emit.d.ts +6 -0
  315. package/types/src/charts/Network/index.d.ts +7 -0
  316. package/types/src/charts/Network.d.ts +0 -24
  317. package/types/src/charts/Pack/applyLayout.d.ts +16 -0
  318. package/types/src/charts/Pack/emit.d.ts +6 -0
  319. package/types/src/charts/Pack/index.d.ts +15 -0
  320. package/types/src/charts/Pack/recursionCircles.d.ts +7 -0
  321. package/types/src/charts/Pack.d.ts +0 -13
  322. package/types/src/charts/Pie/applyLayout.d.ts +8 -0
  323. package/types/src/charts/Pie/emit.d.ts +5 -0
  324. package/types/src/charts/Pie/index.d.ts +14 -0
  325. package/types/src/charts/Pie.d.ts +0 -27
  326. package/types/src/charts/Plot/draw.d.ts +2 -0
  327. package/types/src/charts/Plot/index.d.ts +167 -0
  328. package/types/src/charts/Plot/labelPlacement.d.ts +15 -0
  329. package/types/src/charts/Plot/pipeline.d.ts +70 -0
  330. package/types/src/charts/Plot/pipelineDomains.d.ts +2 -0
  331. package/types/src/charts/Plot/pipelineLineLabels.d.ts +2 -0
  332. package/types/src/charts/Plot/shapeDefaults.d.ts +64 -0
  333. package/types/src/charts/Plot/stackHelpers.d.ts +24 -0
  334. package/types/src/charts/Plot.d.ts +23 -72
  335. package/types/src/charts/Priestley/applyLayout.d.ts +21 -0
  336. package/types/src/charts/Priestley/emit.d.ts +6 -0
  337. package/types/src/charts/Priestley/index.d.ts +14 -0
  338. package/types/src/charts/Radar/applyLayout.d.ts +10 -0
  339. package/types/src/charts/Radar/emit.d.ts +7 -0
  340. package/types/src/charts/Radar/index.d.ts +14 -0
  341. package/types/src/charts/RadialMatrix/applyLayout.d.ts +11 -0
  342. package/types/src/charts/RadialMatrix/emit.d.ts +6 -0
  343. package/types/src/charts/RadialMatrix/index.d.ts +14 -0
  344. package/types/src/charts/RadialMatrix.d.ts +0 -15
  345. package/types/src/charts/Rings/applyLayout.d.ts +2 -0
  346. package/types/src/charts/Rings/emit.d.ts +7 -0
  347. package/types/src/charts/Rings/index.d.ts +15 -0
  348. package/types/src/charts/Rings.d.ts +0 -13
  349. package/types/src/charts/Sankey/applyLayout.d.ts +7 -0
  350. package/types/src/charts/Sankey/emit.d.ts +6 -0
  351. package/types/src/charts/Sankey/index.d.ts +7 -0
  352. package/types/src/charts/Sankey.d.ts +0 -4
  353. package/types/src/charts/StackedArea/index.d.ts +10 -0
  354. package/types/src/charts/Tree/applyLayout.d.ts +2 -0
  355. package/types/src/charts/Tree/emit.d.ts +7 -0
  356. package/types/src/charts/Tree/index.d.ts +14 -0
  357. package/types/src/charts/Tree.d.ts +0 -16
  358. package/types/src/charts/Treemap/applyLayout.d.ts +16 -0
  359. package/types/src/charts/Treemap/emit.d.ts +6 -0
  360. package/types/src/charts/Treemap/index.d.ts +18 -0
  361. package/types/src/charts/Treemap/thresholdFunction.d.ts +25 -0
  362. package/types/src/charts/Treemap.d.ts +4 -13
  363. package/types/src/charts/Viz.d.ts +49 -361
  364. package/types/src/charts/VizBase.d.ts +158 -0
  365. package/types/src/charts/VizBaseConfig.d.ts +148 -0
  366. package/types/src/charts/applyDefinition.d.ts +13 -0
  367. package/types/src/charts/axes.d.ts +134 -0
  368. package/types/src/charts/chartGeometry.d.ts +58 -0
  369. package/types/src/charts/definition/ChartDefinition.d.ts +84 -0
  370. package/types/src/charts/definition/applyDefinition.d.ts +13 -0
  371. package/types/src/charts/definition/makeChart.d.ts +22 -0
  372. package/types/src/charts/drawSteps/zoomControls.d.ts +25 -5
  373. package/types/src/charts/emitHelpers.d.ts +122 -0
  374. package/types/src/charts/ensureZoomDom.d.ts +39 -0
  375. package/types/src/charts/events/click.legend.d.ts +1 -1
  376. package/types/src/charts/events/click.shape.d.ts +1 -1
  377. package/types/src/charts/events/mouseenter.d.ts +1 -1
  378. package/types/src/charts/events/mouseleave.d.ts +1 -1
  379. package/types/src/charts/events/mousemove.legend.d.ts +1 -1
  380. package/types/src/charts/events/mousemove.shape.d.ts +1 -1
  381. package/types/src/charts/events/touchstart.body.d.ts +1 -1
  382. package/types/src/charts/factories.d.ts +73 -0
  383. package/types/src/charts/features/axes.d.ts +134 -0
  384. package/types/src/charts/features/chartGeometry.d.ts +58 -0
  385. package/types/src/charts/features/colorScaleBucket.d.ts +43 -0
  386. package/types/src/charts/features/colorScaleBucketShare.d.ts +16 -0
  387. package/types/src/charts/features/emitHelpers.d.ts +123 -0
  388. package/types/src/charts/features/ensureZoomDom.d.ts +39 -0
  389. package/types/src/charts/features/features.d.ts +152 -0
  390. package/types/src/charts/features/featuresLegend.d.ts +12 -0
  391. package/types/src/charts/features/legendLabel.d.ts +11 -0
  392. package/types/src/charts/features/lineLabels.d.ts +40 -0
  393. package/types/src/charts/features/plotPaint.d.ts +233 -0
  394. package/types/src/charts/features/shapeEmit.d.ts +61 -0
  395. package/types/src/charts/features.d.ts +152 -0
  396. package/types/src/charts/featuresLegend.d.ts +12 -0
  397. package/types/src/charts/helpers/matrixData.d.ts +1 -1
  398. package/types/src/charts/index.d.ts +21 -21
  399. package/types/src/charts/legendLabel.d.ts +11 -0
  400. package/types/src/charts/lineLabels.d.ts +40 -0
  401. package/types/src/charts/makeChart.d.ts +22 -0
  402. package/types/src/charts/pipeline/resolveSpec.d.ts +51 -0
  403. package/types/src/charts/pipeline/runChartDraw.d.ts +38 -0
  404. package/types/src/charts/pipeline/runVizPipeline.d.ts +31 -0
  405. package/types/src/charts/pipeline/stages.d.ts +160 -0
  406. package/types/src/charts/pipeline/vizContext.d.ts +45 -0
  407. package/types/src/charts/pipeline/vizDraw.d.ts +25 -0
  408. package/types/src/charts/pipeline/vizDrawPure.d.ts +46 -0
  409. package/types/src/charts/pipeline/vizPreDraw.d.ts +22 -0
  410. package/types/src/charts/pipeline/vizPreDrawPure.d.ts +68 -0
  411. package/types/src/charts/plotBuffers/Bar.d.ts +6 -5
  412. package/types/src/charts/plotBuffers/Box.d.ts +6 -5
  413. package/types/src/charts/plotBuffers/Circle.d.ts +6 -5
  414. package/types/src/charts/plotBuffers/Line.d.ts +6 -5
  415. package/types/src/charts/plotBuffers/Rect.d.ts +6 -5
  416. package/types/src/charts/plotBuffers/discreteBuffer.d.ts +2 -1
  417. package/types/src/charts/plotBuffers/numericBuffer.d.ts +2 -1
  418. package/types/src/charts/plotPaint.d.ts +233 -0
  419. package/types/src/charts/resolveSpec.d.ts +50 -0
  420. package/types/src/charts/runChartDraw.d.ts +38 -0
  421. package/types/src/charts/runVizPipeline.d.ts +31 -0
  422. package/types/src/charts/shapeEmit.d.ts +61 -0
  423. package/types/src/charts/stages.d.ts +117 -0
  424. package/types/src/charts/viz/Viz.d.ts +111 -0
  425. package/types/src/charts/viz/VizBase.d.ts +160 -0
  426. package/types/src/charts/viz/VizBaseConfig.d.ts +156 -0
  427. package/types/src/charts/viz/interactionOpacity.d.ts +23 -0
  428. package/types/src/charts/viz/ordinalColor.d.ts +14 -0
  429. package/types/src/charts/viz/trailCatchup.d.ts +14 -0
  430. package/types/src/charts/viz/vizDefaults.d.ts +8 -0
  431. package/types/src/charts/viz/vizRender.d.ts +8 -0
  432. package/types/src/charts/viz/vizTypes.d.ts +250 -0
  433. package/types/src/charts/vizContext.d.ts +46 -0
  434. package/types/src/charts/vizDefaults.d.ts +8 -0
  435. package/types/src/charts/vizDraw.d.ts +25 -0
  436. package/types/src/charts/vizDrawPure.d.ts +17 -0
  437. package/types/src/charts/vizPreDraw.d.ts +22 -0
  438. package/types/src/charts/vizPreDrawPure.d.ts +40 -0
  439. package/types/src/charts/vizRender.d.ts +8 -0
  440. package/types/src/charts/vizTypes.d.ts +202 -0
  441. package/types/src/components/Axis/Axis.d.ts +182 -0
  442. package/types/src/components/Axis/AxisBottom.d.ts +11 -0
  443. package/types/src/components/Axis/AxisLeft.d.ts +11 -0
  444. package/types/src/components/Axis/AxisRight.d.ts +11 -0
  445. package/types/src/components/Axis/AxisTop.d.ts +11 -0
  446. package/types/src/components/Axis/axisLayout.d.ts +29 -0
  447. package/types/src/components/Axis/axisLayoutLabels.d.ts +70 -0
  448. package/types/src/components/Axis/axisLayoutScale.d.ts +14 -0
  449. package/types/src/components/Axis/axisRender.d.ts +68 -0
  450. package/types/src/components/Axis.d.ts +68 -194
  451. package/types/src/components/ColorScale/ColorScale.d.ts +100 -0
  452. package/types/src/components/ColorScale/colorScaleRender.d.ts +15 -0
  453. package/types/src/components/ColorScale/colorScaleScale.d.ts +19 -0
  454. package/types/src/components/ColorScale.d.ts +1 -129
  455. package/types/src/components/Legend/Legend.d.ts +95 -0
  456. package/types/src/components/Legend/legendConfig.d.ts +7 -0
  457. package/types/src/components/Legend/legendRender.d.ts +16 -0
  458. package/types/src/components/Legend.d.ts +9 -73
  459. package/types/src/components/TextBox.d.ts +25 -218
  460. package/types/src/components/Timeline/Timeline.d.ts +118 -0
  461. package/types/src/components/Timeline/timelineConfig.d.ts +6 -0
  462. package/types/src/components/Timeline/timelineRender.d.ts +24 -0
  463. package/types/src/components/Timeline.d.ts +7 -81
  464. package/types/src/components/Tooltip.d.ts +20 -200
  465. package/types/src/components/axisLayout.d.ts +27 -0
  466. package/types/src/components/axisLayoutLabels.d.ts +42 -0
  467. package/types/src/components/axisLayoutScale.d.ts +12 -0
  468. package/types/src/components/axisRender.d.ts +65 -0
  469. package/types/src/components/colorScaleRender.d.ts +15 -0
  470. package/types/src/components/colorScaleScale.d.ts +19 -0
  471. package/types/src/components/index.d.ts +8 -8
  472. package/types/src/components/legendConfig.d.ts +7 -0
  473. package/types/src/components/legendRender.d.ts +16 -0
  474. package/types/src/components/timelineConfig.d.ts +6 -0
  475. package/types/src/components/timelineRender.d.ts +14 -0
  476. package/types/src/fluent.d.ts +94 -0
  477. package/types/src/shapes/Area.d.ts +15 -27
  478. package/types/src/shapes/Bar.d.ts +13 -33
  479. package/types/src/shapes/Box.d.ts +17 -56
  480. package/types/src/shapes/Circle.d.ts +11 -17
  481. package/types/src/shapes/Image.d.ts +18 -84
  482. package/types/src/shapes/Line.d.ts +12 -22
  483. package/types/src/shapes/Path.d.ts +12 -19
  484. package/types/src/shapes/Rect.d.ts +11 -27
  485. package/types/src/shapes/Shape.d.ts +46 -257
  486. package/types/src/shapes/Whisker.d.ts +15 -42
  487. package/types/src/shapes/buildLabelData.d.ts +50 -0
  488. package/types/src/shapes/emitLabels.d.ts +16 -0
  489. package/types/src/shapes/hitAreaNode.d.ts +19 -0
  490. package/types/src/shapes/sceneSort.d.ts +20 -0
  491. package/types/src/shapes/shapeConfig.d.ts +226 -0
  492. package/types/src/utils/BaseClass.d.ts +13 -7
  493. package/types/src/utils/D3Scale.d.ts +48 -0
  494. package/types/src/utils/D3plusConfig.d.ts +230 -3
  495. package/types/src/utils/configPrep.d.ts +7 -4
  496. package/types/src/utils/getProp.d.ts +3 -1
  497. package/types/src/utils/index.d.ts +3 -1
  498. package/types/src/utils/paintComponentScene.d.ts +28 -0
  499. package/types/umd-entry.d.ts +15 -0
  500. package/umd/d3plus-core.full.js +31148 -19470
  501. package/umd/d3plus-core.full.js.map +1 -1
  502. package/umd/d3plus-core.full.min.js +5315 -2939
  503. package/umd/d3plus-core.js +17379 -10575
  504. package/umd/d3plus-core.js.map +1 -1
  505. package/umd/d3plus-core.min.js +3470 -1873
  506. package/es/src/charts/AreaPlot.js +0 -85
  507. package/es/src/charts/AreaPlot.js.map +0 -1
  508. package/es/src/charts/BarChart.js +0 -92
  509. package/es/src/charts/BarChart.js.map +0 -1
  510. package/es/src/charts/BoxWhisker.js +0 -92
  511. package/es/src/charts/BoxWhisker.js.map +0 -1
  512. package/es/src/charts/BumpChart.js +0 -147
  513. package/es/src/charts/BumpChart.js.map +0 -1
  514. package/es/src/charts/Donut.js +0 -84
  515. package/es/src/charts/Donut.js.map +0 -1
  516. package/es/src/charts/Geomap.js +0 -766
  517. package/es/src/charts/Geomap.js.map +0 -1
  518. package/es/src/charts/LinePlot.js +0 -83
  519. package/es/src/charts/LinePlot.js.map +0 -1
  520. package/es/src/charts/Matrix.js +0 -341
  521. package/es/src/charts/Matrix.js.map +0 -1
  522. package/es/src/charts/Network.js +0 -796
  523. package/es/src/charts/Network.js.map +0 -1
  524. package/es/src/charts/Pack.js +0 -308
  525. package/es/src/charts/Pack.js.map +0 -1
  526. package/es/src/charts/Pie.js +0 -232
  527. package/es/src/charts/Pie.js.map +0 -1
  528. package/es/src/charts/Plot.js +0 -2114
  529. package/es/src/charts/Plot.js.map +0 -1
  530. package/es/src/charts/Priestley.js +0 -296
  531. package/es/src/charts/Priestley.js.map +0 -1
  532. package/es/src/charts/Radar.js +0 -420
  533. package/es/src/charts/Radar.js.map +0 -1
  534. package/es/src/charts/RadialMatrix.js +0 -383
  535. package/es/src/charts/RadialMatrix.js.map +0 -1
  536. package/es/src/charts/Rings.js +0 -788
  537. package/es/src/charts/Rings.js.map +0 -1
  538. package/es/src/charts/Sankey.js +0 -461
  539. package/es/src/charts/Sankey.js.map +0 -1
  540. package/es/src/charts/StackedArea.js +0 -80
  541. package/es/src/charts/StackedArea.js.map +0 -1
  542. package/es/src/charts/Tree.js +0 -347
  543. package/es/src/charts/Tree.js.map +0 -1
  544. package/es/src/charts/Treemap.js +0 -454
  545. package/es/src/charts/Treemap.js.map +0 -1
  546. package/es/src/charts/Viz.js +0 -1832
  547. package/es/src/charts/Viz.js.map +0 -1
  548. package/es/src/charts/drawSteps/drawAttribution.js +0 -16
  549. package/es/src/charts/drawSteps/drawAttribution.js.map +0 -1
  550. package/es/src/charts/drawSteps/drawBack.js +0 -24
  551. package/es/src/charts/drawSteps/drawBack.js.map +0 -1
  552. package/es/src/charts/drawSteps/drawColorScale.js +0 -75
  553. package/es/src/charts/drawSteps/drawColorScale.js.map +0 -1
  554. package/es/src/charts/drawSteps/drawLegend.js +0 -122
  555. package/es/src/charts/drawSteps/drawLegend.js.map +0 -1
  556. package/es/src/charts/drawSteps/drawSubtitle.js +0 -31
  557. package/es/src/charts/drawSteps/drawSubtitle.js.map +0 -1
  558. package/es/src/charts/drawSteps/drawTimeline.js +0 -85
  559. package/es/src/charts/drawSteps/drawTimeline.js.map +0 -1
  560. package/es/src/charts/drawSteps/drawTitle.js +0 -31
  561. package/es/src/charts/drawSteps/drawTitle.js.map +0 -1
  562. package/es/src/charts/drawSteps/drawTotal.js +0 -32
  563. package/es/src/charts/drawSteps/drawTotal.js.map +0 -1
  564. package/es/src/components/Axis.js +0 -1454
  565. package/es/src/components/Axis.js.map +0 -1
  566. package/es/src/components/AxisBottom.js.map +0 -1
  567. package/es/src/components/AxisLeft.js.map +0 -1
  568. package/es/src/components/AxisRight.js.map +0 -1
  569. package/es/src/components/AxisTop.js.map +0 -1
  570. package/es/src/components/ColorScale.js +0 -843
  571. package/es/src/components/ColorScale.js.map +0 -1
  572. package/es/src/components/Legend.js +0 -622
  573. package/es/src/components/Legend.js.map +0 -1
  574. package/es/src/components/Timeline.js +0 -695
  575. package/es/src/components/Timeline.js.map +0 -1
  576. /package/es/src/components/{AxisBottom.js → Axis/AxisBottom.js} +0 -0
  577. /package/es/src/components/{AxisLeft.js → Axis/AxisLeft.js} +0 -0
  578. /package/es/src/components/{AxisRight.js → Axis/AxisRight.js} +0 -0
  579. /package/es/src/components/{AxisTop.js → Axis/AxisTop.js} +0 -0
@@ -0,0 +1,827 @@
1
+ function _array_like_to_array(arr, len) {
2
+ if (len == null || len > arr.length) len = arr.length;
3
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4
+ return arr2;
5
+ }
6
+ function _array_without_holes(arr) {
7
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
8
+ }
9
+ function _assert_this_initialized(self) {
10
+ if (self === void 0) {
11
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
12
+ }
13
+ return self;
14
+ }
15
+ function _call_super(_this, derived, args) {
16
+ derived = _get_prototype_of(derived);
17
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
18
+ }
19
+ function _class_call_check(instance, Constructor) {
20
+ if (!(instance instanceof Constructor)) {
21
+ throw new TypeError("Cannot call a class as a function");
22
+ }
23
+ }
24
+ function _defineProperties(target, props) {
25
+ for(var i = 0; i < props.length; i++){
26
+ var descriptor = props[i];
27
+ descriptor.enumerable = descriptor.enumerable || false;
28
+ descriptor.configurable = true;
29
+ if ("value" in descriptor) descriptor.writable = true;
30
+ Object.defineProperty(target, descriptor.key, descriptor);
31
+ }
32
+ }
33
+ function _create_class(Constructor, protoProps, staticProps) {
34
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
35
+ if (staticProps) _defineProperties(Constructor, staticProps);
36
+ return Constructor;
37
+ }
38
+ function _get(target, property, receiver) {
39
+ if (typeof Reflect !== "undefined" && Reflect.get) {
40
+ _get = Reflect.get;
41
+ } else {
42
+ _get = function get(target, property, receiver) {
43
+ var base = _super_prop_base(target, property);
44
+ if (!base) return;
45
+ var desc = Object.getOwnPropertyDescriptor(base, property);
46
+ if (desc.get) {
47
+ return desc.get.call(receiver || target);
48
+ }
49
+ return desc.value;
50
+ };
51
+ }
52
+ return _get(target, property, receiver || target);
53
+ }
54
+ function _get_prototype_of(o) {
55
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
56
+ return o.__proto__ || Object.getPrototypeOf(o);
57
+ };
58
+ return _get_prototype_of(o);
59
+ }
60
+ function _inherits(subClass, superClass) {
61
+ if (typeof superClass !== "function" && superClass !== null) {
62
+ throw new TypeError("Super expression must either be null or a function");
63
+ }
64
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
65
+ constructor: {
66
+ value: subClass,
67
+ writable: true,
68
+ configurable: true
69
+ }
70
+ });
71
+ if (superClass) _set_prototype_of(subClass, superClass);
72
+ }
73
+ function _instanceof(left, right) {
74
+ "@swc/helpers - instanceof";
75
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
76
+ return !!right[Symbol.hasInstance](left);
77
+ } else {
78
+ return left instanceof right;
79
+ }
80
+ }
81
+ function _iterable_to_array(iter) {
82
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
83
+ }
84
+ function _non_iterable_spread() {
85
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
86
+ }
87
+ function _possible_constructor_return(self, call) {
88
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
89
+ return call;
90
+ }
91
+ return _assert_this_initialized(self);
92
+ }
93
+ function _set_prototype_of(o, p) {
94
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
95
+ o.__proto__ = p;
96
+ return o;
97
+ };
98
+ return _set_prototype_of(o, p);
99
+ }
100
+ function _super_prop_base(object, property) {
101
+ while(!Object.prototype.hasOwnProperty.call(object, property)){
102
+ object = _get_prototype_of(object);
103
+ if (object === null) break;
104
+ }
105
+ return object;
106
+ }
107
+ function _to_consumable_array(arr) {
108
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
109
+ }
110
+ function _type_of(obj) {
111
+ "@swc/helpers - typeof";
112
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
113
+ }
114
+ function _unsupported_iterable_to_array(o, minLen) {
115
+ if (!o) return;
116
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
117
+ var n = Object.prototype.toString.call(o).slice(8, -1);
118
+ if (n === "Object" && o.constructor) n = o.constructor.name;
119
+ if (n === "Map" || n === "Set") return Array.from(n);
120
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
121
+ }
122
+ function _is_native_reflect_construct() {
123
+ try {
124
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
125
+ } catch (_) {}
126
+ return (_is_native_reflect_construct = function() {
127
+ return !!result;
128
+ })();
129
+ }
130
+ /* eslint no-cond-assign: 0*/ import * as d3Shape from "d3-shape";
131
+ // @ts-ignore
132
+ import pkg from "open-color/open-color.js";
133
+ var openColor = pkg.theme;
134
+ import { colorAssign, colorContrast, colorDefaults } from "@d3plus/color";
135
+ import { assign, backgroundColor } from "@d3plus/dom";
136
+ import { AxisBottom, AxisLeft, AxisRight, AxisTop } from "../../components/index.js";
137
+ import { accessor, constant } from "../../utils/index.js";
138
+ import { installFluent } from "../../fluent.js";
139
+ // E4: Plot's identity-coerce accessor schema (18 keys). installFluent's
140
+ // per-key idempotence lets this co-exist with vizSchema on the parent
141
+ // Viz.prototype — installFluent walks the actual prototype (Plot.prototype
142
+ // here) and skips keys already present.
143
+ var plotSchema = [
144
+ {
145
+ key: "barPadding",
146
+ coerce: "identity"
147
+ },
148
+ {
149
+ key: "baseline",
150
+ coerce: "identity"
151
+ },
152
+ {
153
+ key: "lineLabels",
154
+ coerce: "identity"
155
+ },
156
+ {
157
+ key: "shapeSort",
158
+ coerce: "identity"
159
+ },
160
+ {
161
+ key: "sizeMax",
162
+ coerce: "identity"
163
+ },
164
+ {
165
+ key: "sizeMin",
166
+ coerce: "identity"
167
+ },
168
+ {
169
+ key: "sizeScale",
170
+ coerce: "identity"
171
+ },
172
+ {
173
+ key: "stacked",
174
+ coerce: "identity"
175
+ },
176
+ {
177
+ key: "xCutoff",
178
+ coerce: "identity"
179
+ },
180
+ {
181
+ key: "xDomain",
182
+ coerce: "identity"
183
+ },
184
+ {
185
+ key: "x2Domain",
186
+ coerce: "identity"
187
+ },
188
+ {
189
+ key: "xSort",
190
+ coerce: "identity"
191
+ },
192
+ {
193
+ key: "x2Sort",
194
+ coerce: "identity"
195
+ },
196
+ {
197
+ key: "yCutoff",
198
+ coerce: "identity"
199
+ },
200
+ {
201
+ key: "yDomain",
202
+ coerce: "identity"
203
+ },
204
+ {
205
+ key: "y2Domain",
206
+ coerce: "identity"
207
+ },
208
+ {
209
+ key: "ySort",
210
+ coerce: "identity"
211
+ },
212
+ {
213
+ key: "y2Sort",
214
+ coerce: "identity"
215
+ }
216
+ ];
217
+ import { plotDef } from "./pipeline.js";
218
+ import { drawPlot } from "./draw.js";
219
+ import { plotShapeDefaults } from "./shapeDefaults.js";
220
+ import { stackOffsetDiverging, stackOrderAscending, stackOrderDescending } from "./stackHelpers.js";
221
+ import { plotPaint } from "../features/plotPaint.js";
222
+ import Viz from "../viz/Viz.js";
223
+ import { default as BarBuffer } from "../plotBuffers/Bar.js";
224
+ import { default as BoxBuffer } from "../plotBuffers/Box.js";
225
+ import { default as CircleBuffer } from "../plotBuffers/Circle.js";
226
+ import { default as LineBuffer } from "../plotBuffers/Line.js";
227
+ import { default as RectBuffer } from "../plotBuffers/Rect.js";
228
+ var defaultBuffers = {
229
+ Bar: BarBuffer,
230
+ Box: BoxBuffer,
231
+ Circle: CircleBuffer,
232
+ Line: LineBuffer,
233
+ Rect: RectBuffer
234
+ };
235
+ var Plot = /*#__PURE__*/ function(Viz1) {
236
+ "use strict";
237
+ _inherits(Plot, Viz1);
238
+ function Plot() {
239
+ _class_call_check(this, Plot);
240
+ var _this;
241
+ _this = _call_super(this, Plot);
242
+ // E4: install identity-coerce accessors on Plot.prototype. Defaults
243
+ // are still applied below imperatively from plotDef; installFluent
244
+ // skips slots that are already set, so the constructor wins.
245
+ installFluent(_this, plotSchema);
246
+ // E3: scalar defaults sourced from plotDef.
247
+ var defaults = plotDef.defaults;
248
+ _this._axisPersist = defaults.axisPersist;
249
+ _this._annotations = defaults.annotations;
250
+ _this._backgroundConfig = {
251
+ duration: 0,
252
+ fill: "transparent"
253
+ };
254
+ _this.schema.barPadding = defaults.barPadding;
255
+ _this._buffer = assign({}, defaultBuffers, {
256
+ Bar: false,
257
+ Line: false
258
+ });
259
+ _this._confidenceConfig = {
260
+ fill: function fill(d, i) {
261
+ var c = typeof _this.schema.shapeConfig.Line.stroke === "function" ? _this.schema.shapeConfig.Line.stroke(d, i) : _this.schema.shapeConfig.Line.stroke;
262
+ return c;
263
+ },
264
+ fillOpacity: constant(0.5)
265
+ };
266
+ _this._discreteCutoff = defaults.discreteCutoff;
267
+ _this._groupPadding = defaults.groupPadding;
268
+ _this._labelConnectorConfig = {
269
+ strokeDasharray: "1 1"
270
+ };
271
+ _this._labelPosition = constant("auto");
272
+ _this._lineMarkerConfig = {
273
+ fill: function fill(d, i) {
274
+ return colorAssign(_this._id(d, i));
275
+ },
276
+ r: constant(3)
277
+ };
278
+ _this._lineMarkers = defaults.lineMarkers;
279
+ _this._previousAnnotations = {
280
+ back: [],
281
+ front: []
282
+ };
283
+ _this._previousShapes = [];
284
+ _this.schema.shape = defaults.shape;
285
+ _this.schema.shapeConfig = assign(_this.schema.shapeConfig, plotShapeDefaults.call(_this));
286
+ _this._shapeOrder = [
287
+ "Area",
288
+ "Path",
289
+ "Bar",
290
+ "Box",
291
+ "Line",
292
+ "Rect",
293
+ "Circle"
294
+ ];
295
+ _this.schema.shapeSort = function(a, b) {
296
+ return _this._shapeOrder.indexOf(a) - _this._shapeOrder.indexOf(b);
297
+ };
298
+ _this.schema.sizeMax = 20;
299
+ _this.schema.sizeMin = 5;
300
+ _this.schema.sizeScale = "sqrt";
301
+ _this._stackOffset = stackOffsetDiverging;
302
+ _this._stackOrder = stackOrderDescending;
303
+ _this.schema.timelineConfig = assign(_this.schema.timelineConfig, {
304
+ brushMin: function brushMin() {
305
+ return _this._xTime || _this._yTime || _this._x2Time || _this._y2Time ? 2 : 1;
306
+ }
307
+ });
308
+ _this._x = accessor("x");
309
+ _this._xKey = "x";
310
+ _this._xAxis = new AxisBottom().align("end");
311
+ // _xTest/_yTest/_x2Test/_y2Test are NOT persistent fields anymore. The
312
+ // measure-only test axes are allocated as locals inside `_draw` and
313
+ // garbage-collected after each draw — proving Plot doesn't need to
314
+ // own a long-lived Axis instance just for layout. See measureAxis()
315
+ // in axisLayout.ts for the standalone shape.
316
+ _this._xConfig = {
317
+ gridConfig: {
318
+ stroke: function stroke(d) {
319
+ if (_this.schema.discrete && _this.schema.discrete.charAt(0) === "x") return "transparent";
320
+ var range = _this._xAxis.range();
321
+ var position = _this._xAxis._getPosition.bind(_this._xAxis)(d.id);
322
+ if (range[0] === position) return "transparent";
323
+ var bg = _this._select ? backgroundColor(_this._select.node()) : "rgb(255, 255, 255)";
324
+ var contrast = colorContrast(bg);
325
+ return contrast === colorDefaults.dark ? openColor.colors.gray[200] : openColor.colors.gray[600];
326
+ }
327
+ }
328
+ };
329
+ _this.schema.xCutoff = 150;
330
+ _this._x2 = accessor("x2");
331
+ _this._x2Key = "x2";
332
+ _this._x2Axis = new AxisTop().align("start");
333
+ _this._x2Config = {};
334
+ _this._y = accessor("y");
335
+ _this._yKey = "y";
336
+ _this._yAxis = new AxisLeft().align("start");
337
+ _this._yKey = "y";
338
+ _this._yConfig = {
339
+ gridConfig: {
340
+ stroke: function stroke(d) {
341
+ if (_this.schema.discrete && _this.schema.discrete.charAt(0) === "y") return "transparent";
342
+ var range = _this._yAxis.range();
343
+ var position = _this._yAxis._getPosition.bind(_this._yAxis)(d.id);
344
+ if (range[range.length - 1] === position) return "transparent";
345
+ var bg = _this._select ? backgroundColor(_this._select.node()) : "rgb(255, 255, 255)";
346
+ var contrast = colorContrast(bg);
347
+ return contrast === colorDefaults.dark ? openColor.colors.gray[200] : openColor.colors.gray[600];
348
+ }
349
+ }
350
+ };
351
+ _this.schema.yCutoff = 150;
352
+ _this._y2 = accessor("y2");
353
+ _this._y2Key = "y2";
354
+ _this._y2Axis = new AxisRight().align("end");
355
+ _this._y2Config = {};
356
+ return _this;
357
+ }
358
+ _create_class(Plot, [
359
+ {
360
+ /**
361
+ Extends the preDraw behavior of the abstract Viz class.
362
+ @private
363
+ */ key: "_preDraw",
364
+ value: function _preDraw() {
365
+ var _this = this;
366
+ // logic repeated for each axis
367
+ [
368
+ "x",
369
+ "y",
370
+ "x2",
371
+ "y2"
372
+ ].forEach(function(k) {
373
+ // if user has supplied a String key as the main method value
374
+ if (_this["_".concat(k, "Key")]) {
375
+ var str = _this["_".concat(k, "Key")];
376
+ // if axis is discrete and numerical, do not sum values
377
+ if (!_this.schema.aggs[str] && _this.schema.discrete === k) {
378
+ _this.schema.aggs[str] = function(a, c) {
379
+ var v = Array.from(new Set(a.map(c)));
380
+ return v.length === 1 ? v[0] : v;
381
+ };
382
+ }
383
+ // set axis title if not discrete
384
+ if (str !== k && _this["_".concat(k, "Title")] === _this["_".concat(k, "Config")].title && _this.schema.discrete !== k) {
385
+ _this["_".concat(k, "Title")] = str;
386
+ _this["_".concat(k, "Config")].title = str;
387
+ }
388
+ }
389
+ });
390
+ _get(_get_prototype_of(Plot.prototype), "_preDraw", this).call(this);
391
+ }
392
+ },
393
+ {
394
+ /**
395
+ Composes the chart's scene graph: the native shape scenes from Viz.toScene
396
+ (bars/lines/areas + labels) plus snapshots of the rendered axes, so a Plot
397
+ renders fully — geometry and axes — through the @d3plus/render backends.
398
+ */ key: "toScene",
399
+ value: function toScene() {
400
+ var // Axes are drawn behind the shapes.
401
+ _scene_root_children;
402
+ var scene = Viz.prototype.toScene.call(this);
403
+ // Skip the axis walk when an explicit empty-data render just
404
+ // happened. Axes are constructor-allocated and never reset between
405
+ // renders, so a previous-render's axis._select.node() still exists
406
+ // after `.data([]).render()` — emitting its toScene snapshot
407
+ // would leak stale tick marks + grid lines under the no-data
408
+ // overlay. We test `length === 0` explicitly so test fixtures that
409
+ // construct viz without ever calling .render() (and leave
410
+ // _filteredData undefined) don't trip the early-return.
411
+ if (Array.isArray(this._filteredData) && this._filteredData.length === 0 && (!this._annotations || this._annotations.length === 0)) return scene;
412
+ var axisNodes = [];
413
+ for(var _i = 0, _iter = [
414
+ "_xAxis",
415
+ "_x2Axis",
416
+ "_yAxis",
417
+ "_y2Axis"
418
+ ]; _i < _iter.length; _i++){
419
+ var name = _iter[_i];
420
+ var axis = this[name];
421
+ if (axis && typeof axis.toScene === "function" && axis._select && typeof axis._select.node === "function" && axis._select.node()) {
422
+ // Wrap in a uniquely-keyed group so sibling axes never collide (axis
423
+ // snapshots reuse a per-call key counter).
424
+ axisNodes.push({
425
+ type: "group",
426
+ key: "plot-".concat(name),
427
+ children: [
428
+ axis.toScene()
429
+ ]
430
+ });
431
+ }
432
+ }
433
+ (_scene_root_children = scene.root.children).unshift.apply(_scene_root_children, _to_consumable_array(axisNodes));
434
+ return scene;
435
+ }
436
+ },
437
+ {
438
+ /**
439
+ Wires user-registered `on()` event handlers onto a freshly-configured
440
+ shape instance. Splits the registered events into three buckets:
441
+ global (`"click"`), shape-scoped (`"click.shape"`), and
442
+ shape-class-scoped (`"click.Bar"` etc.). All three forward into
443
+ `this.schema.on[event](d.data, d.i, x, event)`. Extracted from
444
+ Plot._paint so the chart-level event wiring is in one place.
445
+
446
+ On the scene path (SvgRenderer/CanvasRenderer) these d3-selection
447
+ bindings don't fire — compute-mode shapes mount no per-shape DOM.
448
+ Pointer events are instead routed by `Viz._drawSceneToTarget`'s
449
+ renderer bridge: it hit-tests via `Renderer.pick`, reads the picked
450
+ node's stamped `shapeType`, and dispatches the matching global,
451
+ `.shape`, and shape-class-scoped (`.Bar`) handlers — the same three
452
+ buckets this method wires, so SVG and Canvas behave identically.
453
+ */ key: "_wirePlotShapeEvents",
454
+ value: function _wirePlotShapeEvents(shape, shapeKey, events) {
455
+ var _this = this;
456
+ var classEvents = events.filter(function(e) {
457
+ return e.includes(".".concat(shapeKey));
458
+ });
459
+ var globalEvents = events.filter(function(e) {
460
+ return !e.includes(".");
461
+ });
462
+ var shapeEvents = events.filter(function(e) {
463
+ return e.includes(".shape");
464
+ });
465
+ var forward = function forward(evt) {
466
+ return function(d, i, x, event) {
467
+ return _this.schema.on[evt](d.data, d.i, x, event);
468
+ };
469
+ };
470
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
471
+ try {
472
+ for(var _iterator = globalEvents[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
473
+ var evt = _step.value;
474
+ shape.on(evt, forward(evt));
475
+ }
476
+ } catch (err) {
477
+ _didIteratorError = true;
478
+ _iteratorError = err;
479
+ } finally{
480
+ try {
481
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
482
+ _iterator.return();
483
+ }
484
+ } finally{
485
+ if (_didIteratorError) {
486
+ throw _iteratorError;
487
+ }
488
+ }
489
+ }
490
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
491
+ try {
492
+ for(var _iterator1 = shapeEvents[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
493
+ var evt1 = _step1.value;
494
+ shape.on(evt1, forward(evt1));
495
+ }
496
+ } catch (err) {
497
+ _didIteratorError1 = true;
498
+ _iteratorError1 = err;
499
+ } finally{
500
+ try {
501
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
502
+ _iterator1.return();
503
+ }
504
+ } finally{
505
+ if (_didIteratorError1) {
506
+ throw _iteratorError1;
507
+ }
508
+ }
509
+ }
510
+ var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
511
+ try {
512
+ for(var _iterator2 = classEvents[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
513
+ var evt2 = _step2.value;
514
+ shape.on(evt2, forward(evt2));
515
+ }
516
+ } catch (err) {
517
+ _didIteratorError2 = true;
518
+ _iteratorError2 = err;
519
+ } finally{
520
+ try {
521
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
522
+ _iterator2.return();
523
+ }
524
+ } finally{
525
+ if (_didIteratorError2) {
526
+ throw _iteratorError2;
527
+ }
528
+ }
529
+ }
530
+ }
531
+ },
532
+ {
533
+ /**
534
+ Extends the draw behavior of the abstract Viz class.
535
+ @private
536
+ */ key: "_draw",
537
+ value: function _draw(callback) {
538
+ return drawPlot(this, callback);
539
+ }
540
+ },
541
+ {
542
+ /**
543
+ Paint phase: production axis rendering, shape buffer setup, and shape
544
+ emission with event handlers. Receives all cross-phase locals from
545
+ _draw via `pCtx` (so this method has zero coupling to _draw's local
546
+ scope beyond the explicit context).
547
+ */ key: "_paint",
548
+ value: function _paint(pCtx) {
549
+ // plotPaint builds the chart scene as a fresh array from the paint
550
+ // context (data, scales, axis measurements) — emission is a pure
551
+ // function of its inputs. `super._draw` resets `_chartScene` to []
552
+ // before the paint phase, so the emit output IS the scene. Viz.toScene
553
+ // wraps the collection in viz-chart-cells + zoom transform.
554
+ this._chartScene = plotPaint(this, pCtx);
555
+ return this;
556
+ }
557
+ },
558
+ {
559
+ /**
560
+ Allows drawing custom shapes to be used as annotations in the provided x/y plot. This method accepts custom config objects for the [Shape](http://d3plus.org/docs/#Shape) class, either a single config object or an array of config objects. Each config object requires an additional parameter, the "shape", which denotes which [Shape](http://d3plus.org/docs/#Shape) sub-class to use ([Rect](http://d3plus.org/docs/#Rect), [Line](http://d3plus.org/docs/#Line), etc).
561
+
562
+ Additionally, each config object can also contain an optional "layer" key, which defines whether the annotations will be displayed in "front" or in "back" of the primary visualization shapes. This value defaults to "back" if not present.
563
+ */ key: "annotations",
564
+ value: function annotations(_) {
565
+ return arguments.length ? (this._annotations = _instanceof(_, Array) ? _ : [
566
+ _
567
+ ], this) : this._annotations;
568
+ }
569
+ },
570
+ {
571
+ /**
572
+ Determines whether the x and y axes should have their scales persist while users filter the data, the timeline being the prime example (set this to `true` to make the axes stay consistent when the timeline changes).
573
+ */ key: "axisPersist",
574
+ value: function axisPersist(_) {
575
+ return arguments.length ? (this._axisPersist = _, this) : this._axisPersist;
576
+ }
577
+ },
578
+ {
579
+ /**
580
+ A d3plus-shape configuration Object used for styling the background rectangle of the inner x/y plot (behind all of the shapes and gridlines).
581
+ */ key: "backgroundConfig",
582
+ value: function backgroundConfig(_) {
583
+ return arguments.length ? (this._backgroundConfig = assign(this._backgroundConfig, _), this) : this._backgroundConfig;
584
+ }
585
+ },
586
+ {
587
+ /**
588
+ Determines whether or not to add additional padding at the ends of x or y scales. The most commone use for this is in Scatter Plots, so that the shapes do not appear directly on the axis itself. The value provided can either be `true` or `false` to toggle the behavior for all shape types, or a keyed Object for each shape type (ie. `{Bar: false, Circle: true, Line: false}`).
589
+ */ key: "buffer",
590
+ value: function buffer(_) {
591
+ if (arguments.length) {
592
+ if (!_) this._buffer = {};
593
+ else if (_ === true) this._buffer = defaultBuffers;
594
+ else {
595
+ this._buffer = assign({}, this._buffer, _);
596
+ for(var key in this._buffer){
597
+ var buf = this._buffer;
598
+ if (buf[key] === true) buf[key] = defaultBuffers[key];
599
+ }
600
+ }
601
+ return this;
602
+ }
603
+ return this._buffer;
604
+ }
605
+ },
606
+ {
607
+ /**
608
+ The confidence interval as an array of [lower, upper] bounds.
609
+
610
+ @example <caption>Can be called with accessor functions or static keys:</caption>
611
+ var data = {id: "alpha", value: 10, lci: 9, hci: 11};
612
+ ...
613
+ // Accessor functions
614
+ .confidence([function(d) { return d.lci }, function(d) { return d.hci }])
615
+
616
+ // Or static keys
617
+ .confidence(["lci", "hci"])
618
+ */ key: "confidence",
619
+ value: function confidence(_) {
620
+ if (arguments.length && _instanceof(_, Array)) {
621
+ this._confidence = [];
622
+ var lower = _[0];
623
+ this._confidence[0] = typeof lower === "function" || !lower ? lower : accessor(lower);
624
+ var upper = _[1];
625
+ this._confidence[1] = typeof upper === "function" || !upper ? upper : accessor(upper);
626
+ return this;
627
+ } else return this._confidence;
628
+ }
629
+ },
630
+ {
631
+ /**
632
+ Configuration object for shapes rendered as confidence intervals.
633
+ */ key: "confidenceConfig",
634
+ value: function confidenceConfig(_) {
635
+ return arguments.length ? (this._confidenceConfig = assign(this._confidenceConfig, _), this) : this._confidenceConfig;
636
+ }
637
+ },
638
+ {
639
+ /**
640
+ When the width or height of the chart is less than or equal to this pixel value, the discrete axis will not be shown. This helps produce slick sparklines. Set this value to `0` to disable the behavior entirely.
641
+ */ key: "discreteCutoff",
642
+ value: function discreteCutoff(_) {
643
+ return arguments.length ? (this._discreteCutoff = _, this) : this._discreteCutoff;
644
+ }
645
+ },
646
+ {
647
+ /**
648
+ The pixel space between groups of bars.
649
+ */ key: "groupPadding",
650
+ value: function groupPadding(_) {
651
+ return arguments.length ? (this._groupPadding = _, this) : this._groupPadding;
652
+ }
653
+ },
654
+ {
655
+ /**
656
+ The d3plus-shape config used on the Line shapes created to connect lineLabels to the end of their associated Line path.
657
+ */ key: "labelConnectorConfig",
658
+ value: function labelConnectorConfig(_) {
659
+ return arguments.length ? (this._labelConnectorConfig = assign(this._labelConnectorConfig, _), this) : this._labelConnectorConfig;
660
+ }
661
+ },
662
+ {
663
+ /**
664
+ The behavior to be used when calculating the position and size of each shape's label(s). The value passed can either be the _String_ name of the behavior to be used for all shapes, or an accessor _Function_ that will be provided each data point and will be expected to return the behavior to be used for that data point. The availability and options for this method depend on the default logic for each Shape. As an example, the values "outside" or "inside" can be set for Bar shapes, whose "auto" default will calculate the best position dynamically based on the available space.
665
+ */ key: "labelPosition",
666
+ value: function labelPosition(_) {
667
+ return arguments.length ? (this._labelPosition = typeof _ === "function" ? _ : constant(_), this) : this._labelPosition;
668
+ }
669
+ },
670
+ {
671
+ /**
672
+ Shape config for the Circle shapes drawn by the lineMarkers method.
673
+ */ key: "lineMarkerConfig",
674
+ value: function lineMarkerConfig(_) {
675
+ return arguments.length ? (this._lineMarkerConfig = assign(this._lineMarkerConfig, _), this) : this._lineMarkerConfig;
676
+ }
677
+ },
678
+ {
679
+ /**
680
+ Draws circle markers on each vertex of a Line.
681
+ */ key: "lineMarkers",
682
+ value: function lineMarkers(_) {
683
+ return arguments.length ? (this._lineMarkers = _, this) : this._lineMarkers;
684
+ }
685
+ },
686
+ {
687
+ /**
688
+ Sets the size of bubbles to the given Number, data key, or function.
689
+ */ key: "size",
690
+ value: function size(_) {
691
+ return arguments.length ? (this._size = typeof _ === "function" || !_ ? _ : accessor(_), this) : this._size;
692
+ }
693
+ },
694
+ {
695
+ /**
696
+ Sets the stack offset. If *value* is not specified, returns the current stack offset function.
697
+ */ key: "stackOffset",
698
+ value: function stackOffset(_) {
699
+ return arguments.length ? (this._stackOffset = typeof _ === "function" ? _ : d3Shape["stackOffset".concat(_.charAt(0).toUpperCase() + _.slice(1))], this) : this._stackOffset;
700
+ }
701
+ },
702
+ {
703
+ /**
704
+ Sets the stack order. If *value* is not specified, returns the current stack order function.
705
+ */ key: "stackOrder",
706
+ value: function stackOrder(_) {
707
+ if (arguments.length) {
708
+ if (typeof _ === "string") this._stackOrder = _ === "ascending" ? stackOrderAscending : _ === "descending" ? stackOrderDescending : d3Shape["stackOrder".concat(_.charAt(0).toUpperCase() + _.slice(1))];
709
+ else this._stackOrder = _;
710
+ return this;
711
+ } else return this._stackOrder;
712
+ }
713
+ },
714
+ {
715
+ /**
716
+ Accessor function or string key for the x-axis value of each data point.
717
+ */ key: "x",
718
+ value: function x(_) {
719
+ if (arguments.length) {
720
+ if (typeof _ === "function") this._x = _;
721
+ else {
722
+ this._x = accessor(_);
723
+ this._xKey = _;
724
+ }
725
+ return this;
726
+ } else return this._x;
727
+ }
728
+ },
729
+ {
730
+ /**
731
+ Accessor function or string key for the secondary x-axis value of each data point.
732
+ */ key: "x2",
733
+ value: function x2(_) {
734
+ if (arguments.length) {
735
+ if (typeof _ === "function") this._x2 = _;
736
+ else {
737
+ this._x2 = accessor(_);
738
+ this._x2Key = _;
739
+ }
740
+ return this;
741
+ } else return this._x2;
742
+ }
743
+ },
744
+ {
745
+ /**
746
+ A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the x-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data.
747
+ */ key: "xConfig",
748
+ value: function xConfig(_) {
749
+ return arguments.length ? (this._xConfig = assign(this._xConfig, _), this) : this._xConfig;
750
+ }
751
+ },
752
+ {
753
+ /**
754
+ A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the secondary x-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data.
755
+ */ key: "x2Config",
756
+ value: function x2Config(_) {
757
+ return arguments.length ? (this._x2Config = assign(this._x2Config, _), this) : this._x2Config;
758
+ }
759
+ },
760
+ {
761
+ /**
762
+ Accessor function or string key for the y-axis value of each data point.
763
+ */ key: "y",
764
+ value: function y(_) {
765
+ if (arguments.length) {
766
+ if (typeof _ === "function") this._y = _;
767
+ else {
768
+ this._y = accessor(_);
769
+ this._yKey = _;
770
+ }
771
+ return this;
772
+ } else return this._y;
773
+ }
774
+ },
775
+ {
776
+ /**
777
+ Accessor function or string key for the secondary y-axis value of each data point.
778
+ */ key: "y2",
779
+ value: function y2(_) {
780
+ if (arguments.length) {
781
+ if (typeof _ === "function") this._y2 = _;
782
+ else {
783
+ this._y2 = accessor(_);
784
+ this._y2Key = _;
785
+ }
786
+ return this;
787
+ } else return this._y2;
788
+ }
789
+ },
790
+ {
791
+ /**
792
+ A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the y-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data.
793
+
794
+ *Note:* If a "domain" array is passed to the y-axis config, it will be reversed.
795
+ */ key: "yConfig",
796
+ value: function yConfig(_) {
797
+ if (arguments.length) {
798
+ var cfg = _;
799
+ if (cfg.domain) cfg.domain = cfg.domain.slice().reverse();
800
+ this._yConfig = assign(this._yConfig, _);
801
+ return this;
802
+ }
803
+ return this._yConfig;
804
+ }
805
+ },
806
+ {
807
+ /**
808
+ A pass-through to the underlying [Axis](http://d3plus.org/docs/#Axis) config used for the secondary y-axis. Includes additional functionality where passing "auto" as the value for the [scale](http://d3plus.org/docs/#Axis.scale) method will determine if the scale should be "linear" or "log" based on the provided data.
809
+ */ key: "y2Config",
810
+ value: function y2Config(_) {
811
+ if (arguments.length) {
812
+ var cfg = _;
813
+ if (cfg.domain) cfg.domain = cfg.domain.slice().reverse();
814
+ this._y2Config = assign(this._y2Config, _);
815
+ return this;
816
+ }
817
+ return this._y2Config;
818
+ }
819
+ }
820
+ ]);
821
+ return Plot;
822
+ }(Viz);
823
+ /**
824
+ Creates an x/y plot based on an array of data.
825
+ */ export { Plot as default };
826
+
827
+ //# sourceMappingURL=index.js.map