@carbon/charts 0.30.24 → 0.30.25

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 (162) hide show
  1. package/CHANGELOG.md +330 -1052
  2. package/README.md +3 -0
  3. package/axis-chart.js +8 -14
  4. package/axis-chart.js.map +1 -1
  5. package/build/demo/{data/create-codesandbox.d.ts → create-codesandbox.d.ts} +16 -13
  6. package/build/demo/data/bar.d.ts +1 -1
  7. package/build/demo/data/line.d.ts +1 -1
  8. package/build/src/interfaces/axis-scales.d.ts +11 -11
  9. package/build/src/interfaces/charts.d.ts +1 -0
  10. package/bundle.js +1 -1
  11. package/chart.js +15 -24
  12. package/chart.js.map +1 -1
  13. package/charts/bar-grouped.js +3 -1
  14. package/charts/bar-grouped.js.map +1 -1
  15. package/charts/bar-simple.js +3 -1
  16. package/charts/bar-simple.js.map +1 -1
  17. package/charts/bar-stacked.js +3 -1
  18. package/charts/bar-stacked.js.map +1 -1
  19. package/charts/bubble.js +3 -1
  20. package/charts/bubble.js.map +1 -1
  21. package/charts/donut.js +3 -1
  22. package/charts/donut.js.map +1 -1
  23. package/charts/line.js +3 -1
  24. package/charts/line.js.map +1 -1
  25. package/charts/pie.js +3 -1
  26. package/charts/pie.js.map +1 -1
  27. package/charts/radar.js +1 -3
  28. package/charts/radar.js.map +1 -1
  29. package/charts/scatter.js +3 -1
  30. package/charts/scatter.js.map +1 -1
  31. package/components/axes/axis.js +72 -33
  32. package/components/axes/axis.js.map +1 -1
  33. package/components/axes/grid.js +23 -18
  34. package/components/axes/grid.js.map +1 -1
  35. package/components/axes/ruler.js +7 -5
  36. package/components/axes/ruler.js.map +1 -1
  37. package/components/axes/two-dimensional-axes.js +5 -2
  38. package/components/axes/two-dimensional-axes.js.map +1 -1
  39. package/components/axes/zero-line.js +2 -1
  40. package/components/axes/zero-line.js.map +1 -1
  41. package/components/component.js +2 -4
  42. package/components/component.js.map +1 -1
  43. package/components/essentials/legend.js +46 -23
  44. package/components/essentials/legend.js.map +1 -1
  45. package/components/essentials/threshold.js +11 -5
  46. package/components/essentials/threshold.js.map +1 -1
  47. package/components/essentials/title.js +6 -4
  48. package/components/essentials/title.js.map +1 -1
  49. package/components/essentials/tooltip-bar.js +39 -20
  50. package/components/essentials/tooltip-bar.js.map +1 -1
  51. package/components/essentials/tooltip-pie.js +4 -3
  52. package/components/essentials/tooltip-pie.js.map +1 -1
  53. package/components/essentials/tooltip-radar.js +6 -3
  54. package/components/essentials/tooltip-radar.js.map +1 -1
  55. package/components/essentials/tooltip-scatter.js +3 -1
  56. package/components/essentials/tooltip-scatter.js.map +1 -1
  57. package/components/essentials/tooltip.js +35 -15
  58. package/components/essentials/tooltip.js.map +1 -1
  59. package/components/graphs/bar-grouped.js +46 -20
  60. package/components/graphs/bar-grouped.js.map +1 -1
  61. package/components/graphs/bar-simple.js +39 -19
  62. package/components/graphs/bar-simple.js.map +1 -1
  63. package/components/graphs/bar-stacked.js +50 -28
  64. package/components/graphs/bar-stacked.js.map +1 -1
  65. package/components/graphs/bar.js.map +1 -1
  66. package/components/graphs/bubble.js +22 -8
  67. package/components/graphs/bubble.js.map +1 -1
  68. package/components/graphs/donut.js +12 -4
  69. package/components/graphs/donut.js.map +1 -1
  70. package/components/graphs/line.js +14 -7
  71. package/components/graphs/line.js.map +1 -1
  72. package/components/graphs/pie.js +80 -44
  73. package/components/graphs/pie.js.map +1 -1
  74. package/components/graphs/radar.js +271 -140
  75. package/components/graphs/radar.js.map +1 -1
  76. package/components/graphs/scatter.js +54 -21
  77. package/components/graphs/scatter.js.map +1 -1
  78. package/components/graphs/skeleton.js +29 -14
  79. package/components/graphs/skeleton.js.map +1 -1
  80. package/components/layout/layout.js +38 -26
  81. package/components/layout/layout.js.map +1 -1
  82. package/components/layout/spacer.js +2 -1
  83. package/components/layout/spacer.js.map +1 -1
  84. package/configuration.js +15 -13
  85. package/configuration.js.map +1 -1
  86. package/demo/{data/create-codesandbox.d.ts → create-codesandbox.d.ts} +16 -13
  87. package/demo/{data/create-codesandbox.js → create-codesandbox.js} +24 -21
  88. package/demo/create-codesandbox.js.map +1 -0
  89. package/demo/data/bar.d.ts +1 -1
  90. package/demo/data/bar.js +1 -1
  91. package/demo/data/bar.js.map +1 -1
  92. package/demo/data/bubble.js +5 -3
  93. package/demo/data/bubble.js.map +1 -1
  94. package/demo/data/bundle.js +1 -1
  95. package/demo/data/index.js +12 -7
  96. package/demo/data/index.js.map +1 -1
  97. package/demo/data/line.d.ts +1 -1
  98. package/demo/data/line.js +2 -4
  99. package/demo/data/line.js.map +1 -1
  100. package/demo/data/radar.js.map +1 -1
  101. package/demo/data/time-series-axis.js +1 -3
  102. package/demo/data/time-series-axis.js.map +1 -1
  103. package/demo/styles.css +50 -18
  104. package/demo/styles.css.map +1 -1
  105. package/demo/styles.min.css +1 -1
  106. package/demo/styles.min.css.map +1 -1
  107. package/demo/tsconfig.tsbuildinfo +68 -68
  108. package/index.js.map +1 -1
  109. package/interfaces/axis-scales.d.ts +11 -11
  110. package/interfaces/axis-scales.js.map +1 -1
  111. package/interfaces/charts.d.ts +1 -0
  112. package/interfaces/charts.js.map +1 -1
  113. package/interfaces/components.js.map +1 -1
  114. package/interfaces/enums.js.map +1 -1
  115. package/model.js +27 -16
  116. package/model.js.map +1 -1
  117. package/package.json +4 -2
  118. package/polyfills.js +7 -2
  119. package/polyfills.js.map +1 -1
  120. package/services/angle-utils.js +34 -9
  121. package/services/angle-utils.js.map +1 -1
  122. package/services/colors.js.map +1 -1
  123. package/services/curves.js +4 -2
  124. package/services/curves.js.map +1 -1
  125. package/services/essentials/dom-utils.js +4 -3
  126. package/services/essentials/dom-utils.js.map +1 -1
  127. package/services/essentials/transitions.js +3 -4
  128. package/services/essentials/transitions.js.map +1 -1
  129. package/services/scales-cartesian.js +63 -23
  130. package/services/scales-cartesian.js.map +1 -1
  131. package/services/time-series.js +28 -12
  132. package/services/time-series.js.map +1 -1
  133. package/styles/components/_axis.scss +4 -0
  134. package/styles/components/_layout.scss +0 -1
  135. package/styles/components/_ruler.scss +5 -2
  136. package/styles/components/_skeleton.scss +2 -3
  137. package/styles/components/_threshold.scss +2 -2
  138. package/styles/components/_tooltip.scss +6 -5
  139. package/styles/graphs/_bubble.scss +1 -1
  140. package/styles/graphs/_radar.scss +4 -2
  141. package/styles/graphs/_scatter.scss +1 -1
  142. package/styles/mixins.scss +2 -2
  143. package/styles-g10.css +11 -4
  144. package/styles-g10.css.map +1 -1
  145. package/styles-g10.min.css +1 -1
  146. package/styles-g10.min.css.map +1 -1
  147. package/styles-g100.css +11 -4
  148. package/styles-g100.css.map +1 -1
  149. package/styles-g100.min.css +1 -1
  150. package/styles-g100.min.css.map +1 -1
  151. package/styles-g90.css +11 -4
  152. package/styles-g90.css.map +1 -1
  153. package/styles-g90.min.css +1 -1
  154. package/styles-g90.min.css.map +1 -1
  155. package/styles.css +11 -4
  156. package/styles.css.map +1 -1
  157. package/styles.min.css +1 -1
  158. package/styles.min.css.map +1 -1
  159. package/tools.js +19 -7
  160. package/tools.js.map +1 -1
  161. package/tsconfig.tsbuildinfo +56 -56
  162. package/demo/data/create-codesandbox.js.map +0 -1
@@ -113,6 +113,18 @@
113
113
  "version": "0c9ea8c2028047f39a3f66752682604f543c08be8806258c3d95c93e75a43255",
114
114
  "signature": "0c9ea8c2028047f39a3f66752682604f543c08be8806258c3d95c93e75a43255"
115
115
  },
