@carbon/charts 1.8.0 → 1.9.0-next.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 (972) hide show
  1. package/CHANGELOG.md +84 -155
  2. package/README.md +18 -20
  3. package/dist/_baseEach-603421de.mjs +21 -0
  4. package/dist/_baseEach-603421de.mjs.map +1 -0
  5. package/dist/_baseEach-cdac417f.js +2 -0
  6. package/dist/_baseEach-cdac417f.js.map +1 -0
  7. package/dist/a11y-7bad4f48.mjs +5 -0
  8. package/dist/a11y-7bad4f48.mjs.map +1 -0
  9. package/dist/a11y-c7c9d087.js +2 -0
  10. package/dist/a11y-c7c9d087.js.map +1 -0
  11. package/dist/angle-utils-6f166b40.js +2 -0
  12. package/dist/angle-utils-6f166b40.js.map +1 -0
  13. package/dist/angle-utils-8b6ce998.mjs +387 -0
  14. package/dist/angle-utils-8b6ce998.mjs.map +1 -0
  15. package/dist/axis-chart.d.ts +13 -0
  16. package/dist/chart.d.ts +18 -0
  17. package/dist/charts/alluvial.d.ts +10 -0
  18. package/dist/charts/area-stacked.d.ts +8 -0
  19. package/dist/charts/area.d.ts +8 -0
  20. package/dist/charts/bar-grouped.d.ts +8 -0
  21. package/dist/charts/bar-simple.d.ts +8 -0
  22. package/dist/charts/bar-stacked.d.ts +8 -0
  23. package/dist/charts/boxplot.d.ts +10 -0
  24. package/dist/charts/bubble.d.ts +8 -0
  25. package/dist/charts/bullet.d.ts +10 -0
  26. package/dist/charts/choropleth.d.ts +14 -0
  27. package/dist/charts/circle-pack.d.ts +10 -0
  28. package/dist/charts/combo.d.ts +9 -0
  29. package/dist/charts/donut.d.ts +8 -0
  30. package/dist/charts/gauge.d.ts +10 -0
  31. package/dist/charts/heatmap.d.ts +14 -0
  32. package/dist/charts/histogram.d.ts +10 -0
  33. package/dist/charts/index.d.ts +27 -0
  34. package/dist/charts/line.d.ts +8 -0
  35. package/dist/charts/lollipop.d.ts +8 -0
  36. package/dist/charts/meter.d.ts +10 -0
  37. package/dist/charts/pie.d.ts +10 -0
  38. package/dist/charts/radar.d.ts +10 -0
  39. package/dist/charts/scatter.d.ts +8 -0
  40. package/dist/charts/tree.d.ts +10 -0
  41. package/dist/charts/treemap.d.ts +10 -0
  42. package/dist/charts/wordcloud.d.ts +10 -0
  43. package/dist/choropleth-4ac6ac20.js +82 -0
  44. package/dist/choropleth-4ac6ac20.js.map +1 -0
  45. package/dist/choropleth-f473ea0d.mjs +7997 -0
  46. package/dist/choropleth-f473ea0d.mjs.map +1 -0
  47. package/dist/color-scale-utils-5eb3eeaa.mjs +3809 -0
  48. package/dist/color-scale-utils-5eb3eeaa.mjs.map +1 -0
  49. package/dist/color-scale-utils-7d463811.js +3 -0
  50. package/dist/color-scale-utils-7d463811.js.map +1 -0
  51. package/dist/components/axes/axis.d.ts +24 -0
  52. package/dist/components/axes/chart-clip.d.ts +13 -0
  53. package/dist/components/axes/grid-brush.d.ts +10 -0
  54. package/dist/components/axes/grid.d.ts +22 -0
  55. package/dist/components/axes/index.d.ts +12 -0
  56. package/dist/components/axes/ruler-binned.d.ts +10 -0
  57. package/dist/components/axes/ruler.d.ts +30 -0
  58. package/dist/components/axes/toolbar.d.ts +40 -0
  59. package/dist/components/axes/two-dimensional-axes.d.ts +16 -0
  60. package/dist/components/axes/zero-line.d.ts +7 -0
  61. package/dist/components/axes/zoom-bar.d.ts +31 -0
  62. package/dist/components/component.d.ts +30 -0
  63. package/dist/components/diagrams/buildPaths.d.ts +40 -0
  64. package/dist/components/diagrams/index.d.ts +2 -0
  65. package/dist/components/essentials/canvas-chart-clip.d.ts +6 -0
  66. package/dist/components/essentials/color-scale-legend.d.ts +20 -0
  67. package/dist/components/essentials/geo-projection.d.ts +16 -0
  68. package/dist/components/essentials/highlights.d.ts +13 -0
  69. package/dist/components/essentials/index.d.ts +11 -0
  70. package/dist/components/essentials/legend.d.ts +11 -0
  71. package/dist/components/essentials/modal.d.ts +14 -0
  72. package/dist/components/essentials/threshold.d.ts +20 -0
  73. package/dist/components/essentials/title-meter.d.ts +30 -0
  74. package/dist/components/essentials/title.d.ts +20 -0
  75. package/dist/components/essentials/tooltip.d.ts +22 -0
  76. package/dist/components/graphs/alluvial.d.ts +14 -0
  77. package/dist/components/graphs/area-stacked.d.ts +11 -0
  78. package/dist/components/graphs/area.d.ts +12 -0
  79. package/dist/components/graphs/bar-grouped.d.ts +22 -0
  80. package/dist/components/graphs/bar-simple.d.ts +12 -0
  81. package/dist/components/graphs/bar-stacked.d.ts +13 -0
  82. package/dist/components/graphs/bar.d.ts +5 -0
  83. package/dist/components/graphs/boxplot.d.ts +9 -0
  84. package/dist/components/graphs/bubble.d.ts +13 -0
  85. package/dist/components/graphs/bullet.d.ts +12 -0
  86. package/dist/components/graphs/choropleth.d.ts +6 -0
  87. package/dist/components/graphs/circle-pack.d.ts +19 -0
  88. package/dist/components/graphs/donut.d.ts +9 -0
  89. package/dist/components/graphs/gauge.d.ts +27 -0
  90. package/dist/components/graphs/heatmap.d.ts +25 -0
  91. package/dist/components/graphs/histogram.d.ts +12 -0
  92. package/dist/components/graphs/index.d.ts +28 -0
  93. package/dist/components/graphs/line.d.ts +11 -0
  94. package/dist/components/graphs/lollipop.d.ts +14 -0
  95. package/dist/components/graphs/meter.d.ts +10 -0
  96. package/dist/components/graphs/pie.d.ts +16 -0
  97. package/dist/components/graphs/radar.d.ts +25 -0
  98. package/dist/components/graphs/scatter-stacked.d.ts +8 -0
  99. package/dist/components/graphs/scatter.d.ts +21 -0
  100. package/dist/components/graphs/skeleton-lines.d.ts +12 -0
  101. package/dist/components/graphs/skeleton.d.ts +23 -0
  102. package/dist/components/graphs/tree.d.ts +9 -0
  103. package/dist/components/graphs/treemap.d.ts +11 -0
  104. package/dist/components/graphs/wordcloud.d.ts +12 -0
  105. package/dist/components/index.d.ts +6 -0
  106. package/dist/components/index.js +2 -0
  107. package/dist/components/index.js.map +1 -0
  108. package/dist/components/index.mjs +76 -0
  109. package/dist/components/index.mjs.map +1 -0
  110. package/dist/components/layout/index.d.ts +2 -0
  111. package/dist/components/layout/layout.d.ts +18 -0
  112. package/dist/components/layout/spacer.d.ts +5 -0
  113. package/dist/configuration-non-customizable.d.ts +263 -0
  114. package/dist/configuration.d.ts +48 -0
  115. package/dist/demo/charts/alluvial.d.ts +109 -0
  116. package/dist/demo/charts/area.d.ts +224 -0
  117. package/dist/demo/charts/bar.d.ts +681 -0
  118. package/dist/demo/charts/boxplot.d.ts +34 -0
  119. package/dist/demo/charts/bubble.d.ts +141 -0
  120. package/dist/demo/charts/bullet.d.ts +24 -0
  121. package/dist/demo/charts/chart-types.d.ts +128 -0
  122. package/dist/demo/charts/choropleth.d.ts +738 -0
  123. package/dist/demo/charts/circle-pack.d.ts +91 -0
  124. package/dist/demo/charts/combo.d.ts +482 -0
  125. package/dist/demo/charts/donut.d.ts +64 -0
  126. package/dist/demo/charts/gauge.d.ts +40 -0
  127. package/dist/demo/charts/heatmap.d.ts +125 -0
  128. package/dist/demo/charts/hightlight.d.ts +40 -0
  129. package/dist/demo/charts/histogram.d.ts +63 -0
  130. package/dist/demo/charts/index.d.ts +62 -0
  131. package/dist/demo/charts/line.d.ts +361 -0
  132. package/dist/demo/charts/lollipop.d.ts +39 -0
  133. package/dist/demo/charts/meter.d.ts +95 -0
  134. package/dist/demo/charts/pie.d.ts +46 -0
  135. package/dist/demo/charts/radar.d.ts +63 -0
  136. package/dist/demo/charts/scatter.d.ts +118 -0
  137. package/dist/demo/charts/step.d.ts +96 -0
  138. package/dist/demo/charts/time-series-axis.d.ts +293 -0
  139. package/dist/demo/charts/toolbar.d.ts +12 -0
  140. package/dist/demo/charts/topojson-110.d.ts +360 -0
  141. package/dist/demo/charts/tree.d.ts +30 -0
  142. package/dist/demo/charts/treemap.d.ts +15 -0
  143. package/dist/demo/charts/wordcloud.d.ts +14 -0
  144. package/dist/demo/charts/zoom-bar.d.ts +79 -0
  145. package/dist/demo/index.d.ts +4 -0
  146. package/dist/demo/index.js +470 -0
  147. package/dist/demo/index.js.map +1 -0
  148. package/dist/demo/index.mjs +51789 -0
  149. package/dist/demo/index.mjs.map +1 -0
  150. package/dist/demo/styles.css +30574 -0
  151. package/dist/demo/styles.css.map +1 -0
  152. package/dist/demo/utils/index.d.ts +2 -0
  153. package/dist/demo/utils/sandbox.d.ts +39 -0
  154. package/dist/demo/utils/story-widgets.d.ts +7 -0
  155. package/dist/enums-a96ef472.mjs +89 -0
  156. package/dist/enums-a96ef472.mjs.map +1 -0
  157. package/dist/enums-aa2efd99.js +2 -0
  158. package/dist/enums-aa2efd99.js.map +1 -0
  159. package/dist/index-822564ed.js +2 -0
  160. package/dist/index-822564ed.js.map +1 -0
  161. package/dist/index-a266373c.mjs +749 -0
  162. package/dist/index-a266373c.mjs.map +1 -0
  163. package/dist/index-becfb567.mjs +72 -0
  164. package/dist/index-becfb567.mjs.map +1 -0
  165. package/dist/index-d865d500.js +2 -0
  166. package/dist/index-d865d500.js.map +1 -0
  167. package/dist/index-ec554115.mjs +62 -0
  168. package/dist/index-ec554115.mjs.map +1 -0
  169. package/dist/index-f23685eb.js +2 -0
  170. package/dist/index-f23685eb.js.map +1 -0
  171. package/dist/index.d.ts +13 -0
  172. package/dist/index.js +2 -0
  173. package/dist/index.js.map +1 -0
  174. package/dist/index.mjs +1121 -0
  175. package/dist/index.mjs.map +1 -0
  176. package/dist/interfaces/axis-scales.d.ts +201 -0
  177. package/dist/interfaces/charts.d.ts +520 -0
  178. package/dist/interfaces/components.d.ts +231 -0
  179. package/dist/interfaces/index.d.ts +12 -0
  180. package/dist/interfaces/index.js +2 -0
  181. package/dist/interfaces/index.js.map +1 -0
  182. package/dist/interfaces/index.mjs +58 -0
  183. package/dist/interfaces/index.mjs.map +1 -0
  184. package/dist/interfaces/layout.d.ts +21 -0
  185. package/dist/interfaces/model.d.ts +35 -0
  186. package/dist/interfaces/services.d.ts +20 -0
  187. package/dist/interfaces/truncation.d.ts +17 -0
  188. package/dist/model/binned-charts.d.ts +7 -0
  189. package/dist/model/cartesian-charts.d.ts +24 -0
  190. package/dist/model/heatmap.d.ts +57 -0
  191. package/dist/model/index.d.ts +16 -0
  192. package/dist/model/index.js +3 -0
  193. package/dist/model/index.js.map +1 -0
  194. package/dist/model/index.mjs +1107 -0
  195. package/dist/model/index.mjs.map +1 -0
  196. package/dist/model/meter.d.ts +20 -0
  197. package/dist/model/model.d.ts +110 -0
  198. package/dist/services/angle-utils.d.ts +15 -0
  199. package/dist/services/curves.d.ts +24 -0
  200. package/dist/services/essentials/dom-utils.d.ts +45 -0
  201. package/dist/services/essentials/events.d.ts +8 -0
  202. package/dist/services/essentials/files.d.ts +7 -0
  203. package/dist/services/essentials/gradient-utils.d.ts +6 -0
  204. package/dist/services/essentials/index.d.ts +5 -0
  205. package/dist/services/essentials/transitions.d.ts +13 -0
  206. package/dist/services/index.d.ts +9 -0
  207. package/dist/services/index.js +2 -0
  208. package/dist/services/index.js.map +1 -0
  209. package/dist/services/index.mjs +32 -0
  210. package/dist/services/index.mjs.map +1 -0
  211. package/dist/services/scales-cartesian.d.ts +89 -0
  212. package/dist/services/service.d.ts +11 -0
  213. package/dist/services/zoom.d.ts +21 -0
  214. package/dist/styles/_chart-holder.scss +50 -0
  215. package/dist/styles/color-palatte.scss +458 -0
  216. package/dist/styles/colors.scss +131 -0
  217. package/dist/styles/components/_color-legend.scss +11 -0
  218. package/dist/styles/components/_edge.scss +65 -0
  219. package/dist/styles/components/_grid.scss +30 -0
  220. package/dist/styles/components/_marker.scss +7 -0
  221. package/dist/styles/components/_meter-title.scss +37 -0
  222. package/dist/styles/components/_tooltip.scss +132 -0
  223. package/dist/styles/components/diagrams/_card-node.scss +97 -0
  224. package/dist/styles/components/diagrams/_edge.scss +66 -0
  225. package/dist/styles/components/diagrams/_shape-node.scss +89 -0
  226. package/dist/styles/components/diagrams/index.scss +4 -0
  227. package/dist/styles/graphs/_alluvial.scss +17 -0
  228. package/dist/styles/graphs/_bullet.scss +36 -0
  229. package/dist/styles/graphs/_circle-pack.scss +36 -0
  230. package/dist/styles/graphs/_gauge.scss +23 -0
  231. package/dist/styles/graphs/_heatmap.scss +60 -0
  232. package/dist/styles/graphs/_meter.scss +34 -0
  233. package/dist/styles/graphs/_radar.scss +18 -0
  234. package/dist/styles/graphs/_scatter-stacked.scss +12 -0
  235. package/dist/styles/graphs/_tree.scss +46 -0
  236. package/dist/styles/styles.scss +40 -0
  237. package/dist/styles/tokens.scss +407 -0
  238. package/dist/styles.css +28463 -0
  239. package/dist/styles.css.map +1 -0
  240. package/dist/styles.min.css +1 -0
  241. package/dist/styles.min.css.map +1 -0
  242. package/dist/tools.d.ts +150 -0
  243. package/package.json +140 -102
  244. package/axis-chart.d.ts +0 -10
  245. package/axis-chart.js +0 -169
  246. package/axis-chart.js.map +0 -1
  247. package/build/demo/create-codesandbox.d.ts +0 -113
  248. package/build/demo/data/CHART_TYPES.d.ts +0 -128
  249. package/build/demo/data/alluvial.d.ts +0 -109
  250. package/build/demo/data/area.d.ts +0 -224
  251. package/build/demo/data/bar.d.ts +0 -681
  252. package/build/demo/data/boxplot.d.ts +0 -34
  253. package/build/demo/data/bubble.d.ts +0 -141
  254. package/build/demo/data/bullet.d.ts +0 -24
  255. package/build/demo/data/choropleth.d.ts +0 -738
  256. package/build/demo/data/circle-pack.d.ts +0 -91
  257. package/build/demo/data/combo.d.ts +0 -482
  258. package/build/demo/data/donut.d.ts +0 -64
  259. package/build/demo/data/gauge.d.ts +0 -40
  260. package/build/demo/data/heatmap.d.ts +0 -125
  261. package/build/demo/data/high-scale.d.ts +0 -1
  262. package/build/demo/data/hightlight.d.ts +0 -40
  263. package/build/demo/data/histogram.d.ts +0 -63
  264. package/build/demo/data/index.d.ts +0 -33
  265. package/build/demo/data/line.d.ts +0 -361
  266. package/build/demo/data/lollipop.d.ts +0 -39
  267. package/build/demo/data/meter.d.ts +0 -95
  268. package/build/demo/data/pie.d.ts +0 -46
  269. package/build/demo/data/radar.d.ts +0 -63
  270. package/build/demo/data/scatter.d.ts +0 -118
  271. package/build/demo/data/step.d.ts +0 -96
  272. package/build/demo/data/time-series-axis.d.ts +0 -368
  273. package/build/demo/data/toolbar.d.ts +0 -12
  274. package/build/demo/data/topojson-110.d.ts +0 -360
  275. package/build/demo/data/tree.d.ts +0 -30
  276. package/build/demo/data/treemap.d.ts +0 -15
  277. package/build/demo/data/wordcloud.d.ts +0 -14
  278. package/build/demo/data/zoom-bar.d.ts +0 -94
  279. package/build/demo/utils.d.ts +0 -40
  280. package/build/src/axis-chart.d.ts +0 -10
  281. package/build/src/chart.d.ts +0 -14
  282. package/build/src/charts/alluvial.d.ts +0 -8
  283. package/build/src/charts/area-stacked.d.ts +0 -6
  284. package/build/src/charts/area.d.ts +0 -6
  285. package/build/src/charts/bar-grouped.d.ts +0 -6
  286. package/build/src/charts/bar-simple.d.ts +0 -6
  287. package/build/src/charts/bar-stacked.d.ts +0 -6
  288. package/build/src/charts/boxplot.d.ts +0 -8
  289. package/build/src/charts/bubble.d.ts +0 -6
  290. package/build/src/charts/bullet.d.ts +0 -8
  291. package/build/src/charts/choropleth.d.ts +0 -10
  292. package/build/src/charts/circle-pack.d.ts +0 -8
  293. package/build/src/charts/combo.d.ts +0 -7
  294. package/build/src/charts/donut.d.ts +0 -6
  295. package/build/src/charts/gauge.d.ts +0 -8
  296. package/build/src/charts/heatmap.d.ts +0 -10
  297. package/build/src/charts/histogram.d.ts +0 -8
  298. package/build/src/charts/index.d.ts +0 -25
  299. package/build/src/charts/line.d.ts +0 -6
  300. package/build/src/charts/lollipop.d.ts +0 -6
  301. package/build/src/charts/meter.d.ts +0 -8
  302. package/build/src/charts/pie.d.ts +0 -8
  303. package/build/src/charts/radar.d.ts +0 -8
  304. package/build/src/charts/scatter.d.ts +0 -6
  305. package/build/src/charts/tree.d.ts +0 -8
  306. package/build/src/charts/treemap.d.ts +0 -8
  307. package/build/src/charts/wordcloud.d.ts +0 -8
  308. package/build/src/components/axes/axis.d.ts +0 -24
  309. package/build/src/components/axes/chart-clip.d.ts +0 -13
  310. package/build/src/components/axes/grid-brush.d.ts +0 -10
  311. package/build/src/components/axes/grid.d.ts +0 -22
  312. package/build/src/components/axes/hover-axis.d.ts +0 -10
  313. package/build/src/components/axes/ruler-binned.d.ts +0 -7
  314. package/build/src/components/axes/ruler-stacked.d.ts +0 -4
  315. package/build/src/components/axes/ruler.d.ts +0 -27
  316. package/build/src/components/axes/toolbar.d.ts +0 -40
  317. package/build/src/components/axes/two-dimensional-axes.d.ts +0 -16
  318. package/build/src/components/axes/zero-line.d.ts +0 -7
  319. package/build/src/components/axes/zoom-bar.d.ts +0 -28
  320. package/build/src/components/component.d.ts +0 -28
  321. package/build/src/components/diagrams/buildPaths.d.ts +0 -63
  322. package/build/src/components/diagrams/markerDefinitions.d.ts +0 -37
  323. package/build/src/components/essentials/canvas-chart-clip.d.ts +0 -6
  324. package/build/src/components/essentials/color-scale-legend.d.ts +0 -20
  325. package/build/src/components/essentials/geo-projection.d.ts +0 -16
  326. package/build/src/components/essentials/highlights.d.ts +0 -13
  327. package/build/src/components/essentials/legend.d.ts +0 -11
  328. package/build/src/components/essentials/modal.d.ts +0 -14
  329. package/build/src/components/essentials/threshold.d.ts +0 -20
  330. package/build/src/components/essentials/title-meter.d.ts +0 -30
  331. package/build/src/components/essentials/title.d.ts +0 -20
  332. package/build/src/components/essentials/tooltip-axis.d.ts +0 -4
  333. package/build/src/components/essentials/tooltip.d.ts +0 -22
  334. package/build/src/components/graphs/alluvial.d.ts +0 -14
  335. package/build/src/components/graphs/area-stacked.d.ts +0 -11
  336. package/build/src/components/graphs/area.d.ts +0 -12
  337. package/build/src/components/graphs/bar-grouped.d.ts +0 -22
  338. package/build/src/components/graphs/bar-simple.d.ts +0 -12
  339. package/build/src/components/graphs/bar-stacked.d.ts +0 -13
  340. package/build/src/components/graphs/bar.d.ts +0 -5
  341. package/build/src/components/graphs/boxplot.d.ts +0 -9
  342. package/build/src/components/graphs/bubble.d.ts +0 -13
  343. package/build/src/components/graphs/bullet.d.ts +0 -12
  344. package/build/src/components/graphs/choropleth.d.ts +0 -6
  345. package/build/src/components/graphs/circle-pack.d.ts +0 -19
  346. package/build/src/components/graphs/donut.d.ts +0 -9
  347. package/build/src/components/graphs/gauge.d.ts +0 -27
  348. package/build/src/components/graphs/heatmap.d.ts +0 -25
  349. package/build/src/components/graphs/histogram.d.ts +0 -12
  350. package/build/src/components/graphs/line.d.ts +0 -11
  351. package/build/src/components/graphs/lollipop.d.ts +0 -14
  352. package/build/src/components/graphs/meter.d.ts +0 -10
  353. package/build/src/components/graphs/pie.d.ts +0 -16
  354. package/build/src/components/graphs/radar.d.ts +0 -25
  355. package/build/src/components/graphs/scatter-stacked.d.ts +0 -8
  356. package/build/src/components/graphs/scatter.d.ts +0 -21
  357. package/build/src/components/graphs/skeleton-lines.d.ts +0 -11
  358. package/build/src/components/graphs/skeleton.d.ts +0 -22
  359. package/build/src/components/graphs/tree.d.ts +0 -9
  360. package/build/src/components/graphs/treemap.d.ts +0 -11
  361. package/build/src/components/graphs/wordcloud.d.ts +0 -12
  362. package/build/src/components/index.d.ts +0 -53
  363. package/build/src/components/layout/layout.d.ts +0 -17
  364. package/build/src/components/layout/spacer.d.ts +0 -5
  365. package/build/src/configuration-non-customizable.d.ts +0 -263
  366. package/build/src/configuration.d.ts +0 -46
  367. package/build/src/interfaces/a11y.d.ts +0 -12
  368. package/build/src/interfaces/axis-scales.d.ts +0 -201
  369. package/build/src/interfaces/charts.d.ts +0 -512
  370. package/build/src/interfaces/components.d.ts +0 -231
  371. package/build/src/interfaces/enums.d.ts +0 -261
  372. package/build/src/interfaces/events.d.ts +0 -239
  373. package/build/src/interfaces/index.d.ts +0 -7
  374. package/build/src/interfaces/layout.d.ts +0 -15
  375. package/build/src/interfaces/model.d.ts +0 -35
  376. package/build/src/interfaces/truncation.d.ts +0 -17
  377. package/build/src/model/alluvial.d.ts +0 -8
  378. package/build/src/model/binned-charts.d.ts +0 -7
  379. package/build/src/model/boxplot.d.ts +0 -14
  380. package/build/src/model/bullet.d.ts +0 -14
  381. package/build/src/model/cartesian-charts.d.ts +0 -24
  382. package/build/src/model/choropleth.d.ts +0 -29
  383. package/build/src/model/circle-pack.d.ts +0 -36
  384. package/build/src/model/gauge.d.ts +0 -9
  385. package/build/src/model/heatmap.d.ts +0 -52
  386. package/build/src/model/meter.d.ts +0 -19
  387. package/build/src/model/model.d.ts +0 -107
  388. package/build/src/model/pie.d.ts +0 -9
  389. package/build/src/model/radar.d.ts +0 -7
  390. package/build/src/model/tree.d.ts +0 -14
  391. package/build/src/model/treemap.d.ts +0 -8
  392. package/build/src/model/wordcloud.d.ts +0 -7
  393. package/build/src/services/angle-utils.d.ts +0 -205
  394. package/build/src/services/canvas-zoom.d.ts +0 -11
  395. package/build/src/services/color-scale-utils.d.ts +0 -10
  396. package/build/src/services/curves.d.ts +0 -25
  397. package/build/src/services/essentials/dom-utils.d.ts +0 -39
  398. package/build/src/services/essentials/events.d.ts +0 -8
  399. package/build/src/services/essentials/files.d.ts +0 -6
  400. package/build/src/services/essentials/gradient-utils.d.ts +0 -6
  401. package/build/src/services/essentials/transitions.d.ts +0 -13
  402. package/build/src/services/index.d.ts +0 -10
  403. package/build/src/services/scales-cartesian.d.ts +0 -86
  404. package/build/src/services/service.d.ts +0 -10
  405. package/build/src/services/time-series.d.ts +0 -787
  406. package/build/src/services/zoom.d.ts +0 -21
  407. package/build/src/tools.d.ts +0 -2427
  408. package/build/stories/all.stories.d.ts +0 -1
  409. package/build/stories/tutorials/api.d.ts +0 -4
  410. package/build/stories/tutorials/color-palette.d.ts +0 -4
  411. package/build/stories/tutorials/combo-charts.d.ts +0 -4
  412. package/build/stories/tutorials/dual-axes.d.ts +0 -4
  413. package/build/stories/tutorials/event-listeners.d.ts +0 -4
  414. package/build/stories/tutorials/getting-started/angular.d.ts +0 -5
  415. package/build/stories/tutorials/getting-started/react.d.ts +0 -5
  416. package/build/stories/tutorials/getting-started/vanilla.d.ts +0 -5
  417. package/build/stories/tutorials/getting-started/vue.d.ts +0 -5
  418. package/build/stories/tutorials/index.d.ts +0 -11
  419. package/build/stories/tutorials/tabular-data-format.d.ts +0 -4
  420. package/build/stories/tutorials/themes.d.ts +0 -4
  421. package/build/stories/tutorials.stories.d.ts +0 -1
  422. package/bundle.js +0 -17
  423. package/chart.d.ts +0 -14
  424. package/chart.js +0 -198
  425. package/chart.js.map +0 -1
  426. package/charts/alluvial.d.ts +0 -8
  427. package/charts/alluvial.js +0 -46
  428. package/charts/alluvial.js.map +0 -1
  429. package/charts/area-stacked.d.ts +0 -6
  430. package/charts/area-stacked.js +0 -55
  431. package/charts/area-stacked.js.map +0 -1
  432. package/charts/area.d.ts +0 -6
  433. package/charts/area.js +0 -54
  434. package/charts/area.js.map +0 -1
  435. package/charts/bar-grouped.d.ts +0 -6
  436. package/charts/bar-grouped.js +0 -49
  437. package/charts/bar-grouped.js.map +0 -1
  438. package/charts/bar-simple.d.ts +0 -6
  439. package/charts/bar-simple.js +0 -49
  440. package/charts/bar-simple.js.map +0 -1
  441. package/charts/bar-stacked.d.ts +0 -6
  442. package/charts/bar-stacked.js +0 -50
  443. package/charts/bar-stacked.js.map +0 -1
  444. package/charts/boxplot.d.ts +0 -8
  445. package/charts/boxplot.js +0 -55
  446. package/charts/boxplot.js.map +0 -1
  447. package/charts/bubble.d.ts +0 -6
  448. package/charts/bubble.js +0 -49
  449. package/charts/bubble.js.map +0 -1
  450. package/charts/bullet.d.ts +0 -8
  451. package/charts/bullet.js +0 -50
  452. package/charts/bullet.js.map +0 -1
  453. package/charts/choropleth.d.ts +0 -10
  454. package/charts/choropleth.js +0 -141
  455. package/charts/choropleth.js.map +0 -1
  456. package/charts/circle-pack.d.ts +0 -8
  457. package/charts/circle-pack.js +0 -45
  458. package/charts/circle-pack.js.map +0 -1
  459. package/charts/combo.d.ts +0 -7
  460. package/charts/combo.js +0 -132
  461. package/charts/combo.js.map +0 -1
  462. package/charts/donut.d.ts +0 -6
  463. package/charts/donut.js +0 -46
  464. package/charts/donut.js.map +0 -1
  465. package/charts/gauge.d.ts +0 -8
  466. package/charts/gauge.js +0 -42
  467. package/charts/gauge.js.map +0 -1
  468. package/charts/heatmap.d.ts +0 -10
  469. package/charts/heatmap.js +0 -142
  470. package/charts/heatmap.js.map +0 -1
  471. package/charts/histogram.d.ts +0 -8
  472. package/charts/histogram.js +0 -48
  473. package/charts/histogram.js.map +0 -1
  474. package/charts/index.d.ts +0 -25
  475. package/charts/index.js +0 -26
  476. package/charts/index.js.map +0 -1
  477. package/charts/line.d.ts +0 -6
  478. package/charts/line.js +0 -48
  479. package/charts/line.js.map +0 -1
  480. package/charts/lollipop.d.ts +0 -6
  481. package/charts/lollipop.js +0 -50
  482. package/charts/lollipop.js.map +0 -1
  483. package/charts/meter.d.ts +0 -8
  484. package/charts/meter.js +0 -94
  485. package/charts/meter.js.map +0 -1
  486. package/charts/pie.d.ts +0 -8
  487. package/charts/pie.js +0 -55
  488. package/charts/pie.js.map +0 -1
  489. package/charts/radar.d.ts +0 -8
  490. package/charts/radar.js +0 -44
  491. package/charts/radar.js.map +0 -1
  492. package/charts/scatter.d.ts +0 -6
  493. package/charts/scatter.js +0 -49
  494. package/charts/scatter.js.map +0 -1
  495. package/charts/tree.d.ts +0 -8
  496. package/charts/tree.js +0 -47
  497. package/charts/tree.js.map +0 -1
  498. package/charts/treemap.d.ts +0 -8
  499. package/charts/treemap.js +0 -43
  500. package/charts/treemap.js.map +0 -1
  501. package/charts/wordcloud.d.ts +0 -8
  502. package/charts/wordcloud.js +0 -49
  503. package/charts/wordcloud.js.map +0 -1
  504. package/components/axes/axis.d.ts +0 -24
  505. package/components/axes/axis.js +0 -587
  506. package/components/axes/axis.js.map +0 -1
  507. package/components/axes/chart-clip.d.ts +0 -13
  508. package/components/axes/chart-clip.js +0 -63
  509. package/components/axes/chart-clip.js.map +0 -1
  510. package/components/axes/grid-brush.d.ts +0 -10
  511. package/components/axes/grid-brush.js +0 -170
  512. package/components/axes/grid-brush.js.map +0 -1
  513. package/components/axes/grid.d.ts +0 -22
  514. package/components/axes/grid.js +0 -235
  515. package/components/axes/grid.js.map +0 -1
  516. package/components/axes/hover-axis.js +0 -243
  517. package/components/axes/hover-axis.js.map +0 -1
  518. package/components/axes/ruler-binned.d.ts +0 -7
  519. package/components/axes/ruler-binned.js +0 -136
  520. package/components/axes/ruler-binned.js.map +0 -1
  521. package/components/axes/ruler-stacked.js +0 -26
  522. package/components/axes/ruler-stacked.js.map +0 -1
  523. package/components/axes/ruler.d.ts +0 -27
  524. package/components/axes/ruler.js +0 -209
  525. package/components/axes/ruler.js.map +0 -1
  526. package/components/axes/toolbar.d.ts +0 -40
  527. package/components/axes/toolbar.js +0 -558
  528. package/components/axes/toolbar.js.map +0 -1
  529. package/components/axes/two-dimensional-axes.d.ts +0 -16
  530. package/components/axes/two-dimensional-axes.js +0 -134
  531. package/components/axes/two-dimensional-axes.js.map +0 -1
  532. package/components/axes/zero-line.d.ts +0 -7
  533. package/components/axes/zero-line.js +0 -76
  534. package/components/axes/zero-line.js.map +0 -1
  535. package/components/axes/zoom-bar.d.ts +0 -28
  536. package/components/axes/zoom-bar.js +0 -490
  537. package/components/axes/zoom-bar.js.map +0 -1
  538. package/components/component.d.ts +0 -28
  539. package/components/component.js +0 -102
  540. package/components/component.js.map +0 -1
  541. package/components/diagrams/buildPaths.d.ts +0 -39
  542. package/components/diagrams/buildPaths.js +0 -71
  543. package/components/diagrams/buildPaths.js.map +0 -1
  544. package/components/diagrams/markerDefinitions.js +0 -38
  545. package/components/diagrams/markerDefinitions.js.map +0 -1
  546. package/components/essentials/canvas-chart-clip.d.ts +0 -6
  547. package/components/essentials/canvas-chart-clip.js +0 -46
  548. package/components/essentials/canvas-chart-clip.js.map +0 -1
  549. package/components/essentials/color-scale-legend.d.ts +0 -20
  550. package/components/essentials/color-scale-legend.js +0 -237
  551. package/components/essentials/color-scale-legend.js.map +0 -1
  552. package/components/essentials/geo-projection.d.ts +0 -16
  553. package/components/essentials/geo-projection.js +0 -160
  554. package/components/essentials/geo-projection.js.map +0 -1
  555. package/components/essentials/highlights.d.ts +0 -13
  556. package/components/essentials/highlights.js +0 -196
  557. package/components/essentials/highlights.js.map +0 -1
  558. package/components/essentials/legend.d.ts +0 -11
  559. package/components/essentials/legend.js +0 -428
  560. package/components/essentials/legend.js.map +0 -1
  561. package/components/essentials/modal.d.ts +0 -14
  562. package/components/essentials/modal.js +0 -89
  563. package/components/essentials/modal.js.map +0 -1
  564. package/components/essentials/threshold.d.ts +0 -20
  565. package/components/essentials/threshold.js +0 -306
  566. package/components/essentials/threshold.js.map +0 -1
  567. package/components/essentials/title-meter.d.ts +0 -30
  568. package/components/essentials/title-meter.js +0 -279
  569. package/components/essentials/title-meter.js.map +0 -1
  570. package/components/essentials/title.d.ts +0 -20
  571. package/components/essentials/title.js +0 -138
  572. package/components/essentials/title.js.map +0 -1
  573. package/components/essentials/tooltip-axis.js +0 -142
  574. package/components/essentials/tooltip-axis.js.map +0 -1
  575. package/components/essentials/tooltip.d.ts +0 -22
  576. package/components/essentials/tooltip.js +0 -263
  577. package/components/essentials/tooltip.js.map +0 -1
  578. package/components/graphs/alluvial.d.ts +0 -14
  579. package/components/graphs/alluvial.js +0 -535
  580. package/components/graphs/alluvial.js.map +0 -1
  581. package/components/graphs/area-stacked.d.ts +0 -11
  582. package/components/graphs/area-stacked.js +0 -131
  583. package/components/graphs/area-stacked.js.map +0 -1
  584. package/components/graphs/area.d.ts +0 -12
  585. package/components/graphs/area.js +0 -260
  586. package/components/graphs/area.js.map +0 -1
  587. package/components/graphs/bar-grouped.d.ts +0 -22
  588. package/components/graphs/bar-grouped.js +0 -312
  589. package/components/graphs/bar-grouped.js.map +0 -1
  590. package/components/graphs/bar-simple.d.ts +0 -12
  591. package/components/graphs/bar-simple.js +0 -218
  592. package/components/graphs/bar-simple.js.map +0 -1
  593. package/components/graphs/bar-stacked.d.ts +0 -13
  594. package/components/graphs/bar-stacked.js +0 -281
  595. package/components/graphs/bar-stacked.js.map +0 -1
  596. package/components/graphs/bar.d.ts +0 -5
  597. package/components/graphs/bar.js +0 -58
  598. package/components/graphs/bar.js.map +0 -1
  599. package/components/graphs/boxplot.d.ts +0 -9
  600. package/components/graphs/boxplot.js +0 -485
  601. package/components/graphs/boxplot.js.map +0 -1
  602. package/components/graphs/bubble.d.ts +0 -13
  603. package/components/graphs/bubble.js +0 -113
  604. package/components/graphs/bubble.js.map +0 -1
  605. package/components/graphs/bullet.d.ts +0 -12
  606. package/components/graphs/bullet.js +0 -395
  607. package/components/graphs/bullet.js.map +0 -1
  608. package/components/graphs/choropleth.d.ts +0 -6
  609. package/components/graphs/choropleth.js +0 -106
  610. package/components/graphs/choropleth.js.map +0 -1
  611. package/components/graphs/circle-pack.d.ts +0 -19
  612. package/components/graphs/circle-pack.js +0 -388
  613. package/components/graphs/circle-pack.js.map +0 -1
  614. package/components/graphs/donut.d.ts +0 -9
  615. package/components/graphs/donut.js +0 -116
  616. package/components/graphs/donut.js.map +0 -1
  617. package/components/graphs/gauge.d.ts +0 -27
  618. package/components/graphs/gauge.js +0 -347
  619. package/components/graphs/gauge.js.map +0 -1
  620. package/components/graphs/heatmap.d.ts +0 -25
  621. package/components/graphs/heatmap.js +0 -388
  622. package/components/graphs/heatmap.js.map +0 -1
  623. package/components/graphs/histogram.d.ts +0 -12
  624. package/components/graphs/histogram.js +0 -220
  625. package/components/graphs/histogram.js.map +0 -1
  626. package/components/graphs/line.d.ts +0 -11
  627. package/components/graphs/line.js +0 -179
  628. package/components/graphs/line.js.map +0 -1
  629. package/components/graphs/lollipop.d.ts +0 -14
  630. package/components/graphs/lollipop.js +0 -164
  631. package/components/graphs/lollipop.js.map +0 -1
  632. package/components/graphs/meter.d.ts +0 -10
  633. package/components/graphs/meter.js +0 -284
  634. package/components/graphs/meter.js.map +0 -1
  635. package/components/graphs/pie.d.ts +0 -16
  636. package/components/graphs/pie.js +0 -438
  637. package/components/graphs/pie.js.map +0 -1
  638. package/components/graphs/radar.d.ts +0 -25
  639. package/components/graphs/radar.js +0 -737
  640. package/components/graphs/radar.js.map +0 -1
  641. package/components/graphs/scatter-stacked.d.ts +0 -8
  642. package/components/graphs/scatter-stacked.js +0 -140
  643. package/components/graphs/scatter-stacked.js.map +0 -1
  644. package/components/graphs/scatter.d.ts +0 -21
  645. package/components/graphs/scatter.js +0 -360
  646. package/components/graphs/scatter.js.map +0 -1
  647. package/components/graphs/skeleton-lines.d.ts +0 -11
  648. package/components/graphs/skeleton-lines.js +0 -84
  649. package/components/graphs/skeleton-lines.js.map +0 -1
  650. package/components/graphs/skeleton.d.ts +0 -22
  651. package/components/graphs/skeleton.js +0 -272
  652. package/components/graphs/skeleton.js.map +0 -1
  653. package/components/graphs/tree.d.ts +0 -9
  654. package/components/graphs/tree.js +0 -262
  655. package/components/graphs/tree.js.map +0 -1
  656. package/components/graphs/treemap.d.ts +0 -11
  657. package/components/graphs/treemap.js +0 -344
  658. package/components/graphs/treemap.js.map +0 -1
  659. package/components/graphs/wordcloud.d.ts +0 -12
  660. package/components/graphs/wordcloud.js +0 -268
  661. package/components/graphs/wordcloud.js.map +0 -1
  662. package/components/index.d.ts +0 -53
  663. package/components/index.js +0 -59
  664. package/components/index.js.map +0 -1
  665. package/components/layout/layout.d.ts +0 -17
  666. package/components/layout/layout.js +0 -191
  667. package/components/layout/layout.js.map +0 -1
  668. package/components/layout/spacer.d.ts +0 -5
  669. package/components/layout/spacer.js +0 -33
  670. package/components/layout/spacer.js.map +0 -1
  671. package/configuration-non-customizable.d.ts +0 -263
  672. package/configuration-non-customizable.js +0 -276
  673. package/configuration-non-customizable.js.map +0 -1
  674. package/configuration.d.ts +0 -46
  675. package/configuration.js +0 -552
  676. package/configuration.js.map +0 -1
  677. package/demo/create-codesandbox.d.ts +0 -65
  678. package/demo/create-codesandbox.js +0 -173
  679. package/demo/create-codesandbox.js.map +0 -1
  680. package/demo/data/CHART_TYPES.d.ts +0 -128
  681. package/demo/data/CHART_TYPES.js +0 -128
  682. package/demo/data/CHART_TYPES.js.map +0 -1
  683. package/demo/data/alluvial.d.ts +0 -109
  684. package/demo/data/alluvial.js +0 -328
  685. package/demo/data/alluvial.js.map +0 -1
  686. package/demo/data/area.d.ts +0 -224
  687. package/demo/data/area.js +0 -330
  688. package/demo/data/area.js.map +0 -1
  689. package/demo/data/bar.d.ts +0 -681
  690. package/demo/data/bar.js +0 -915
  691. package/demo/data/bar.js.map +0 -1
  692. package/demo/data/boxplot.d.ts +0 -34
  693. package/demo/data/boxplot.js +0 -48
  694. package/demo/data/boxplot.js.map +0 -1
  695. package/demo/data/bubble.d.ts +0 -141
  696. package/demo/data/bubble.js +0 -182
  697. package/demo/data/bubble.js.map +0 -1
  698. package/demo/data/bullet.d.ts +0 -24
  699. package/demo/data/bullet.js +0 -55
  700. package/demo/data/bullet.js.map +0 -1
  701. package/demo/data/bundle.js +0 -1
  702. package/demo/data/choropleth.d.ts +0 -738
  703. package/demo/data/choropleth.js +0 -1684
  704. package/demo/data/choropleth.js.map +0 -1
  705. package/demo/data/circle-pack.d.ts +0 -91
  706. package/demo/data/circle-pack.js +0 -224
  707. package/demo/data/circle-pack.js.map +0 -1
  708. package/demo/data/combo.d.ts +0 -482
  709. package/demo/data/combo.js +0 -571
  710. package/demo/data/combo.js.map +0 -1
  711. package/demo/data/donut.d.ts +0 -64
  712. package/demo/data/donut.js +0 -60
  713. package/demo/data/donut.js.map +0 -1
  714. package/demo/data/gauge.d.ts +0 -40
  715. package/demo/data/gauge.js +0 -41
  716. package/demo/data/gauge.js.map +0 -1
  717. package/demo/data/heatmap.d.ts +0 -125
  718. package/demo/data/heatmap.js +0 -1149
  719. package/demo/data/heatmap.js.map +0 -1
  720. package/demo/data/high-scale.d.ts +0 -1
  721. package/demo/data/high-scale.js +0 -5
  722. package/demo/data/high-scale.js.map +0 -1
  723. package/demo/data/hightlight.d.ts +0 -40
  724. package/demo/data/hightlight.js +0 -44
  725. package/demo/data/hightlight.js.map +0 -1
  726. package/demo/data/histogram.d.ts +0 -63
  727. package/demo/data/histogram.js +0 -312
  728. package/demo/data/histogram.js.map +0 -1
  729. package/demo/data/index.d.ts +0 -33
  730. package/demo/data/index.js +0 -1305
  731. package/demo/data/index.js.map +0 -1
  732. package/demo/data/line.d.ts +0 -361
  733. package/demo/data/line.js +0 -480
  734. package/demo/data/line.js.map +0 -1
  735. package/demo/data/lollipop.d.ts +0 -39
  736. package/demo/data/lollipop.js +0 -37
  737. package/demo/data/lollipop.js.map +0 -1
  738. package/demo/data/meter.d.ts +0 -95
  739. package/demo/data/meter.js +0 -114
  740. package/demo/data/meter.js.map +0 -1
  741. package/demo/data/pie.d.ts +0 -46
  742. package/demo/data/pie.js +0 -55
  743. package/demo/data/pie.js.map +0 -1
  744. package/demo/data/radar.d.ts +0 -63
  745. package/demo/data/radar.js +0 -118
  746. package/demo/data/radar.js.map +0 -1
  747. package/demo/data/scatter.d.ts +0 -118
  748. package/demo/data/scatter.js +0 -143
  749. package/demo/data/scatter.js.map +0 -1
  750. package/demo/data/step.d.ts +0 -96
  751. package/demo/data/step.js +0 -27
  752. package/demo/data/step.js.map +0 -1
  753. package/demo/data/time-series-axis.d.ts +0 -368
  754. package/demo/data/time-series-axis.js +0 -436
  755. package/demo/data/time-series-axis.js.map +0 -1
  756. package/demo/data/toolbar.d.ts +0 -12
  757. package/demo/data/toolbar.js +0 -67
  758. package/demo/data/toolbar.js.map +0 -1
  759. package/demo/data/topojson-110.d.ts +0 -360
  760. package/demo/data/topojson-110.js +0 -40724
  761. package/demo/data/topojson-110.js.map +0 -1
  762. package/demo/data/tree.d.ts +0 -30
  763. package/demo/data/tree.js +0 -209
  764. package/demo/data/tree.js.map +0 -1
  765. package/demo/data/treemap.d.ts +0 -15
  766. package/demo/data/treemap.js +0 -93
  767. package/demo/data/treemap.js.map +0 -1
  768. package/demo/data/wordcloud.d.ts +0 -14
  769. package/demo/data/wordcloud.js +0 -105
  770. package/demo/data/wordcloud.js.map +0 -1
  771. package/demo/data/zoom-bar.d.ts +0 -94
  772. package/demo/data/zoom-bar.js +0 -187
  773. package/demo/data/zoom-bar.js.map +0 -1
  774. package/demo/styles.css +0 -31231
  775. package/demo/styles.css.map +0 -1
  776. package/demo/styles.min.css +0 -1
  777. package/demo/styles.min.css.map +0 -1
  778. package/demo/tsconfig.tsbuildinfo +0 -1451
  779. package/demo/utils.d.ts +0 -24
  780. package/demo/utils.js +0 -222
  781. package/demo/utils.js.map +0 -1
  782. package/index.d.ts +0 -4
  783. package/index.js +0 -6
  784. package/index.js.map +0 -1
  785. package/interfaces/a11y.js +0 -14
  786. package/interfaces/a11y.js.map +0 -1
  787. package/interfaces/axis-scales.d.ts +0 -201
  788. package/interfaces/axis-scales.js +0 -1
  789. package/interfaces/axis-scales.js.map +0 -1
  790. package/interfaces/charts.d.ts +0 -512
  791. package/interfaces/charts.js +0 -1
  792. package/interfaces/charts.js.map +0 -1
  793. package/interfaces/components.d.ts +0 -231
  794. package/interfaces/components.js +0 -1
  795. package/interfaces/components.js.map +0 -1
  796. package/interfaces/enums.js +0 -296
  797. package/interfaces/enums.js.map +0 -1
  798. package/interfaces/events.js +0 -269
  799. package/interfaces/events.js.map +0 -1
  800. package/interfaces/index.d.ts +0 -7
  801. package/interfaces/index.js +0 -3
  802. package/interfaces/index.js.map +0 -1
  803. package/interfaces/layout.d.ts +0 -15
  804. package/interfaces/layout.js +0 -1
  805. package/interfaces/layout.js.map +0 -1
  806. package/interfaces/model.d.ts +0 -35
  807. package/interfaces/model.js +0 -1
  808. package/interfaces/model.js.map +0 -1
  809. package/interfaces/truncation.d.ts +0 -17
  810. package/interfaces/truncation.js +0 -1
  811. package/interfaces/truncation.js.map +0 -1
  812. package/model/alluvial.js +0 -47
  813. package/model/alluvial.js.map +0 -1
  814. package/model/binned-charts.d.ts +0 -7
  815. package/model/binned-charts.js +0 -52
  816. package/model/binned-charts.js.map +0 -1
  817. package/model/boxplot.js +0 -174
  818. package/model/boxplot.js.map +0 -1
  819. package/model/bullet.js +0 -74
  820. package/model/bullet.js.map +0 -1
  821. package/model/cartesian-charts.d.ts +0 -24
  822. package/model/cartesian-charts.js +0 -202
  823. package/model/cartesian-charts.js.map +0 -1
  824. package/model/choropleth.js +0 -105
  825. package/model/choropleth.js.map +0 -1
  826. package/model/circle-pack.js +0 -189
  827. package/model/circle-pack.js.map +0 -1
  828. package/model/gauge.js +0 -51
  829. package/model/gauge.js.map +0 -1
  830. package/model/heatmap.d.ts +0 -52
  831. package/model/heatmap.js +0 -220
  832. package/model/heatmap.js.map +0 -1
  833. package/model/meter.d.ts +0 -19
  834. package/model/meter.js +0 -118
  835. package/model/meter.js.map +0 -1
  836. package/model/model.d.ts +0 -107
  837. package/model/model.js +0 -712
  838. package/model/model.js.map +0 -1
  839. package/model/pie.js +0 -66
  840. package/model/pie.js.map +0 -1
  841. package/model/radar.js +0 -52
  842. package/model/radar.js.map +0 -1
  843. package/model/tree.js +0 -56
  844. package/model/tree.js.map +0 -1
  845. package/model/treemap.js +0 -44
  846. package/model/treemap.js.map +0 -1
  847. package/model/wordcloud.js +0 -47
  848. package/model/wordcloud.js.map +0 -1
  849. package/polyfills.d.ts +0 -0
  850. package/polyfills.js +0 -29
  851. package/polyfills.js.map +0 -1
  852. package/services/angle-utils.d.ts +0 -16
  853. package/services/angle-utils.js +0 -82
  854. package/services/angle-utils.js.map +0 -1
  855. package/services/canvas-zoom.js +0 -72
  856. package/services/canvas-zoom.js.map +0 -1
  857. package/services/color-scale-utils.js +0 -64
  858. package/services/color-scale-utils.js.map +0 -1
  859. package/services/curves.d.ts +0 -25
  860. package/services/curves.js +0 -77
  861. package/services/curves.js.map +0 -1
  862. package/services/essentials/dom-utils.d.ts +0 -39
  863. package/services/essentials/dom-utils.js +0 -423
  864. package/services/essentials/dom-utils.js.map +0 -1
  865. package/services/essentials/events.d.ts +0 -8
  866. package/services/essentials/events.js +0 -53
  867. package/services/essentials/events.js.map +0 -1
  868. package/services/essentials/files.d.ts +0 -6
  869. package/services/essentials/files.js +0 -60
  870. package/services/essentials/files.js.map +0 -1
  871. package/services/essentials/gradient-utils.d.ts +0 -6
  872. package/services/essentials/gradient-utils.js +0 -85
  873. package/services/essentials/gradient-utils.js.map +0 -1
  874. package/services/essentials/transitions.d.ts +0 -13
  875. package/services/essentials/transitions.js +0 -51
  876. package/services/essentials/transitions.js.map +0 -1
  877. package/services/index.d.ts +0 -10
  878. package/services/index.js +0 -13
  879. package/services/index.js.map +0 -1
  880. package/services/scales-cartesian.d.ts +0 -86
  881. package/services/scales-cartesian.js +0 -656
  882. package/services/scales-cartesian.js.map +0 -1
  883. package/services/service.d.ts +0 -10
  884. package/services/service.js +0 -24
  885. package/services/service.js.map +0 -1
  886. package/services/time-series.js +0 -147
  887. package/services/time-series.js.map +0 -1
  888. package/services/zoom.d.ts +0 -21
  889. package/services/zoom.js +0 -217
  890. package/services/zoom.js.map +0 -1
  891. package/styles/_chart-holder.scss +0 -50
  892. package/styles/color-palatte.scss +0 -458
  893. package/styles/colors.scss +0 -155
  894. package/styles/components/_color-legend.scss +0 -11
  895. package/styles/components/_edge.scss +0 -65
  896. package/styles/components/_grid.scss +0 -30
  897. package/styles/components/_marker.scss +0 -7
  898. package/styles/components/_meter-title.scss +0 -37
  899. package/styles/components/_tooltip.scss +0 -132
  900. package/styles/components/diagrams/_card-node.scss +0 -97
  901. package/styles/components/diagrams/_edge.scss +0 -66
  902. package/styles/components/diagrams/_shape-node.scss +0 -89
  903. package/styles/components/diagrams/index.scss +0 -4
  904. package/styles/graphs/_alluvial.scss +0 -17
  905. package/styles/graphs/_bullet.scss +0 -36
  906. package/styles/graphs/_circle-pack.scss +0 -36
  907. package/styles/graphs/_gauge.scss +0 -23
  908. package/styles/graphs/_heatmap.scss +0 -60
  909. package/styles/graphs/_meter.scss +0 -34
  910. package/styles/graphs/_radar.scss +0 -18
  911. package/styles/graphs/_scatter-stacked.scss +0 -12
  912. package/styles/graphs/_tree.scss +0 -47
  913. package/styles/styles.scss +0 -35
  914. package/styles/tokens.scss +0 -416
  915. package/styles.css +0 -6325
  916. package/styles.css.map +0 -1
  917. package/styles.min.css +0 -1
  918. package/styles.min.css.map +0 -1
  919. package/tools.d.ts +0 -144
  920. package/tools.js +0 -348
  921. package/tools.js.map +0 -1
  922. package/tsconfig.tsbuildinfo +0 -3816
  923. /package/{components → dist/components}/axes/hover-axis.d.ts +0 -0
  924. /package/{components → dist/components}/axes/ruler-stacked.d.ts +0 -0
  925. /package/{components → dist/components}/diagrams/markerDefinitions.d.ts +0 -0
  926. /package/{components → dist/components}/essentials/tooltip-axis.d.ts +0 -0
  927. /package/{interfaces → dist/interfaces}/a11y.d.ts +0 -0
  928. /package/{interfaces → dist/interfaces}/enums.d.ts +0 -0
  929. /package/{interfaces → dist/interfaces}/events.d.ts +0 -0
  930. /package/{model → dist/model}/alluvial.d.ts +0 -0
  931. /package/{model → dist/model}/boxplot.d.ts +0 -0
  932. /package/{model → dist/model}/bullet.d.ts +0 -0
  933. /package/{model → dist/model}/choropleth.d.ts +0 -0
  934. /package/{model → dist/model}/circle-pack.d.ts +0 -0
  935. /package/{model → dist/model}/gauge.d.ts +0 -0
  936. /package/{model → dist/model}/pie.d.ts +0 -0
  937. /package/{model → dist/model}/radar.d.ts +0 -0
  938. /package/{model → dist/model}/tree.d.ts +0 -0
  939. /package/{model → dist/model}/treemap.d.ts +0 -0
  940. /package/{model → dist/model}/wordcloud.d.ts +0 -0
  941. /package/{services → dist/services}/canvas-zoom.d.ts +0 -0
  942. /package/{services → dist/services}/color-scale-utils.d.ts +0 -0
  943. /package/{services → dist/services}/time-series.d.ts +0 -0
  944. /package/{styles → dist/styles}/_type.scss +0 -0
  945. /package/{styles → dist/styles}/components/_axis.scss +0 -0
  946. /package/{styles → dist/styles}/components/_callouts.scss +0 -0
  947. /package/{styles → dist/styles}/components/_grid-brush.scss +0 -0
  948. /package/{styles → dist/styles}/components/_highlights.scss +0 -0
  949. /package/{styles → dist/styles}/components/_layout.scss +0 -0
  950. /package/{styles → dist/styles}/components/_legend.scss +0 -0
  951. /package/{styles → dist/styles}/components/_modal.scss +0 -0
  952. /package/{styles → dist/styles}/components/_ruler.scss +0 -0
  953. /package/{styles → dist/styles}/components/_skeleton-lines.scss +0 -0
  954. /package/{styles → dist/styles}/components/_skeleton.scss +0 -0
  955. /package/{styles → dist/styles}/components/_threshold.scss +0 -0
  956. /package/{styles → dist/styles}/components/_title.scss +0 -0
  957. /package/{styles → dist/styles}/components/_toolbar.scss +0 -0
  958. /package/{styles → dist/styles}/components/_zero-line.scss +0 -0
  959. /package/{styles → dist/styles}/components/_zoom-bar.scss +0 -0
  960. /package/{styles → dist/styles}/components/diagrams/_marker.scss +0 -0
  961. /package/{styles → dist/styles}/components/index.scss +0 -0
  962. /package/{styles → dist/styles}/graphs/_area.scss +0 -0
  963. /package/{styles → dist/styles}/graphs/_bubble.scss +0 -0
  964. /package/{styles → dist/styles}/graphs/_choropleth.scss +0 -0
  965. /package/{styles → dist/styles}/graphs/_donut.scss +0 -0
  966. /package/{styles → dist/styles}/graphs/_line.scss +0 -0
  967. /package/{styles → dist/styles}/graphs/_lollipop.scss +0 -0
  968. /package/{styles → dist/styles}/graphs/_pie.scss +0 -0
  969. /package/{styles → dist/styles}/graphs/_scatter.scss +0 -0
  970. /package/{styles → dist/styles}/graphs/_treemap.scss +0 -0
  971. /package/{styles → dist/styles}/graphs/_wordcloud.scss +0 -0
  972. /package/{styles → dist/styles}/graphs/index.scss +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"color-scale-legend.js","sourceRoot":"","sources":["color-scale-legend.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC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C,SAAS,CAAC;aACpD,IAAI,CAAC,OAAO,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC,EAAD,CAAC,CAAC;aACvB,IAAI,CAAC,MAAM,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC,EAAD,CAAC,CAAC,CAAC;QAEzB,OAAO,CAAC,CAAC,mBAAmB,IAAI,WAAW,CAAC,KAAK,MAAM;YACtD,CAAC,CAAC,cAAc,CAAC,SAAS,EAAE,GAAG,CAAC;YAChC,CAAC,CAAC,CAAC,CAAC;IACN,CAAC;IAED,kCAAO,GAAP;QACC,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;YACjC,0BAA0B;YAC1B,IAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC5C,cAAc,CAAC,mBAAmB,CACjC,MAAM,CAAC,IAAI,CAAC,eAAe,EAC3B,IAAI,CAAC,uBAAuB,CAC5B,CAAC;SACF;IACF,CAAC;IACF,uBAAC;AAAD,CAAC,AA5VD,CAAsC,MAAM,GA4V3C","sourcesContent":["// Internal Imports\nimport * as Tools from '../../tools';\nimport { ColorLegendType, Events, RenderTypes } from '../../interfaces';\nimport * as Configuration from '../../configuration';\nimport { Legend } from './legend';\nimport { DOMUtils, getDomain } from '../../services';\nimport { ChartModel } from '../../model/model';\n\n// D3 imports\nimport { axisBottom } from 'd3-axis';\nimport { scaleBand, scaleLinear } from 'd3-scale';\nimport { interpolateNumber, quantize } from 'd3-interpolate';\n\nexport class ColorScaleLegend extends Legend {\n\ttype = 'color-legend';\n\trenderType = RenderTypes.SVG;\n\n\tprivate gradient_id =\n\t\t'gradient-id-' + Math.floor(Math.random() * 99999999999);\n\tprivate chartType: string;\n\n\tconstructor(model: ChartModel, services: any, configs?: any) {\n\t\tsuper(model, services, configs);\n\t\tthis.chartType = configs.chartType;\n\t}\n\n\tinit() {\n\t\t// Highlight correct circle on legend item hovers\n\t\tif (this.chartType === 'heatmap') {\n\t\t\tconst eventsFragment = this.services.events;\n\t\t\teventsFragment.addEventListener(\n\t\t\t\tEvents.Axis.RENDER_COMPLETE,\n\t\t\t\tthis.handleAxisCompleteEvent\n\t\t\t);\n\t\t}\n\t}\n\n\t// Position legend after axis have rendered\n\thandleAxisCompleteEvent = (event: CustomEvent) => {\n\t\tconst svg = this.getComponentContainer();\n\n\t\tconst { width } = DOMUtils.getSVGElementSize(svg, {\n\t\t\tuseAttrs: true,\n\t\t});\n\n\t\tconst isDataLoading = Tools.getProperty(\n\t\t\tthis.getOptions(),\n\t\t\t'data',\n\t\t\t'loading'\n\t\t);\n\n\t\tif (width > Configuration.legend.color.barWidth && !isDataLoading) {\n\t\t\tconst title = Tools.getProperty(\n\t\t\t\tthis.getOptions(),\n\t\t\t\t'heatmap',\n\t\t\t\t'colorLegend',\n\t\t\t\t'title'\n\t\t\t);\n\n\t\t\tconst { cartesianScales } = this.services;\n\n\t\t\t// Get axis width & start/end positions\n\t\t\tconst mainXScale = cartesianScales.getMainXScale();\n\t\t\tconst xDimensions = mainXScale.range();\n\n\t\t\t// Align legend with the axis\n\t\t\tif (xDimensions[0] > 1) {\n\t\t\t\tsvg.select('g.legend').attr(\n\t\t\t\t\t'transform',\n\t\t\t\t\t`translate(${xDimensions[0]}, 0)`\n\t\t\t\t);\n\n\t\t\t\tif (title) {\n\t\t\t\t\tconst {\n\t\t\t\t\t\twidth: textWidth,\n\t\t\t\t\t} = DOMUtils.getSVGElementSize(\n\t\t\t\t\t\tsvg.select('g.legend-title').select('text'),\n\t\t\t\t\t\t{ useBBox: true }\n\t\t\t\t\t);\n\n\t\t\t\t\t// D3 moves the LEFT y-axis labels by 9\n\t\t\t\t\tconst availableSpace = xDimensions[0] - textWidth - 9;\n\n\t\t\t\t\t// If space is available, align the label with the axis labels\n\t\t\t\t\tif (availableSpace > 1) {\n\t\t\t\t\t\tsvg.select('g.legend-title').attr(\n\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t`translate(${availableSpace}, 0)`\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Move the legend down by 16 pixels to display legend text on top\n\t\t\t\t\t\tsvg.select('g.legend').attr(\n\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t`translate(${xDimensions[0]}, 16)`\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Align legend title with start of axis\n\t\t\t\t\t\tsvg.select('g.legend-title').attr(\n\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t`translate(${xDimensions[0]}, 0)`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Default state\n\t\t\tsvg.select('g.legend-title').attr('transform', `translate(0, 0)`);\n\t\t}\n\t};\n\n\trender(animate = false) {\n\t\tconst options = this.getOptions();\n\t\tconst svg = this.getComponentContainer();\n\t\tconst { width } = DOMUtils.getSVGElementSize(svg, {\n\t\t\tuseAttrs: true,\n\t\t});\n\n\t\tconst customColors = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'color',\n\t\t\t'gradient',\n\t\t\t'colors'\n\t\t);\n\n\t\tconst colorScaleType = Tools.getProperty(\n\t\t\toptions,\n\t\t\tthis.chartType,\n\t\t\t'colorLegend',\n\t\t\t'type'\n\t\t);\n\n\t\tlet colorPairingOption = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'color',\n\t\t\t'pairing',\n\t\t\t'option'\n\t\t);\n\n\t\tconst title = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'heatmap',\n\t\t\t'colorLegend',\n\t\t\t'title'\n\t\t);\n\n\t\t// Clear DOM if loading\n\t\tconst isDataLoading = Tools.getProperty(\n\t\t\tthis.getOptions(),\n\t\t\t'data',\n\t\t\t'loading'\n\t\t);\n\n\t\tif (isDataLoading) {\n\t\t\tsvg.html('');\n\t\t\treturn;\n\t\t}\n\n\t\tconst customColorsEnabled = !Tools.isEmpty(customColors);\n\t\tconst domain = getDomain(this.model.getDisplayData());\n\n\t\tconst useDefaultBarWidth = !(\n\t\t\twidth <= Configuration.legend.color.barWidth\n\t\t);\n\t\tconst barWidth = useDefaultBarWidth\n\t\t\t? Configuration.legend.color.barWidth\n\t\t\t: width;\n\n\t\tconst legendGroupElement = DOMUtils.appendOrSelect(svg, 'g.legend');\n\t\tconst axisElement = DOMUtils.appendOrSelect(\n\t\t\tlegendGroupElement,\n\t\t\t'g.legend-axis'\n\t\t);\n\n\t\t// Render title if it exists\n\t\tif (title) {\n\t\t\tconst legendTitleGroup = DOMUtils.appendOrSelect(\n\t\t\t\tsvg,\n\t\t\t\t'g.legend-title'\n\t\t\t);\n\t\t\tconst legendTitle = DOMUtils.appendOrSelect(\n\t\t\t\tlegendTitleGroup,\n\t\t\t\t'text'\n\t\t\t);\n\t\t\tlegendTitle.text(title).attr('dy', '0.7em');\n\n\t\t\t// Move the legend down by 16 pixels to display legend text on top\n\t\t\tlegendGroupElement.attr('transform', `translate(0, 16)`);\n\t\t}\n\n\t\t// If domain consists of negative and positive values, use diverging palettes\n\t\tconst colorScheme = domain[0] < 0 && domain[1] > 0 ? 'diverge' : 'mono';\n\n\t\t// Use default color pairing options if not in defined range\n\t\tif (\n\t\t\tcolorPairingOption < 1 &&\n\t\t\tcolorPairingOption > 4 &&\n\t\t\tcolorScheme === 'mono'\n\t\t) {\n\t\t\tcolorPairingOption = 1;\n\t\t} else if (\n\t\t\tcolorPairingOption < 1 &&\n\t\t\tcolorPairingOption > 2 &&\n\t\t\tcolorScheme === 'diverge'\n\t\t) {\n\t\t\tcolorPairingOption = 1;\n\t\t}\n\n\t\tlet colorPairing = [];\n\t\t// Carbon charts has 11 colors for a single monochromatic palette & 17 for a divergent palette\n\t\tlet colorGroupingLength = colorScheme === 'diverge' ? 17 : 11;\n\n\t\tif (!customColorsEnabled) {\n\t\t\t// Add class names to list and the amount based on the color scheme\n\t\t\tfor (let i = 1; i < colorGroupingLength + 1; i++) {\n\t\t\t\tcolorPairing.push(\n\t\t\t\t\tcolorScaleType === ColorLegendType.LINEAR\n\t\t\t\t\t\t? `stop-color-${colorScheme}-${colorPairingOption}-${i}`\n\t\t\t\t\t\t: `fill-${colorScheme}-${colorPairingOption}-${i}`\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\t// Use custom colors\n\t\t\tcolorPairing = customColors;\n\t\t}\n\n\t\t// Generate equal chunks between range to act as ticks\n\t\tconst interpolator = interpolateNumber(domain[0], domain[1]);\n\t\tconst quant = quantize(interpolator, 3);\n\n\t\t// Create scale & ticks\n\t\tconst linearScale = scaleLinear().domain(domain).range([0, barWidth]);\n\n\t\tconst legendAxis = axisBottom(linearScale)\n\t\t\t.tickSize(0)\n\t\t\t.tickValues(quant);\n\n\t\tswitch (colorScaleType) {\n\t\t\tcase ColorLegendType.LINEAR:\n\t\t\t\tthis.drawLinear(colorPairing, legendGroupElement, barWidth);\n\t\t\t\tbreak;\n\t\t\tcase ColorLegendType.QUANTIZE:\n\t\t\t\tconst rangeStart = this.drawQuantize(\n\t\t\t\t\tcolorPairing,\n\t\t\t\t\tcolorScheme,\n\t\t\t\t\tcustomColorsEnabled,\n\t\t\t\t\tlegendGroupElement,\n\t\t\t\t\tbarWidth\n\t\t\t\t);\n\t\t\t\t// Using range provided by drawQuantize for alignment purposes\n\t\t\t\tlinearScale.range([rangeStart, barWidth]);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow Error('Entered color legend type is not supported.');\n\t\t}\n\n\t\t// Align axes at the bottom of the rectangle and delete the domain line\n\t\taxisElement\n\t\t\t.attr(\n\t\t\t\t'transform',\n\t\t\t\t`translate(0,${Configuration.legend.color.axisYTranslation})`\n\t\t\t)\n\t\t\t.call(legendAxis);\n\n\t\t// Remove auto generated axis bottom line\n\t\taxisElement.select('.domain').remove();\n\n\t\t// Translate first/last axis tick if barWidth equals chart width\n\t\t// Ensures text is not clipped when default bar width (300px) is not used\n\t\taxisElement\n\t\t\t.select('g.tick:last-of-type text')\n\t\t\t.style('text-anchor', useDefaultBarWidth ? 'middle' : 'end');\n\t\taxisElement\n\t\t\t.select('g.tick:first-of-type text')\n\t\t\t.style(\n\t\t\t\t'text-anchor',\n\t\t\t\tuseDefaultBarWidth && this.chartType !== 'choropleth'\n\t\t\t\t\t? 'middle'\n\t\t\t\t\t: 'start'\n\t\t\t);\n\t}\n\n\t// Renders gradient legend\n\tdrawLinear(colorPairing, legendGroupElement, barWidth) {\n\t\tconst stopLengthPercentage = 100 / (colorPairing.length - 1);\n\n\t\t// Generate the gradient\n\t\tconst linearGradient = DOMUtils.appendOrSelect(\n\t\t\tlegendGroupElement,\n\t\t\t'linearGradient'\n\t\t);\n\t\t// Rendering gradient\n\t\tlinearGradient\n\t\t\t.attr('id', `${this.gradient_id}-legend`)\n\t\t\t.selectAll('stop')\n\t\t\t.data(colorPairing)\n\t\t\t.enter()\n\t\t\t.append('stop')\n\t\t\t.attr('offset', (_, i) => `${i * stopLengthPercentage}%`)\n\t\t\t.attr('class', (_, i) => colorPairing[i])\n\t\t\t.attr('stop-color', (d) => d);\n\n\t\t// Create the legend container\n\t\tconst rectangle = DOMUtils.appendOrSelect(legendGroupElement, 'rect');\n\t\trectangle\n\t\t\t.attr('width', barWidth)\n\t\t\t.attr('height', Configuration.legend.color.barHeight)\n\t\t\t.style('fill', `url(#${this.gradient_id}-legend)`);\n\t}\n\n\t/**\n\t * Renders quantized legend\n\t * @returns number (range start)\n\t */\n\tdrawQuantize(\n\t\tcolorPairing,\n\t\tcolorScheme,\n\t\tcustomColorsEnabled,\n\t\tlegendGroupElement,\n\t\tbarWidth\n\t) {\n\t\t// If divergent && non-custom color, remove 0/white from being displayed\n\t\tif (!customColorsEnabled && colorScheme === 'diverge') {\n\t\t\tcolorPairing.splice(colorPairing.length / 2, 1);\n\t\t}\n\n\t\tconst colorScaleBand = scaleBand()\n\t\t\t.domain(colorPairing)\n\t\t\t.range([0, barWidth]);\n\n\t\t// Render the quantized rectangles\n\t\tconst rectangle = DOMUtils.appendOrSelect(\n\t\t\tlegendGroupElement,\n\t\t\t'g.quantized-rect'\n\t\t);\n\n\t\trectangle\n\t\t\t.selectAll('rect')\n\t\t\t.data(colorScaleBand.domain())\n\t\t\t.join('rect')\n\t\t\t.attr('x', (d) => colorScaleBand(d))\n\t\t\t.attr('y', 0)\n\t\t\t.attr('width', Math.max(0, colorScaleBand.bandwidth() - 1))\n\t\t\t.attr('height', Configuration.legend.color.barHeight)\n\t\t\t.attr('class', (d) => d)\n\t\t\t.attr('fill', (d) => d);\n\n\t\treturn (!customColorsEnabled && colorScheme) === 'mono'\n\t\t\t? colorScaleBand.bandwidth() - 1\n\t\t\t: 0;\n\t}\n\n\tdestroy() {\n\t\tif (this.chartType === 'heatmap') {\n\t\t\t// Remove legend listeners\n\t\t\tconst eventsFragment = this.services.events;\n\t\t\teventsFragment.removeEventListener(\n\t\t\t\tEvents.Axis.RENDER_COMPLETE,\n\t\t\t\tthis.handleAxisCompleteEvent\n\t\t\t);\n\t\t}\n\t}\n}\n"]}
