@carbon/charts 0.41.6 → 0.41.11

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 (102) hide show
  1. package/CHANGELOG.md +51 -27
  2. package/build/demo/data/index.d.ts +5 -0
  3. package/build/demo/data/line.d.ts +3 -0
  4. package/build/demo/data/lollipop.d.ts +39 -0
  5. package/build/demo/data/step.d.ts +78 -4
  6. package/build/demo/data/time-series-axis.d.ts +48 -0
  7. package/build/src/axis-chart.d.ts +1 -1
  8. package/build/src/chart.d.ts +1 -1
  9. package/build/src/charts/index.d.ts +1 -0
  10. package/build/src/charts/lollipop.d.ts +6 -0
  11. package/build/src/components/graphs/lollipop.d.ts +9 -0
  12. package/build/src/components/graphs/scatter.d.ts +2 -0
  13. package/build/src/components/index.d.ts +1 -0
  14. package/build/src/configuration.d.ts +2 -1
  15. package/build/src/interfaces/charts.d.ts +5 -0
  16. package/build/src/interfaces/model.d.ts +2 -1
  17. package/build/stories/tutorials/combo-charts.d.ts +4 -0
  18. package/build/stories/tutorials/index.d.ts +1 -0
  19. package/bundle.js +1 -1
  20. package/charts/bar-stacked.js.map +1 -1
  21. package/charts/combo.js +29 -8
  22. package/charts/combo.js.map +1 -1
  23. package/charts/index.d.ts +1 -0
  24. package/charts/index.js +1 -0
  25. package/charts/index.js.map +1 -1
  26. package/charts/lollipop.d.ts +6 -0
  27. package/charts/lollipop.js +50 -0
  28. package/charts/lollipop.js.map +1 -0
  29. package/charts/treemap.js.map +1 -1
  30. package/components/axes/axis.js.map +1 -1
  31. package/components/axes/ruler.js.map +1 -1
  32. package/components/axes/two-dimensional-axes.js.map +1 -1
  33. package/components/axes/zero-line.js.map +1 -1
  34. package/components/component.js.map +1 -1
  35. package/components/essentials/legend.js +3 -3
  36. package/components/essentials/legend.js.map +1 -1
  37. package/components/essentials/tooltip-axis.js +5 -2
  38. package/components/essentials/tooltip-axis.js.map +1 -1
  39. package/components/essentials/tooltip.js.map +1 -1
  40. package/components/graphs/area-stacked.js +7 -3
  41. package/components/graphs/area-stacked.js.map +1 -1
  42. package/components/graphs/area.js +1 -3
  43. package/components/graphs/area.js.map +1 -1
  44. package/components/graphs/bar-grouped.js +1 -2
  45. package/components/graphs/bar-grouped.js.map +1 -1
  46. package/components/graphs/bar-simple.js.map +1 -1
  47. package/components/graphs/bar-stacked.js +4 -2
  48. package/components/graphs/bar-stacked.js.map +1 -1
  49. package/components/graphs/bubble.js +1 -1
  50. package/components/graphs/bubble.js.map +1 -1
  51. package/components/graphs/line.js +8 -4
  52. package/components/graphs/line.js.map +1 -1
  53. package/components/graphs/lollipop.d.ts +9 -0
  54. package/components/graphs/lollipop.js +119 -0
  55. package/components/graphs/lollipop.js.map +1 -0
  56. package/components/graphs/scatter-stacked.js +14 -4
  57. package/components/graphs/scatter-stacked.js.map +1 -1
  58. package/components/graphs/scatter.d.ts +2 -0
  59. package/components/graphs/scatter.js +28 -18
  60. package/components/graphs/scatter.js.map +1 -1
  61. package/components/graphs/skeleton-lines.js.map +1 -1
  62. package/components/index.d.ts +1 -0
  63. package/components/index.js +1 -0
  64. package/components/index.js.map +1 -1
  65. package/configuration.d.ts +2 -1
  66. package/configuration.js +6 -1
  67. package/configuration.js.map +1 -1
  68. package/demo/data/area.js.map +1 -1
  69. package/demo/data/bubble.js.map +1 -1
  70. package/demo/data/bundle.js +1 -1
  71. package/demo/data/combo.js +11 -38
  72. package/demo/data/combo.js.map +1 -1
  73. package/demo/data/index.d.ts +5 -0
  74. package/demo/data/index.js +21 -0
  75. package/demo/data/index.js.map +1 -1
  76. package/demo/data/line.d.ts +3 -0
  77. package/demo/data/line.js +4 -3
  78. package/demo/data/line.js.map +1 -1
  79. package/demo/data/lollipop.d.ts +39 -0
  80. package/demo/data/lollipop.js +37 -0
  81. package/demo/data/lollipop.js.map +1 -0
  82. package/demo/data/step.d.ts +78 -4
  83. package/demo/data/step.js +4 -5
  84. package/demo/data/step.js.map +1 -1
  85. package/demo/data/time-series-axis.d.ts +48 -0
  86. package/demo/data/time-series-axis.js +48 -0
  87. package/demo/data/time-series-axis.js.map +1 -1
  88. package/demo/data/zoom-bar.js.map +1 -1
  89. package/demo/tsconfig.tsbuildinfo +134 -122
  90. package/interfaces/charts.d.ts +5 -0
  91. package/interfaces/charts.js.map +1 -1
  92. package/interfaces/model.d.ts +2 -1
  93. package/interfaces/model.js.map +1 -1
  94. package/model-cartesian-charts.js.map +1 -1
  95. package/model.js +3 -1
  96. package/model.js.map +1 -1
  97. package/package.json +1 -1
  98. package/services/scales-cartesian.js +44 -21
  99. package/services/scales-cartesian.js.map +1 -1
  100. package/styles/color-palatte.scss +12 -8
  101. package/styles/colors.scss +4 -4
  102. package/tsconfig.tsbuildinfo +80 -35
@@ -126,7 +126,7 @@
126
126
  "signature": "1c93a4a4302316313fdc8aeda3003738ffdc57df20fe88262fd15eaba01d0059"
127
127
  },
128
128
  "../../demo/data/area.ts": {
129
- "version": "57ee4cccafb883eb19741f69505cc555da9a8714aa3050939f1f79ab0e149522",
129
+ "version": "f9f2a1b854122b6980a62d711238a505aa9823789a1f939f041aa95265ec4dfa",
130
130
  "signature": "33d4700c2b9022175628f57f14ab2fa706f250a1daeea865aa22d58781d07a10"
131
131
  },
132
132
  "../../../../node_modules/date-fns/typings.d.ts": {
@@ -270,15 +270,15 @@
270
270
  "signature": "ff07d0e1e23dcc09b7868c330f7d1a554357c1ed2ec211b90dc4f4fbc406cd77"
271
271
  },
272
272
  "../../demo/data/line.ts": {
273
- "version": "c4639a1e2fa103f2e2ee496b56a22faf195cbb3e541c3185bd753847b90d516f",
274
- "signature": "af7df16b55b1b8fdd9d99ce72d0d58b4d8ff21e9d94daf25e1153fadfdf5c1eb"
273
+ "version": "4c465cf62fba5f509b8f9182e5ce215502f09ed3cabb0df79f8d4cbbab6eadef",
274
+ "signature": "57c6d2a52167ae95aafc4f69ef19c192627645aad38a2df639bca9377c8dbbae"
275
275
  },