116
+ "../../../../node_modules/codesandbox-import-utils/lib/api/define.d.ts": {
117
+ "version": "a0d8a4615587d85377d884a829baf0a50c5f36a89ccf2e07c48b0d8f2f9d76f1",
118
+ "signature": "a0d8a4615587d85377d884a829baf0a50c5f36a89ccf2e07c48b0d8f2f9d76f1"
119
+ },
120
+ "../../../../node_modules/codesandbox/lib/api/define.d.ts": {
121
+ "version": "7daed976a3f0970f36023ac5f65197a16102f1b948a6d350ac3d6010af983c8b",
122
+ "signature": "7daed976a3f0970f36023ac5f65197a16102f1b948a6d350ac3d6010af983c8b"
123
+ },
124
+ "../../demo/create-codesandbox.ts": {
125
+ "version": "6383c7624d528b3f0bd3a35b4afdf58ac608805af8f268cf3848ec8056a18d8d",
126
+ "signature": "b7df433c4664dd2719c6eefd32021de6163a14624165daba31088bd90da5ee4f"
127
+ },
116
128
  "../../../../node_modules/date-fns/typings.d.ts": {
117
129
  "version": "0d1954e6a821396de9f72b8d2e8553096a755eb76ad99b63857da0b9a23723a0",
118
130
  "signature": "0d1954e6a821396de9f72b8d2e8553096a755eb76ad99b63857da0b9a23723a0"
@@ -122,8 +134,8 @@
122
134
  "signature": "37dce3c308ecb1ef88ddf7c9f9346d64c2b09a36eb7dcd4fe9d9736f5608107f"
123
135
  },
124
136
  "../../demo/data/bar.ts": {
125
- "version": "f9c0d5a1ab2fdd50f4c16fc480de71154d5287e5f2a9be9c722b71450425c2af",
126
- "signature": "c283ccc2a5aa10c74d5bf1c557950481d1b030280e862ae5f45d1ff5dc4151f8"
137
+ "version": "3544b2e798662927410d0b5a2fa7782f0c24e095687c38a5039ed96a474c1b06",
138
+ "signature": "d66e1f5763544bb6cead6a4c4c5e5688566b5d8952473d51ecc6e0dd1005c968"
127
139
  },
128
140
  "../../../../node_modules/@types/d3-array/index.d.ts": {
129
141
  "version": "f5b8f86da74b4bfb29f85a631b725a47c8a3ab6c4ce91537e5b176bbe0cd0a7a",
@@ -254,25 +266,13 @@
254
266
  "signature": "ff07d0e1e23dcc09b7868c330f7d1a554357c1ed2ec211b90dc4f4fbc406cd77"
255
267
  },
256
268
  "../../demo/data/line.ts": {
257
- "version": "c72749c18e9a9dfc178a90fe04064f99c2d9b32cd94c3cbf057ce7d589724206",
258
- "signature": "49bd91840e751aa08eed75fd15b06a8a5dd407bf531658f59f9044acd692c1f5"
269
+ "version": "d8f9220604e0e5c32efbfce3701293554c4563b28aaf680b04da0bae7495e0b1",
270
+ "signature": "8cbfc1ba99538e7ef396d732c0d12fbb01227f1d2e261767e60a3651c6ce2d7f"
259
271
  },
260
272
  "../../demo/data/bubble.ts": {
261
- "version": "0eef8a21693201dff1cf00115661d11a1077fa9f0a7d023ef043d76cfe4e5602",
273
+ "version": "1aeb64d8a97db1942fb4b97513fb5d19904ccb5c6c66d3896d79419fc9422850",
262
274
  "signature": "557852fdc5c0d5082accd2c713c2619a6bda8f4903896a88a3f4f4b4c1576f88"
263
275
  },
264
- "../../../../node_modules/codesandbox-import-utils/lib/api/define.d.ts": {
265
- "version": "a0d8a4615587d85377d884a829baf0a50c5f36a89ccf2e07c48b0d8f2f9d76f1",
266
- "signature": "a0d8a4615587d85377d884a829baf0a50c5f36a89ccf2e07c48b0d8f2f9d76f1"
267
- },
268
- "../../../../node_modules/codesandbox/lib/api/define.d.ts": {
269
- "version": "7daed976a3f0970f36023ac5f65197a16102f1b948a6d350ac3d6010af983c8b",
270
- "signature": "7daed976a3f0970f36023ac5f65197a16102f1b948a6d350ac3d6010af983c8b"
271
- },
272
- "../../demo/data/create-codesandbox.ts": {
273
- "version": "81594c1000ea8fb75e78b8dc4c154d65452a1ab0837346c0c710e63f1c2338ed",
274
- "signature": "b7a223d921dad12fafde9fefd6956b503d8eba68aa2bc59aaf6ed27aedc39c1f"
275
- },
276
276
  "../../demo/data/pie.ts": {
277
277
  "version": "a169c39586edc85fc934cb85834e93ac7795f3a2d70d59ed1417821aebbbe311",
278
278
  "signature": "af77c4b8b8b5e5edc9f9df8e5c1ece6898ca16edc0579059a4c42486e5c1bd21"
@@ -310,12 +310,12 @@
310
310
  "signature": "a37a74297b67cfca205b49e1d11a2a333edcb404e58a677fc51e21d2a395d476"
311
311
  },
312
312
  "../../src/interfaces/axis-scales.ts": {
313
- "version": "7774a74132e0d791bc07367e2fa7370b6a644b68417f0e96c06865d4e00ee0fb",
314
- "signature": "7774a74132e0d791bc07367e2fa7370b6a644b68417f0e96c06865d4e00ee0fb"
313
+ "version": "3155a4767fe25abf51472993168960121cd678705639f01673478a0d668f7edb",
314
+ "signature": "3155a4767fe25abf51472993168960121cd678705639f01673478a0d668f7edb"
315
315
  },
316
316
  "../../src/interfaces/charts.ts": {
317
- "version": "c041b62e975566b46808580f01ebe26984409e09ee89f366787f5f3fe84fb718",
318
- "signature": "c041b62e975566b46808580f01ebe26984409e09ee89f366787f5f3fe84fb718"
317
+ "version": "37fe78b0ab43f5dcfbfed41cbf7dcf760417a416758aa189da8264fbc03a9a7e",
318
+ "signature": "37fe78b0ab43f5dcfbfed41cbf7dcf760417a416758aa189da8264fbc03a9a7e"
319
319
  },
320
320
  "../../src/interfaces/layout.ts": {
321
321
  "version": "4d474058b20e782a7d01c499c6e5871a95dee4cbc1eed7d601e5cb246d3308d0",
@@ -342,15 +342,15 @@
342
342
  "signature": "3e31fb44c1f21304f598fc4c6321bb52aa248a94eae915b48c8bec58b55b42e5"
343
343
  },
344
344
  "../../demo/data/time-series-axis.ts": {
345
- "version": "a7ec7b7257e572f0462a37377beab3efc76edfd46f43eb0b1e518decda4d6b7c",
345
+ "version": "2b8e669c0a108b9cfc4f53f77feb7da48d8db53f5b711d2d694a81f69f0fdeaf",
346
346
  "signature": "70068f32df389c3215e3b16f8efea26c189b3ccc340c9b1070bcdea3baeb20f9"
347
347
  },
348
348
  "../../demo/data/radar.ts": {
349
- "version": "b202a0baaf90f6e93a21abdaa7f4e31ed0c86e9f9a57ebdf81c5aa821d72542c",
349
+ "version": "1d2ae537bbe418ed6cdb93bea236d015f7e9db82d61cb3c2b234a501079d2937",
350
350
  "signature": "7fbd2c1dfdbbe5439288e7376d5b535a4fb03d7f30649924e5bcaa848fda0f6b"
351
351
  },
352
352
  "../../demo/data/index.ts": {
353
- "version": "c4b76b440c35fa4747ffcdcc278f0b10ed6eec87c05f92007e1fe22c57b4177b",
353
+ "version": "b301f7c7151dff9fd7837acb97c816d4c2fe958c7f63eb9978809ac392a16817",
354
354
  "signature": "1fad4ef30d6c61817e694e265c2727dbb5499dc713e16d3c15749bdc1379cf73"
355
355
  },
356
356
  "../../node_modules/@types/node/globals.d.ts": {
@@ -775,6 +775,29 @@
775
775
  "../../node_modules/@types/node/util.d.ts",
776
776
  "../../node_modules/@types/node/ts3.2/util.d.ts"
777
777
  ],
