@carbon/charts 0.41.20 → 0.41.24

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 (417) hide show
  1. package/CHANGELOG.md +28 -46
  2. package/axis-chart.d.ts +4 -4
  3. package/axis-chart.js +46 -46
  4. package/axis-chart.js.map +1 -1
  5. package/build/demo/create-codesandbox.d.ts +42 -42
  6. package/build/demo/data/bar.d.ts +2 -2
  7. package/build/demo/data/index.d.ts +13 -13
  8. package/build/demo/data/line.d.ts +4 -4
  9. package/build/demo/data/meter.d.ts +1 -1
  10. package/build/src/axis-chart.d.ts +4 -4
  11. package/build/src/chart.d.ts +3 -3
  12. package/build/src/charts/area-stacked.d.ts +2 -2
  13. package/build/src/charts/area.d.ts +2 -2
  14. package/build/src/charts/bar-grouped.d.ts +2 -2
  15. package/build/src/charts/bar-simple.d.ts +2 -2
  16. package/build/src/charts/bar-stacked.d.ts +2 -2
  17. package/build/src/charts/bubble.d.ts +2 -2
  18. package/build/src/charts/combo.d.ts +2 -2
  19. package/build/src/charts/donut.d.ts +2 -2
  20. package/build/src/charts/gauge.d.ts +3 -3
  21. package/build/src/charts/index.d.ts +16 -16
  22. package/build/src/charts/line.d.ts +2 -2
  23. package/build/src/charts/lollipop.d.ts +2 -2
  24. package/build/src/charts/meter.d.ts +3 -3
  25. package/build/src/charts/pie.d.ts +3 -3
  26. package/build/src/charts/radar.d.ts +2 -2
  27. package/build/src/charts/scatter.d.ts +2 -2
  28. package/build/src/charts/treemap.d.ts +2 -2
  29. package/build/src/components/axes/axis.d.ts +3 -3
  30. package/build/src/components/axes/chart-clip.d.ts +2 -2
  31. package/build/src/components/axes/grid-brush.d.ts +1 -1
  32. package/build/src/components/axes/grid.d.ts +1 -1
  33. package/build/src/components/axes/ruler-stacked.d.ts +1 -1
  34. package/build/src/components/axes/ruler.d.ts +2 -2
  35. package/build/src/components/axes/toolbar.d.ts +2 -2
  36. package/build/src/components/axes/two-dimensional-axes.d.ts +2 -2
  37. package/build/src/components/axes/zero-line.d.ts +1 -1
  38. package/build/src/components/axes/zoom-bar.d.ts +2 -2
  39. package/build/src/components/component.d.ts +1 -1
  40. package/build/src/components/essentials/legend.d.ts +1 -1
  41. package/build/src/components/essentials/threshold.d.ts +3 -3
  42. package/build/src/components/essentials/title-meter.d.ts +1 -1
  43. package/build/src/components/essentials/title.d.ts +1 -1
  44. package/build/src/components/essentials/tooltip-axis.d.ts +1 -1
  45. package/build/src/components/essentials/tooltip.d.ts +3 -3
  46. package/build/src/components/graphs/area-stacked.d.ts +1 -1
  47. package/build/src/components/graphs/area.d.ts +1 -1
  48. package/build/src/components/graphs/bar-grouped.d.ts +2 -2
  49. package/build/src/components/graphs/bar-simple.d.ts +1 -1
  50. package/build/src/components/graphs/bar-stacked.d.ts +1 -1
  51. package/build/src/components/graphs/bar.d.ts +1 -1
  52. package/build/src/components/graphs/bubble.d.ts +2 -2
  53. package/build/src/components/graphs/donut.d.ts +1 -1
  54. package/build/src/components/graphs/gauge.d.ts +1 -1
  55. package/build/src/components/graphs/line.d.ts +1 -1
  56. package/build/src/components/graphs/lollipop.d.ts +1 -1
  57. package/build/src/components/graphs/meter.d.ts +1 -1
  58. package/build/src/components/graphs/pie.d.ts +1 -1
  59. package/build/src/components/graphs/radar.d.ts +1 -1
  60. package/build/src/components/graphs/scatter-stacked.d.ts +1 -1
  61. package/build/src/components/graphs/scatter.d.ts +2 -2
  62. package/build/src/components/graphs/skeleton-lines.d.ts +1 -1
  63. package/build/src/components/graphs/skeleton.d.ts +1 -1
  64. package/build/src/components/graphs/treemap.d.ts +1 -1
  65. package/build/src/components/index.d.ts +36 -36
  66. package/build/src/components/layout/layout.d.ts +3 -3
  67. package/build/src/components/layout/spacer.d.ts +1 -1
  68. package/build/src/configuration-non-customizable.d.ts +7 -7
  69. package/build/src/configuration.d.ts +2 -2
  70. package/build/src/interfaces/axis-scales.d.ts +7 -7
  71. package/build/src/interfaces/charts.d.ts +11 -4
  72. package/build/src/interfaces/components.d.ts +3 -3
  73. package/build/src/interfaces/enums.d.ts +1 -1
  74. package/build/src/interfaces/index.d.ts +7 -7
  75. package/build/src/interfaces/layout.d.ts +1 -1
  76. package/build/src/interfaces/model.d.ts +1 -1
  77. package/build/src/model-cartesian-charts.d.ts +1 -1
  78. package/build/src/model-gauge.d.ts +1 -1
  79. package/build/src/model-meter.d.ts +1 -1
  80. package/build/src/model-pie.d.ts +1 -1
  81. package/build/src/model.d.ts +1 -9
  82. package/build/src/services/angle-utils.d.ts +1 -1
  83. package/build/src/services/curves.d.ts +2 -2
  84. package/build/src/services/essentials/dom-utils.d.ts +2 -2
  85. package/build/src/services/essentials/events.d.ts +1 -1
  86. package/build/src/services/essentials/gradient-utils.d.ts +1 -1
  87. package/build/src/services/essentials/transitions.d.ts +2 -2
  88. package/build/src/services/index.d.ts +7 -7
  89. package/build/src/services/scales-cartesian.d.ts +2 -2
  90. package/build/src/services/service.d.ts +1 -1
  91. package/build/src/services/time-series.d.ts +1 -1
  92. package/build/src/services/zoom.d.ts +2 -2
  93. package/build/src/tools.d.ts +2 -2
  94. package/build/stories/all.stories.d.ts +1 -1
  95. package/build/stories/tutorials/index.d.ts +11 -11
  96. package/build/stories/tutorials.stories.d.ts +1 -1
  97. package/bundle.js +1 -1
  98. package/chart.d.ts +3 -3
  99. package/chart.js +35 -35
  100. package/chart.js.map +1 -1
  101. package/charts/area-stacked.d.ts +2 -2
  102. package/charts/area-stacked.js +8 -8
  103. package/charts/area-stacked.js.map +1 -1
  104. package/charts/area.d.ts +2 -2
  105. package/charts/area.js +8 -8
  106. package/charts/area.js.map +1 -1
  107. package/charts/bar-grouped.d.ts +2 -2
  108. package/charts/bar-grouped.js +7 -7
  109. package/charts/bar-grouped.js.map +1 -1
  110. package/charts/bar-simple.d.ts +2 -2
  111. package/charts/bar-simple.js +7 -7
  112. package/charts/bar-simple.js.map +1 -1
  113. package/charts/bar-stacked.d.ts +2 -2
  114. package/charts/bar-stacked.js +7 -7
  115. package/charts/bar-stacked.js.map +1 -1
  116. package/charts/bubble.d.ts +2 -2
  117. package/charts/bubble.js +7 -7
  118. package/charts/bubble.js.map +1 -1
  119. package/charts/combo.d.ts +2 -2
  120. package/charts/combo.js +12 -12
  121. package/charts/combo.js.map +1 -1
  122. package/charts/donut.d.ts +2 -2
  123. package/charts/donut.js +7 -7
  124. package/charts/donut.js.map +1 -1
  125. package/charts/gauge.d.ts +3 -3
  126. package/charts/gauge.js +5 -5
  127. package/charts/gauge.js.map +1 -1
  128. package/charts/index.d.ts +16 -16
  129. package/charts/index.js +16 -16
  130. package/charts/index.js.map +1 -1
  131. package/charts/line.d.ts +2 -2
  132. package/charts/line.js +5 -5
  133. package/charts/line.js.map +1 -1
  134. package/charts/lollipop.d.ts +2 -2
  135. package/charts/lollipop.js +7 -7
  136. package/charts/lollipop.js.map +1 -1
  137. package/charts/meter.d.ts +3 -3
  138. package/charts/meter.js +18 -18
  139. package/charts/meter.js.map +1 -1
  140. package/charts/pie.d.ts +3 -3
  141. package/charts/pie.js +8 -8
  142. package/charts/pie.js.map +1 -1
  143. package/charts/radar.d.ts +2 -2
  144. package/charts/radar.js +5 -5
  145. package/charts/radar.js.map +1 -1
  146. package/charts/scatter.d.ts +2 -2
  147. package/charts/scatter.js +7 -7
  148. package/charts/scatter.js.map +1 -1
  149. package/charts/treemap.d.ts +2 -2
  150. package/charts/treemap.js +4 -4
  151. package/charts/treemap.js.map +1 -1
  152. package/components/axes/axis.d.ts +3 -3
  153. package/components/axes/axis.js +98 -98
  154. package/components/axes/axis.js.map +1 -1
  155. package/components/axes/chart-clip.d.ts +2 -2
  156. package/components/axes/chart-clip.js +9 -9
  157. package/components/axes/chart-clip.js.map +1 -1
  158. package/components/axes/grid-brush.d.ts +1 -1
  159. package/components/axes/grid-brush.js +32 -32
  160. package/components/axes/grid-brush.js.map +1 -1
  161. package/components/axes/grid.d.ts +1 -1
  162. package/components/axes/grid.js +34 -34
  163. package/components/axes/grid.js.map +1 -1
  164. package/components/axes/ruler-stacked.d.ts +1 -1
  165. package/components/axes/ruler-stacked.js +5 -5
  166. package/components/axes/ruler-stacked.js.map +1 -1
  167. package/components/axes/ruler.d.ts +2 -2
  168. package/components/axes/ruler.js +36 -36
  169. package/components/axes/ruler.js.map +1 -1
  170. package/components/axes/toolbar.d.ts +2 -2
  171. package/components/axes/toolbar.js +85 -85
  172. package/components/axes/toolbar.js.map +1 -1
  173. package/components/axes/two-dimensional-axes.d.ts +2 -2
  174. package/components/axes/two-dimensional-axes.js +13 -13
  175. package/components/axes/two-dimensional-axes.js.map +1 -1
  176. package/components/axes/zero-line.d.ts +1 -1
  177. package/components/axes/zero-line.js +12 -12
  178. package/components/axes/zero-line.js.map +1 -1
  179. package/components/axes/zoom-bar.d.ts +2 -2
  180. package/components/axes/zoom-bar.js +114 -114
  181. package/components/axes/zoom-bar.js.map +1 -1
  182. package/components/component.d.ts +1 -1
  183. package/components/component.js +13 -13
  184. package/components/component.js.map +1 -1
  185. package/components/essentials/legend.d.ts +1 -1
  186. package/components/essentials/legend.js +95 -92
  187. package/components/essentials/legend.js.map +1 -1
  188. package/components/essentials/threshold.d.ts +3 -3
  189. package/components/essentials/threshold.js +39 -39
  190. package/components/essentials/threshold.js.map +1 -1
  191. package/components/essentials/title-meter.d.ts +1 -1
  192. package/components/essentials/title-meter.js +42 -42
  193. package/components/essentials/title-meter.js.map +1 -1
  194. package/components/essentials/title.d.ts +1 -1
  195. package/components/essentials/title.js +19 -19
  196. package/components/essentials/title.js.map +1 -1
  197. package/components/essentials/tooltip-axis.d.ts +1 -1
  198. package/components/essentials/tooltip-axis.js +23 -23
  199. package/components/essentials/tooltip-axis.js.map +1 -1
  200. package/components/essentials/tooltip.d.ts +3 -3
  201. package/components/essentials/tooltip.js +31 -31
  202. package/components/essentials/tooltip.js.map +1 -1
  203. package/components/graphs/area-stacked.d.ts +1 -1
  204. package/components/graphs/area-stacked.js +28 -29
  205. package/components/graphs/area-stacked.js.map +1 -1
  206. package/components/graphs/area.d.ts +1 -1
  207. package/components/graphs/area.js +62 -57
  208. package/components/graphs/area.js.map +1 -1
  209. package/components/graphs/bar-grouped.d.ts +2 -2
  210. package/components/graphs/bar-grouped.js +56 -56
  211. package/components/graphs/bar-grouped.js.map +1 -1
  212. package/components/graphs/bar-simple.d.ts +1 -1
  213. package/components/graphs/bar-simple.js +45 -45
  214. package/components/graphs/bar-simple.js.map +1 -1
  215. package/components/graphs/bar-stacked.d.ts +1 -1
  216. package/components/graphs/bar-stacked.js +50 -51
  217. package/components/graphs/bar-stacked.js.map +1 -1
  218. package/components/graphs/bar.d.ts +1 -1
  219. package/components/graphs/bar.js +4 -4
  220. package/components/graphs/bar.js.map +1 -1
  221. package/components/graphs/bubble.d.ts +2 -2
  222. package/components/graphs/bubble.js +19 -19
  223. package/components/graphs/bubble.js.map +1 -1
  224. package/components/graphs/donut.d.ts +1 -1
  225. package/components/graphs/donut.js +20 -20
  226. package/components/graphs/donut.js.map +1 -1
  227. package/components/graphs/gauge.d.ts +1 -1
  228. package/components/graphs/gauge.js +89 -87
  229. package/components/graphs/gauge.js.map +1 -1
  230. package/components/graphs/line.d.ts +1 -1
  231. package/components/graphs/line.js +33 -33
  232. package/components/graphs/line.js.map +1 -1
  233. package/components/graphs/lollipop.d.ts +1 -1
  234. package/components/graphs/lollipop.js +32 -32
  235. package/components/graphs/lollipop.js.map +1 -1
  236. package/components/graphs/meter.d.ts +1 -1
  237. package/components/graphs/meter.js +39 -39
  238. package/components/graphs/meter.js.map +1 -1
  239. package/components/graphs/pie.d.ts +1 -1
  240. package/components/graphs/pie.js +102 -100
  241. package/components/graphs/pie.js.map +1 -1
  242. package/components/graphs/radar.d.ts +1 -1
  243. package/components/graphs/radar.js +180 -180
  244. package/components/graphs/radar.js.map +1 -1
  245. package/components/graphs/scatter-stacked.d.ts +1 -1
  246. package/components/graphs/scatter-stacked.js +22 -22
  247. package/components/graphs/scatter-stacked.js.map +1 -1
  248. package/components/graphs/scatter.d.ts +2 -2
  249. package/components/graphs/scatter.js +67 -66
  250. package/components/graphs/scatter.js.map +1 -1
  251. package/components/graphs/skeleton-lines.d.ts +1 -1
  252. package/components/graphs/skeleton-lines.js +27 -27
  253. package/components/graphs/skeleton-lines.js.map +1 -1
  254. package/components/graphs/skeleton.d.ts +1 -1
  255. package/components/graphs/skeleton.js +85 -85
  256. package/components/graphs/skeleton.js.map +1 -1
  257. package/components/graphs/treemap.d.ts +1 -1
  258. package/components/graphs/treemap.js +82 -82
  259. package/components/graphs/treemap.js.map +1 -1
  260. package/components/index.d.ts +36 -36
  261. package/components/index.js +36 -36
  262. package/components/index.js.map +1 -1
  263. package/components/layout/layout.d.ts +3 -3
  264. package/components/layout/layout.js +28 -28
  265. package/components/layout/layout.js.map +1 -1
  266. package/components/layout/spacer.d.ts +1 -1
  267. package/components/layout/spacer.js +10 -10
  268. package/components/layout/spacer.js.map +1 -1
  269. package/configuration-non-customizable.d.ts +7 -7
  270. package/configuration-non-customizable.js +37 -37
  271. package/configuration-non-customizable.js.map +1 -1
  272. package/configuration.d.ts +2 -2
  273. package/configuration.js +81 -78
  274. package/configuration.js.map +1 -1
  275. package/demo/create-codesandbox.d.ts +42 -42
  276. package/demo/create-codesandbox.js +100 -100
  277. package/demo/create-codesandbox.js.map +1 -1
  278. package/demo/data/area.js +220 -190
  279. package/demo/data/area.js.map +1 -1
  280. package/demo/data/bar.d.ts +2 -2
  281. package/demo/data/bar.js +302 -302
  282. package/demo/data/bar.js.map +1 -1
  283. package/demo/data/bubble.js +108 -108
  284. package/demo/data/bubble.js.map +1 -1
  285. package/demo/data/combo.js +323 -323
  286. package/demo/data/combo.js.map +1 -1
  287. package/demo/data/donut.js +19 -19
  288. package/demo/data/donut.js.map +1 -1
  289. package/demo/data/gauge.js +20 -20
  290. package/demo/data/gauge.js.map +1 -1
  291. package/demo/data/high-scale.js +3 -3
  292. package/demo/data/high-scale.js.map +1 -1
  293. package/demo/data/index.d.ts +13 -13
  294. package/demo/data/index.js +299 -299
  295. package/demo/data/index.js.map +1 -1
  296. package/demo/data/line.d.ts +4 -4
  297. package/demo/data/line.js +332 -332
  298. package/demo/data/line.js.map +1 -1
  299. package/demo/data/lollipop.js +19 -19
  300. package/demo/data/lollipop.js.map +1 -1
  301. package/demo/data/meter.d.ts +1 -1
  302. package/demo/data/meter.js +22 -22
  303. package/demo/data/meter.js.map +1 -1
  304. package/demo/data/pie.js +17 -17
  305. package/demo/data/pie.js.map +1 -1
  306. package/demo/data/radar.js +84 -84
  307. package/demo/data/radar.js.map +1 -1
  308. package/demo/data/scatter.js +125 -125
  309. package/demo/data/scatter.js.map +1 -1
  310. package/demo/data/step.js +11 -11
  311. package/demo/data/step.js.map +1 -1
  312. package/demo/data/time-series-axis.js +164 -164
  313. package/demo/data/time-series-axis.js.map +1 -1
  314. package/demo/data/toolbar.js +15 -15
  315. package/demo/data/toolbar.js.map +1 -1
  316. package/demo/data/treemap.js +63 -63
  317. package/demo/data/treemap.js.map +1 -1
  318. package/demo/data/zoom-bar.js +65 -65
  319. package/demo/data/zoom-bar.js.map +1 -1
  320. package/demo/styles.css +1 -1
  321. package/demo/styles.min.css +1 -1
  322. package/demo/tsconfig.tsbuildinfo +45 -45
  323. package/index.d.ts +3 -3
  324. package/index.js +3 -3
  325. package/index.js.map +1 -1
  326. package/interfaces/a11y.js.map +1 -1
  327. package/interfaces/axis-scales.d.ts +7 -7
  328. package/interfaces/axis-scales.js.map +1 -1
  329. package/interfaces/charts.d.ts +11 -4
  330. package/interfaces/charts.js.map +1 -1
  331. package/interfaces/components.d.ts +3 -3
  332. package/interfaces/components.js.map +1 -1
  333. package/interfaces/enums.d.ts +1 -1
  334. package/interfaces/enums.js +1 -1
  335. package/interfaces/enums.js.map +1 -1
  336. package/interfaces/events.js.map +1 -1
  337. package/interfaces/index.d.ts +7 -7
  338. package/interfaces/index.js +2 -2
  339. package/interfaces/index.js.map +1 -1
  340. package/interfaces/layout.d.ts +1 -1
  341. package/interfaces/layout.js.map +1 -1
  342. package/interfaces/model.d.ts +1 -1
  343. package/interfaces/model.js.map +1 -1
  344. package/model-cartesian-charts.d.ts +1 -1
  345. package/model-cartesian-charts.js +7 -7
  346. package/model-cartesian-charts.js.map +1 -1
  347. package/model-gauge.d.ts +1 -1
  348. package/model-gauge.js +2 -2
  349. package/model-gauge.js.map +1 -1
  350. package/model-meter.d.ts +1 -1
  351. package/model-meter.js +7 -7
  352. package/model-meter.js.map +1 -1
  353. package/model-pie.d.ts +1 -1
  354. package/model-pie.js +1 -1
  355. package/model-pie.js.map +1 -1
  356. package/model.d.ts +1 -9
  357. package/model.js +31 -42
  358. package/model.js.map +1 -1
  359. package/package.json +2 -3
  360. package/polyfills.js +9 -9
  361. package/polyfills.js.map +1 -1
  362. package/services/angle-utils.d.ts +1 -1
  363. package/services/angle-utils.js +9 -9
  364. package/services/angle-utils.js.map +1 -1
  365. package/services/curves.d.ts +2 -2
  366. package/services/curves.js +6 -6
  367. package/services/curves.js.map +1 -1
  368. package/services/essentials/dom-utils.d.ts +2 -2
  369. package/services/essentials/dom-utils.js +37 -37
  370. package/services/essentials/dom-utils.js.map +1 -1
  371. package/services/essentials/events.d.ts +1 -1
  372. package/services/essentials/events.js +3 -3
  373. package/services/essentials/events.js.map +1 -1
  374. package/services/essentials/gradient-utils.d.ts +1 -1
  375. package/services/essentials/gradient-utils.js +25 -25
  376. package/services/essentials/gradient-utils.js.map +1 -1
  377. package/services/essentials/transitions.d.ts +2 -2
  378. package/services/essentials/transitions.js +8 -8
  379. package/services/essentials/transitions.js.map +1 -1
  380. package/services/index.d.ts +7 -7
  381. package/services/index.js +7 -7
  382. package/services/index.js.map +1 -1
  383. package/services/scales-cartesian.d.ts +2 -2
  384. package/services/scales-cartesian.js +57 -60
  385. package/services/scales-cartesian.js.map +1 -1
  386. package/services/service.d.ts +1 -1
  387. package/services/service.js.map +1 -1
  388. package/services/time-series.d.ts +1 -1
  389. package/services/time-series.js +27 -27
  390. package/services/time-series.js.map +1 -1
  391. package/services/zoom.d.ts +2 -2
  392. package/services/zoom.js +20 -20
  393. package/services/zoom.js.map +1 -1
  394. package/styles/_type.scss +7 -7
  395. package/styles/color-palatte.scss +218 -218
  396. package/styles/colors.scss +3 -3
  397. package/styles/components/_axis.scss +5 -5
  398. package/styles/components/_ruler.scss +2 -2
  399. package/styles/components/_threshold.scss +1 -1
  400. package/styles/components/_title.scss +3 -3
  401. package/styles/components/_toolbar.scss +1 -1
  402. package/styles/components/_tooltip.scss +6 -6
  403. package/styles/components/index.scss +16 -16
  404. package/styles/graphs/_bubble.scss +1 -1
  405. package/styles/graphs/_radar.scss +2 -2
  406. package/styles/graphs/_scatter.scss +1 -1
  407. package/styles/graphs/_treemap.scss +1 -1
  408. package/styles/graphs/index.scss +9 -9
  409. package/styles/styles-g10.scss +2 -2
  410. package/styles/styles-g100.scss +2 -2
  411. package/styles/styles-g90.scss +2 -2
  412. package/styles/styles-white.scss +2 -2
  413. package/styles/styles.scss +10 -10
  414. package/tools.d.ts +2 -2
  415. package/tools.js +26 -26
  416. package/tools.js.map +1 -1
  417. package/tsconfig.tsbuildinfo +173 -173