276
276
  "../../demo/data/bubble.ts": {
277
- "version": "66d0eb8123de07a93eb163e022828dff3f2d89393bb7c7f07192f6f5702e7e96",
277
+ "version": "b0a3e3de135e3a87d7312d46f59bda8ff2ebb3346c17cabed46dcc8829078c3a",
278
278
  "signature": "5f971e9544c4c5f5f7c2b82e997d49bfb78c1834bbab909f0a21c5dace641fef"
279
279
  },
280
280
  "../../demo/data/combo.ts": {
281
- "version": "b1a3fd3f8242d284419c1b82849f7c90469e5a22d9a27802ec501ea62b963cd7",
281
+ "version": "1ca2822c04d02f6070ddaf7feb9993f4ee6666b3c76072bc7bf6808caf81e796",
282
282
  "signature": "583cae8e773853f15b7cd55ed5c22add2297835db7064907443375bd05a73c9e"
283
283
  },
284
284
  "../../demo/data/pie.ts": {
@@ -297,6 +297,46 @@
297
297
  "version": "bc09b3c05abc5e11bd04462effc9331b0abe6387584a3abd4d1257c966aa0f6b",
298
298
  "signature": "ba75251ed87a975de056888aae9cb16925229cb70f38b8ab39d411549a165078"
299
299
  },
300
+ "../../demo/data/step.ts": {
301
+ "version": "ac60fb64cde3ba513be0d04008a706f975eff87238753c9289b5feb5c6407bac",
302
+ "signature": "0af934e6ddb54e11efc9767f7ac3d86d38e37ec17f6d8dbba0d698f5c6382b1e"
303
+ },
304
+ "../../../../node_modules/date-fns/locale/fr/index.d.ts": {
305
+ "version": "3e31fb44c1f21304f598fc4c6321bb52aa248a94eae915b48c8bec58b55b42e5",
306
+ "signature": "3e31fb44c1f21304f598fc4c6321bb52aa248a94eae915b48c8bec58b55b42e5"
307
+ },
308
+ "../../demo/data/time-series-axis.ts": {
309
+ "version": "558991171fa88ad2b6de42bd3a41d6b770ee54fb7ac47b6e2e8b75e4e5ab351d",
310
+ "signature": "f9e50523c7e40a538d82d8ea5aa541c4031cba143ca4355f6c99efd344c87484"
311
+ },
312
+ "../../demo/data/zoom-bar.ts": {
313
+ "version": "6eca5ec627c8f946389f48ee0acc93c499d84f22821c416903f5e0bf8c61828b",
314
+ "signature": "aab7e0b102bce0f619c8d1be40e2ff43833934e498c1dc0c12822f166209483b"
315
+ },
316
+ "../../demo/data/high-scale.ts": {
317
+ "version": "d633dc28c5bf64ad1ae593abae6794c90996ebe8a4692d872849db2e99f69da2",
318
+ "signature": "870dd81d6d88d8f2bee2361e9252854a7e439de4460eddf57fe246942254d6bf"
319
+ },
320
+ "../../demo/data/lollipop.ts": {
321
+ "version": "79b8e4dfa4820fa84295734b1753c2579b30905aa1bd529f70b1d19d8aa8fdeb",
322
+ "signature": "99a070f9cdcdd7d94f2287f3c742f60aa9210b8194a61b2ee10763caf7fdb09d"
323
+ },
324
+ "../../demo/data/meter.ts": {
325
+ "version": "9c2df3cdf43bafc5e2ef8eb339111687ef43e300d010d9c7f92f971bb0e62a20",
326
+ "signature": "6136c70db6771f57b05b4eeeedaa08fa78779c707aa8d314cc656ba701136802"
327
+ },
328
+ "../../demo/data/radar.ts": {
329
+ "version": "9ecc1104c4bbc8e034ddad400566f66b7a7b496a1d0823b9b31b9b440929c9b0",
330
+ "signature": "4e3028065721d5acb0219b187447883885db7ae87f2af64be3fc8b91f1d24f27"
331
+ },
332
+ "../../demo/data/treemap.ts": {
333
+ "version": "ff345ac73f8c13583cee2f85aa127acc5288af67c6bf6e9bc64f3ed55697995c",
334
+ "signature": "953f0c6eacdabbbc75e4f119fcc0a4eb2003671e6b6560cfea8ec80fe37fc0eb"
335
+ },
336
+ "../../demo/data/toolbar.ts": {
337
+ "version": "94e5bf70b834adc577d8c6ec288bf14cb72bb9357e4da0132c2abaa482836761",
338
+ "signature": "366baf83310f18e4bf48cc82c3df5df4c8754adf1bbdcbbbf67554073e2663ff"
339
+ },
300
340
  "../../src/interfaces/a11y.ts": {
301
341
  "version": "95edee9e66eb5c6dd0060018df015a4a079945b22b2b5788573094ea68a928be",
302
342
  "signature": "95edee9e66eb5c6dd0060018df015a4a079945b22b2b5788573094ea68a928be"
@@ -330,16 +370,16 @@
330
370
  "signature": "c8f6914fe20a169c25a1390b2a1593a01b7947e645da8ccaa867ae88991d7cc7"
331
371
  },
332
372
  "../../src/interfaces/charts.ts": {
333
- "version": "10fc53974b83ff25e1781fca203841659fe598d0c1006571ae0ff0f5b400937e",
334
- "signature": "10fc53974b83ff25e1781fca203841659fe598d0c1006571ae0ff0f5b400937e"
373
+ "version": "9789fdfb6c48cc2f06d6be91d4ef6e7949b886098220627a7c6567d72f1102c3",
374
+ "signature": "9789fdfb6c48cc2f06d6be91d4ef6e7949b886098220627a7c6567d72f1102c3"
335
375
  },
336
376
  "../../src/interfaces/layout.ts": {
337
377
  "version": "4d474058b20e782a7d01c499c6e5871a95dee4cbc1eed7d601e5cb246d3308d0",
338
378
  "signature": "4d474058b20e782a7d01c499c6e5871a95dee4cbc1eed7d601e5cb246d3308d0"
339
379
  },
340
380
  "../../src/interfaces/model.ts": {
341
- "version": "63a7aaa1d088a6145db13f8ff170d2cd16314ac1cf7903ecd3ed368829fede2f",
342
- "signature": "63a7aaa1d088a6145db13f8ff170d2cd16314ac1cf7903ecd3ed368829fede2f"
381
+ "version": "a028b51e05e7e58ae6d13928c409ab2dc1c09ad6e89648bcbc6b5dece0a18f39",
382
+ "signature": "a028b51e05e7e58ae6d13928c409ab2dc1c09ad6e89648bcbc6b5dece0a18f39"
343
383
  },
344
384
  "../../src/interfaces/index.ts": {
345
385
  "version": "76155b4beaf0aa54eb99042bf954e56d47f803147ea42fefb4758e39f222b3d6",
@@ -349,45 +389,9 @@
349
389
  "version": "76de9e764ad83530ad26f834b611ad4394e965ea07ab468bcdd14a640627b3ac",
350
390
  "signature": "76de9e764ad83530ad26f834b611ad4394e965ea07ab468bcdd14a640627b3ac"
351
391
  },