778
+ "../../../../node_modules/codesandbox-import-utils/lib/api/define.d.ts": [
779
+ "../../../../node_modules/date-fns/typings.d.ts",
780
+ "../../node_modules/@types/node/fs.d.ts",
781
+ "../../node_modules/@types/node/ts3.2/fs.d.ts",
782
+ "../../node_modules/@types/node/util.d.ts",
783
+ "../../node_modules/@types/node/ts3.2/util.d.ts"
784
+ ],
785
+ "../../../../node_modules/codesandbox/lib/api/define.d.ts": [
786
+ "../../../../node_modules/codesandbox-import-utils/lib/api/define.d.ts",
787
+ "../../../../node_modules/date-fns/typings.d.ts",
788
+ "../../node_modules/@types/node/fs.d.ts",
789
+ "../../node_modules/@types/node/ts3.2/fs.d.ts",
790
+ "../../node_modules/@types/node/util.d.ts",
791
+ "../../node_modules/@types/node/ts3.2/util.d.ts"
792
+ ],
793
+ "../../demo/create-codesandbox.ts": [
794
+ "../../../../node_modules/codesandbox/lib/api/define.d.ts",
795
+ "../../../../node_modules/date-fns/typings.d.ts",
796
+ "../../node_modules/@types/node/fs.d.ts",
797
+ "../../node_modules/@types/node/ts3.2/fs.d.ts",
798
+ "../../node_modules/@types/node/util.d.ts",
799
+ "../../node_modules/@types/node/ts3.2/util.d.ts"
800
+ ],
778
801
  "../../../../node_modules/date-fns/typings.d.ts": [
779
802
  "../../../../node_modules/date-fns/typings.d.ts",
780
803
  "../../node_modules/@types/node/fs.d.ts",
@@ -1077,29 +1100,6 @@
1077
1100
  "../../node_modules/@types/node/util.d.ts",
1078
1101
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1079
1102
  ],
1080
- "../../../../node_modules/codesandbox-import-utils/lib/api/define.d.ts": [
1081
- "../../../../node_modules/date-fns/typings.d.ts",
1082
- "../../node_modules/@types/node/fs.d.ts",
1083
- "../../node_modules/@types/node/ts3.2/fs.d.ts",
1084
- "../../node_modules/@types/node/util.d.ts",
1085
- "../../node_modules/@types/node/ts3.2/util.d.ts"
1086
- ],
1087
- "../../../../node_modules/codesandbox/lib/api/define.d.ts": [
1088
- "../../../../node_modules/codesandbox-import-utils/lib/api/define.d.ts",
1089
- "../../../../node_modules/date-fns/typings.d.ts",
1090
- "../../node_modules/@types/node/fs.d.ts",
1091
- "../../node_modules/@types/node/ts3.2/fs.d.ts",
1092
- "../../node_modules/@types/node/util.d.ts",
1093
- "../../node_modules/@types/node/ts3.2/util.d.ts"
1094
- ],
1095
- "../../demo/data/create-codesandbox.ts": [
1096
- "../../../../node_modules/codesandbox/lib/api/define.d.ts",
1097
- "../../../../node_modules/date-fns/typings.d.ts",
1098
- "../../node_modules/@types/node/fs.d.ts",
1099
- "../../node_modules/@types/node/ts3.2/fs.d.ts",
1100
- "../../node_modules/@types/node/util.d.ts",
1101
- "../../node_modules/@types/node/ts3.2/util.d.ts"
1102
- ],
1103
1103
  "../../demo/data/pie.ts": [
1104
1104
  "../../../../node_modules/date-fns/typings.d.ts",
1105
1105
  "../../node_modules/@types/node/fs.d.ts",
@@ -1266,7 +1266,7 @@
1266
1266
  "../../demo/data/step.ts",
1267
1267
  "../../demo/data/time-series-axis.ts",
1268
1268
  "../../demo/data/radar.ts",
1269
- "../../demo/data/create-codesandbox.ts",
1269
+ "../../demo/create-codesandbox.ts",
1270
1270
  "../tools.d.ts",
1271
1271
  "../../../../node_modules/date-fns/typings.d.ts",
1272
1272
  "../../node_modules/@types/node/fs.d.ts",
@@ -1888,14 +1888,15 @@
1888
1888
  "../../node_modules/@types/node/util.d.ts",
1889
1889
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1890
1890
  ],