@@ -1,16 +0,0 @@
1
- import { Component } from '../component';
2
- import { RenderTypes } from '../../interfaces';
3
- export declare class GeoProjection extends Component {
4
- type: string;
5
- renderType: RenderTypes;
6
- render(): void;
7
- /**
8
- * @info
9
- * Depending on projection, we may need to provide additional configuration
10
- * e.g. sizing
11
- *
12
- * In such case, function can be refactored so that
13
- * projection should return an object with the configuraiton & function
14
- */
15
- getProjection(): any;
16
- }
@@ -1,160 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
- // Internal Imports
15
- import { Component } from '../component';
16
- import { DOMUtils } from '../../services';
17
- import * as Tools from '../../tools';
18
- import { RenderTypes, Projection } from '../../interfaces';
19
- // D3 imports
20
- import { geoPath, line } from 'd3';
21
- import { feature, merge } from 'topojson-client';
22
- import {
23
- // Azimuthal Projections - project the sphere directly on to the plane
24
- geoEqualEarth,
25
- // Conic projections - project the sphere onto a cone & unroll into the plane
26
- geoAlbers, geoConicEqualArea, geoConicEquidistant,
27
- // Cylindrical projections - project the sphere onto a containing cylinder & unroll onto the plane
28
- geoEquirectangular, geoMercator, geoNaturalEarth1, } from 'd3-geo';
29
- var GeoProjection = /** @class */ (function (_super) {
30
- __extends(GeoProjection, _super);
31
- function GeoProjection() {
32
- var _this = _super !== null && _super.apply(this, arguments) || this;
33
- _this.type = 'geo';
34
- _this.renderType = RenderTypes.SVG;
35
- return _this;
36
- }
37
- GeoProjection.prototype.render = function () {
38
- var svg = this.getComponentContainer({ withinChartClip: true });
39
- var _a = DOMUtils.getSVGElementSize(svg, {
40
- useAttrs: true,
41
- }), width = _a.width, height = _a.height;
42
- // Because of a Firefox bug with regards to sizing & d3 packs,
43
- // rather than checking if height or width aren't 0,
44
- // we have to make sure they're not smaller than 1
45
- if (width < 1 || height < 1) {
46
- return;
47
- }
48
- // Get users projection
49
- var projection = this.getProjection();
50
- var geoData = Tools.getProperty(this.getOptions(), 'geoData');
51
- var data = this.model.getCombinedData();
52
- // Seperate countries that have data & countries with missing data
53
- var withData = {};
54
- var withoutData = {};
55
- Object.keys(data).forEach(function (element) {
56
- if (typeof data[element].value === 'number') {
57
- withData[element] = data[element];
58
- }
59
- else {
60
- withoutData[element] = data[element];
61
- }
62
- });
63
- // Merge all without data
64
- var withoutDataMerge = merge(geoData, Object.values(withoutData));
65
- /**
66
- * @todo - Currently only topojson is supported
67
- *
68
- * Unlike geojson, topojson does not have a standard format
69
- * So data must be nested in the following format:
70
- * options : {
71
- * geoData: {
72
- * objects: {
73
- * ...
74
- * }
75
- * }
76
- * }
77
- */
78
- // Convert from topojson to geojson
79
- var json = feature(geoData, {
80
- // We need to specify that we are converting geometry collections
81
- type: 'GeometryCollection',
82
- geometries: Object.values(withData),
83
- });
84
- // Depending on the projection selected, we will need to scale/translate accordingly
85
- var projectionScale = projection.fitSize([width, height], json);
86
- var geo = geoPath().projection(projectionScale);
87
- var borders = DOMUtils.appendOrSelect(svg, 'g.geo');
88
- borders
89
- .selectAll('path')
90
- .data(json.features)
91
- .join('path')
92
- .attr('d', geo);
93
- var patternID = this.services.domUtils.generateElementIDString("geo-pattern-stripes");
94
- // Create a striped pattern for missing data
95
- var defs = DOMUtils.appendOrSelect(svg, 'defs');
96
- DOMUtils.appendOrSelect(defs, 'pattern')
97
- .attr('id', patternID)
98
- .attr('width', 5)
99
- .attr('height', 10)
100
- .attr('patternUnits', 'userSpaceOnUse')
101
- .attr('patternTransform', 'rotate(45)')
102
- .append('path')
103
- .classed('pattern-fill', true)
104
- .attr('d', line()([
105
- [0, 0],
106
- [0, 10],
107
- ]));
108
- var missingBorders = DOMUtils.appendOrSelect(svg, 'g.missing-data');
109
- DOMUtils.appendOrSelect(missingBorders, 'path')
110
- .datum(withoutDataMerge)
111
- .attr('d', geo)
112
- .style('fill', "url(#" + patternID + ")");
113
- };
114
- /**
115
- * @info
116
- * Depending on projection, we may need to provide additional configuration
117
- * e.g. sizing
118
- *
119
- * In such case, function can be refactored so that
120
- * projection should return an object with the configuraiton & function
121
- */
122
- GeoProjection.prototype.getProjection = function () {
123
- var projection = null;
124
- var projectionSelected = Tools.getProperty(this.getOptions(), 'thematic', 'projection');
125
- switch (projectionSelected) {
126
- // Azimuthal Projections
127
- case Projection.geoEqualEarth:
128
- projection = geoEqualEarth();
129
- break;
130
- // Conic Projections
131
- case Projection.geoAlbers:
132
- projection = geoAlbers();
133
- break;
134
- case Projection.geoConicEqualArea:
135
- projection = geoConicEqualArea();
136
- break;
137
- case Projection.geoConicEquidistant:
138
- projection = geoConicEquidistant();
139
- break;
140
- // Cyndrical projections
141
- case Projection.geoEquirectangular:
142
- projection = geoEquirectangular();
143
- break;
144
- case Projection.geoMercator:
145
- projection = geoMercator();
146
- break;
147
- case Projection.geoNaturalEarth1:
148
- projection = geoNaturalEarth1();
149
- break;
150
- default:
151
- // Projection is missing or an unsupported projection value is passed
152
- throw new Error('Projection is not supported.');
153
- break;
154
- }
155
- return projection;
156
- };
157
- return GeoProjection;
158
- }(Component));
159
- export { GeoProjection };
160
- //# sourceMappingURL=../../../src/components/essentials/geo-projection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"geo-projection.js","sourceRoot":"","sources":["geo-projection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE3D,aAAa;AACb,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO;AACN,sEAAsE;AACtE,aAAa;AACb,6EAA6E;AAC7E,SAAS,EACT,iBAAiB,EACjB,mBAAmB;AACnB,kGAAkG;AAClG,kBAAkB,EAClB,WAAW,EACX,gBAAgB,GAChB,MAAM,QAAQ,CAAC;AAEhB;IAAmC,iCAAS;IAA5C;QAAA,qEAmJC;QAlJA,UAAI,GAAG,KAAK,CAAC;QACb,gBAAU,GAAG,WAAW,CAAC,GAAG,CAAC;;IAiJ9B,CAAC;IA/IA,8BAAM,GAAN;QACC,IAAM,GAAG,GAAG,IAAI,CAAC,qBAAqB,CAAC,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,IAAA;;UAEJ,EAFM,gBAAK,EAAE,kBAEb,CAAC;QAEH,8DAA8D;Q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ED;;;;;;;OAOG;IACH,qCAAa,GAAb;QACC,IAAI,UAAU,GAAG,IAAI,CAAC;QACtB,IAAM,kBAAkB,GAAG,KAAK,CAAC,WAAW,CAC3C,IAAI,CAAC,UAAU,EAAE,EACjB,UAAU,EACV,YAAY,CACZ,CAAC;QAEF,QAAQ,kBAAkB,EAAE;YAC3B,wBAAwB;YACxB,KAAK,UAAU,CAAC,aAAa;gBAC5B,UAAU,GAAG,aAAa,EAAE,CAAC;gBAC7B,MAAM;YACP,oBAAoB;YACpB,KAAK,UAAU,CAAC,SAAS;gBACxB,UAAU,GAAG,SAAS,EAAE,CAAC;gBACzB,MAAM;YACP,KAAK,UAAU,CAAC,iBAAiB;gBAChC,UAAU,GAAG,iBAAiB,EAAE,CAAC;gBACjC,MAAM;YACP,KAAK,UAAU,CAAC,mBAAmB;gBAClC,UAAU,GAAG,mBAAmB,EAAE,CAAC;gBACnC,MAAM;YACP,wBAAwB;YACxB,KAAK,UAAU,CAAC,kBAAkB;gBACjC,UAAU,GAAG,kBAAkB,EAAE,CAAC;gBAClC,MAAM;YACP,KAAK,UAAU,CAAC,WAAW;gBAC1B,UAAU,GAAG,WAAW,EAAE,CAAC;gBAC3B,MAAM;YACP,KAAK,UAAU,CAAC,gBAAgB;gBAC/B,UAAU,GAAG,gBAAgB,EAAE,CAAC;gBAChC,MAAM;YACP;gBACC,qEAAqE;gBACrE,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;gBAChD,MAAM;SACP;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,oBAAC;AAAD,CAAC,AAnJD,CAAmC,SAAS,GAmJ3C","sourcesContent":["// Internal Imports\nimport { Component } from '../component';\nimport { DOMUtils } from '../../services';\nimport * as Tools from '../../tools';\nimport { RenderTypes, Projection } from '../../interfaces';\n\n// D3 imports\nimport { geoPath, line } from 'd3';\nimport { feature, merge } from 'topojson-client';\nimport {\n\t// Azimuthal Projections - project the sphere directly on to the plane\n\tgeoEqualEarth,\n\t// Conic projections - project the sphere onto a cone & unroll into the plane\n\tgeoAlbers,\n\tgeoConicEqualArea,\n\tgeoConicEquidistant,\n\t// Cylindrical projections - project the sphere onto a containing cylinder & unroll onto the plane\n\tgeoEquirectangular,\n\tgeoMercator,\n\tgeoNaturalEarth1,\n} from 'd3-geo';\n\nexport class GeoProjection extends Component {\n\ttype = 'geo';\n\trenderType = RenderTypes.SVG;\n\n\trender() {\n\t\tconst svg = this.getComponentContainer({ withinChartClip: true });\n\t\tconst { width, height } = DOMUtils.getSVGElementSize(svg, {\n\t\t\tuseAttrs: true,\n\t\t});\n\n\t\t// Because of a Firefox bug with regards to sizing & d3 packs,\n\t\t// rather than checking if height or width aren't 0,\n\t\t// we have to make sure they're not smaller than 1\n\t\tif (width < 1 || height < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get users projection\n\t\tconst projection = this.getProjection();\n\n\t\tconst geoData = Tools.getProperty(this.getOptions(), 'geoData');\n\n\t\tconst data = this.model.getCombinedData();\n\n\t\t// Seperate countries that have data & countries with missing data\n\t\tconst withData = {};\n\t\tconst withoutData = {};\n\t\tObject.keys(data).forEach((element) => {\n\t\t\tif (typeof data[element].value === 'number') {\n\t\t\t\twithData[element] = data[element];\n\t\t\t} else {\n\t\t\t\twithoutData[element] = data[element];\n\t\t\t}\n\t\t});\n\n\t\t// Merge all without data\n\t\tconst withoutDataMerge = merge(geoData, Object.values(withoutData));\n\n\t\t/**\n\t\t * @todo - Currently only topojson is supported\n\t\t *\n\t\t * Unlike geojson, topojson does not have a standard format\n\t\t * So data must be nested in the following format:\n\t\t * options : {\n\t\t * \tgeoData: {\n\t\t * \tobjects: {\n\t\t * \t\t\t...\n\t\t * \t\t}\n\t\t * }\n\t\t * }\n\t\t */\n\t\t// Convert from topojson to geojson\n\t\tconst json = feature(geoData, {\n\t\t\t// We need to specify that we are converting geometry collections\n\t\t\ttype: 'GeometryCollection',\n\t\t\tgeometries: Object.values(withData),\n\t\t});\n\n\t\t// Depending on the projection selected, we will need to scale/translate accordingly\n\t\tconst projectionScale = projection.fitSize([width, height], json);\n\t\tconst geo = geoPath().projection(projectionScale);\n\n\t\tconst borders = DOMUtils.appendOrSelect(svg, 'g.geo');\n\t\tborders\n\t\t\t.selectAll('path')\n\t\t\t.data(json.features)\n\t\t\t.join('path')\n\t\t\t.attr('d', geo);\n\n\t\tconst patternID = this.services.domUtils.generateElementIDString(\n\t\t\t`geo-pattern-stripes`\n\t\t);\n\n\t\t// Create a striped pattern for missing data\n\t\tconst defs = DOMUtils.appendOrSelect(svg, 'defs');\n\t\tDOMUtils.appendOrSelect(defs, 'pattern')\n\t\t\t.attr('id', patternID)\n\t\t\t.attr('width', 5)\n\t\t\t.attr('height', 10)\n\t\t\t.attr('patternUnits', 'userSpaceOnUse')\n\t\t\t.attr('patternTransform', 'rotate(45)')\n\t\t\t.append('path')\n\t\t\t.classed('pattern-fill', true)\n\t\t\t.attr(\n\t\t\t\t'd',\n\t\t\t\tline()([\n\t\t\t\t\t[0, 0],\n\t\t\t\t\t[0, 10],\n\t\t\t\t])\n\t\t\t);\n\n\t\tconst missingBorders = DOMUtils.appendOrSelect(svg, 'g.missing-data');\n\t\tDOMUtils.appendOrSelect(missingBorders, 'path')\n\t\t\t.datum(withoutDataMerge)\n\t\t\t.attr('d', geo)\n\t\t\t.style('fill', `url(#${patternID})`);\n\t}\n\n\t/**\n\t * @info\n\t * Depending on projection, we may need to provide additional configuration\n\t * e.g. sizing\n\t *\n\t * In such case, function can be refactored so that\n\t * projection should return an object with the configuraiton & function\n\t */\n\tgetProjection() {\n\t\tlet projection = null;\n\t\tconst projectionSelected = Tools.getProperty(\n\t\t\tthis.getOptions(),\n\t\t\t'thematic',\n\t\t\t'projection'\n\t\t);\n\n\t\tswitch (projectionSelected) {\n\t\t\t// Azimuthal Projections\n\t\t\tcase Projection.geoEqualEarth:\n\t\t\t\tprojection = geoEqualEarth();\n\t\t\t\tbreak;\n\t\t\t// Conic Projections\n\t\t\tcase Projection.geoAlbers:\n\t\t\t\tprojection = geoAlbers();\n\t\t\t\tbreak;\n\t\t\tcase Projection.geoConicEqualArea:\n\t\t\t\tprojection = geoConicEqualArea();\n\t\t\t\tbreak;\n\t\t\tcase Projection.geoConicEquidistant:\n\t\t\t\tprojection = geoConicEquidistant();\n\t\t\t\tbreak;\n\t\t\t// Cyndrical projections\n\t\t\tcase Projection.geoEquirectangular:\n\t\t\t\tprojection = geoEquirectangular();\n\t\t\t\tbreak;\n\t\t\tcase Projection.geoMercator:\n\t\t\t\tprojection = geoMercator();\n\t\t\t\tbreak;\n\t\t\tcase Projection.geoNaturalEarth1:\n\t\t\t\tprojection = geoNaturalEarth1();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Projection is missing or an unsupported projection value is passed\n\t\t\t\tthrow new Error('Projection is not supported.');\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn projection;\n\t}\n}\n"]}
@@ -1,13 +0,0 @@
1
- import { Component } from '../component';
2
- import { ChartModel } from '../../model/model';
3
- import { RenderTypes } from '../../interfaces';
4
- import Position from '@carbon/utils-position';
5
- export declare class Highlight extends Component {
6
- type: string;
7
- renderType: RenderTypes;
8
- label: any;
9
- positionService: Position;
10
- highlightStrokeWidth: number;
11
- constructor(model: ChartModel, services: any);
12
- render(animate?: boolean): void;
13
- }
@@ -1,196 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
- var __rest = (this && this.__rest) || function (s, e) {
15
- var t = {};
16
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
17
- t[p] = s[p];
18
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
19
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
20
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
21
- t[p[i]] = s[p[i]];
22
- }
23
- return t;
24
- };
25
- import { Component } from '../component';
26
- import * as Tools from '../../tools';
27
- import { AxisPositions, RenderTypes } from '../../interfaces';
28
- // D3 Imports
29
- // @ts-ignore
30
- // ts-ignore is needed because `@types/d3`
31
- // is missing the `pointer` function
32
- import { select } from 'd3-selection';
33
- // Carbon position service
34
- import Position from '@carbon/utils-position';
35
- var Highlight = /** @class */ (function (_super) {
36
- __extends(Highlight, _super);
37
- function Highlight(model, services) {
38
- var _this = _super.call(this, model, services) || this;
39
- _this.type = 'highlight';
40
- _this.renderType = RenderTypes.SVG;
41
- _this.positionService = new Position();
42
- _this.highlightStrokeWidth = 1;
43
- return _this;
44
- }
45
- Highlight.prototype.render = function (animate) {
46
- if (animate === void 0) { animate = false; }
47
- var axesOptions = Tools.getProperty(this.getOptions(), 'axes');
48
- var highlightData = [];
49
- Object.keys(axesOptions).forEach(function (axisPosition) {
50
- if (Object.values(AxisPositions).includes(axisPosition)) {
51
- var axisOptions = axesOptions[axisPosition];
52
- if (axisOptions.highlights &&
53
- axisOptions.highlights.data.length > 0) {
54
- highlightData.push({
55
- axisPosition: axisPosition,
56
- highlightStartMapsTo: axisOptions.highlights.highlightStartMapsTo,
57
- highlightEndMapsTo: axisOptions.highlights.highlightEndMapsTo,
58
- labelMapsTo: axisOptions.highlights.labelMapsTo,
59
- highlight: axisOptions.highlights.data,
60
- color: axisOptions.highlights.color,
61
- });
62
- }
63
- }
64
- });
65
- // Grab container SVG
66
- var svg = this.getComponentContainer({ withinChartClip: true });
67
- // Update data on all axis highlight groups
68
- var highlightAxisGroups = svg
69
- .selectAll('g.axis-highlight')
70
- .data(highlightData, function (highlightData) { return highlightData.axisPosition; });
71
- // Remove axis highlight groups that are no longer needed
72
- highlightAxisGroups.exit().attr('opacity', 0).remove();
73
- // Add the axis highlight groups that need to be introduced
74
- var highlightAxisGroupsEnter = highlightAxisGroups
75
- .enter()
76
- .append('g');
77
- var highlightAxisGroupsMerge = highlightAxisGroupsEnter.merge(highlightAxisGroups);
78
- highlightAxisGroupsMerge.attr('class', function (d) { return "axis-highlight " + d.axisPosition; });
79
- var highlightGroups = highlightAxisGroupsMerge
80
- .selectAll('g.highlight-group')
81
- .data(function (d) {
82
- return d.highlight.map(function (highlight) {
83
- highlight.axisPosition = d.axisPosition;
84
- highlight.highlightStartMapsTo = d.highlightStartMapsTo;
85
- highlight.labelMapsTo = d.labelMapsTo;
86
- highlight.color = d.color;
87
- highlight.highlightEndMapsTo = d.highlightEndMapsTo;
88
- return highlight;
89
- });
90
- });
91
- // Remove highlight groups that are no longer needed
92
- highlightGroups.exit().attr('opacity', 0).remove();
93
- // Add the highlight groups that need to be introduced
94
- var highlightGroupsEnter = highlightGroups.enter().append('g');
95
- highlightGroupsEnter.append('rect').attr('class', 'highlight-bar');
96
- highlightGroupsEnter.append('line').attr('class', 'highlight-line');
97
- var highlightGroupsMerge = highlightGroupsEnter.merge(highlightGroups);
98
- highlightGroupsMerge.attr('class', 'highlight-group');
99
- var self = this;
100
- highlightAxisGroupsMerge.each(function (_a) {
101
- var axisPosition = _a.axisPosition;
102
- var mainXScale = self.services.cartesianScales.getMainXScale();
103
- var mainYScale = self.services.cartesianScales.getMainYScale();
104
- var _b = mainXScale.range(), xScaleStart = _b[0], xScaleEnd = _b[1];
105
- var _c = mainYScale.range(), yScaleEnd = _c[0], yScaleStart = _c[1];
106
- var cartesianScales = self.services.cartesianScales;
107
- var orientation = cartesianScales.getOrientation();
108
- var getDomainValue = function (d) { return cartesianScales.getDomainValue(d); };
109
- var getRangeValue = function (d) { return cartesianScales.getRangeValue(d); };
110
- var _d = Tools.flipDomainAndRangeBasedOnOrientation(getDomainValue, getRangeValue, orientation), getXValue = _d[0], getYValue = _d[1];
111
- var group = select(this);
112
- if (axisPosition === AxisPositions.TOP ||
113
- axisPosition === AxisPositions.BOTTOM) {
114
- group
115
- .selectAll('rect.highlight-bar')
116
- .transition()
117
- .call(function (t) {
118
- return self.services.transitions.setupTransition({
119
- transition: t,
120
- name: 'highlight-bar-update',
121
- animate: animate,
122
- });
123
- })
124
- // Stroke width added to stop overflow of highlight
125
- .attr('y', Math.max(yScaleStart + self.highlightStrokeWidth, 0))
126
- // Stroke width subtracted to stop overflow of highlight
127
- .attr('height', Math.max(yScaleEnd - 2 * self.highlightStrokeWidth, 0))
128
- .attr('x', function (_a) {
129
- var highlightStartMapsTo = _a.highlightStartMapsTo, d = __rest(_a, ["highlightStartMapsTo"]);
130
- return getXValue(d[highlightStartMapsTo]);
131
- })
132
- .attr('width', function (_a) {
133
- var highlightStartMapsTo = _a.highlightStartMapsTo, highlightEndMapsTo = _a.highlightEndMapsTo, d = __rest(_a, ["highlightStartMapsTo", "highlightEndMapsTo"]);
134
- return Math.max(getXValue(d[highlightEndMapsTo]) -
135
- getXValue(d[highlightStartMapsTo]), 0);
136
- })
137
- .style('stroke', function (_a) {
138
- var color = _a.color, labelMapsTo = _a.labelMapsTo, data = __rest(_a, ["color", "labelMapsTo"]);
139
- return color && color.scale[data[labelMapsTo]]
140
- ? color.scale[data[labelMapsTo]]
141
- : null;
142
- })
143
- .style('stroke-dasharray', '2, 2')
144
- .attr('stroke-width', self.highlightStrokeWidth + 'px')
145
- .style('fill-opacity', 0.1)
146
- .style('fill', function (_a) {
147
- var color = _a.color, labelMapsTo = _a.labelMapsTo, data = __rest(_a, ["color", "labelMapsTo"]);
148
- return color && color.scale[data[labelMapsTo]]
149
- ? color.scale[data[labelMapsTo]]
150
- : null;
151
- });
152
- }
153
- else {
154
- group
155
- .selectAll('rect.highlight-bar')
156
- .transition()
157
- .call(function (t) {
158
- return self.services.transitions.setupTransition({
159
- transition: t,
160
- name: 'highlight-bar-update',
161
- animate: animate,
162
- });
163
- })
164
- .attr('x', xScaleStart)
165
- .attr('width', Math.max(xScaleEnd - xScaleStart, 0))
166
- .attr('y', function (_a) {
167
- var highlightEndMapsTo = _a.highlightEndMapsTo, d = __rest(_a, ["highlightEndMapsTo"]);
168
- return getYValue(d[highlightEndMapsTo]);
169
- })
170
- .attr('height', function (_a) {
171
- var highlightStartMapsTo = _a.highlightStartMapsTo, highlightEndMapsTo = _a.highlightEndMapsTo, d = __rest(_a, ["highlightStartMapsTo", "highlightEndMapsTo"]);
172
- return Math.max(getYValue(d[highlightStartMapsTo]) -
173
- getYValue(d[highlightEndMapsTo]), 0);
174
- })
175
- .style('stroke', function (_a) {
176
- var color = _a.color, labelMapsTo = _a.labelMapsTo, data = __rest(_a, ["color", "labelMapsTo"]);
177
- return color && color.scale[data[labelMapsTo]]
178
- ? color.scale[data[labelMapsTo]]
179
- : null;
180
- })
181
- .style('stroke-dasharray', '2, 2')
182
- .attr('stroke-width', self.highlightStrokeWidth + 'px')
183
- .style('fill-opacity', 0.1)
184
- .style('fill', function (_a) {
185
- var color = _a.color, labelMapsTo = _a.labelMapsTo, data = __rest(_a, ["color", "labelMapsTo"]);
186
- return color && color.scale[data[labelMapsTo]]
187
- ? color.scale[data[labelMapsTo]]
188
- : null;
189
- });
190
- }
191
- });
192
- };
193
- return Highlight;
194
- }(Component));
195
- export { Highlight };
196
- //# sourceMappingURL=../../../src/components/essentials/highlights.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"highlights.js","sourceRoot":"","sources":["highlights.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAc,MAAM,kBAAkB,CAAC;AAE1E,aAAa;AACb,aAAa;AACb,0CAA0C;AAC1C,oCAAoC;AACpC,OAAO,EAAE,MAAM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0CAAkB,EAAE,8DAAI;oBAChD,OAAA,IAAI,CAAC,GAAG,CACP,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;wBACjC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,EACjC,CAAC,CACD,CAAA;iBAAA,CACF;qBACA,KAAK,CAAC,QAAQ,EAAE,UAAC,EAA+B;oBAA7B,IAAA,gBAAK,EAAE,4BAAW,EAAE,2CAAO;oBAC9C,OAAO,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;wBAC7C,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;wBAChC,CAAC,CAAC,IAAI,CAAC;gBACT,CAAC,CAAC;qBACD,KAAK,CAAC,kBAAkB,EAAE,MAAM,CAAC;qBACjC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC;qBACtD,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC;qBAC1B,KAAK,CAAC,MAAM,EAAE,UAAC,EAA+B;oBAA7B,IAAA,gBAAK,EAAE,4BAAW,EAAE,2CAAO;oBAC5C,OAAO,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;wBAC7C,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;wBAChC,CAAC,CAAC,IAAI,CAAC;gBACT,CAAC,CAAC,CAAC;aACJ;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IACF,gBAAC;AAAD,CAAC,AAxMD,CAA+B,SAAS,GAwMvC","sourcesContent":["import { Component } from '../component';\nimport * as Tools from '../../tools';\nimport { ChartModel } from '../../model/model';\nimport { AxisPositions, RenderTypes, ScaleTypes } from '../../interfaces';\n\n// D3 Imports\n// @ts-ignore\n// ts-ignore is needed because `@types/d3`\n// is missing the `pointer` function\nimport { select } from 'd3-selection';\n\n// Carbon position service\nimport Position from '@carbon/utils-position';\n\nexport class Highlight extends Component {\n\ttype = 'highlight';\n\trenderType = RenderTypes.SVG;\n\n\tlabel: any;\n\n\tpositionService = new Position();\n\thighlightStrokeWidth = 1;\n\n\tconstructor(model: ChartModel, services: any) {\n\t\tsuper(model, services);\n\t}\n\n\trender(animate = false) {\n\t\tconst axesOptions = Tools.getProperty(this.getOptions(), 'axes');\n\t\tconst highlightData = [];\n\n\t\tObject.keys(axesOptions).forEach((axisPosition) => {\n\t\t\tif (Object.values(AxisPositions).includes(axisPosition as any)) {\n\t\t\t\tconst axisOptions = axesOptions[axisPosition];\n\t\t\t\tif (\n\t\t\t\t\taxisOptions.highlights &&\n\t\t\t\t\taxisOptions.highlights.data.length > 0\n\t\t\t\t) {\n\t\t\t\t\thighlightData.push({\n\t\t\t\t\t\taxisPosition,\n\t\t\t\t\t\thighlightStartMapsTo:\n\t\t\t\t\t\t\taxisOptions.highlights.highlightStartMapsTo,\n\t\t\t\t\t\thighlightEndMapsTo:\n\t\t\t\t\t\t\taxisOptions.highlights.highlightEndMapsTo,\n\t\t\t\t\t\tlabelMapsTo: axisOptions.highlights.labelMapsTo,\n\t\t\t\t\t\thighlight: axisOptions.highlights.data,\n\t\t\t\t\t\tcolor: axisOptions.highlights.color,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Grab container SVG\n\t\tconst svg = this.getComponentContainer({ withinChartClip: true });\n\n\t\t// Update data on all axis highlight groups\n\t\tconst highlightAxisGroups = svg\n\t\t\t.selectAll('g.axis-highlight')\n\t\t\t.data(highlightData, (highlightData) => highlightData.axisPosition);\n\n\t\t// Remove axis highlight groups that are no longer needed\n\t\thighlightAxisGroups.exit().attr('opacity', 0).remove();\n\n\t\t// Add the axis highlight groups that need to be introduced\n\t\tconst highlightAxisGroupsEnter = highlightAxisGroups\n\t\t\t.enter()\n\t\t\t.append('g');\n\n\t\tconst highlightAxisGroupsMerge = highlightAxisGroupsEnter.merge(\n\t\t\thighlightAxisGroups\n\t\t);\n\t\thighlightAxisGroupsMerge.attr(\n\t\t\t'class',\n\t\t\t(d) => `axis-highlight ${d.axisPosition}`\n\t\t);\n\n\t\tconst highlightGroups = highlightAxisGroupsMerge\n\t\t\t.selectAll('g.highlight-group')\n\t\t\t.data((d) =>\n\t\t\t\td.highlight.map((highlight) => {\n\t\t\t\t\thighlight.axisPosition = d.axisPosition;\n\t\t\t\t\thighlight.highlightStartMapsTo = d.highlightStartMapsTo;\n\t\t\t\t\thighlight.labelMapsTo = d.labelMapsTo;\n\t\t\t\t\thighlight.color = d.color;\n\t\t\t\t\thighlight.highlightEndMapsTo = d.highlightEndMapsTo;\n\t\t\t\t\treturn highlight;\n\t\t\t\t})\n\t\t\t);\n\n\t\t// Remove highlight groups that are no longer needed\n\t\thighlightGroups.exit().attr('opacity', 0).remove();\n\n\t\t// Add the highlight groups that need to be introduced\n\t\tconst highlightGroupsEnter = highlightGroups.enter().append('g');\n\n\t\thighlightGroupsEnter.append('rect').attr('class', 'highlight-bar');\n\t\thighlightGroupsEnter.append('line').attr('class', 'highlight-line');\n\n\t\tconst highlightGroupsMerge = highlightGroupsEnter.merge(\n\t\t\thighlightGroups\n\t\t);\n\t\thighlightGroupsMerge.attr('class', 'highlight-group');\n\n\t\tconst self = this;\n\t\thighlightAxisGroupsMerge.each(function ({ axisPosition }) {\n\t\t\tconst mainXScale = self.services.cartesianScales.getMainXScale();\n\t\t\tconst mainYScale = self.services.cartesianScales.getMainYScale();\n\t\t\tconst [xScaleStart, xScaleEnd] = mainXScale.range();\n\t\t\tconst [yScaleEnd, yScaleStart] = mainYScale.range();\n\n\t\t\tconst { cartesianScales } = self.services;\n\t\t\tconst orientation = cartesianScales.getOrientation();\n\t\t\tconst getDomainValue = (d) => cartesianScales.getDomainValue(d);\n\t\t\tconst getRangeValue = (d) => cartesianScales.getRangeValue(d);\n\t\t\tconst [\n\t\t\t\tgetXValue,\n\t\t\t\tgetYValue,\n\t\t\t] = Tools.flipDomainAndRangeBasedOnOrientation(\n\t\t\t\tgetDomainValue,\n\t\t\t\tgetRangeValue,\n\t\t\t\torientation\n\t\t\t);\n\n\t\t\tconst group = select(this);\n\t\t\tif (\n\t\t\t\taxisPosition === AxisPositions.TOP ||\n\t\t\t\taxisPosition === AxisPositions.BOTTOM\n\t\t\t) {\n\t\t\t\tgroup\n\t\t\t\t\t.selectAll('rect.highlight-bar')\n\t\t\t\t\t.transition()\n\t\t\t\t\t.call((t) =>\n\t\t\t\t\t\tself.services.transitions.setupTransition({\n\t\t\t\t\t\t\ttransition: t,\n\t\t\t\t\t\t\tname: 'highlight-bar-update',\n\t\t\t\t\t\t\tanimate,\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t\t// Stroke width added to stop overflow of highlight\n\t\t\t\t\t.attr(\n\t\t\t\t\t\t'y',\n\t\t\t\t\t\tMath.max(yScaleStart + self.highlightStrokeWidth, 0)\n\t\t\t\t\t)\n\t\t\t\t\t// Stroke width subtracted to stop overflow of highlight\n\t\t\t\t\t.attr(\n\t\t\t\t\t\t'height',\n\t\t\t\t\t\tMath.max(yScaleEnd - 2 * self.highlightStrokeWidth, 0)\n\t\t\t\t\t)\n\t\t\t\t\t.attr('x', ({ highlightStartMapsTo, ...d }) =>\n\t\t\t\t\t\tgetXValue(d[highlightStartMapsTo])\n\t\t\t\t\t)\n\t\t\t\t\t.attr(\n\t\t\t\t\t\t'width',\n\t\t\t\t\t\t({ highlightStartMapsTo, highlightEndMapsTo, ...d }) =>\n\t\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\t\tgetXValue(d[highlightEndMapsTo]) -\n\t\t\t\t\t\t\t\t\tgetXValue(d[highlightStartMapsTo]),\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t.style('stroke', ({ color, labelMapsTo, ...data }) => {\n\t\t\t\t\t\treturn color && color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t? color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t})\n\t\t\t\t\t.style('stroke-dasharray', '2, 2')\n\t\t\t\t\t.attr('stroke-width', self.highlightStrokeWidth + 'px')\n\t\t\t\t\t.style('fill-opacity', 0.1)\n\t\t\t\t\t.style('fill', ({ color, labelMapsTo, ...data }) => {\n\t\t\t\t\t\treturn color && color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t? color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tgroup\n\t\t\t\t\t.selectAll('rect.highlight-bar')\n\t\t\t\t\t.transition()\n\t\t\t\t\t.call((t) =>\n\t\t\t\t\t\tself.services.transitions.setupTransition({\n\t\t\t\t\t\t\ttransition: t,\n\t\t\t\t\t\t\tname: 'highlight-bar-update',\n\t\t\t\t\t\t\tanimate,\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t\t.attr('x', xScaleStart)\n\t\t\t\t\t.attr('width', Math.max(xScaleEnd - xScaleStart, 0))\n\t\t\t\t\t.attr('y', ({ highlightEndMapsTo, ...d }) =>\n\t\t\t\t\t\tgetYValue(d[highlightEndMapsTo])\n\t\t\t\t\t)\n\t\t\t\t\t.attr(\n\t\t\t\t\t\t'height',\n\t\t\t\t\t\t({ highlightStartMapsTo, highlightEndMapsTo, ...d }) =>\n\t\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\t\tgetYValue(d[highlightStartMapsTo]) -\n\t\t\t\t\t\t\t\t\tgetYValue(d[highlightEndMapsTo]),\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t.style('stroke', ({ color, labelMapsTo, ...data }) => {\n\t\t\t\t\t\treturn color && color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t? color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t})\n\t\t\t\t\t.style('stroke-dasharray', '2, 2')\n\t\t\t\t\t.attr('stroke-width', self.highlightStrokeWidth + 'px')\n\t\t\t\t\t.style('fill-opacity', 0.1)\n\t\t\t\t\t.style('fill', ({ color, labelMapsTo, ...data }) => {\n\t\t\t\t\t\treturn color && color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t? color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
@@ -1,11 +0,0 @@
1
- import { Component } from '../component';
2
- import { RenderTypes } from '../../interfaces';
3
- export declare class Legend extends Component {
4
- type: string;
5
- renderType: RenderTypes;
6
- render(): void;
7
- sortDataGroups(dataGroups: any, legendOrder: any): any;
8
- addAdditionalItem(additionalItem: any, itemConfig: any, indexOfItem: any): void;
9
- truncateLegendText(): void;
10
- addEventListeners(): void;
11
- }