@@ -12,7 +12,7 @@ var __extends = (this && this.__extends) || (function () {
12
12
  };
13
13
  })();
14
14
  // Internal Imports
15
- import { Service } from "../service";
15
+ import { Service } from '../service';
16
16
  var GradientUtils = /** @class */ (function (_super) {
17
17
  __extends(GradientUtils, _super);
18
18
  function GradientUtils() {
@@ -22,58 +22,58 @@ var GradientUtils = /** @class */ (function (_super) {
22
22
  var lg = configs.svg.select("defs linearGradient#" + configs.id);
23
23
  if (lg.empty()) {
24
24
  lg = configs.svg
25
- .append("defs")
26
- .append("linearGradient")
27
- .attr("id", configs.id)
28
- .attr("x1", configs.x1)
29
- .attr("x2", configs.x2)
30
- .attr("y1", configs.y1)
31
- .attr("y2", configs.y2);
25
+ .append('defs')
26
+ .append('linearGradient')
27
+ .attr('id', configs.id)
28
+ .attr('x1', configs.x1)
29
+ .attr('x2', configs.x2)
30
+ .attr('y1', configs.y1)
31
+ .attr('y2', configs.y2);
32
32
  }
33
- lg.selectAll("stop")
33
+ lg.selectAll('stop')
34
34
  .data(configs.stops)
35
35
  .enter()
36
- .append("stop")
37
- .attr("offset", function (d) { return d.offset; })
38
- .style("stop-color", function (d) { return d.color; })
39
- .style("stop-opacity", function (d) { return d.opacity; });
36
+ .append('stop')
37
+ .attr('offset', function (d) { return d.offset; })
38
+ .style('stop-color', function (d) { return d.color; })
39
+ .style('stop-opacity', function (d) { return d.opacity; });
40
40
  };
41
41
  GradientUtils.getOffsetRatio = function (domain) {
42
42
  var offsetRatio = ((Math.abs(domain[1]) * 100) /
43
- Math.abs(domain[0] - domain[1])).toFixed(2) + "%";
43
+ Math.abs(domain[0] - domain[1])).toFixed(2) + '%';
44
44
  return offsetRatio;
45
45
  };
46
46
  GradientUtils.getStops = function (domain, color) {
47
47
  var need3Stops = domain[0] < 0 && domain[1] > 0;
48
48
  var stops = [
49
49
  {
50
- offset: "0%",
50
+ offset: '0%',
51
51
  color: color,
52
- opacity: "0.6"
52
+ opacity: '0.6',
53
53
  },
54
54
  {
55
- offset: "80%",
55
+ offset: '80%',
56
56
  color: color,
57
- opacity: "0"
58
- }
57
+ opacity: '0',
58
+ },
59
59
  ];
60
60
  if (need3Stops) {
61
61
  stops = [
62
62
  {
63
- offset: "0%",
63
+ offset: '0%',
64
64
  color: color,
65
- opacity: "0.6"
65
+ opacity: '0.6',
66
66
  },
67
67
  {
68
68
  offset: GradientUtils.getOffsetRatio(domain),
69
69
  color: color,
70
- opacity: "0"
70
+ opacity: '0',
71
71
  },
72
72
  {
73
- offset: "100%",
73
+ offset: '100%',
74
74
  color: color,
75
- opacity: "0.6"
76
- }
75
+ opacity: '0.6',
76
+ },
77
77
  ];
78
78
  }
79
79
  return stops;
@@ -1 +1 @@
1
- {"version":3,"file":"gradient-utils.js","sourceRoot":"","sources":["gradient-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,OAAO,EAAE,MAAM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,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAC/B,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;QACpB,OAAO,WAAW,CAAC;IACpB,CAAC;IAEM,sBAAQ,GAAf,UAAgB,MAAM,EAAE,KAAK;QAC5B,IAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAClD,IAAI,KAAK,GAAa;YACrB;gBACC,MAAM,EAAE,IAAI;gBACZ,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,KAAK;aACd;YACD;gBACC,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,GAAG;aACZ;SACD,CAAC;QAEF,IAAI,UAAU,EAAE;YACf,KAAK,GAAG;gBACP;oBACC,MAAM,EAAE,IAAI;oBACZ,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,KAAK;iBACd;gBACD;oBACC,MAAM,EAAE,aAAa,CAAC,cAAc,CAAC,MAAM,CAAC;oBAC5C,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,GAAG;iBACZ;gBACD;oBACC,MAAM,EAAE,MAAM;oBACd,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,KAAK;iBACd;aACD,CAAC;SACF;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IACF,oBAAC;AAAD,CAAC,AApED,CAAmC,OAAO,GAoEzC","sourcesContent":["// Internal Imports\nimport { Service } from \"../service\";\nimport { DOMUtils } from \"../\";\n\nexport class GradientUtils extends Service {\n\tstatic appendOrUpdateLinearGradient(configs) {\n\t\tlet lg = configs.svg.select(`defs linearGradient#${configs.id}`);\n\t\tif (lg.empty()) {\n\t\t\tlg = configs.svg\n\t\t\t\t.append(\"defs\")\n\t\t\t\t.append(\"linearGradient\")\n\t\t\t\t.attr(\"id\", configs.id)\n\t\t\t\t.attr(\"x1\", configs.x1)\n\t\t\t\t.attr(\"x2\", configs.x2)\n\t\t\t\t.attr(\"y1\", configs.y1)\n\t\t\t\t.attr(\"y2\", configs.y2);\n\t\t}\n\n\t\tlg.selectAll(\"stop\")\n\t\t\t.data(configs.stops)\n\t\t\t.enter()\n\t\t\t.append(\"stop\")\n\t\t\t.attr(\"offset\", (d) => d.offset)\n\t\t\t.style(\"stop-color\", (d) => d.color)\n\t\t\t.style(\"stop-opacity\", (d) => d.opacity);\n\t}\n\n\tstatic getOffsetRatio(domain) {\n\t\tconst offsetRatio =\n\t\t\t(\n\t\t\t\t(Math.abs(domain[1]) * 100) /\n\t\t\t\tMath.abs(domain[0] - domain[1])\n\t\t\t).toFixed(2) + \"%\";\n\t\treturn offsetRatio;\n\t}\n\n\tstatic getStops(domain, color) {\n\t\tconst need3Stops = domain[0] < 0 && domain[1] > 0;\n\t\tlet stops: object[] = [\n\t\t\t{\n\t\t\t\toffset: \"0%\",\n\t\t\t\tcolor: color,\n\t\t\t\topacity: \"0.6\"\n\t\t\t},\n\t\t\t{\n\t\t\t\toffset: \"80%\",\n\t\t\t\tcolor: color,\n\t\t\t\topacity: \"0\"\n\t\t\t}\n\t\t];\n\n\t\tif (need3Stops) {\n\t\t\tstops = [\n\t\t\t\t{\n\t\t\t\t\toffset: \"0%\",\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: \"0.6\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toffset: GradientUtils.getOffsetRatio(domain),\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: \"0\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toffset: \"100%\",\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: \"0.6\"\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t\treturn stops;\n\t}\n}\n"]}
1
+ {"version":3,"file":"gradient-utils.js","sourceRoot":"","sources":["gradient-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,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CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAC/B,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;QACpB,OAAO,WAAW,CAAC;IACpB,CAAC;IAEM,sBAAQ,GAAf,UAAgB,MAAM,EAAE,KAAK;QAC5B,IAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAClD,IAAI,KAAK,GAAa;YACrB;gBACC,MAAM,EAAE,IAAI;gBACZ,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,KAAK;aACd;YACD;gBACC,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,GAAG;aACZ;SACD,CAAC;QAEF,IAAI,UAAU,EAAE;YACf,KAAK,GAAG;gBACP;oBACC,MAAM,EAAE,IAAI;oBACZ,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,KAAK;iBACd;gBACD;oBACC,MAAM,EAAE,aAAa,CAAC,cAAc,CAAC,MAAM,CAAC;oBAC5C,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,GAAG;iBACZ;gBACD;oBACC,MAAM,EAAE,MAAM;oBACd,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,KAAK;iBACd;aACD,CAAC;SACF;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IACF,oBAAC;AAAD,CAAC,AApED,CAAmC,OAAO,GAoEzC","sourcesContent":["// Internal Imports\nimport { Service } from '../service';\nimport { DOMUtils } from '../';\n\nexport class GradientUtils extends Service {\n\tstatic appendOrUpdateLinearGradient(configs) {\n\t\tlet lg = configs.svg.select(`defs linearGradient#${configs.id}`);\n\t\tif (lg.empty()) {\n\t\t\tlg = configs.svg\n\t\t\t\t.append('defs')\n\t\t\t\t.append('linearGradient')\n\t\t\t\t.attr('id', configs.id)\n\t\t\t\t.attr('x1', configs.x1)\n\t\t\t\t.attr('x2', configs.x2)\n\t\t\t\t.attr('y1', configs.y1)\n\t\t\t\t.attr('y2', configs.y2);\n\t\t}\n\n\t\tlg.selectAll('stop')\n\t\t\t.data(configs.stops)\n\t\t\t.enter()\n\t\t\t.append('stop')\n\t\t\t.attr('offset', (d) => d.offset)\n\t\t\t.style('stop-color', (d) => d.color)\n\t\t\t.style('stop-opacity', (d) => d.opacity);\n\t}\n\n\tstatic getOffsetRatio(domain) {\n\t\tconst offsetRatio =\n\t\t\t(\n\t\t\t\t(Math.abs(domain[1]) * 100) /\n\t\t\t\tMath.abs(domain[0] - domain[1])\n\t\t\t).toFixed(2) + '%';\n\t\treturn offsetRatio;\n\t}\n\n\tstatic getStops(domain, color) {\n\t\tconst need3Stops = domain[0] < 0 && domain[1] > 0;\n\t\tlet stops: object[] = [\n\t\t\t{\n\t\t\t\toffset: '0%',\n\t\t\t\tcolor: color,\n\t\t\t\topacity: '0.6',\n\t\t\t},\n\t\t\t{\n\t\t\t\toffset: '80%',\n\t\t\t\tcolor: color,\n\t\t\t\topacity: '0',\n\t\t\t},\n\t\t];\n\n\t\tif (need3Stops) {\n\t\t\tstops = [\n\t\t\t\t{\n\t\t\t\t\toffset: '0%',\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: '0.6',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toffset: GradientUtils.getOffsetRatio(domain),\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: '0',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toffset: '100%',\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: '0.6',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn stops;\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { Service } from "../service";
2
- import { Transition } from "d3-transition";
1
+ import { Service } from '../service';
2
+ import { Transition } from 'd3-transition';
3
3
  export declare class Transitions extends Service {
4
4
  pendingTransitions: {};
5
5
  init(): void;
@@ -12,12 +12,12 @@ var __extends = (this && this.__extends) || (function () {
12
12
  };
13
13
  })();
14
14
  // Internal Imports
15
- import { Service } from "../service";
16
- import * as Configuration from "../../configuration";
17
- import { Events } from "./../../interfaces";
18
- import { Tools } from "../../tools";
15
+ import { Service } from '../service';
16
+ import * as Configuration from '../../configuration';
17
+ import { Events } from './../../interfaces';
18
+ import { Tools } from '../../tools';
19
19
  // D3 Imports
20
- import { transition } from "d3-transition";
20
+ import { transition } from 'd3-transition';
21
21
  var Transitions = /** @class */ (function (_super) {
22
22
  __extends(Transitions, _super);
23
23
  function Transitions() {
@@ -37,10 +37,10 @@ var Transitions = /** @class */ (function (_super) {
37
37
  if (this.model.getOptions().animations === false || animate === false) {
38
38
  return this.getInstantTransition(name);
39
39
  }
40
- var t = transition(name).duration(Tools.getProperty(Configuration.transitions, name, "duration") ||
40
+ var t = transition(name).duration(Tools.getProperty(Configuration.transitions, name, 'duration') ||
41
41
  Configuration.transitions.default.duration);
42
42
  this.pendingTransitions[t._id] = t;
43
- t.on("end interrupt cancel", function () {
43
+ t.on('end interrupt cancel', function () {
44
44
  delete _this.pendingTransitions[t._id];
45
45
  });
46
46
  return t;
@@ -49,7 +49,7 @@ var Transitions = /** @class */ (function (_super) {
49
49
  var _this = this;
50
50
  var t = transition(name).duration(0);
51
51
  this.pendingTransitions[t._id] = t;
52
- t.on("end interrupt cancel", function () {
52
+ t.on('end interrupt cancel', function () {
53
53
  delete _this.pendingTransitions[t._id];
54
54
  });
55
55
  return t;
@@ -1 +1 @@
1
- {"version":3,"file":"transitions.js","sourceRoot":"","sources":["transitions.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEp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AAC,GAAG,CAAC,CAAC;QACnC,CAAC,CAAC,EAAE,CAAC,sBAAsB,EAAE;YAC5B,OAAO,KAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,CAAC;IACV,CAAC;IAED,2CAAqB,GAArB;QACC,OAAO,IAAI,CAAC,kBAAkB,CAAC;IAChC,CAAC;IACF,kBAAC;AAAD,CAAC,AA7CD,CAAiC,OAAO,GA6CvC","sourcesContent":["// Internal Imports\nimport { Service } from \"../service\";\nimport * as Configuration from \"../../configuration\";\nimport { Events } from \"./../../interfaces\";\nimport { Tools } from \"../../tools\";\n\n// D3 Imports\nimport { Transition, transition } from \"d3-transition\";\n\nexport class Transitions extends Service {\n\tpendingTransitions = {};\n\t// transitions: Transition<any, any, any, any>[];\n\n\tinit() {\n\t\tthis.services.events.addEventListener(Events.Model.UPDATE, () => {\n\t\t\tthis.pendingTransitions = {};\n\t\t});\n\t}\n\n\tgetTransition(\n\t\tname?: string,\n\t\tanimate?: boolean\n\t): Transition<any, any, any, any> {\n\t\tif (this.model.getOptions().animations === false || animate === false) {\n\t\t\treturn this.getInstantTransition(name);\n\t\t}\n\n\t\tconst t: any = transition(name).duration(\n\t\t\tTools.getProperty(Configuration.transitions, name, \"duration\") ||\n\t\t\t\tConfiguration.transitions.default.duration\n\t\t);\n\n\t\tthis.pendingTransitions[t._id] = t;\n\t\tt.on(\"end interrupt cancel\", () => {\n\t\t\tdelete this.pendingTransitions[t._id];\n\t\t});\n\n\t\treturn t;\n\t}\n\n\tgetInstantTransition(name?: string): Transition<any, any, any, any> {\n\t\tconst t: any = transition(name).duration(0);\n\n\t\tthis.pendingTransitions[t._id] = t;\n\t\tt.on(\"end interrupt cancel\", () => {\n\t\t\tdelete this.pendingTransitions[t._id];\n\t\t});\n\n\t\treturn t;\n\t}\n\n\tgetPendingTransitions() {\n\t\treturn this.pendingTransitions;\n\t}\n}\n"]}
1
+ {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kB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,CAAC;IACV,CAAC;IAED,0CAAoB,GAApB,UAAqB,IAAa;QAAlC,iBASC;QARA,IAAM,CAAC,GAAQ,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAE5C,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC,CAAC,EAAE,CAAC,sBAAsB,EAAE;YAC5B,OAAO,KAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,CAAC;IACV,CAAC;IAED,2CAAqB,GAArB;QACC,OAAO,IAAI,CAAC,kBAAkB,CAAC;IAChC,CAAC;IACF,kBAAC;AAAD,CAAC,AA7CD,CAAiC,OAAO,GA6CvC","sourcesContent":["// Internal Imports\nimport { Service } from '../service';\nimport * as Configuration from '../../configuration';\nimport { Events } from './../../interfaces';\nimport { Tools } from '../../tools';\n\n// D3 Imports\nimport { Transition, transition } from 'd3-transition';\n\nexport class Transitions extends Service {\n\tpendingTransitions = {};\n\t// transitions: Transition<any, any, any, any>[];\n\n\tinit() {\n\t\tthis.services.events.addEventListener(Events.Model.UPDATE, () => {\n\t\t\tthis.pendingTransitions = {};\n\t\t});\n\t}\n\n\tgetTransition(\n\t\tname?: string,\n\t\tanimate?: boolean\n\t): Transition<any, any, any, any> {\n\t\tif (this.model.getOptions().animations === false || animate === false) {\n\t\t\treturn this.getInstantTransition(name);\n\t\t}\n\n\t\tconst t: any = transition(name).duration(\n\t\t\tTools.getProperty(Configuration.transitions, name, 'duration') ||\n\t\t\t\tConfiguration.transitions.default.duration\n\t\t);\n\n\t\tthis.pendingTransitions[t._id] = t;\n\t\tt.on('end interrupt cancel', () => {\n\t\t\tdelete this.pendingTransitions[t._id];\n\t\t});\n\n\t\treturn t;\n\t}\n\n\tgetInstantTransition(name?: string): Transition<any, any, any, any> {\n\t\tconst t: any = transition(name).duration(0);\n\n\t\tthis.pendingTransitions[t._id] = t;\n\t\tt.on('end interrupt cancel', () => {\n\t\t\tdelete this.pendingTransitions[t._id];\n\t\t});\n\n\t\treturn t;\n\t}\n\n\tgetPendingTransitions() {\n\t\treturn this.pendingTransitions;\n\t}\n}\n"]}
@@ -1,7 +1,7 @@
1
- export * from "./essentials/dom-utils";
2
- export * from "./essentials/events";
3
- export * from "./essentials/transitions";
4
- export * from "./essentials/gradient-utils";
5
- export * from "./scales-cartesian";
6
- export * from "./curves";
7
- export * from "./zoom";
1
+ export * from './essentials/dom-utils';
2
+ export * from './essentials/events';
3
+ export * from './essentials/transitions';
4
+ export * from './essentials/gradient-utils';
5
+ export * from './scales-cartesian';
6
+ export * from './curves';
7
+ export * from './zoom';
package/services/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  // Essentials
2
- export * from "./essentials/dom-utils";
3
- export * from "./essentials/events";
4
- export * from "./essentials/transitions";
5
- export * from "./essentials/gradient-utils";
2
+ export * from './essentials/dom-utils';
3
+ export * from './essentials/events';
4
+ export * from './essentials/transitions';
5
+ export * from './essentials/gradient-utils';
6
6
  // MISC
7
- export * from "./scales-cartesian";
8
- export * from "./curves";
9
- export * from "./zoom";
7
+ export * from './scales-cartesian';
8
+ export * from './curves';
9
+ export * from './zoom';
10
10
  //# sourceMappingURL=../../src/services/index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAE5C,OAAO;AACP,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC","sourcesContent":["// Essentials\nexport * from \"./essentials/dom-utils\";\nexport * from \"./essentials/events\";\nexport * from \"./essentials/transitions\";\nexport * from \"./essentials/gradient-utils\";\n\n// MISC\nexport * from \"./scales-cartesian\";\nexport * from \"./curves\";\nexport * from \"./zoom\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAE5C,OAAO;AACP,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC","sourcesContent":["// Essentials\nexport * from './essentials/dom-utils';\nexport * from './essentials/events';\nexport * from './essentials/transitions';\nexport * from './essentials/gradient-utils';\n\n// MISC\nexport * from './scales-cartesian';\nexport * from './curves';\nexport * from './zoom';\n"]}
@@ -1,5 +1,5 @@
1
- import { Service } from "./service";
2
- import { AxisPositions, CartesianOrientations, ScaleTypes, ThresholdOptions } from "../interfaces";
1
+ import { Service } from './service';
2
+ import { AxisPositions, CartesianOrientations, ScaleTypes, ThresholdOptions } from '../interfaces';
3
3
  export declare class CartesianScales extends Service {
4
4
  protected scaleTypes: {
5
5
  top: any;
@@ -30,16 +30,16 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
30
30
  return r;
31
31
  };
32
32
  // Internal Imports
33
- import * as Configuration from "../configuration";
34
- import { Service } from "./service";
35
- import { AxisPositions, CartesianOrientations, ScaleTypes } from "../interfaces";
36
- import { Tools } from "../tools";
33
+ import * as Configuration from '../configuration';
34
+ import { Service } from './service';
35
+ import { AxisPositions, CartesianOrientations, ScaleTypes, } from '../interfaces';
36
+ import { Tools } from '../tools';
37
37
  // D3 Imports
38
- import { scaleBand, scaleLinear, scaleTime, scaleLog } from "d3-scale";
39
- import { extent, sum } from "d3-array";
40
- import { map, values } from "d3-collection";
38
+ import { scaleBand, scaleLinear, scaleTime, scaleLog } from 'd3-scale';
39
+ import { extent, sum } from 'd3-array';
40
+ import { map, values } from 'd3-collection';
41
41
  // Misc
42
- import { differenceInYears, addYears, subYears, differenceInMonths, addMonths, subMonths, differenceInDays, addDays, subDays, differenceInHours, addHours, subHours, differenceInMinutes, addMinutes, subMinutes, differenceInSeconds, subSeconds, addSeconds } from "date-fns";
42
+ import { differenceInYears, addYears, subYears, differenceInMonths, addMonths, subMonths, differenceInDays, addDays, subDays, differenceInHours, addHours, subHours, differenceInMinutes, addMinutes, subMinutes, differenceInSeconds, subSeconds, addSeconds, } from 'date-fns';
43
43
  var CartesianScales = /** @class */ (function (_super) {
44
44
  __extends(CartesianScales, _super);
45
45
  function CartesianScales() {
@@ -48,13 +48,13 @@ var CartesianScales = /** @class */ (function (_super) {
48
48
  top: null,
49
49
  right: null,
50
50
  bottom: null,
51
- left: null
51
+ left: null,
52
52
  };
53
53
  _this.scales = {
54
54
  top: null,
55
55
  right: null,
56
56
  bottom: null,
57
- left: null
57
+ left: null,
58
58
  };
59
59
  return _this;
60
60
  }
@@ -64,7 +64,7 @@ var CartesianScales = /** @class */ (function (_super) {
64
64
  if (this.dualAxes && datum) {
65
65
  var options = this.model.getOptions();
66
66
  var groupMapsTo = options.data.groupMapsTo;
67
- var axesOptions = Tools.getProperty(options, "axes", this.secondaryDomainAxisPosition);
67
+ var axesOptions = Tools.getProperty(options, 'axes', this.secondaryDomainAxisPosition);
68
68
  var dataset = datum[groupMapsTo];
69
69
  if (((_c = axesOptions) === null || _c === void 0 ? void 0 : _c.correspondingDatasets) &&
70
70
  axesOptions.correspondingDatasets.includes(dataset)) {
@@ -79,7 +79,7 @@ var CartesianScales = /** @class */ (function (_super) {
79
79
  if (this.dualAxes) {
80
80
  var options = this.model.getOptions();
81
81
  var groupMapsTo = options.data.groupMapsTo;
82
- var axisOptions = Tools.getProperty(options, "axes", this.secondaryRangeAxisPosition);
82
+ var axisOptions = Tools.getProperty(options, 'axes', this.secondaryRangeAxisPosition);
83
83
  var dataset = void 0;
84
84
  if (datum !== null) {
85
85
  dataset = datum[groupMapsTo];
@@ -95,7 +95,7 @@ var CartesianScales = /** @class */ (function (_super) {
95
95
  return this.rangeAxisPosition;
96
96
  };
97
97
  CartesianScales.prototype.getAxisOptions = function (position) {
98
- return Tools.getProperty(this.model.getOptions(), "axes", position);
98
+ return Tools.getProperty(this.model.getOptions(), 'axes', position);
99
99
  };
100
100
  CartesianScales.prototype.getDomainAxisOptions = function () {
101
101
  var domainAxisPosition = this.getDomainAxisPosition();
@@ -152,7 +152,7 @@ var CartesianScales = /** @class */ (function (_super) {
152
152
  CartesianScales.prototype.determineAxisDuality = function () {
153
153
  var _a, _b, _c, _d;
154
154
  var options = this.model.getOptions();
155
- var axesOptions = Tools.getProperty(options, "axes");
155
+ var axesOptions = Tools.getProperty(options, 'axes');
156
156
  if ((((_a = axesOptions[AxisPositions.LEFT]) === null || _a === void 0 ? void 0 : _a.correspondingDatasets) &&
157
157
  axesOptions[AxisPositions.RIGHT]) ||
158
158
  (((_b = axesOptions[AxisPositions.RIGHT]) === null || _b === void 0 ? void 0 : _b.correspondingDatasets) &&
@@ -191,7 +191,7 @@ var CartesianScales = /** @class */ (function (_super) {
191
191
  CartesianScales.prototype.getMainXAxisPosition = function () {
192
192
  var possibleXAxisPositions = [
193
193
  AxisPositions.BOTTOM,
194
- AxisPositions.TOP
194
+ AxisPositions.TOP,
195
195
  ];
196
196
  return [this.domainAxisPosition, this.rangeAxisPosition].find(function (position) { return possibleXAxisPositions.indexOf(position) > -1; });
197
197
  };
@@ -199,7 +199,7 @@ var CartesianScales = /** @class */ (function (_super) {
199
199
  CartesianScales.prototype.getMainYAxisPosition = function () {
200
200
  var possibleYAxisPositions = [
201
201
  AxisPositions.LEFT,
202
- AxisPositions.RIGHT
202
+ AxisPositions.RIGHT,
203
203
  ];
204
204
  return [this.domainAxisPosition, this.rangeAxisPosition].find(function (position) { return possibleYAxisPositions.indexOf(position) > -1; });
205
205
  };
@@ -211,7 +211,7 @@ var CartesianScales = /** @class */ (function (_super) {
211
211
  };
212
212
  CartesianScales.prototype.getValueFromScale = function (scale, scaleType, axisPosition, datum, index) {
213
213
  var options = this.model.getOptions();
214
- var axesOptions = Tools.getProperty(options, "axes");
214
+ var axesOptions = Tools.getProperty(options, 'axes');
215
215
  var axisOptions = axesOptions[axisPosition];
216
216
  var mapsTo = axisOptions.mapsTo;
217
217
  var value = datum[mapsTo] !== undefined ? datum[mapsTo] : datum;
@@ -232,7 +232,7 @@ var CartesianScales = /** @class */ (function (_super) {
232
232
  var bounds = this.model.getOptions().bounds;
233
233
  var scale = this.scales[this.rangeAxisPosition];
234
234
  var options = this.model.getOptions();
235
- var axesOptions = Tools.getProperty(options, "axes");
235
+ var axesOptions = Tools.getProperty(options, 'axes');
236
236
  var axisOptions = axesOptions[this.rangeAxisPosition];
237
237
  var mapsTo = axisOptions.mapsTo;
238
238
  var value = datum[mapsTo] !== undefined ? datum[mapsTo] : datum;
@@ -242,7 +242,7 @@ var CartesianScales = /** @class */ (function (_super) {
242
242
  : value),
243
243
  scale(datum[bounds.lowerBoundMapsTo]
244
244
  ? datum[bounds.lowerBoundMapsTo]
245
- : value)
245
+ : value),
246
246
  ];
247
247
  return boundedValues;
248
248
  };
@@ -267,17 +267,17 @@ var CartesianScales = /** @class */ (function (_super) {
267
267
  };
268
268
  CartesianScales.prototype.getDomainIdentifier = function (datum) {
269
269
  var options = this.model.getOptions();
270
- return Tools.getProperty(options, "axes", this.getDomainAxisPosition({ datum: datum }), "mapsTo");
270
+ return Tools.getProperty(options, 'axes', this.getDomainAxisPosition({ datum: datum }), 'mapsTo');
271
271
  };
272
272
  CartesianScales.prototype.getRangeIdentifier = function (datum) {
273
273
  var options = this.model.getOptions();
274
- return Tools.getProperty(options, "axes", this.getRangeAxisPosition({ datum: datum }), "mapsTo");
274
+ return Tools.getProperty(options, 'axes', this.getRangeAxisPosition({ datum: datum }), 'mapsTo');
275
275
  };
276
276
  CartesianScales.prototype.extendsDomain = function (axisPosition, domain) {
277
277
  var options = this.model.getOptions();
278
- var axisOptions = Tools.getProperty(options, "axes", axisPosition);
278
+ var axisOptions = Tools.getProperty(options, 'axes', axisPosition);
279
279
  if (axisOptions.scaleType === ScaleTypes.TIME) {
280
- var spaceToAddToEdges = Tools.getProperty(options, "timeScale", "addSpaceOnEdges");
280
+ var spaceToAddToEdges = Tools.getProperty(options, 'timeScale', 'addSpaceOnEdges');
281
281
  return addSpacingToTimeDomain(domain, spaceToAddToEdges);
282
282
  }
283
283
  else {
@@ -286,51 +286,51 @@ var CartesianScales = /** @class */ (function (_super) {
286
286
  };
287
287
  CartesianScales.prototype.findVerticalAxesPositions = function () {
288
288
  var options = this.model.getOptions();
289
- var axesOptions = Tools.getProperty(options, "axes");
289
+ var axesOptions = Tools.getProperty(options, 'axes');
290
290
  var dualAxes = this.isDualAxes();
291
291
  // If right axis has been specified as `main`
292
292
  if ((Tools.getProperty(axesOptions, AxisPositions.LEFT) === null &&
293
293
  Tools.getProperty(axesOptions, AxisPositions.RIGHT) !== null) ||
294
- Tools.getProperty(axesOptions, AxisPositions.RIGHT, "main") ===
294
+ Tools.getProperty(axesOptions, AxisPositions.RIGHT, 'main') ===
295
295
  true ||
296
296
  (dualAxes &&
297
- Tools.getProperty(axesOptions, AxisPositions.LEFT, "correspondingDatasets"))) {
297
+ Tools.getProperty(axesOptions, AxisPositions.LEFT, 'correspondingDatasets'))) {
298
298
  return {
299
299
  primary: AxisPositions.RIGHT,
300
- secondary: AxisPositions.LEFT
300
+ secondary: AxisPositions.LEFT,
301
301
  };
302
302
  }
303
303
  return { primary: AxisPositions.LEFT, secondary: AxisPositions.RIGHT };
304
304
  };
305
305
  CartesianScales.prototype.findHorizontalAxesPositions = function () {
306
306
  var options = this.model.getOptions();
307
- var axesOptions = Tools.getProperty(options, "axes");
307
+ var axesOptions = Tools.getProperty(options, 'axes');
308
308
  var dualAxes = this.isDualAxes();
309
309
  // If top axis has been specified as `main`
310
310
  if ((Tools.getProperty(axesOptions, AxisPositions.BOTTOM) === null &&
311
311
  Tools.getProperty(axesOptions, AxisPositions.TOP) !== null) ||
312
- Tools.getProperty(axesOptions, AxisPositions.TOP, "main") ===
312
+ Tools.getProperty(axesOptions, AxisPositions.TOP, 'main') ===
313
313
  true ||
314
314
  (dualAxes &&
315
- Tools.getProperty(axesOptions, AxisPositions.BOTTOM, "correspondingDatasets"))) {
315
+ Tools.getProperty(axesOptions, AxisPositions.BOTTOM, 'correspondingDatasets'))) {
316
316
  return {
317
317
  primary: AxisPositions.TOP,
318
- secondary: AxisPositions.BOTTOM
318
+ secondary: AxisPositions.BOTTOM,
319
319
  };
320
320
  }
321
321
  return { primary: AxisPositions.BOTTOM, secondary: AxisPositions.TOP };
322
322
  };
323
323
  CartesianScales.prototype.findDomainAndRangeAxesPositions = function (verticalAxesPositions, horizontalAxesPositions) {
324
324
  var options = this.model.getOptions();
325
- var mainVerticalAxisOptions = Tools.getProperty(options, "axes", verticalAxesPositions.primary);
326
- var mainHorizontalAxisOptions = Tools.getProperty(options, "axes", horizontalAxesPositions.primary);
325
+ var mainVerticalAxisOptions = Tools.getProperty(options, 'axes', verticalAxesPositions.primary);
326
+ var mainHorizontalAxisOptions = Tools.getProperty(options, 'axes', horizontalAxesPositions.primary);
327
327
  var mainVerticalScaleType = mainVerticalAxisOptions.scaleType || ScaleTypes.LINEAR;
328
328
  var mainHorizontalScaleType = mainHorizontalAxisOptions.scaleType || ScaleTypes.LINEAR;
329
329
  var result = {
330
330
  primaryDomainAxisPosition: null,
331
331
  secondaryDomainAxisPosition: null,
332
332
  primaryRangeAxisPosition: null,
333
- secondaryRangeAxisPosition: null
333
+ secondaryRangeAxisPosition: null,
334
334
  };
335
335
  // assign to to be a vertical chart by default
336
336
  result.primaryDomainAxisPosition = horizontalAxesPositions.primary;
@@ -356,10 +356,10 @@ var CartesianScales = /** @class */ (function (_super) {
356
356
  };
357
357
  CartesianScales.prototype.getScaleDomain = function (axisPosition) {
358
358
  var options = this.model.getOptions();
359
- var axisOptions = Tools.getProperty(options, "axes", axisPosition);
360
- var bounds = Tools.getProperty(options, "bounds");
359
+ var axisOptions = Tools.getProperty(options, 'axes', axisPosition);
360
+ var bounds = Tools.getProperty(options, 'bounds');
361
361
  var includeZero = axisOptions.includeZero;
362
- var scaleType = Tools.getProperty(axisOptions, "scaleType") || ScaleTypes.LINEAR;
362
+ var scaleType = Tools.getProperty(axisOptions, 'scaleType') || ScaleTypes.LINEAR;
363
363
  if (this.model.isDataEmpty()) {
364
364
  return [];
365
365
  }
@@ -389,14 +389,10 @@ var CartesianScales = /** @class */ (function (_super) {
389
389
  // Get the extent of the domain
390
390
  var domain;
391
391
  var allDataValues;
392
- var stackedGroups = this.model.getStackedGroups();
392
+ var dataGroupNames = this.model.getDataGroupNames();
393
393
  if (scaleType === ScaleTypes.TIME) {
394
394
  allDataValues = displayData.map(function (datum) { return +new Date(datum[mapsTo]); });
395
395
  }
396
- else if (scaleType === ScaleTypes.TIME) {
397
- allDataValues = displayData.map(function (datum) { return datum[mapsTo]; });
398
- // If the scale has bounded area
399
- }
400
396
  else if (bounds && options.axes) {
401
397
  allDataValues = [];
402
398
  displayData.forEach(function (datum) {
@@ -409,11 +405,12 @@ var CartesianScales = /** @class */ (function (_super) {
409
405
  }
410
406
  });
411
407
  }
412
- else if (stackedGroups &&
408
+ else if (axisOptions.stacked === true &&
409
+ dataGroupNames &&
413
410
  axisPosition === this.getRangeAxisPosition()) {
414
411
  var groupMapsTo_1 = options.data.groupMapsTo;
415
- var dataValuesGroupedByKeys = this.model.getDataValuesGroupedByKeys(stackedGroups);
416
- var nonStackedGroupsData = displayData.filter(function (datum) { return !stackedGroups.includes(datum[groupMapsTo_1]); });
412
+ var dataValuesGroupedByKeys = this.model.getDataValuesGroupedByKeys(dataGroupNames);
413
+ var nonStackedGroupsData = displayData.filter(function (datum) { return !dataGroupNames.includes(datum[groupMapsTo_1]); });
417
414
  var stackedValues = dataValuesGroupedByKeys.map(function (dataValues) {
418
415
  var sharedStackKey = dataValues.sharedStackKey, numericalValues = __rest(dataValues, ["sharedStackKey"]);
419
416
  return sum(values(numericalValues));
@@ -432,11 +429,11 @@ var CartesianScales = /** @class */ (function (_super) {
432
429
  };
433
430
  CartesianScales.prototype.createScale = function (axisPosition) {
434
431
  var options = this.model.getOptions();
435
- var axisOptions = Tools.getProperty(options, "axes", axisPosition);
432
+ var axisOptions = Tools.getProperty(options, 'axes', axisPosition);
436
433
  if (!axisOptions) {
437
434
  return null;
438
435
  }
439
- var scaleType = Tools.getProperty(axisOptions, "scaleType") || ScaleTypes.LINEAR;
436
+ var scaleType = Tools.getProperty(axisOptions, 'scaleType') || ScaleTypes.LINEAR;
440
437
  this.scaleTypes[axisPosition] = scaleType;
441
438
  var scale;
442
439
  if (scaleType === ScaleTypes.TIME) {
@@ -455,7 +452,7 @@ var CartesianScales = /** @class */ (function (_super) {
455
452
  return scale;
456
453
  };
457
454
  CartesianScales.prototype.getHighestDomainThreshold = function () {
458
- var axesOptions = Tools.getProperty(this.model.getOptions(), "axes");
455
+ var axesOptions = Tools.getProperty(this.model.getOptions(), 'axes');
459
456
  var domainAxisPosition = this.getDomainAxisPosition();
460
457
  var thresholds = axesOptions[domainAxisPosition].thresholds;
461
458
  if (!thresholds) {
@@ -466,17 +463,17 @@ var CartesianScales = /** @class */ (function (_super) {
466
463
  var highestThreshold = thresholds.sort(function (a, b) { return b.value - a.value; })[0];
467
464
  var scaleType = this.getScaleTypeByPosition(domainAxisPosition);
468
465
  if (scaleType === ScaleTypes.TIME &&
469
- (typeof highestThreshold.value === "string" ||
466
+ (typeof highestThreshold.value === 'string' ||
470
467
  highestThreshold.value.getTime === undefined)) {
471
468
  highestThreshold.value = new Date(highestThreshold.value);
472
469
  }
473
470
  return {
474
471
  threshold: highestThreshold,
475
- scaleValue: domainScale(highestThreshold.value)
472
+ scaleValue: domainScale(highestThreshold.value),
476
473
  };
477
474
  };
478
475
  CartesianScales.prototype.getHighestRangeThreshold = function () {
479
- var axesOptions = Tools.getProperty(this.model.getOptions(), "axes");
476
+ var axesOptions = Tools.getProperty(this.model.getOptions(), 'axes');
480
477
  var rangeAxisPosition = this.getRangeAxisPosition();
481
478
  var thresholds = axesOptions[rangeAxisPosition].thresholds;
482
479
  if (!thresholds) {
@@ -487,7 +484,7 @@ var CartesianScales = /** @class */ (function (_super) {
487
484
  var highestThreshold = thresholds.sort(function (a, b) { return b.value - a.value; })[0];
488
485
  return {
489
486
  threshold: highestThreshold,
490
- scaleValue: rangeScale(highestThreshold.value)
487
+ scaleValue: rangeScale(highestThreshold.value),
491
488
  };
492
489
  };
493
490
  return CartesianScales;
@@ -499,49 +496,49 @@ function addSpacingToTimeDomain(domain, spaceToAddToEdges) {
499
496
  if (differenceInYears(endDate, startDate) > 1) {
500
497
  return [
501
498
  subYears(startDate, spaceToAddToEdges),
502
- addYears(endDate, spaceToAddToEdges)
499
+ addYears(endDate, spaceToAddToEdges),
503
500
  ];
504
501
  }
505
502
  if (differenceInMonths(endDate, startDate) > 1) {
506
503
  return [
507
504
  subMonths(startDate, spaceToAddToEdges),
508
- addMonths(endDate, spaceToAddToEdges)
505
+ addMonths(endDate, spaceToAddToEdges),
509
506
  ];
510
507
  }
511
508
  if (differenceInDays(endDate, startDate) > 1) {
512
509
  return [
513
510
  subDays(startDate, spaceToAddToEdges),
514
- addDays(endDate, spaceToAddToEdges)
511
+ addDays(endDate, spaceToAddToEdges),
515
512
  ];
516
513
  }
517
514
  if (differenceInHours(endDate, startDate) > 1) {
518
515
  return [
519
516
  subHours(startDate, spaceToAddToEdges),
520
- addHours(endDate, spaceToAddToEdges)
517
+ addHours(endDate, spaceToAddToEdges),
521
518
  ];
522
519
  }
523
520
  if (differenceInMinutes(endDate, startDate) > 30) {
524
521
  return [
525
522
  subMinutes(startDate, spaceToAddToEdges * 30),
526
- addMinutes(endDate, spaceToAddToEdges * 30)
523
+ addMinutes(endDate, spaceToAddToEdges * 30),
527
524
  ];
528
525
  }
529
526
  if (differenceInMinutes(endDate, startDate) > 1) {
530
527
  return [
531
528
  subMinutes(startDate, spaceToAddToEdges),
532
- addMinutes(endDate, spaceToAddToEdges)
529
+ addMinutes(endDate, spaceToAddToEdges),
533
530
  ];
534
531
  }
535
532
  if (differenceInSeconds(endDate, startDate) > 15) {
536
533
  return [
537
534
  subSeconds(startDate, spaceToAddToEdges * 15),
538
- addSeconds(endDate, spaceToAddToEdges * 15)
535
+ addSeconds(endDate, spaceToAddToEdges * 15),
539
536
  ];
540
537
  }
541
538
  if (differenceInSeconds(endDate, startDate) > 1) {
542
539
  return [
543
540
  subSeconds(startDate, spaceToAddToEdges),
544
- addSeconds(endDate, spaceToAddToEdges)
541
+ addSeconds(endDate, spaceToAddToEdges),
545
542
  ];
546
543
  }
547
544
  return [startDate, endDate];