1891
- "../../../../node_modules/date-fns/typings.d.ts": [
1891
+ "../../../../node_modules/codesandbox-import-utils/lib/api/define.d.ts": [
1892
1892
  "../../../../node_modules/date-fns/typings.d.ts",
1893
1893
  "../../node_modules/@types/node/fs.d.ts",
1894
1894
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1895
1895
  "../../node_modules/@types/node/util.d.ts",
1896
1896
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1897
1897
  ],
1898
- "../../../../node_modules/date-fns/locale/tr/index.d.ts": [
1898
+ "../../../../node_modules/codesandbox/lib/api/define.d.ts": [
1899
+ "../../../../node_modules/codesandbox-import-utils/lib/api/define.d.ts",
1899
1900
  "../../../../node_modules/date-fns/typings.d.ts",
1900
1901
  "../../node_modules/@types/node/fs.d.ts",
1901
1902
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
@@ -1912,6 +1913,20 @@
1912
1913
  "../../demo/data/step.ts",
1913
1914
  "../../demo/data/radar.ts"
1914
1915
  ],
1916
+ "../../../../node_modules/date-fns/typings.d.ts": [
1917
+ "../../../../node_modules/date-fns/typings.d.ts",
1918
+ "../../node_modules/@types/node/fs.d.ts",
1919
+ "../../node_modules/@types/node/ts3.2/fs.d.ts",
1920
+ "../../node_modules/@types/node/util.d.ts",
1921
+ "../../node_modules/@types/node/ts3.2/util.d.ts"
1922
+ ],
1923
+ "../../../../node_modules/date-fns/locale/tr/index.d.ts": [
1924
+ "../../../../node_modules/date-fns/typings.d.ts",
1925
+ "../../node_modules/@types/node/fs.d.ts",
1926
+ "../../node_modules/@types/node/ts3.2/fs.d.ts",
1927
+ "../../node_modules/@types/node/util.d.ts",
1928
+ "../../node_modules/@types/node/ts3.2/util.d.ts"
1929
+ ],
1915
1930
  "../../../../node_modules/@types/d3-array/index.d.ts": [
1916
1931
  "../../../../node_modules/date-fns/typings.d.ts",
1917
1932
  "../../node_modules/@types/node/fs.d.ts",
@@ -2226,21 +2241,6 @@
2226
2241
  "../../node_modules/@types/node/util.d.ts",
2227
2242
  "../../node_modules/@types/node/ts3.2/util.d.ts"
2228
2243
  ],
2229
- "../../../../node_modules/codesandbox-import-utils/lib/api/define.d.ts": [
2230
- "../../../../node_modules/date-fns/typings.d.ts",
2231
- "../../node_modules/@types/node/fs.d.ts",
2232
- "../../node_modules/@types/node/ts3.2/fs.d.ts",
2233
- "../../node_modules/@types/node/util.d.ts",
2234
- "../../node_modules/@types/node/ts3.2/util.d.ts"
2235
- ],
2236
- "../../../../node_modules/codesandbox/lib/api/define.d.ts": [
2237
- "../../../../node_modules/codesandbox-import-utils/lib/api/define.d.ts",
2238
- "../../../../node_modules/date-fns/typings.d.ts",
2239
- "../../node_modules/@types/node/fs.d.ts",
2240
- "../../node_modules/@types/node/ts3.2/fs.d.ts",
2241
- "../../node_modules/@types/node/util.d.ts",
2242
- "../../node_modules/@types/node/ts3.2/util.d.ts"
2243
- ],
2244
2244
  "../../src/interfaces/a11y.ts": [
2245
2245
  "../../../../node_modules/date-fns/typings.d.ts",
2246
2246
  "../../node_modules/@types/node/fs.d.ts",
@@ -2720,6 +2720,9 @@
2720
2720
  ]
2721
2721
  },
2722
2722
  "semanticDiagnosticsPerFile": [
2723
+ "../../../../node_modules/codesandbox-import-utils/lib/api/define.d.ts",
2724
+ "../../../../node_modules/codesandbox/lib/api/define.d.ts",
2725
+ "../../demo/create-codesandbox.ts",
2723
2726
  "../../../../node_modules/date-fns/typings.d.ts",
2724
2727
  "../../../../node_modules/date-fns/locale/tr/index.d.ts",
2725
2728
  "../../demo/data/bar.ts",
@@ -2757,9 +2760,6 @@
2757
2760
  "../../../../node_modules/@types/d3/index.d.ts",
2758
2761
  "../../demo/data/line.ts",
2759
2762
  "../../demo/data/bubble.ts",
2760
- "../../../../node_modules/codesandbox-import-utils/lib/api/define.d.ts",
2761
- "../../../../node_modules/codesandbox/lib/api/define.d.ts",
2762
- "../../demo/data/create-codesandbox.ts",
2763
2763
  "../../demo/data/pie.ts",
2764
2764
  "../../demo/data/donut.ts",
2765
2765
  "../../demo/data/scatter.ts",
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAEzB,uBAAuB;AACvB,OAAO,KAAK,cAAc,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,mCAAmC;AACnC,IAAM,aAAa,GAAG,OAAO,CAAC;AAE9B,OAAO,EACN,UAAU,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,CAAC","sourcesContent":["export * from \"./charts\";\n\n// Configs & interfaces\nimport * as configurations from \"./configuration\";\nimport * as interfaces from \"./interfaces\";\n\nimport * as colorPalettes from \"./services/colorPalettes\";\nimport { DEFAULT } from \"./services/colorPalettes\";\n// TODO 1.0 - Remove deprecated API\nconst defaultColors = DEFAULT;\n\nexport {\n\tinterfaces,\n\tconfigurations,\n\tdefaultColors,\n\tcolorPalettes\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAEzB,uBAAuB;AACvB,OAAO,KAAK,cAAc,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,mCAAmC;AACnC,IAAM,aAAa,GAAG,OAAO,CAAC;AAE9B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC","sourcesContent":["export * from \"./charts\";\n\n// Configs & interfaces\nimport * as configurations from \"./configuration\";\nimport * as interfaces from \"./interfaces\";\n\nimport * as colorPalettes from \"./services/colorPalettes\";\nimport { DEFAULT } from \"./services/colorPalettes\";\n// TODO 1.0 - Remove deprecated API\nconst defaultColors = DEFAULT;\n\nexport { interfaces, configurations, defaultColors, colorPalettes };\n"]}
@@ -19,10 +19,10 @@ export interface AxisOptions {
19
19
  */
20
20
  domain?: AxisDomain[];
21
21
  /**
22
- * Whether the Axis should be forced to include 0 as a starting point
23
- * (or ending point, in case of all negative axis).
24
- * Default: true
25
- */
22
+ * Whether the Axis should be forced to include 0 as a starting point
23
+ * (or ending point, in case of all negative axis).
24
+ * Default: true
25
+ */
26
26
  includeZero?: boolean;
27
27
  /**
28
28
  * identifies what key within the data the axis values would map to
@@ -99,14 +99,14 @@ export interface TickFormats {
99
99
  }
100
100
  export interface TimeIntervalFormats {
101
101
  "15seconds"?: TickFormats;
102
- "minute"?: TickFormats;
102
+ minute?: TickFormats;
103
103
  "30minutes"?: TickFormats;
104
- "hourly"?: TickFormats;
105
- "daily"?: TickFormats;
106
- "weekly"?: TickFormats;
107
- "monthly"?: TickFormats;
108
- "quarterly"?: TickFormats;
109
- "yearly"?: TickFormats;
104
+ hourly?: TickFormats;
105
+ daily?: TickFormats;
106
+ weekly?: TickFormats;
107
+ monthly?: TickFormats;
108
+ quarterly?: TickFormats;
109
+ yearly?: TickFormats;
110
110
  }
111
111
  /**
112
112
  * customize the axes components
@@ -1 +1 @@
1
- {"version":3,"file":"axis-scales.js","sourceRoot":"","sources":["axis-scales.ts"],"names":[],"mappings":"","sourcesContent":["import { ScaleTypes } from \"./enums\";\nimport { AxisDomain } from \"d3\";\nimport { Locale } from \"date-fns\";\nimport { ThresholdOptions } from \"./components\";\n\n/**\n * options to configure a scale. not all options are used by all scales\n */\nexport interface AxisOptions {\n\t/**\n\t * type of the scale used on axis\n\t */\n\tscaleType?: ScaleTypes;\n\t/**\n\t * Whether the Axis should use the specified domain\n\t * instead of it being dynamically generated based on data extents.\n\t * The type of values should depend on the scale type.\n\t * Example for continuous axis scale: [-100, 100]\n\t * Example for discrete axis scale: ['Qty', 'More', 'Sold']\n\t */\n\tdomain?: AxisDomain[];\n\t/**\n\t* Whether the Axis should be forced to include 0 as a starting point\n\t* (or ending point, in case of all negative axis).\n\t* Default: true\n\t*/\n\tincludeZero?: boolean;\n\t/**\n\t * identifies what key within the data the axis values would map to\n\t */\n\tmapsTo?: string;\n\t/**\n\t * optional title for the scales\n\t */\n\ttitle?: string;\n\t/**\n\t * thresholds\n\t * Example:\n\t * [\n\t *\t\t{value: 10000},\n\t *\t\t{value: 40020, valueFormatter: (x) => x},\n\t *\t\t{value: 55000, label: \"Custom label\", fillColor: \"#03a9f4\"},\n\t * ]\n\t */\n\tthresholds?: ThresholdOptions[];\n\t/**\n\t * tick configuration\n\t */\n\tticks?: {\n\t\t/**\n\t\t * number of ticks to show\n\t\t */\n\t\tnumber?: number;\n\t\t/**\n\t\t * minimum tick value\n\t\t */\n\t\tmin?: number;\n\t\t/**\n\t\t * maximum tick value\n\t\t */\n\t\tmax?: number;\n\t\t/**\n\t\t * minimum width of a tick\n\t\t * before getting rotated (in pixels)\n\t\t */\n\t\trotateIfSmallerThan?: number;\n\t\t/**\n\t\t * function to format the ticks\n\t\t */\n\t\tformatter?: Function;\n\t};\n}\n\n/**\n * customize time series scales\n */\nexport interface TimeScaleOptions {\n\taddSpaceOnEdges?: number;\n\t/**\n\t * if it's true, days are shown as mon-sun,\n\t * otherwise days are shown as number 1-31\n\t */\n\tshowDayName?: boolean;\n\t/**\n\t * formats for each time interval\n\t */\n\ttimeIntervalFormats?: TimeIntervalFormats;\n\t/**\n\t * locale object, for more information see https://date-fns.org/v2.11.0/docs/Locale.\n\t * example: `import enUSLocaleObject from \"date-fns/locale/en-US/index\"`.\n\t * available locale objects are: https://github.com/date-fns/date-fns/tree/master/src/locale\n\t */\n\tlocaleObject?: Locale;\n}\n\n/**\n * time scales: customize ticks format for different time intervals\n */\nexport interface TickFormats {\n\tprimary?: string;\n\tsecondary?: string;\n}\n\n\nexport interface TimeIntervalFormats {\n\t\"15seconds\"?: TickFormats;\n\t\"minute\"?: TickFormats;\n\t\"30minutes\"?: TickFormats;\n\t\"hourly\"?: TickFormats;\n\t\"daily\"?: TickFormats;\n\t\"weekly\"?: TickFormats;\n\t\"monthly\"?: TickFormats;\n\t\"quarterly\"?: TickFormats;\n\t\"yearly\"?: TickFormats;\n}\n\n/**\n * customize the axes components\n */\nexport interface AxesOptions {\n\tleft?: AxisOptions;\n\tbottom?: AxisOptions;\n\tright?: AxisOptions;\n\ttop?: AxisOptions;\n}\n"]}
1
+ {"version":3,"file":"axis-scales.js","sourceRoot":"","sources":["axis-scales.ts"],"names":[],"mappings":"","sourcesContent":["import { ScaleTypes } from \"./enums\";\nimport { AxisDomain } from \"d3\";\nimport { Locale } from \"date-fns\";\nimport { ThresholdOptions } from \"./components\";\n\n/**\n * options to configure a scale. not all options are used by all scales\n */\nexport interface AxisOptions {\n\t/**\n\t * type of the scale used on axis\n\t */\n\tscaleType?: ScaleTypes;\n\t/**\n\t * Whether the Axis should use the specified domain\n\t * instead of it being dynamically generated based on data extents.\n\t * The type of values should depend on the scale type.\n\t * Example for continuous axis scale: [-100, 100]\n\t * Example for discrete axis scale: ['Qty', 'More', 'Sold']\n\t */\n\tdomain?: AxisDomain[];\n\t/**\n\t * Whether the Axis should be forced to include 0 as a starting point\n\t * (or ending point, in case of all negative axis).\n\t * Default: true\n\t */\n\tincludeZero?: boolean;\n\t/**\n\t * identifies what key within the data the axis values would map to\n\t */\n\tmapsTo?: string;\n\t/**\n\t * optional title for the scales\n\t */\n\ttitle?: string;\n\t/**\n\t * thresholds\n\t * Example:\n\t * [\n\t *\t\t{value: 10000},\n\t *\t\t{value: 40020, valueFormatter: (x) => x},\n\t *\t\t{value: 55000, label: \"Custom label\", fillColor: \"#03a9f4\"},\n\t * ]\n\t */\n\tthresholds?: ThresholdOptions[];\n\t/**\n\t * tick configuration\n\t */\n\tticks?: {\n\t\t/**\n\t\t * number of ticks to show\n\t\t */\n\t\tnumber?: number;\n\t\t/**\n\t\t * minimum tick value\n\t\t */\n\t\tmin?: number;\n\t\t/**\n\t\t * maximum tick value\n\t\t */\n\t\tmax?: number;\n\t\t/**\n\t\t * minimum width of a tick\n\t\t * before getting rotated (in pixels)\n\t\t */\n\t\trotateIfSmallerThan?: number;\n\t\t/**\n\t\t * function to format the ticks\n\t\t */\n\t\tformatter?: Function;\n\t};\n}\n\n/**\n * customize time series scales\n */\nexport interface TimeScaleOptions {\n\taddSpaceOnEdges?: number;\n\t/**\n\t * if it's true, days are shown as mon-sun,\n\t * otherwise days are shown as number 1-31\n\t */\n\tshowDayName?: boolean;\n\t/**\n\t * formats for each time interval\n\t */\n\ttimeIntervalFormats?: TimeIntervalFormats;\n\t/**\n\t * locale object, for more information see https://date-fns.org/v2.11.0/docs/Locale.\n\t * example: `import enUSLocaleObject from \"date-fns/locale/en-US/index\"`.\n\t * available locale objects are: https://github.com/date-fns/date-fns/tree/master/src/locale\n\t */\n\tlocaleObject?: Locale;\n}\n\n/**\n * time scales: customize ticks format for different time intervals\n */\nexport interface TickFormats {\n\tprimary?: string;\n\tsecondary?: string;\n}\n\nexport interface TimeIntervalFormats {\n\t\"15seconds\"?: TickFormats;\n\tminute?: TickFormats;\n\t\"30minutes\"?: TickFormats;\n\thourly?: TickFormats;\n\tdaily?: TickFormats;\n\tweekly?: TickFormats;\n\tmonthly?: TickFormats;\n\tquarterly?: TickFormats;\n\tyearly?: TickFormats;\n}\n\n/**\n * customize the axes components\n */\nexport interface AxesOptions {\n\tleft?: AxisOptions;\n\tbottom?: AxisOptions;\n\tright?: AxisOptions;\n\ttop?: AxisOptions;\n}\n"]}
@@ -175,6 +175,7 @@ export interface PieChartOptions extends BaseChartOptions {
175
175
  export interface DonutChartOptions extends PieChartOptions {
176
176
  donut?: {
177
177
  center?: {
178
+ label?: string;
178
179
  numberFontSize?: Function;
179
180
  titleFontSize?: Function;
180
181
  titleYPosition?: Function;
@@ -1 +1 @@
1
- {"version":3,"file":"charts.js","sourceRoot":"","sources":["charts.ts"],"names":[],"mappings":"","sourcesContent":["import { LegendOptions, TooltipOptions, GridOptions, AxesOptions } from \"./index\";\nimport { AxisTooltipOptions, BarTooltipOptions, BarOptions, StackedBarOptions } from \"./components\";\n\n/**\n * Base chart options common to any chart\n */\nexport interface BaseChartOptions {\n\t/**\n\t * boolean to disable animations (enabled by default)\n\t */\n\tanimations?: boolean;\n\t/**\n\t * boolean to prevent the container from resizing\n\t */\n\tresizable?: boolean;\n\t/**\n\t * Optionally specify a width for the chart\n\t */\n\twidth?: string;\n\t/**\n\t * Optionally specify a height for the chart\n\t */\n\theight?: string;\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: TooltipOptions;\n\t/**\n\t * legend configuration\n\t */\n\tlegend?: LegendOptions;\n\t/**\n\t * Optional function to determine whether is filled based on datasetLabel, label, and/or data\n\t */\n\tgetIsFilled?: (datasetLabel: any, label?: any, data?: any, defaultFilled?: boolean) => boolean;\n\t/**\n\t * Optional function to generate the fill color based on datasetLabel, label, and/or data\n\t */\n\tgetFillColor?: (datasetLabel: any, label?: any, data?: any, defaultFillColor?: string) => string;\n\t/**\n\t * Optional function to generate the stroke color based on datasetLabel, label, and/or data\n\t */\n\tgetStrokeColor?: (datasetLabel: any, label?: any, data?: any, defaultStrokeColor?: string) => string;\n\t/**\n\t * stylesheet options\n\t */\n\tstyle?: {\n\t\t/**\n\t\t * optional prefixing string for css classes (defaults to 'cc')\n\t\t */\n\t\tprefix?: string;\n\t};\n\t/**\n\t * options related to charting data\n\t */\n\tdata?: {\n\t\t/**\n\t\t * identifier for data groups\n\t\t */\n\t\tgroupMapsTo?: string;\n\t\t/**\n\t\t * used to simulate data loading\n\t\t */\n\t\tloading?: Boolean;\n\t};\n\t/**\n\t * options related to color scales\n\t */\n\tcolor?: {\n\t\t/**\n\t\t * e.g. { \"Dataset 1\": \"blue\" }\n\t\t */\n\t\tscale?: object;\n\t};\n}\n\n/**\n * Options common to any chart with an axis\n */\nexport interface AxisChartOptions extends BaseChartOptions {\n\taxes?: AxesOptions;\n\tgrid?: GridOptions;\n\ttooltip?: AxisTooltipOptions;\n}\n\n/**\n * options specific to bar charts\n */\nexport interface BarChartOptions extends AxisChartOptions {\n\tbars?: BarOptions;\n\ttooltip?: BarTooltipOptions;\n}\n\n/**\n * options specific to stacked bar charts\n */\nexport interface StackedBarChartOptions extends BarChartOptions {\n\tbars?: StackedBarOptions;\n}\n\n/**\n * options specific to scatter charts\n */\nexport interface ScatterChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the points\n\t */\n\tpoints?: {\n\t\t/**\n\t\t * sets the radius of the point\n\t\t */\n\t\tradius: number;\n\t\tfillOpacity?: number;\n\t\tfilled?: boolean;\n\t};\n}\n\n/**\n * options specific to bubble charts\n */\nexport interface BubbleChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the individual bubbles\n\t */\n\tbubble?: {\n\t\t/**\n\t\t * the key to lookup in charting data for the bubble radius value\n\t\t */\n\t\tradiusMapsTo?: string;\n\t\t/**\n\t\t * A function that would determine the range of the bubble radius to use\n\t\t * Returns an array with the 1st value being the min and the 2nd value being the max radius\n\t\t */\n\t\tradiusRange?: Function;\n\t\t/**\n\t\t * Opacity of the fills used within each circle\n\t\t */\n\t\tfillOpacity?: number;\n\t};\n}\n\n/**\n * options specific to line charts\n */\nexport interface LineChartOptions extends ScatterChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?: string | {\n\t\tname: string;\n\t};\n}\n\n/**\n * options specific to pie charts\n */\nexport interface PieChartOptions extends BaseChartOptions {\n\tpie?: {\n\t\tradiusOffset?: number;\n\t\tinnerRadius?: number;\n\t\tpadAngle?: number;\n\t\thoverArc?: {\n\t\t\touterRadiusOffset?: number;\n\t\t};\n\t\txOffset?: number;\n\t\tyOffset?: number;\n\t\tyOffsetCallout?: number;\n\t\tcallout?: {\n\t\t\tminSliceDegree?: number;\n\t\t\toffsetX?: number,\n\t\t\toffsetY?: number;\n\t\t\thorizontalLineLength?: number;\n\t\t\ttextMargin?: number;\n\t\t},\n\t\tlabels?: {\n\t\t\tformatter?: Function;\n\t\t}\n\t};\n}\n\n\n\n/**\n * options specific to donut charts\n */\nexport interface DonutChartOptions extends PieChartOptions {\n\tdonut?: {\n\t\tcenter?: {\n\t\t\tnumberFontSize?: Function;\n\t\t\ttitleFontSize?: Function;\n\t\t\ttitleYPosition?: Function;\n\t\t\tnumberFormatter?: Function;\n\t\t};\n\t};\n}\n\n/**\n * options specific to radar charts\n */\nexport interface RadarChartOptions extends BaseChartOptions {\n\tradar?: {\n\t\topacity: {\n\t\t\tunselected: number,\n\t\t\tselected: number\n\t\t},\n\t\taxes: {\n\t\t\tangle: string,\n\t\t\tvalue: string\n\t\t}\n\t\txLabelPadding: number,\n\t\tyLabelPadding: number,\n\t\tyTicksNumber: number,\n\t\tminRange: number,\n\t\txAxisRectHeight: number,\n\t\tdotsRadius: number\n\t};\n}\n"]}
1
+ {"version":3,"file":"charts.js","sourceRoot":"","sources":["charts.ts"],"names":[],"mappings":"","sourcesContent":["import {\n\tLegendOptions,\n\tTooltipOptions,\n\tGridOptions,\n\tAxesOptions\n} from \"./index\";\nimport {\n\tAxisTooltipOptions,\n\tBarTooltipOptions,\n\tBarOptions,\n\tStackedBarOptions\n} from \"./components\";\n\n/**\n * Base chart options common to any chart\n */\nexport interface BaseChartOptions {\n\t/**\n\t * boolean to disable animations (enabled by default)\n\t */\n\tanimations?: boolean;\n\t/**\n\t * boolean to prevent the container from resizing\n\t */\n\tresizable?: boolean;\n\t/**\n\t * Optionally specify a width for the chart\n\t */\n\twidth?: string;\n\t/**\n\t * Optionally specify a height for the chart\n\t */\n\theight?: string;\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: TooltipOptions;\n\t/**\n\t * legend configuration\n\t */\n\tlegend?: LegendOptions;\n\t/**\n\t * Optional function to determine whether is filled based on datasetLabel, label, and/or data\n\t */\n\tgetIsFilled?: (\n\t\tdatasetLabel: any,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultFilled?: boolean\n\t) => boolean;\n\t/**\n\t * Optional function to generate the fill color based on datasetLabel, label, and/or data\n\t */\n\tgetFillColor?: (\n\t\tdatasetLabel: any,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultFillColor?: string\n\t) => string;\n\t/**\n\t * Optional function to generate the stroke color based on datasetLabel, label, and/or data\n\t */\n\tgetStrokeColor?: (\n\t\tdatasetLabel: any,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultStrokeColor?: string\n\t) => string;\n\t/**\n\t * stylesheet options\n\t */\n\tstyle?: {\n\t\t/**\n\t\t * optional prefixing string for css classes (defaults to 'cc')\n\t\t */\n\t\tprefix?: string;\n\t};\n\t/**\n\t * options related to charting data\n\t */\n\tdata?: {\n\t\t/**\n\t\t * identifier for data groups\n\t\t */\n\t\tgroupMapsTo?: string;\n\t\t/**\n\t\t * used to simulate data loading\n\t\t */\n\t\tloading?: Boolean;\n\t};\n\t/**\n\t * options related to color scales\n\t */\n\tcolor?: {\n\t\t/**\n\t\t * e.g. { \"Dataset 1\": \"blue\" }\n\t\t */\n\t\tscale?: object;\n\t};\n}\n\n/**\n * Options common to any chart with an axis\n */\nexport interface AxisChartOptions extends BaseChartOptions {\n\taxes?: AxesOptions;\n\tgrid?: GridOptions;\n\ttooltip?: AxisTooltipOptions;\n}\n\n/**\n * options specific to bar charts\n */\nexport interface BarChartOptions extends AxisChartOptions {\n\tbars?: BarOptions;\n\ttooltip?: BarTooltipOptions;\n}\n\n/**\n * options specific to stacked bar charts\n */\nexport interface StackedBarChartOptions extends BarChartOptions {\n\tbars?: StackedBarOptions;\n}\n\n/**\n * options specific to scatter charts\n */\nexport interface ScatterChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the points\n\t */\n\tpoints?: {\n\t\t/**\n\t\t * sets the radius of the point\n\t\t */\n\t\tradius: number;\n\t\tfillOpacity?: number;\n\t\tfilled?: boolean;\n\t};\n}\n\n/**\n * options specific to bubble charts\n */\nexport interface BubbleChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the individual bubbles\n\t */\n\tbubble?: {\n\t\t/**\n\t\t * the key to lookup in charting data for the bubble radius value\n\t\t */\n\t\tradiusMapsTo?: string;\n\t\t/**\n\t\t * A function that would determine the range of the bubble radius to use\n\t\t * Returns an array with the 1st value being the min and the 2nd value being the max radius\n\t\t */\n\t\tradiusRange?: Function;\n\t\t/**\n\t\t * Opacity of the fills used within each circle\n\t\t */\n\t\tfillOpacity?: number;\n\t};\n}\n\n/**\n * options specific to line charts\n */\nexport interface LineChartOptions extends ScatterChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n}\n\n/**\n * options specific to pie charts\n */\nexport interface PieChartOptions extends BaseChartOptions {\n\tpie?: {\n\t\tradiusOffset?: number;\n\t\tinnerRadius?: number;\n\t\tpadAngle?: number;\n\t\thoverArc?: {\n\t\t\touterRadiusOffset?: number;\n\t\t};\n\t\txOffset?: number;\n\t\tyOffset?: number;\n\t\tyOffsetCallout?: number;\n\t\tcallout?: {\n\t\t\tminSliceDegree?: number;\n\t\t\toffsetX?: number;\n\t\t\toffsetY?: number;\n\t\t\thorizontalLineLength?: number;\n\t\t\ttextMargin?: number;\n\t\t};\n\t\tlabels?: {\n\t\t\tformatter?: Function;\n\t\t};\n\t};\n}\n\n/**\n * options specific to donut charts\n */\nexport interface DonutChartOptions extends PieChartOptions {\n\tdonut?: {\n\t\tcenter?: {\n\t\t\tlabel?: string;\n\t\t\tnumberFontSize?: Function;\n\t\t\ttitleFontSize?: Function;\n\t\t\ttitleYPosition?: Function;\n\t\t\tnumberFormatter?: Function;\n\t\t};\n\t};\n}\n\n/**\n * options specific to radar charts\n */\nexport interface RadarChartOptions extends BaseChartOptions {\n\tradar?: {\n\t\topacity: {\n\t\t\tunselected: number;\n\t\t\tselected: number;\n\t\t};\n\t\taxes: {\n\t\t\tangle: string;\n\t\t\tvalue: string;\n\t\t};\n\t\txLabelPadding: number;\n\t\tyLabelPadding: number;\n\t\tyTicksNumber: number;\n\t\tminRange: number;\n\t\txAxisRectHeight: number;\n\t\tdotsRadius: number;\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"components.js","sourceRoot":"","sources":["components.ts"],"names":[],"mappings":"","sourcesContent":["import { LayoutGrowth, LegendPositions } from \"./enums\";\nimport { Component } from \"../components/component\";\n\n/**\n * customize the overlay contents\n */\nexport interface LayoutComponentChild {\n\tid: string;\n\t/**\n\t * the component that'll be rendered inside layout child\n\t */\n\tcomponents: Component[];\n\t/**\n\t * size of the layout child\n\t */\n\tsize?: number;\n\t/**\n\t * how the layout child will grow or shrink in x & y directions\n\t */\n\tgrowth?: {\n\t\tx: LayoutGrowth,\n\t\ty: LayoutGrowth\n\t};\n}\n\n\n/**\n * customize the legend component\n */\nexport interface LegendOptions {\n\tposition?: LegendPositions;\n\t/**\n\t * the clickability of legend items\n\t */\n\tclickable?: boolean;\n\t/**\n\t * is the legend visible or not\n\t */\n\tenabled?: boolean;\n\titems?: {\n\t\tstatus?: {\n\t\t\tACTIVE?: Number;\n\t\t\tDISABLED?: Number;\n\t\t};\n\t\thorizontalSpace?: Number;\n\t\tverticalSpace?: Number;\n\t\ttextYOffset?: Number;\n\t};\n\tcheckbox?: {\n\t\tradius?: Number;\n\t\tspaceAfter?: Number;\n\t};\n}\n\nexport interface TooltipOptions {\n\t/**\n\t * a function to format the tooltip values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * custom function for returning tooltip HTML\n\t * passed an array or object with the data, and then the default tooltip markup\n\t */\n\tcustomHTML?: Function;\n\t/**\n\t * options to configure the datapoint tooltip\n\t */\n\tdatapoint?: {\n\t\t/**\n\t\t * offset of the tooltip from the mouse position\n\t\t */\n\t\thorizontalOffset?: number;\n\t\t/**\n\t\t * toggles on/off datapoint tooltips.\n\t\t */\n\t\tenabled?: boolean;\n\t\t/**\n\t\t * vertical offset for tooltip placement\n\t\t */\n\t\tverticalOffset?: number\n\t};\n\ttitle?: {\n\t\t/**\n\t\t * vertical offset for title tooltip placement. < 0 shifts the tooltip above title, > 0 shifts vertically down\n\t\t */\n\t\tverticalOffset?: number\n\t\t/**\n\t\t * max width of title tooltip relative to the width of the chart-svg (percentage should be < 1)\n\t\t */\n\t\twidth?: number\n\t};\n}\n\n/**\n * Threshold options\n */\nexport interface ThresholdOptions {\n\t/**\n\t * threshold value\n\t */\n\tvalue: number | Date;\n\t/**\n\t * a function to format the threshold values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * hex threshold line color\n\t */\n\tfillColor: string;\n\t/**\n\t * threshold label\n\t */\n\tlabel: string;\n}\n\n/**\n * extends tooltip options to provide support for multiple gridline tooltips\n */\nexport interface AxisTooltipOptions extends TooltipOptions {\n\t/** options for gridline event listeners */\n\tgridline?: {\n\t\t/**\n\t\t * controls whether the gridlines are active for tooltip support\n\t\t */\n\t\tenabled?: boolean,\n\t\t/**\n\t\t * optional set threshold (value between 0 and 1) for active gridlines\n\t\t */\n\t\tthreshold?: number\n\t};\n}\n\n/**\n * extends tooltip for bar tooltip\n */\nexport interface BarTooltipOptions extends TooltipOptions {\n\tdatapoint: {\n\t\t/**\n\t\t * padding between the bar items and the tooltip\n\t\t */\n\t\tverticalOffset: number;\n\t};\n}\n\nexport interface GridOptions {\n\ty?: {\n\t\tnumberOfTicks?: number;\n\t};\n\tx?: {\n\t\tnumberOfTicks?: number;\n\t};\n\tstrokeColor?: string;\n}\n\nexport interface BarOptions {\n\twidth?: number;\n\tmaxWidth?: number;\n}\n\nexport interface StackedBarOptions extends BarOptions {\n\tdividerSize?: number;\n}\n"]}
1
+ {"version":3,"file":"components.js","sourceRoot":"","sources":["components.ts"],"names":[],"mappings":"","sourcesContent":["import { LayoutGrowth, LegendPositions } from \"./enums\";\nimport { Component } from \"../components/component\";\n\n/**\n * customize the overlay contents\n */\nexport interface LayoutComponentChild {\n\tid: string;\n\t/**\n\t * the component that'll be rendered inside layout child\n\t */\n\tcomponents: Component[];\n\t/**\n\t * size of the layout child\n\t */\n\tsize?: number;\n\t/**\n\t * how the layout child will grow or shrink in x & y directions\n\t */\n\tgrowth?: {\n\t\tx: LayoutGrowth;\n\t\ty: LayoutGrowth;\n\t};\n}\n\n/**\n * customize the legend component\n */\nexport interface LegendOptions {\n\tposition?: LegendPositions;\n\t/**\n\t * the clickability of legend items\n\t */\n\tclickable?: boolean;\n\t/**\n\t * is the legend visible or not\n\t */\n\tenabled?: boolean;\n\titems?: {\n\t\tstatus?: {\n\t\t\tACTIVE?: Number;\n\t\t\tDISABLED?: Number;\n\t\t};\n\t\thorizontalSpace?: Number;\n\t\tverticalSpace?: Number;\n\t\ttextYOffset?: Number;\n\t};\n\tcheckbox?: {\n\t\tradius?: Number;\n\t\tspaceAfter?: Number;\n\t};\n}\n\nexport interface TooltipOptions {\n\t/**\n\t * a function to format the tooltip values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * custom function for returning tooltip HTML\n\t * passed an array or object with the data, and then the default tooltip markup\n\t */\n\tcustomHTML?: Function;\n\t/**\n\t * options to configure the datapoint tooltip\n\t */\n\tdatapoint?: {\n\t\t/**\n\t\t * offset of the tooltip from the mouse position\n\t\t */\n\t\thorizontalOffset?: number;\n\t\t/**\n\t\t * toggles on/off datapoint tooltips.\n\t\t */\n\t\tenabled?: boolean;\n\t\t/**\n\t\t * vertical offset for tooltip placement\n\t\t */\n\t\tverticalOffset?: number;\n\t};\n\ttitle?: {\n\t\t/**\n\t\t * vertical offset for title tooltip placement. < 0 shifts the tooltip above title, > 0 shifts vertically down\n\t\t */\n\t\tverticalOffset?: number;\n\t\t/**\n\t\t * max width of title tooltip relative to the width of the chart-svg (percentage should be < 1)\n\t\t */\n\t\twidth?: number;\n\t};\n}\n\n/**\n * Threshold options\n */\nexport interface ThresholdOptions {\n\t/**\n\t * threshold value\n\t */\n\tvalue: number | Date;\n\t/**\n\t * a function to format the threshold values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * hex threshold line color\n\t */\n\tfillColor: string;\n\t/**\n\t * threshold label\n\t */\n\tlabel: string;\n}\n\n/**\n * extends tooltip options to provide support for multiple gridline tooltips\n */\nexport interface AxisTooltipOptions extends TooltipOptions {\n\t/** options for gridline event listeners */\n\tgridline?: {\n\t\t/**\n\t\t * controls whether the gridlines are active for tooltip support\n\t\t */\n\t\tenabled?: boolean;\n\t\t/**\n\t\t * optional set threshold (value between 0 and 1) for active gridlines\n\t\t */\n\t\tthreshold?: number;\n\t};\n}\n\n/**\n * extends tooltip for bar tooltip\n */\nexport interface BarTooltipOptions extends TooltipOptions {\n\tdatapoint: {\n\t\t/**\n\t\t * padding between the bar items and the tooltip\n\t\t */\n\t\tverticalOffset: number;\n\t};\n}\n\nexport interface GridOptions {\n\ty?: {\n\t\tnumberOfTicks?: number;\n\t};\n\tx?: {\n\t\tnumberOfTicks?: number;\n\t};\n\tstrokeColor?: string;\n}\n\nexport interface BarOptions {\n\twidth?: number;\n\tmaxWidth?: number;\n}\n\nexport interface StackedBarOptions extends BarOptions {\n\tdividerSize?: number;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"enums.js","sourceRoot":"","sources":["enums.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,UAAU,CAAC;AACvC,MAAM,CAAC,IAAM,MAAM,GAAG,UAAU,CAAC;AAEjC;;GAEG;AACH,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACrB,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,yBAAW,CAAA;AACZ,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACxB,8BAAa,CAAA;IACb,gCAAe,CAAA;IACf,4BAAW,CAAA;IACX,kCAAiB,CAAA;AAClB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAChC,8CAAqB,CAAA;IACrB,kDAAyB,CAAA;AAC1B,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACrB,2BAAa,CAAA;IACb,+BAAiB,CAAA;IACjB,yBAAW,CAAA;IACX,+BAAiB,CAAA;AAClB,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IAC1B,kCAAe,CAAA;IACf,8BAAW,CAAA;IACX,oCAAiB,CAAA;AAClB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACvB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IACrB,+BAAe,CAAA;AAChB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IAC1B,kCAAe,CAAA;IACf,gCAAa,CAAA;IACb,8BAAW,CAAA;IACX,oCAAiB,CAAA;AAClB,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC7B,+CAAyB,CAAA;IACzB,2CAAqB,CAAA;AACtB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IAC1B,8BAAW,CAAA;IACX,oCAAiB,CAAA;IACjB,8CAA2B,CAAA;IAC3B,oDAAiC,CAAA;AAClC,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACvB,+BAAe,CAAA;IACf,uCAAuB,CAAA;IACvB,mCAAmB,CAAA;AACpB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC5B,kCAAa,CAAA;IACb,oCAAe,CAAA;AAChB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACpB,0BAAa,CAAA;IACb,0CAA6B,CAAA;IAC7B,wBAAW,CAAA;IACX,4BAAe,CAAA;AAChB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACrB,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,yBAAW,CAAA;AACZ,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC3B,yCAAqB,CAAA;IACrB,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;AACpB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B","sourcesContent":["import * as EventEnums from \"./events\";\nexport const Events = EventEnums;\n\n/**\n * enum of all supported chart themes\n */\nexport enum ChartTheme {\n\tDEFAULT = \"default\",\n\tG100 = \"g100\",\n\tG90 = \"g90\",\n\tG10 = \"g10\"\n}\n\n/**\n * enum of all possible axis positions\n */\nexport enum AxisPositions {\n\tLEFT = \"left\",\n\tRIGHT = \"right\",\n\tTOP = \"top\",\n\tBOTTOM = \"bottom\"\n}\n\n/**\n * enum of all possible cartesian orientations\n * to be used for determining the orientation\n * of graphs being draw over\n * cartesian scales\n */\nexport enum CartesianOrientations {\n\tVERTICAL = \"vertical\",\n\tHORIZONTAL = \"horizontal\"\n}\n\n/**\n * enum of all possible scale types\n */\nexport enum ScaleTypes {\n\tTIME = \"time\",\n\tLINEAR = \"linear\",\n\tLOG = \"log\",\n\tLABELS = \"labels\"\n}\n\n/**\n * enum of supported tooltip position relative to\n */\nexport enum TooltipPosition {\n\tMOUSE = \"mouse\",\n\tTOP = \"top\",\n\tBOTTOM = \"bottom\"\n}\n\n/**\n * enum of tooltip types for custom tooltip event\n */\nexport enum TooltipTypes {\n\tDATAPOINT = \"datapoint\",\n\tGRIDLINE = \"gridline\",\n\tTITLE = \"title\"\n}\n\n/**\n * enum of all possible legend positions\n */\nexport enum LegendPositions {\n\tRIGHT = \"right\",\n\tLEFT = \"left\",\n\tTOP = \"top\",\n\tBOTTOM = \"bottom\"\n}\n\n/**\n * enum of all possible legend orientations\n */\nexport enum LegendOrientations {\n\tHORIZONTAL = \"horizontal\",\n\tVERTICAL = \"vertical\"\n}\n\n/**\n * enum of all possible layout directions\n */\nexport enum LayoutDirection {\n\tROW = \"row\",\n\tCOLUMN = \"column\",\n\tROW_REVERSE = \"row-reverse\",\n\tCOLUMN_REVERSE = \"column-reverse\"\n}\n\n/**\n * enum of all possible layout growth values\n */\nexport enum LayoutGrowth {\n\tFIXED = \"fixed\",\n\tPREFERRED = \"preferred\",\n\tSTRETCH = \"stretch\",\n}\n\n/**\n * enum of all possible callout directions\n */\nexport enum CalloutDirections {\n\tLEFT = \"left\",\n\tRIGHT = \"right\"\n}\n\n/**\n * enum of all possible skeleton/empty state types\n */\nexport enum Skeletons {\n\tGRID = \"grid\",\n\tVERT_OR_HORIZ = \"vertOrHoriz\",\n\tPIE = \"pie\",\n\tDONUT = \"donut\"\n}\n\n/**\n * enum of all possible attributes used to aling text horizontally\n */\nexport enum TextAnchor {\n\tSTART = \"start\",\n\tMIDDLE = \"middle\",\n\tEND = \"end\"\n}\n\n/**\n * enum of all possible attributes used to aling text vertically\n */\nexport enum DominantBaseline {\n\tBASELINE = \"baseline\",\n\tMIDDLE = \"middle\",\n\tHANGING = \"hanging\"\n}\n"]}
1
+ {"version":3,"file":"enums.js","sourceRoot":"","sources":["enums.ts"],"names":[],"mappings":"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","sourcesContent":["import * as EventEnums from \"./events\";\nexport const Events = EventEnums;\n\n/**\n * enum of all supported chart themes\n */\nexport enum ChartTheme {\n\tDEFAULT = \"default\",\n\tG100 = \"g100\",\n\tG90 = \"g90\",\n\tG10 = \"g10\"\n}\n\n/**\n * enum of all possible axis positions\n */\nexport enum AxisPositions {\n\tLEFT = \"left\",\n\tRIGHT = \"right\",\n\tTOP = \"top\",\n\tBOTTOM = \"bottom\"\n}\n\n/**\n * enum of all possible cartesian orientations\n * to be used for determining the orientation\n * of graphs being draw over\n * cartesian scales\n */\nexport enum CartesianOrientations {\n\tVERTICAL = \"vertical\",\n\tHORIZONTAL = \"horizontal\"\n}\n\n/**\n * enum of all possible scale types\n */\nexport enum ScaleTypes {\n\tTIME = \"time\",\n\tLINEAR = \"linear\",\n\tLOG = \"log\",\n\tLABELS = \"labels\"\n}\n\n/**\n * enum of supported tooltip position relative to\n */\nexport enum TooltipPosition {\n\tMOUSE = \"mouse\",\n\tTOP = \"top\",\n\tBOTTOM = \"bottom\"\n}\n\n/**\n * enum of tooltip types for custom tooltip event\n */\nexport enum TooltipTypes {\n\tDATAPOINT = \"datapoint\",\n\tGRIDLINE = \"gridline\",\n\tTITLE = \"title\"\n}\n\n/**\n * enum of all possible legend positions\n */\nexport enum LegendPositions {\n\tRIGHT = \"right\",\n\tLEFT = \"left\",\n\tTOP = \"top\",\n\tBOTTOM = \"bottom\"\n}\n\n/**\n * enum of all possible legend orientations\n */\nexport enum LegendOrientations {\n\tHORIZONTAL = \"horizontal\",\n\tVERTICAL = \"vertical\"\n}\n\n/**\n * enum of all possible layout directions\n */\nexport enum LayoutDirection {\n\tROW = \"row\",\n\tCOLUMN = \"column\",\n\tROW_REVERSE = \"row-reverse\",\n\tCOLUMN_REVERSE = \"column-reverse\"\n}\n\n/**\n * enum of all possible layout growth values\n */\nexport enum LayoutGrowth {\n\tFIXED = \"fixed\",\n\tPREFERRED = \"preferred\",\n\tSTRETCH = \"stretch\"\n}\n\n/**\n * enum of all possible callout directions\n */\nexport enum CalloutDirections {\n\tLEFT = \"left\",\n\tRIGHT = \"right\"\n}\n\n/**\n * enum of all possible skeleton/empty state types\n */\nexport enum Skeletons {\n\tGRID = \"grid\",\n\tVERT_OR_HORIZ = \"vertOrHoriz\",\n\tPIE = \"pie\",\n\tDONUT = \"donut\"\n}\n\n/**\n * enum of all possible attributes used to aling text horizontally\n */\nexport enum TextAnchor {\n\tSTART = \"start\",\n\tMIDDLE = \"middle\",\n\tEND = \"end\"\n}\n\n/**\n * enum of all possible attributes used to aling text vertically\n */\nexport enum DominantBaseline {\n\tBASELINE = \"baseline\",\n\tMIDDLE = \"middle\",\n\tHANGING = \"hanging\"\n}\n"]}
package/model.js CHANGED
@@ -71,15 +71,15 @@ var ChartModel = /** @class */ (function () {
71
71
  var groupMapsTo = this.getOptions().data.groupMapsTo;
72
72
  displayData.map(function (datum) {
73
73
  var group = datum[groupMapsTo];
74
- if (groupedData[group] !== null && groupedData[group] !== undefined) {
74
+ if (groupedData[group] !== null &&
75
+ groupedData[group] !== undefined) {
75
76
  groupedData[group].push(datum);
76
77
  }
77
78
  else {
78
79
  groupedData[group] = [datum];
79
80
  }
80
81
  });
81
- return Object.keys(groupedData)
82
- .map(function (groupName) { return ({
82
+ return Object.keys(groupedData).map(function (groupName) { return ({
83
83
  name: groupName,
84
84
  data: groupedData[groupName]
85
85
  }); });
@@ -96,10 +96,12 @@ var ChartModel = /** @class */ (function () {
96
96
  var correspondingValues = { sharedStackKey: key };
97
97
  dataGroupNames.forEach(function (dataGroupName) {
98
98
  var correspondingDatum = displayData.find(function (datum) {
99
- return datum[groupMapsTo] === dataGroupName &&
100
- datum[domainIdentifier].toString() === key;
99
+ return (datum[groupMapsTo] === dataGroupName &&
100
+ datum[domainIdentifier].toString() === key);
101
101
  });
102
- correspondingValues[dataGroupName] = correspondingDatum ? correspondingDatum[rangeIdentifier] : null;
102
+ correspondingValues[dataGroupName] = correspondingDatum
103
+ ? correspondingDatum[rangeIdentifier]
104
+ : null;
103
105
  });
104
106
  return correspondingValues;
105
107
  });
@@ -109,7 +111,8 @@ var ChartModel = /** @class */ (function () {
109
111
  var groupMapsTo = options.data.groupMapsTo;
110
112
  var dataGroupNames = this.getDataGroupNames();
111
113
  var dataValuesGroupedByKeys = this.getDataValuesGroupedByKeys();
112
- return stack().keys(dataGroupNames)(dataValuesGroupedByKeys)
114
+ return stack()
115
+ .keys(dataGroupNames)(dataValuesGroupedByKeys)
113
116
  .map(function (series, i) {
114
117
  // Add data group names to each series
115
118
  return Object.keys(series)
@@ -169,7 +172,7 @@ var ChartModel = /** @class */ (function () {
169
172
  };
170
173
  /*
171
174
  * Data labels
172
- */
175
+ */
173
176
  ChartModel.prototype.toggleDataLabel = function (changedLabel) {
174
177
  var _a = Configuration.legend.items.status, ACTIVE = _a.ACTIVE, DISABLED = _a.DISABLED;
175
178
  var dataGroups = this.getDataGroups();
@@ -179,7 +182,8 @@ var ChartModel = /** @class */ (function () {
179
182
  if (hasDeactivatedItems) {
180
183
  // If the only active item is being toggled
181
184
  // Activate all items
182
- if (activeItems.length === 1 && activeItems[0].name === changedLabel) {
185
+ if (activeItems.length === 1 &&
186
+ activeItems[0].name === changedLabel) {
183
187
  // If every item is active, then enable "changedLabel" and disable all other items
184
188
  dataGroups.forEach(function (group, i) {
185
189
  dataGroups[i].status = ACTIVE;
@@ -187,13 +191,17 @@ var ChartModel = /** @class */ (function () {
187
191
  }
188
192
  else {
189
193
  var indexToChange = dataGroups.findIndex(function (group) { return group.name === changedLabel; });
190
- dataGroups[indexToChange].status = dataGroups[indexToChange].status === DISABLED ? ACTIVE : DISABLED;
194
+ dataGroups[indexToChange].status =
195
+ dataGroups[indexToChange].status === DISABLED
196
+ ? ACTIVE
197
+ : DISABLED;
191
198
  }
192
199
  }
193
200
  else {
194
201
  // If every item is active, then enable "changedLabel" and disable all other items
195
202
  dataGroups.forEach(function (group, i) {
196
- dataGroups[i].status = (group.name === changedLabel ? ACTIVE : DISABLED);
203
+ dataGroups[i].status =
204
+ group.name === changedLabel ? ACTIVE : DISABLED;
197
205
  });
198
206
  }
199
207
  // dispatch legend filtering event with the status of all the dataLabels
@@ -298,7 +306,7 @@ var ChartModel = /** @class */ (function () {
298
306
  };
299
307
  /*
300
308
  * Data groups
301
- */
309
+ */
302
310
  ChartModel.prototype.updateAllDataGroups = function () {
303
311
  // allDataGroups is used to generate a color scale that applies
304
312
  // to all the groups. Now when the data updates, you might remove a group,
@@ -332,14 +340,16 @@ var ChartModel = /** @class */ (function () {
332
340
  };
333
341
  /*
334
342
  * Fill scales
335
- */
343
+ */
336
344
  ChartModel.prototype.setColorScale = function () {
337
345
  var defaultColors = colorPalettes.DEFAULT;
338
346
  var options = this.getOptions();
339
347
  var userProvidedScale = Tools.getProperty(options, "color", "scale");
340
348
  // If there is no valid user provided scale, use the default set of colors
341
- if (userProvidedScale === null || Object.keys(userProvidedScale).length === 0) {
342
- this.colorScale = scaleOrdinal().range(defaultColors)
349
+ if (userProvidedScale === null ||
350
+ Object.keys(userProvidedScale).length === 0) {
351
+ this.colorScale = scaleOrdinal()
352
+ .range(defaultColors)
343
353
  .domain(this.allDataGroups);
344
354
  return;
345
355
  }
@@ -364,7 +374,8 @@ var ChartModel = /** @class */ (function () {
364
374
  colorIndex++;
365
375
  }
366
376
  });
367
- this.colorScale = scaleOrdinal().range(colorRange)
377
+ this.colorScale = scaleOrdinal()
378
+ .range(colorRange)
368
379
  .domain(this.allDataGroups);
369
380
  };
370
381
  return ChartModel;