352
- "../../demo/data/step.ts": {
353
- "version": "d251a1aec312e986930f31622c4e98bedb8eedc84c5540997ff43432956a0eaf",
354
- "signature": "b1399f445323373592cbf194c69c3d021b7d8023fec0fad4f955cfa2fa25ce7c"
355
- },
356
- "../../../../node_modules/date-fns/locale/fr/index.d.ts": {
357
- "version": "3e31fb44c1f21304f598fc4c6321bb52aa248a94eae915b48c8bec58b55b42e5",
358
- "signature": "3e31fb44c1f21304f598fc4c6321bb52aa248a94eae915b48c8bec58b55b42e5"
359
- },
360
- "../../demo/data/time-series-axis.ts": {
361
- "version": "deccb62d12889ba5f676a0a6c81f46041107423074995c349c6f1d7b7e17efcc",
362
- "signature": "70068f32df389c3215e3b16f8efea26c189b3ccc340c9b1070bcdea3baeb20f9"
363
- },
364
- "../../demo/data/zoom-bar.ts": {
365
- "version": "11f42465706f1e98cd1c3ae9f491d9c98f910868d16d02dbb622793835e7fbfe",
366
- "signature": "aab7e0b102bce0f619c8d1be40e2ff43833934e498c1dc0c12822f166209483b"
367
- },
368
- "../../demo/data/high-scale.ts": {
369
- "version": "d633dc28c5bf64ad1ae593abae6794c90996ebe8a4692d872849db2e99f69da2",
370
- "signature": "870dd81d6d88d8f2bee2361e9252854a7e439de4460eddf57fe246942254d6bf"
371
- },
372
- "../../demo/data/meter.ts": {
373
- "version": "9c2df3cdf43bafc5e2ef8eb339111687ef43e300d010d9c7f92f971bb0e62a20",
374
- "signature": "6136c70db6771f57b05b4eeeedaa08fa78779c707aa8d314cc656ba701136802"
375
- },
376
- "../../demo/data/radar.ts": {
377
- "version": "9ecc1104c4bbc8e034ddad400566f66b7a7b496a1d0823b9b31b9b440929c9b0",
378
- "signature": "4e3028065721d5acb0219b187447883885db7ae87f2af64be3fc8b91f1d24f27"
379
- },
380
- "../../demo/data/treemap.ts": {
381
- "version": "ff345ac73f8c13583cee2f85aa127acc5288af67c6bf6e9bc64f3ed55697995c",
382
- "signature": "953f0c6eacdabbbc75e4f119fcc0a4eb2003671e6b6560cfea8ec80fe37fc0eb"
383
- },
384
- "../../demo/data/toolbar.ts": {
385
- "version": "94e5bf70b834adc577d8c6ec288bf14cb72bb9357e4da0132c2abaa482836761",
386
- "signature": "366baf83310f18e4bf48cc82c3df5df4c8754adf1bbdcbbbf67554073e2663ff"
387
- },
388
392
  "../../demo/data/index.ts": {
389
- "version": "a0aeb42b9ad749d0b1f6de2cd68571bc7bd0b09acf33816ceefbc984d37953d4",
390
- "signature": "ab535c6de6b022db445a21f08f50ccaab8ee5a14c1b852f6cef9d545c2ff3847"
393
+ "version": "a0803265bb4e09f653c175c870b3e619beb96e82057b56bf89479a92d6bb4c07",
394
+ "signature": "3a504a2efb5bc4b7530422e808b528f273f6e306346429b3d0a7dba89dceb406"
391
395
  },
392
396
  "../../node_modules/@types/node/globals.d.ts": {
393
397
  "version": "6cf62fbc792aa81fa62f99dab5cc692c5315ecd5da09dd35f1ccc82778c4d5bc",
@@ -1180,192 +1184,198 @@
1180
1184
  "../../node_modules/@types/node/util.d.ts",
1181
1185
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1182
1186
  ],
1183
- "../../src/interfaces/a11y.ts": [
1187
+ "../../demo/data/step.ts": [
1188
+ "../../demo/data/line.ts",
1184
1189
  "../../../../node_modules/date-fns/typings.d.ts",
1185
1190
  "../../node_modules/@types/node/fs.d.ts",
1186
1191
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1187
1192
  "../../node_modules/@types/node/util.d.ts",
1188
1193
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1189
1194
  ],
1190
- "../../src/interfaces/events.ts": [
1195
+ "../../../../node_modules/date-fns/locale/fr/index.d.ts": [
1191
1196
  "../../../../node_modules/date-fns/typings.d.ts",
1192
1197
  "../../node_modules/@types/node/fs.d.ts",
1193
1198
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1194
1199
  "../../node_modules/@types/node/util.d.ts",
1195
1200
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1196
1201
  ],
1197
- "../../src/interfaces/enums.ts": [
1198
- "../interfaces/events.d.ts",
1202
+ "../../demo/data/time-series-axis.ts": [
1199
1203
  "../../../../node_modules/date-fns/typings.d.ts",
1200
1204
  "../../node_modules/@types/node/fs.d.ts",
1201
1205
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1202
1206
  "../../node_modules/@types/node/util.d.ts",
1203
1207
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1204
1208
  ],
1205
- "../../src/model.ts": [
1206
- "../interfaces/index.d.ts",
1209
+ "../../demo/data/zoom-bar.ts": [
1210
+ "../../demo/data/area.ts",
1211
+ "../../demo/data/bar.ts",
1212
+ "../../demo/data/bubble.ts",
1213
+ "../../demo/data/line.ts",
1214
+ "../../demo/data/scatter.ts",
1215
+ "../../demo/data/step.ts",
1216
+ "../../demo/data/time-series-axis.ts",
1207
1217
  "../../../../node_modules/date-fns/typings.d.ts",
1208
1218
  "../../node_modules/@types/node/fs.d.ts",
1209
1219
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1210
1220
  "../../node_modules/@types/node/util.d.ts",
1211
1221
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1212
1222
  ],
1213
- "../../src/components/component.ts": [
1214
- "../model.d.ts",
1223
+ "../../demo/data/high-scale.ts": [
1224
+ "../../demo/data/zoom-bar.ts",
1225
+ "../../demo/data/line.ts",
1215
1226
  "../../../../node_modules/date-fns/typings.d.ts",
1216
1227
  "../../node_modules/@types/node/fs.d.ts",
1217
1228
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1218
1229
  "../../node_modules/@types/node/util.d.ts",
1219
1230
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1220
1231
  ],
1221
- "../../src/interfaces/truncation.ts": [
1232
+ "../../demo/data/lollipop.ts": [
1222
1233
  "../../../../node_modules/date-fns/typings.d.ts",
1223
1234
  "../../node_modules/@types/node/fs.d.ts",
1224
1235
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1225
1236
  "../../node_modules/@types/node/util.d.ts",
1226
1237
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1227
1238
  ],
1228
- "../../src/interfaces/components.ts": [
1229
- "../interfaces/enums.d.ts",
1230
- "../components/component.d.ts",
1231
- "../interfaces/truncation.d.ts",
1239
+ "../../demo/data/meter.ts": [
1232
1240
  "../../../../node_modules/date-fns/typings.d.ts",
1233
1241
  "../../node_modules/@types/node/fs.d.ts",
1234
1242
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1235
1243
  "../../node_modules/@types/node/util.d.ts",
1236
1244
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1237
1245
  ],
1238
- "../../src/interfaces/axis-scales.ts": [
1239
- "../interfaces/enums.d.ts",
1240
- "../../../../node_modules/@types/d3/index.d.ts",
1246
+ "../../demo/data/radar.ts": [
1241
1247
  "../../../../node_modules/date-fns/typings.d.ts",
1242
- "../interfaces/components.d.ts",
1243
- "../interfaces/truncation.d.ts",
1244
1248
  "../../node_modules/@types/node/fs.d.ts",
1245
1249
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1246
1250
  "../../node_modules/@types/node/util.d.ts",
1247
1251
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1248
1252
  ],
1249
- "../../src/interfaces/charts.ts": [
1250
- "../interfaces/enums.d.ts",
1251
- "../interfaces/index.d.ts",
1252
- "../interfaces/components.d.ts",
1253
- "../interfaces/axis-scales.d.ts",
1253
+ "../../demo/data/treemap.ts": [
1254
1254
  "../../../../node_modules/date-fns/typings.d.ts",
1255
1255
  "../../node_modules/@types/node/fs.d.ts",
1256
1256
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1257
1257
  "../../node_modules/@types/node/util.d.ts",
1258
1258
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1259
1259
  ],
1260
- "../../src/interfaces/layout.ts": [
1261
- "../interfaces/enums.d.ts",
1260
+ "../../demo/data/toolbar.ts": [
1261
+ "../../demo/data/bar.ts",
1262
+ "../../demo/data/line.ts",
1262
1263
  "../../../../node_modules/date-fns/typings.d.ts",
1263
1264
  "../../node_modules/@types/node/fs.d.ts",
1264
1265
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1265
1266
  "../../node_modules/@types/node/util.d.ts",
1266
1267
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1267
1268
  ],
1268
- "../../src/interfaces/model.ts": [
1269
- "../interfaces/charts.d.ts",
1269
+ "../../src/interfaces/a11y.ts": [
1270
1270
  "../../../../node_modules/date-fns/typings.d.ts",
1271
1271
  "../../node_modules/@types/node/fs.d.ts",
1272
1272
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1273
1273
  "../../node_modules/@types/node/util.d.ts",
1274
1274
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1275
1275
  ],
1276
- "../../src/interfaces/index.ts": [
1277
- "../interfaces/a11y.d.ts",
1278
- "../interfaces/axis-scales.d.ts",
1279
- "../interfaces/charts.d.ts",
1280
- "../interfaces/components.d.ts",
1281
- "../interfaces/enums.d.ts",
1282
- "../interfaces/layout.d.ts",
1283
- "../interfaces/model.d.ts",
1276
+ "../../src/interfaces/events.ts": [
1284
1277
  "../../../../node_modules/date-fns/typings.d.ts",
1285
1278
  "../../node_modules/@types/node/fs.d.ts",
1286
1279
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1287
1280
  "../../node_modules/@types/node/util.d.ts",
1288
1281
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1289
1282
  ],
1290
- "../../src/tools.ts": [
1283
+ "../../src/interfaces/enums.ts": [
1284
+ "../interfaces/events.d.ts",
1285
+ "../../../../node_modules/date-fns/typings.d.ts",
1286
+ "../../node_modules/@types/node/fs.d.ts",
1287
+ "../../node_modules/@types/node/ts3.2/fs.d.ts",
1288
+ "../../node_modules/@types/node/util.d.ts",
1289
+ "../../node_modules/@types/node/ts3.2/util.d.ts"
1290
+ ],
1291
+ "../../src/model.ts": [
1291
1292
  "../interfaces/index.d.ts",
1292
- "../../../../node_modules/@types/d3/index.d.ts",
1293
1293
  "../../../../node_modules/date-fns/typings.d.ts",
1294
1294
  "../../node_modules/@types/node/fs.d.ts",
1295
1295
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1296
1296
  "../../node_modules/@types/node/util.d.ts",
1297
1297
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1298
1298
  ],
1299
- "../../demo/data/step.ts": [
1300
- "../tools.d.ts",
1301
- "../../demo/data/line.ts",
1299
+ "../../src/components/component.ts": [
1300
+ "../model.d.ts",
1302
1301
  "../../../../node_modules/date-fns/typings.d.ts",
1303
1302
  "../../node_modules/@types/node/fs.d.ts",
1304
1303
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1305
1304
  "../../node_modules/@types/node/util.d.ts",
1306
1305
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1307
1306
  ],
1308
- "../../../../node_modules/date-fns/locale/fr/index.d.ts": [
1307
+ "../../src/interfaces/truncation.ts": [
1309
1308
  "../../../../node_modules/date-fns/typings.d.ts",
1310
1309
  "../../node_modules/@types/node/fs.d.ts",
1311
1310
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1312
1311
  "../../node_modules/@types/node/util.d.ts",
1313
1312
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1314
1313
  ],
1315
- "../../demo/data/time-series-axis.ts": [
1314
+ "../../src/interfaces/components.ts": [
1315
+ "../interfaces/enums.d.ts",
1316
+ "../components/component.d.ts",
1317
+ "../interfaces/truncation.d.ts",
1316
1318
  "../../../../node_modules/date-fns/typings.d.ts",
1317
1319
  "../../node_modules/@types/node/fs.d.ts",
1318
1320
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1319
1321
  "../../node_modules/@types/node/util.d.ts",
1320
1322
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1321
1323
  ],
1322
- "../../demo/data/zoom-bar.ts": [
1323
- "../../demo/data/area.ts",
1324
- "../../demo/data/bar.ts",
1325
- "../../demo/data/bubble.ts",
1326
- "../../demo/data/line.ts",
1327
- "../../demo/data/scatter.ts",
1328
- "../../demo/data/step.ts",
1329
- "../../demo/data/time-series-axis.ts",
1324
+ "../../src/interfaces/axis-scales.ts": [
1325
+ "../interfaces/enums.d.ts",
1326
+ "../../../../node_modules/@types/d3/index.d.ts",
1330
1327
  "../../../../node_modules/date-fns/typings.d.ts",
1328
+ "../interfaces/components.d.ts",
1329
+ "../interfaces/truncation.d.ts",
1331
1330
  "../../node_modules/@types/node/fs.d.ts",
1332
1331
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1333
1332
  "../../node_modules/@types/node/util.d.ts",
1334
1333
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1335
1334
  ],
1336
- "../../demo/data/high-scale.ts": [
1337
- "../../demo/data/zoom-bar.ts",
1338
- "../../demo/data/line.ts",
1335
+ "../../src/interfaces/charts.ts": [
1336
+ "../interfaces/enums.d.ts",
1337
+ "../interfaces/index.d.ts",
1338
+ "../interfaces/components.d.ts",
1339
+ "../interfaces/axis-scales.d.ts",
1339
1340
  "../../../../node_modules/date-fns/typings.d.ts",
1340
1341
  "../../node_modules/@types/node/fs.d.ts",
1341
1342
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1342
1343
  "../../node_modules/@types/node/util.d.ts",
1343
1344
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1344
1345
  ],
1345
- "../../demo/data/meter.ts": [
1346
+ "../../src/interfaces/layout.ts": [
1347
+ "../interfaces/enums.d.ts",
1346
1348
  "../../../../node_modules/date-fns/typings.d.ts",
1347
1349
  "../../node_modules/@types/node/fs.d.ts",
1348
1350
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1349
1351
  "../../node_modules/@types/node/util.d.ts",
1350
1352
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1351
1353
  ],
1352
- "../../demo/data/radar.ts": [
1354
+ "../../src/interfaces/model.ts": [
1355
+ "../interfaces/charts.d.ts",
1353
1356
  "../../../../node_modules/date-fns/typings.d.ts",
1354
1357
  "../../node_modules/@types/node/fs.d.ts",
1355
1358
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1356
1359
  "../../node_modules/@types/node/util.d.ts",
1357
1360
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1358
1361
  ],
1359
- "../../demo/data/treemap.ts": [
1362
+ "../../src/interfaces/index.ts": [
1363
+ "../interfaces/a11y.d.ts",
1364
+ "../interfaces/axis-scales.d.ts",
1365
+ "../interfaces/charts.d.ts",
1366
+ "../interfaces/components.d.ts",
1367
+ "../interfaces/enums.d.ts",
1368
+ "../interfaces/layout.d.ts",
1369
+ "../interfaces/model.d.ts",
1360
1370
  "../../../../node_modules/date-fns/typings.d.ts",
1361
1371
  "../../node_modules/@types/node/fs.d.ts",
1362
1372
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
1363
1373
  "../../node_modules/@types/node/util.d.ts",
1364
1374
  "../../node_modules/@types/node/ts3.2/util.d.ts"
1365
1375
  ],
1366
- "../../demo/data/toolbar.ts": [
1367
- "../../demo/data/bar.ts",
1368
- "../../demo/data/line.ts",
1376
+ "../../src/tools.ts": [
1377
+ "../interfaces/index.d.ts",
1378
+ "../../../../node_modules/@types/d3/index.d.ts",
1369
1379
  "../../../../node_modules/date-fns/typings.d.ts",
1370
1380
  "../../node_modules/@types/node/fs.d.ts",
1371
1381
  "../../node_modules/@types/node/ts3.2/fs.d.ts",
@@ -1381,6 +1391,7 @@
1381
1391
  "../../demo/data/pie.ts",
1382
1392
  "../../demo/data/gauge.ts",
1383
1393
  "../../demo/data/scatter.ts",
1394
+ "../../demo/data/lollipop.ts",
1384
1395
  "../../demo/data/step.ts",
1385
1396
  "../../demo/data/meter.ts",
1386
1397
  "../../demo/data/time-series-axis.ts",
@@ -2400,6 +2411,13 @@
2400
2411
  "../../node_modules/@types/node/util.d.ts",
2401
2412
  "../../node_modules/@types/node/ts3.2/util.d.ts"
2402
2413
  ],
2414
+ "../../../../node_modules/date-fns/locale/fr/index.d.ts": [
2415
+ "../../../../node_modules/date-fns/typings.d.ts",
2416
+ "../../node_modules/@types/node/fs.d.ts",
2417
+ "../../node_modules/@types/node/ts3.2/fs.d.ts",
2418
+ "../../node_modules/@types/node/util.d.ts",
2419
+ "../../node_modules/@types/node/ts3.2/util.d.ts"
2420
+ ],
2403
2421
  "../../src/interfaces/a11y.ts": [
2404
2422
  "../../../../node_modules/date-fns/typings.d.ts",
2405
2423
  "../../node_modules/@types/node/fs.d.ts",
@@ -2437,13 +2455,6 @@
2437
2455
  "../../node_modules/@types/node/util.d.ts",
2438
2456
  "../../node_modules/@types/node/ts3.2/util.d.ts"
2439
2457
  ],
2440
- "../../../../node_modules/date-fns/locale/fr/index.d.ts": [
2441
- "../../../../node_modules/date-fns/typings.d.ts",
2442
- "../../node_modules/@types/node/fs.d.ts",
2443
- "../../node_modules/@types/node/ts3.2/fs.d.ts",
2444
- "../../node_modules/@types/node/util.d.ts",
2445
- "../../node_modules/@types/node/ts3.2/util.d.ts"
2446
- ],
2447
2458
  "../../node_modules/@types/node/globals.d.ts": [
2448
2459
  "../../../../node_modules/date-fns/typings.d.ts",
2449
2460
  "../../node_modules/@types/node/fs.d.ts",
@@ -2908,6 +2919,16 @@
2908
2919
  "../../demo/data/donut.ts",
2909
2920
  "../../demo/data/gauge.ts",
2910
2921
  "../../demo/data/scatter.ts",
2922
+ "../../demo/data/step.ts",
2923
+ "../../../../node_modules/date-fns/locale/fr/index.d.ts",
2924
+ "../../demo/data/time-series-axis.ts",
2925
+ "../../demo/data/zoom-bar.ts",
2926
+ "../../demo/data/high-scale.ts",
2927
+ "../../demo/data/lollipop.ts",
2928
+ "../../demo/data/meter.ts",
2929
+ "../../demo/data/radar.ts",
2930
+ "../../demo/data/treemap.ts",
2931
+ "../../demo/data/toolbar.ts",
2911
2932
  "../../src/interfaces/a11y.ts",
2912
2933
  "../../src/interfaces/events.ts",
2913
2934
  "../../src/interfaces/enums.ts",
@@ -2921,15 +2942,6 @@
2921
2942
  "../../src/interfaces/model.ts",
2922
2943
  "../../src/interfaces/index.ts",
2923
2944
  "../../src/tools.ts",
2924
- "../../demo/data/step.ts",
2925
- "../../../../node_modules/date-fns/locale/fr/index.d.ts",
2926
- "../../demo/data/time-series-axis.ts",
2927
- "../../demo/data/zoom-bar.ts",
2928
- "../../demo/data/high-scale.ts",
2929
- "../../demo/data/meter.ts",
2930
- "../../demo/data/radar.ts",
2931
- "../../demo/data/treemap.ts",
2932
- "../../demo/data/toolbar.ts",
2933
2945
  "../../demo/data/index.ts",
2934
2946
  "../../node_modules/@types/node/globals.d.ts",
2935
2947
  "../../node_modules/@types/node/assert.d.ts",
@@ -139,6 +139,11 @@ export interface ScatterChartOptions extends AxisChartOptions {
139
139
  enabled?: boolean;
140
140
  };
141
141
  }
142
+ /**
143
+ * options specific to lollipop charts
144
+ */
145
+ export interface LollipopChartOptions extends ScatterChartOptions {
146
+ }
142
147
  /**
143
148
  * options specific to bubble charts
144
149
  */
@@ -1 +1 @@
1
- {"version":3,"file":"charts.js","sourceRoot":"","sources":["charts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqD,UAAU,EAAE,MAAM,SAAS,CAAC","sourcesContent":["import { GaugeTypes, Statuses, ArrowDirections, Alignments, ChartTypes } from \"./enums\";\nimport {\n\tLegendOptions,\n\tTooltipOptions,\n\tGridOptions,\n\tAxesOptions,\n\tZoomBarsOptions\n} from \"./index\";\nimport { BarOptions, StackedBarOptions } from \"./components\";\nimport { TimeScaleOptions } from \"./axis-scales\";\n\n/**\n * Base chart options common to any chart\n */\nexport interface BaseChartOptions {\n\t/**\n\t * Optionally specify a title for the chart\n\t */\n\ttitle?: string;\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 in skeleton way\n\t\t */\n\t\tloading?: boolean;\n\t\t/**\n\t\t * options related to pre-selected data groups\n\t\t * Remains empty if every legend item is active or dataset doesn't have the data groups.\n\t\t */\n\t\tselectedGroups?: string[];\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\t/**\n\t\t * use a carbon dataviz preset color palette\n\t\t * put the index (selection of which variant)\n\t\t */\n\t\tpairing?: {\n\t\t\t/**\n\t\t\t * the number of color variants in the palette (defaults to using the number of data groups in the given data)\n\t\t\t */\n\t\t\tnumberOfVariants?: number;\n\t\t\t/**\n\t\t\t * the option number of the color paring\n\t\t\t */\n\t\t\toption?: number;\n\t\t};\n\t\t/*\n\t\t * options related to gradient\n\t\t * e.g. { enabled: true }\n\t\t */\n\t\tgradient?: 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\ttimeScale?: TimeScaleOptions;\n\t/**\n\t * zoombar configuration\n\t */\n\tzoomBar?: ZoomBarsOptions;\n}\n\n/**\n * options specific to bar charts\n */\nexport interface BarChartOptions extends AxisChartOptions {\n\tbars?: BarOptions;\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\tenabled?: 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\t/**\n\t\t * enabled scatter dot or not\n\t\t */\n\t\tenabled?: boolean;\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};\n}\n\n/**\n * options specific to area charts\n */\nexport interface AreaChartOptions extends AxisChartOptions {\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 area charts\n */\nexport interface StackedAreaChartOptions 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\tlabels?: {\n\t\t\tformatter?: Function;\n\t\t};\n\t\talignment?: Alignments;\n\t};\n}\n\n/**\n * options specific to gauge charts\n */\nexport interface GaugeChartOptions extends BaseChartOptions {\n\tgauge?: {\n\t\tarcWidth?: number;\n\t\tdeltaArrow?: {\n\t\t\tdirection?: ArrowDirections;\n\t\t\tsize?: Function;\n\t\t\tenabled: Boolean;\n\t\t};\n\t\tstatus?: Statuses;\n\t\tdeltaFontSize?: Function;\n\t\tnumberSpacing?: number;\n\t\tnumberFormatter?: Function;\n\t\tvalueFontSize?: Function;\n\t\ttype?: GaugeTypes;\n\t\talignment?: Alignments;\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\talignment?: Alignments;\n\t};\n}\n\nexport interface MeterChartOptions extends BaseChartOptions {\n\tmeter?: {\n\t\theight?: number;\n\t\ttitle?: {\n\t\t\tpercentageIndicator?: {\n\t\t\t\t/**\n\t\t\t\t * rendering of the percentage value relative to the dataset within title\n\t\t\t\t */\n\t\t\t\tenabled?: boolean;\n\t\t\t};\n\t\t};\n\t};\n}\n\n/**\n * options specific to radar charts\n */\nexport interface RadarChartOptions extends BaseChartOptions {\n\tradar?: {\n\t\taxes: {\n\t\t\tangle: string;\n\t\t\tvalue: string;\n\t\t};\n\t\talignment?: Alignments;\n\t};\n}\n\n/**\n * options specific to combo bar charts\n */\nexport interface ComboChartOptions extends AxisChartOptions {\n\tcomboChartTypes?: {\n\t\t[ChartTypes.LINE]?: [],\n\t\t[ChartTypes.STACKED_BAR]?: [],\n\t\t[ChartTypes.GROUPED_BAR]?: [],\n\t\t[ChartTypes.SIMPLE_BAR]?: [],\n\t\t[ChartTypes.SCATTER]?: []\n\t};\n}\n\n\n/*\n * options specific to treemap charts\n */\nexport interface TreemapChartOptions extends BaseChartOptions {}\n"]}
1
+ {"version":3,"file":"charts.js","sourceRoot":"","sources":["charts.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,UAAU,EACV,MAAM,SAAS,CAAC","sourcesContent":["import {\n\tGaugeTypes,\n\tStatuses,\n\tArrowDirections,\n\tAlignments,\n\tChartTypes\n} from \"./enums\";\nimport {\n\tLegendOptions,\n\tTooltipOptions,\n\tGridOptions,\n\tAxesOptions,\n\tZoomBarsOptions\n} from \"./index\";\nimport { BarOptions, StackedBarOptions } from \"./components\";\nimport { TimeScaleOptions } from \"./axis-scales\";\n\n/**\n * Base chart options common to any chart\n */\nexport interface BaseChartOptions {\n\t/**\n\t * Optionally specify a title for the chart\n\t */\n\ttitle?: string;\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 in skeleton way\n\t\t */\n\t\tloading?: boolean;\n\t\t/**\n\t\t * options related to pre-selected data groups\n\t\t * Remains empty if every legend item is active or dataset doesn't have the data groups.\n\t\t */\n\t\tselectedGroups?: string[];\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\t/**\n\t\t * use a carbon dataviz preset color palette\n\t\t * put the index (selection of which variant)\n\t\t */\n\t\tpairing?: {\n\t\t\t/**\n\t\t\t * the number of color variants in the palette (defaults to using the number of data groups in the given data)\n\t\t\t */\n\t\t\tnumberOfVariants?: number;\n\t\t\t/**\n\t\t\t * the option number of the color paring\n\t\t\t */\n\t\t\toption?: number;\n\t\t};\n\t\t/*\n\t\t * options related to gradient\n\t\t * e.g. { enabled: true }\n\t\t */\n\t\tgradient?: 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\ttimeScale?: TimeScaleOptions;\n\t/**\n\t * zoombar configuration\n\t */\n\tzoomBar?: ZoomBarsOptions;\n}\n\n/**\n * options specific to bar charts\n */\nexport interface BarChartOptions extends AxisChartOptions {\n\tbars?: BarOptions;\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\tenabled?: boolean;\n\t};\n}\n\n/**\n * options specific to lollipop charts\n */\nexport interface LollipopChartOptions extends ScatterChartOptions {}\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\t/**\n\t\t * enabled scatter dot or not\n\t\t */\n\t\tenabled?: boolean;\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 area charts\n */\nexport interface AreaChartOptions extends AxisChartOptions {\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 area charts\n */\nexport interface StackedAreaChartOptions 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\tlabels?: {\n\t\t\tformatter?: Function;\n\t\t};\n\t\talignment?: Alignments;\n\t};\n}\n\n/**\n * options specific to gauge charts\n */\nexport interface GaugeChartOptions extends BaseChartOptions {\n\tgauge?: {\n\t\tarcWidth?: number;\n\t\tdeltaArrow?: {\n\t\t\tdirection?: ArrowDirections;\n\t\t\tsize?: Function;\n\t\t\tenabled: Boolean;\n\t\t};\n\t\tstatus?: Statuses;\n\t\tdeltaFontSize?: Function;\n\t\tnumberSpacing?: number;\n\t\tnumberFormatter?: Function;\n\t\tvalueFontSize?: Function;\n\t\ttype?: GaugeTypes;\n\t\talignment?: Alignments;\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\talignment?: Alignments;\n\t};\n}\n\nexport interface MeterChartOptions extends BaseChartOptions {\n\tmeter?: {\n\t\theight?: number;\n\t\ttitle?: {\n\t\t\tpercentageIndicator?: {\n\t\t\t\t/**\n\t\t\t\t * rendering of the percentage value relative to the dataset within title\n\t\t\t\t */\n\t\t\t\tenabled?: boolean;\n\t\t\t};\n\t\t};\n\t};\n}\n\n/**\n * options specific to radar charts\n */\nexport interface RadarChartOptions extends BaseChartOptions {\n\tradar?: {\n\t\taxes: {\n\t\t\tangle: string;\n\t\t\tvalue: string;\n\t\t};\n\t\talignment?: Alignments;\n\t};\n}\n\n/**\n * options specific to combo bar charts\n */\nexport interface ComboChartOptions extends AxisChartOptions {\n\tcomboChartTypes?: {\n\t\t[ChartTypes.LINE]?: [];\n\t\t[ChartTypes.STACKED_BAR]?: [];\n\t\t[ChartTypes.GROUPED_BAR]?: [];\n\t\t[ChartTypes.SIMPLE_BAR]?: [];\n\t\t[ChartTypes.SCATTER]?: [];\n\t};\n}\n\n/*\n * options specific to treemap charts\n */\nexport interface TreemapChartOptions extends BaseChartOptions {}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { AxisChartOptions } from "./charts";
2
+ export declare type ChartTabularData = Record<string, any>[];
2
3
  /**
3
4
  * Configuration passed to the chart.
4
5
  *
@@ -6,7 +7,7 @@ import { AxisChartOptions } from "./charts";
6
7
  */
7
8
  export interface ChartConfig<T extends AxisChartOptions> {
8
9
  options: T;
9
- data: ChartData | Promise<ChartData>;
10
+ data: ChartTabularData;
10
11
  }
11
12
  export interface DataSet {
12
13
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["model.ts"],"names":[],"mappings":"","sourcesContent":["import { AxisChartOptions } from \"./charts\";\n\n/**\n * Configuration passed to the chart.\n *\n * Includes options and data\n */\nexport interface ChartConfig<T extends AxisChartOptions> {\n\toptions: T;\n\tdata: ChartData | Promise<ChartData>;\n}\n\nexport interface DataSet {\n\t/**\n\t * Label for the dataset\n\t */\n\tlabel: string;\n\t/**\n\t * Array of hex background colors\n\t */\n\tfillColors: string[];\n\t/**\n\t * Array of data values\n\t */\n\tdata: any[];\n}\n\nexport interface ChartData {\n\t/**\n\t * Labels for the x (horizontal) axis. Should match the number of items in each dataset data array\n\t */\n\tlabels: string[];\n\t/**\n\t * Array of datasets to display in the chart\n\t */\n\tdatasets: DataSet[];\n}\n"]}
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["model.ts"],"names":[],"mappings":"","sourcesContent":["import { AxisChartOptions } from \"./charts\";\n\nexport type ChartTabularData = Record<string, any>[];\n\n/**\n * Configuration passed to the chart.\n *\n * Includes options and data\n */\nexport interface ChartConfig<T extends AxisChartOptions> {\n\toptions: T;\n\tdata: ChartTabularData;\n}\n\nexport interface DataSet {\n\t/**\n\t * Label for the dataset\n\t */\n\tlabel: string;\n\t/**\n\t * Array of hex background colors\n\t */\n\tfillColors: string[];\n\t/**\n\t * Array of data values\n\t */\n\tdata: any[];\n}\n\nexport interface ChartData {\n\t/**\n\t * Labels for the x (horizontal) axis. Should match the number of items in each dataset data array\n\t */\n\tlabels: string[];\n\t/**\n\t * Array of datasets to display in the chart\n\t */\n\tdatasets: DataSet[];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"model-cartesian-charts.js","sourceRoot":"","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,CAAC;YAE/C,IAAI,WAAW,IAAI,WAAW,CAAC,SAAS,KAAK,UAAU,CAAC,IAAI,EAAE;gBAC7D,IAAM,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC;gBAEtC,IAAI,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,SAAS,EAAE;oBACpD,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;iBAC7B;aACD;QACF,CAAC,CAAC,CAAC;QAEH,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,0CAA0C;YAC1C,IAAI,CAAC,OAAO,CAAC,UAAC,KAAK;gBAClB,WAAW,CAAC,OAAO,CAAC,UAAC,GAAG;oBACvB,IAAI,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,CAAC,KAAK,IAAI,EAAE;wBACtD,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;qBAClC;gBACF,CAAC,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IAES,sCAAQ,GAAlB,UAAmB,IAAI;QACtB,IAAI,GAAG,iBAAM,QAAQ,YAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAErC,OAAO,IAAI,CAAC;IACb,CAAC;IACF,0BAAC;AAAD,CAAC,AAnHD,CAAyC,UAAU,GAmHlD","sourcesContent":["// Internal Imports\nimport { ChartModel } from \"./model\";\nimport { Tools } from \"./tools\";\nimport {\n\tScaleTypes,\n\tAxisPositions\n} from \"./interfaces\";\n\n/**\n * This supports adding X and Y Cartesian[2D] zoom data to a ChartModel\n * */\nexport class ChartModelCartesian extends ChartModel {\n\tconstructor(services: any) {\n\t\tsuper(services);\n\t}\n\n\tsetData(newData) {\n\t\tlet data;\n\t\tif (newData) {\n\t\t\tdata = super.setData(newData);\n\t\t\tif (\n\t\t\t\tTools.getProperty(\n\t\t\t\t\tthis.getOptions(),\n\t\t\t\t\t\"zoomBar\",\n\t\t\t\t\t\"top\",\n\t\t\t\t\t\"enabled\"\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// if we have zoom bar data we need to update it as well\n\t\t\t\tthis.setZoomBarData();\n\t\t\t}\n\t\t}\n\n\t\treturn data;\n\t}\n\n\t/**\n\t * @param zoomBarData any special zoom bar data to use instead of the model data\n\t */\n\tsetZoomBarData(newZoomBarData?) {\n\t\tconst sanitizedData = newZoomBarData\n\t\t\t? this.sanitize(Tools.clone(newZoomBarData))\n\t\t\t: this.getDisplayData(); // if we're not passed explicit zoom data use the model\n\n\t\tlet zoomBarNormalizedValues = sanitizedData;\n\n\t\tconst { cartesianScales } = this.services;\n\t\tif (\n\t\t\tsanitizedData &&\n\t\t\tcartesianScales.domainAxisPosition &&\n\t\t\tcartesianScales.rangeAxisPosition\n\t\t) {\n\t\t\tconst domainIdentifier = cartesianScales.getDomainIdentifier();\n\t\t\tconst rangeIdentifier = cartesianScales.getRangeIdentifier();\n\t\t\t// get all dates (Number) in displayData\n\t\t\tlet allDates = sanitizedData.map((datum) =>\n\t\t\t\tdatum[domainIdentifier].getTime()\n\t\t\t);\n\t\t\tallDates = Tools.removeArrayDuplicates(allDates).sort();\n\n\t\t\t// Go through all date values\n\t\t\t// And get corresponding data from each dataset\n\t\t\tzoomBarNormalizedValues = allDates.map((date) => {\n\t\t\t\tlet sum = 0;\n\t\t\t\tconst datum = {};\n\n\t\t\t\tsanitizedData.forEach((data) => {\n\t\t\t\t\tif (data[domainIdentifier].getTime() === date) {\n\t\t\t\t\t\tsum += data[rangeIdentifier];\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tdatum[domainIdentifier] = new Date(date);\n\t\t\t\tdatum[rangeIdentifier] = sum;\n\n\t\t\t\treturn datum;\n\t\t\t});\n\t\t}\n\n\t\tthis.set({ zoomBarData: zoomBarNormalizedValues });\n\t}\n\n\tgetZoomBarData() {\n\t\treturn this.get(\"zoomBarData\");\n\t}\n\n\tprotected sanitizeDateValues(data) {\n\t\tconst options = this.getOptions();\n\n\t\tif (!options.axes) {\n\t\t\treturn data;\n\t\t}\n\n\t\tconst keysToCheck = [];\n\t\tObject.keys(AxisPositions).forEach((axisPositionKey) => {\n\t\t\tconst axisPosition = AxisPositions[axisPositionKey];\n\t\t\tconst axisOptions = options.axes[axisPosition];\n\n\t\t\tif (axisOptions && axisOptions.scaleType === ScaleTypes.TIME) {\n\t\t\t\tconst axisMapsTo = axisOptions.mapsTo;\n\n\t\t\t\tif (axisMapsTo !== null || axisMapsTo !== undefined) {\n\t\t\t\t\tkeysToCheck.push(axisMapsTo);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (keysToCheck.length > 0) {\n\t\t\t// Check all datapoints and sanitize dates\n\t\t\tdata.forEach((datum) => {\n\t\t\t\tkeysToCheck.forEach((key) => {\n\t\t\t\t\tif (Tools.getProperty(datum, key, \"getTime\") === null) {\n\t\t\t\t\t\tdatum[key] = new Date(datum[key]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tprotected sanitize(data) {\n\t\tdata = super.sanitize(data);\n\t\tdata = this.sanitizeDateValues(data);\n\n\t\treturn data;\n\t}\n}\n"]}
1
+ {"version":3,"file":"model-cartesian-charts.js","sourceRoot":"","sources":["model-cartesian-charts.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEzD;;KAEK;AACL;IAAyC,uCAAU;IAClD,6BAAY,QAAa;eACxB,kBAAM,QAAQ,CAAC;IAChB,CAAC;IAED,qCAAO,GAAP,UAAQ,O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0CAA0C;YAC1C,IAAI,CAAC,OAAO,CAAC,UAAC,KAAK;gBAClB,WAAW,CAAC,OAAO,CAAC,UAAC,GAAG;oBACvB,IAAI,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,CAAC,KAAK,IAAI,EAAE;wBACtD,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;qBAClC;gBACF,CAAC,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;SACH;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IAES,sCAAQ,GAAlB,UAAmB,IAAI;QACtB,IAAI,GAAG,iBAAM,QAAQ,YAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAErC,OAAO,IAAI,CAAC;IACb,CAAC;IACF,0BAAC;AAAD,CAAC,AAnHD,CAAyC,UAAU,GAmHlD","sourcesContent":["// Internal Imports\nimport { ChartModel } from \"./model\";\nimport { Tools } from \"./tools\";\nimport { ScaleTypes, AxisPositions } from \"./interfaces\";\n\n/**\n * This supports adding X and Y Cartesian[2D] zoom data to a ChartModel\n * */\nexport class ChartModelCartesian extends ChartModel {\n\tconstructor(services: any) {\n\t\tsuper(services);\n\t}\n\n\tsetData(newData) {\n\t\tlet data;\n\t\tif (newData) {\n\t\t\tdata = super.setData(newData);\n\t\t\tif (\n\t\t\t\tTools.getProperty(\n\t\t\t\t\tthis.getOptions(),\n\t\t\t\t\t\"zoomBar\",\n\t\t\t\t\t\"top\",\n\t\t\t\t\t\"enabled\"\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// if we have zoom bar data we need to update it as well\n\t\t\t\tthis.setZoomBarData();\n\t\t\t}\n\t\t}\n\n\t\treturn data;\n\t}\n\n\t/**\n\t * @param zoomBarData any special zoom bar data to use instead of the model data\n\t */\n\tsetZoomBarData(newZoomBarData?) {\n\t\tconst sanitizedData = newZoomBarData\n\t\t\t? this.sanitize(Tools.clone(newZoomBarData))\n\t\t\t: this.getDisplayData(); // if we're not passed explicit zoom data use the model\n\n\t\tlet zoomBarNormalizedValues = sanitizedData;\n\n\t\tconst { cartesianScales } = this.services;\n\t\tif (\n\t\t\tsanitizedData &&\n\t\t\tcartesianScales.domainAxisPosition &&\n\t\t\tcartesianScales.rangeAxisPosition\n\t\t) {\n\t\t\tconst domainIdentifier = cartesianScales.getDomainIdentifier();\n\t\t\tconst rangeIdentifier = cartesianScales.getRangeIdentifier();\n\t\t\t// get all dates (Number) in displayData\n\t\t\tlet allDates = sanitizedData.map((datum) =>\n\t\t\t\tdatum[domainIdentifier].getTime()\n\t\t\t);\n\t\t\tallDates = Tools.removeArrayDuplicates(allDates).sort();\n\n\t\t\t// Go through all date values\n\t\t\t// And get corresponding data from each dataset\n\t\t\tzoomBarNormalizedValues = allDates.map((date) => {\n\t\t\t\tlet sum = 0;\n\t\t\t\tconst datum = {};\n\n\t\t\t\tsanitizedData.forEach((data) => {\n\t\t\t\t\tif (data[domainIdentifier].getTime() === date) {\n\t\t\t\t\t\tsum += data[rangeIdentifier];\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tdatum[domainIdentifier] = new Date(date);\n\t\t\t\tdatum[rangeIdentifier] = sum;\n\n\t\t\t\treturn datum;\n\t\t\t});\n\t\t}\n\n\t\tthis.set({ zoomBarData: zoomBarNormalizedValues });\n\t}\n\n\tgetZoomBarData() {\n\t\treturn this.get(\"zoomBarData\");\n\t}\n\n\tprotected sanitizeDateValues(data) {\n\t\tconst options = this.getOptions();\n\n\t\tif (!options.axes) {\n\t\t\treturn data;\n\t\t}\n\n\t\tconst keysToCheck = [];\n\t\tObject.keys(AxisPositions).forEach((axisPositionKey) => {\n\t\t\tconst axisPosition = AxisPositions[axisPositionKey];\n\t\t\tconst axisOptions = options.axes[axisPosition];\n\n\t\t\tif (axisOptions && axisOptions.scaleType === ScaleTypes.TIME) {\n\t\t\t\tconst axisMapsTo = axisOptions.mapsTo;\n\n\t\t\t\tif (axisMapsTo !== null || axisMapsTo !== undefined) {\n\t\t\t\t\tkeysToCheck.push(axisMapsTo);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (keysToCheck.length > 0) {\n\t\t\t// Check all datapoints and sanitize dates\n\t\t\tdata.forEach((datum) => {\n\t\t\t\tkeysToCheck.forEach((key) => {\n\t\t\t\t\tif (Tools.getProperty(datum, key, \"getTime\") === null) {\n\t\t\t\t\t\tdatum[key] = new Date(datum[key]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tprotected sanitize(data) {\n\t\tdata = super.sanitize(data);\n\t\tdata = this.sanitizeDateValues(data);\n\n\t\treturn data;\n\t}\n}\n"]}
package/model.js CHANGED
@@ -133,7 +133,9 @@ var ChartModel = /** @class */ (function () {
133
133
  }
134
134
  // if its a combo chart, the specific chart will pass the model the groups it needs
135
135
  if (groups) {
136
- return this.get("dataGroups").filter(function (dataGroup) { return groups.includes(dataGroup.name); });
136
+ return this.get("dataGroups").filter(function (dataGroup) {
137
+ return groups.includes(dataGroup.name);
138
+ });
137
139
  }
138
140
  return this.get("dataGroups");
139
141
  };