@carbon/charts 0.30.4 → 0.30.8
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.
- package/CHANGELOG.md +35 -0
- package/build/demo/data/bar.d.ts +56 -94
- package/build/demo/data/bubble.d.ts +58 -13
- package/build/demo/data/donut.d.ts +3 -6
- package/build/demo/data/line.d.ts +35 -35
- package/build/demo/data/pie.d.ts +3 -6
- package/build/demo/data/scatter.d.ts +33 -20
- package/build/demo/data/step.d.ts +15 -16
- package/build/demo/data/time-series-axis.d.ts +12 -48
- package/build/src/charts/bar-grouped.d.ts +2 -2
- package/build/src/charts/bar-simple.d.ts +2 -4
- package/build/src/components/essentials/legend.d.ts +0 -4
- package/build/src/components/essentials/tooltip-bar.d.ts +1 -1
- package/build/src/components/essentials/tooltip-pie.d.ts +5 -0
- package/build/src/components/essentials/tooltip-scatter.d.ts +1 -1
- package/build/src/components/graphs/bar-grouped.d.ts +6 -4
- package/build/src/components/graphs/bar-simple.d.ts +0 -1
- package/build/src/components/graphs/bar-stacked.d.ts +0 -1
- package/build/src/components/graphs/bubble.d.ts +0 -1
- package/build/src/components/graphs/line.d.ts +3 -1
- package/build/src/components/graphs/pie.d.ts +0 -1
- package/build/src/components/graphs/scatter.d.ts +0 -1
- package/build/src/components/index.d.ts +1 -0
- package/build/src/interfaces/axis-scales.d.ts +4 -16
- package/build/src/interfaces/charts.d.ts +23 -1
- package/build/src/interfaces/enums.d.ts +0 -4
- package/build/src/interfaces/events.d.ts +29 -0
- package/build/src/model-pie.d.ts +1 -7
- package/build/src/model.d.ts +31 -13
- package/build/src/services/scales-cartesian.d.ts +11 -3
- package/build/src/tools.d.ts +2 -2
- package/build/stories/tutorials.stories.d.ts +1 -0
- package/bundle.js +1 -1
- package/chart.js +2 -2
- package/chart.js.map +1 -1
- package/charts/bar-grouped.d.ts +2 -2
- package/charts/bar-grouped.js.map +1 -1
- package/charts/bar-simple.d.ts +2 -4
- package/charts/bar-simple.js +0 -2
- package/charts/bar-simple.js.map +1 -1
- package/charts/donut.js +2 -2
- package/charts/donut.js.map +1 -1
- package/charts/pie.js +2 -2
- package/charts/pie.js.map +1 -1
- package/components/axes/grid.js +12 -19
- package/components/axes/grid.js.map +1 -1
- package/components/component.js +1 -1
- package/components/component.js.map +1 -1
- package/components/essentials/legend.d.ts +0 -4
- package/components/essentials/legend.js +12 -26
- package/components/essentials/legend.js.map +1 -1
- package/components/essentials/title.js +4 -4
- package/components/essentials/title.js.map +1 -1
- package/components/essentials/tooltip-bar.d.ts +1 -1
- package/components/essentials/tooltip-bar.js +13 -5
- package/components/essentials/tooltip-bar.js.map +1 -1
- package/components/essentials/tooltip-pie.d.ts +5 -0
- package/components/essentials/tooltip-pie.js +40 -0
- package/components/essentials/tooltip-pie.js.map +1 -0
- package/components/essentials/tooltip-scatter.d.ts +1 -1
- package/components/essentials/tooltip-scatter.js +8 -6
- package/components/essentials/tooltip-scatter.js.map +1 -1
- package/components/essentials/tooltip.js +14 -17
- package/components/essentials/tooltip.js.map +1 -1
- package/components/graphs/bar-grouped.d.ts +6 -4
- package/components/graphs/bar-grouped.js +64 -36
- package/components/graphs/bar-grouped.js.map +1 -1
- package/components/graphs/bar-simple.d.ts +0 -1
- package/components/graphs/bar-simple.js +16 -34
- package/components/graphs/bar-simple.js.map +1 -1
- package/components/graphs/bar-stacked.d.ts +0 -1
- package/components/graphs/bar-stacked.js +31 -112
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/bar.js.map +1 -1
- package/components/graphs/bubble.d.ts +0 -1
- package/components/graphs/bubble.js +16 -20
- package/components/graphs/bubble.js.map +1 -1
- package/components/graphs/donut.js +1 -1
- package/components/graphs/donut.js.map +1 -1
- package/components/graphs/line.d.ts +3 -1
- package/components/graphs/line.js +42 -31
- package/components/graphs/line.js.map +1 -1
- package/components/graphs/pie.d.ts +0 -1
- package/components/graphs/pie.js +15 -22
- package/components/graphs/pie.js.map +1 -1
- package/components/graphs/scatter.d.ts +0 -1
- package/components/graphs/scatter.js +26 -41
- package/components/graphs/scatter.js.map +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/index.js.map +1 -1
- package/configuration.js +7 -0
- package/configuration.js.map +1 -1
- package/demo/data/bar.d.ts +56 -94
- package/demo/data/bar.js +106 -271
- package/demo/data/bar.js.map +1 -1
- package/demo/data/bubble.d.ts +58 -13
- package/demo/data/bubble.js +74 -174
- package/demo/data/bubble.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/donut.d.ts +3 -6
- package/demo/data/index.js +22 -4
- package/demo/data/index.js.map +1 -1
- package/demo/data/line.d.ts +35 -35
- package/demo/data/line.js +70 -196
- package/demo/data/line.js.map +1 -1
- package/demo/data/pie.d.ts +3 -6
- package/demo/data/pie.js +8 -10
- package/demo/data/pie.js.map +1 -1
- package/demo/data/scatter.d.ts +33 -20
- package/demo/data/scatter.js +50 -68
- package/demo/data/scatter.js.map +1 -1
- package/demo/data/step.d.ts +15 -16
- package/demo/data/time-series-axis.d.ts +12 -48
- package/demo/data/time-series-axis.js +34 -46
- package/demo/data/time-series-axis.js.map +1 -1
- package/demo/styles.css +28 -0
- package/demo/styles.css.map +1 -1
- package/demo/styles.min.css +1 -1
- package/demo/styles.min.css.map +1 -1
- package/demo/tsconfig.tsbuildinfo +38 -37
- package/interfaces/axis-scales.d.ts +4 -16
- package/interfaces/axis-scales.js.map +1 -1
- package/interfaces/charts.d.ts +23 -1
- package/interfaces/charts.js.map +1 -1
- package/interfaces/enums.d.ts +0 -4
- package/interfaces/enums.js +0 -5
- package/interfaces/enums.js.map +1 -1
- package/interfaces/events.d.ts +29 -0
- package/interfaces/events.js +33 -0
- package/interfaces/events.js.map +1 -1
- package/model-pie.d.ts +1 -7
- package/model-pie.js +2 -107
- package/model-pie.js.map +1 -1
- package/model.d.ts +31 -13
- package/model.js +204 -75
- package/model.js.map +1 -1
- package/package.json +3 -1
- package/services/essentials/dom-utils.js +3 -2
- package/services/essentials/dom-utils.js.map +1 -1
- package/services/scales-cartesian.d.ts +11 -3
- package/services/scales-cartesian.js +104 -122
- package/services/scales-cartesian.js.map +1 -1
- package/tools.d.ts +2 -2
- package/tools.js +23 -2
- package/tools.js.map +1 -1
- package/tsconfig.tsbuildinfo +93 -93
- package/build/src/model-simple-bar.d.ts +0 -11
- package/model-simple-bar.d.ts +0 -11
- package/model-simple-bar.js +0 -88
- package/model-simple-bar.js.map +0 -1
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -118,12 +118,12 @@
|
|
|
118
118
|
"signature": "0d4aed71a8b1dfaf64b2bc13434c2f6b8e19670c16b0c4f090293a2efab8518b"
|
|
119
119
|
},
|
|
120
120
|
"../src/interfaces/events.ts": {
|
|
121
|
-
"version": "
|
|
122
|
-
"signature": "
|
|
121
|
+
"version": "c16923daf9579620b37b7a11820b14dcf879d8221b25670a5b6feecf50825dff",
|
|
122
|
+
"signature": "d587417e87d29974eac630b2531e10ecce6335592fd4785d189e50759ee0aecd"
|
|
123
123
|
},
|
|
124
124
|
"../src/interfaces/enums.ts": {
|
|
125
|
-
"version": "
|
|
126
|
-
"signature": "
|
|
125
|
+
"version": "1179d35a865b1b5e281d06c18a48750045708886e84a2b8cdf386ee0df297395",
|
|
126
|
+
"signature": "7e562d12a40a686853e7d044ef5f420de67c039a873e149ff3847263b6dbbbdc"
|
|
127
127
|
},
|
|
128
128
|
"../../../node_modules/@types/d3-array/index.d.ts": {
|
|
129
129
|
"version": "f5b8f86da74b4bfb29f85a631b725a47c8a3ab6c4ce91537e5b176bbe0cd0a7a",
|
|
@@ -258,19 +258,19 @@
|
|
|
258
258
|
"signature": "0d1954e6a821396de9f72b8d2e8553096a755eb76ad99b63857da0b9a23723a0"
|
|
259
259
|
},
|
|
260
260
|
"../src/interfaces/axis-scales.ts": {
|
|
261
|
-
"version": "
|
|
262
|
-
"signature": "
|
|
261
|
+
"version": "09d116c90313b921772825626c157bdc3b31b163a67358cc9f3a93d2f24668f9",
|
|
262
|
+
"signature": "c015ac2517d1f7555d773861f9caff86d5b564a24e21aae8596ab4d87cdf9c58"
|
|
263
263
|
},
|
|
264
264
|
"../src/tools.ts": {
|
|
265
|
-
"version": "
|
|
266
|
-
"signature": "
|
|
265
|
+
"version": "f027ed2402fcdadda34b41721f2a975f494a191d9fc64ce4ad87dbd8b437edbd",
|
|
266
|
+
"signature": "e48e49a9261dd7707798c5702f1c7478254cc073f6e9381983dc306df05c3f7d"
|
|
267
267
|
},
|
|
268
268
|
"../../../node_modules/date-fns/locale/en-US/index.d.ts": {
|
|
269
269
|
"version": "40479353a4fea9dd15e631f03b9bf3d724d627a49c7491ac3c3781275de9ba88",
|
|
270
270
|
"signature": "40479353a4fea9dd15e631f03b9bf3d724d627a49c7491ac3c3781275de9ba88"
|
|
271
271
|
},
|
|
272
272
|
"../src/configuration.ts": {
|
|
273
|
-
"version": "
|
|
273
|
+
"version": "f6c6fef2ed2f0c1787bce0e3906d600fbeab45f39cbf32226cb780ecf8854466",
|
|
274
274
|
"signature": "db7c4a2faa0cb1653570c519646fc99d6bcdfcf3fdf1fdd84edd0d12cd43f793"
|
|
275
275
|
},
|
|
276
276
|
"../src/services/colors.ts": {
|
|
@@ -282,8 +282,8 @@
|
|
|
282
282
|
"signature": "e4f5595f10b6565508dbd77a53decb500b0318494090c2b250b960855452cf1c"
|
|
283
283
|
},
|
|
284
284
|
"../src/model.ts": {
|
|
285
|
-
"version": "
|
|
286
|
-
"signature": "
|
|
285
|
+
"version": "d4da2f0c460c3f41b629b66020bdc40706a7ac327ba5365cad66f6cd20ba9fcf",
|
|
286
|
+
"signature": "1b65b7be46730ca674681c65a1fcad258dcda2ea61cefe52005fd47a906f437e"
|
|
287
287
|
},
|
|
288
288
|
"../src/services/service.ts": {
|
|
289
289
|
"version": "8326e7c581e9f2fbfa6ca0d2b17150771156b45fcfe270a2f14b1c74de37db87",
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
"signature": "6dc3970c1e09b6f0ea2389e69e2dc11906dd4a1b82f7c024504439932facbd3a"
|
|
295
295
|
},
|
|
296
296
|
"../src/services/essentials/dom-utils.ts": {
|
|
297
|
-
"version": "
|
|
297
|
+
"version": "f81bb3d5dcc711c186d5e54e5ae9783ee39b3cc8199547375cfb2e46eaa8caac",
|
|
298
298
|
"signature": "56b1e22fd5f83b4cde1d1e08af6d0daa6b7f18810e83e9fa6a5d2f6537183034"
|
|
299
299
|
},
|
|
300
300
|
"../src/services/essentials/events.ts": {
|
|
@@ -306,8 +306,8 @@
|
|
|
306
306
|
"signature": "78843159f44def46e74ca19d659d94fd0298396f0d47b311eb9b122baf829e56"
|
|
307
307
|
},
|
|
308
308
|
"../src/services/scales-cartesian.ts": {
|
|
309
|
-
"version": "
|
|
310
|
-
"signature": "
|
|
309
|
+
"version": "7b8e3c2af253806cd2134cabb20063f47fb82c9187cebb6c486ecfe278eaf263",
|
|
310
|
+
"signature": "95059d4f113d7cb5311fbb553ce8f2bcc575fb8bae204df99e700c1b6790d818"
|
|
311
311
|
},
|
|
312
312
|
"../src/services/curves.ts": {
|
|
313
313
|
"version": "51b3a625ac66d338655ae2363f498dfdb5ffed17c80928bc4f6c4dc7c9dfe79e",
|
|
@@ -318,7 +318,7 @@
|
|
|
318
318
|
"signature": "dee79e005d411887fd5f71b7d79218a3f61f7e69ad73274ccda329a6b2140eac"
|
|
319
319
|
},
|
|
320
320
|
"../src/components/component.ts": {
|
|
321
|
-
"version": "
|
|
321
|
+
"version": "99cd5525dde13622b97cb3296be7ead6276b68079d9155bd236921bd824da028",
|
|
322
322
|
"signature": "e26a591e02fc2b57848b7a548d747f5148aa51f2f223f4b598b944e7d084120d"
|
|
323
323
|
},
|
|
324
324
|
"../src/interfaces/components.ts": {
|
|
@@ -326,8 +326,8 @@
|
|
|
326
326
|
"signature": "2cb5092061e67b7abdab29d1156afef911427548ee24d11c530819389807dd0e"
|
|
327
327
|
},
|
|
328
328
|
"../src/interfaces/charts.ts": {
|
|
329
|
-
"version": "
|
|
330
|
-
"signature": "
|
|
329
|
+
"version": "1c499489d9a152dbf560e3f44a50af9f31769d7e9d4430021b54a6587fd2a69c",
|
|
330
|
+
"signature": "ca00ab80ad1c3b6f81d2ad0c047261e3476a87dfb9dc0632c4bddf6de3e6267e"
|
|
331
331
|
},
|
|
332
332
|
"../src/interfaces/layout.ts": {
|
|
333
333
|
"version": "cddb4b977e4a5e8fec8a78753cddd9c0804617ad6e82caa1f33b35967d8c6a7b",
|
|
@@ -342,11 +342,11 @@
|
|
|
342
342
|
"signature": "76155b4beaf0aa54eb99042bf954e56d47f803147ea42fefb4758e39f222b3d6"
|
|
343
343
|
},
|
|
344
344
|
"../src/components/essentials/legend.ts": {
|
|
345
|
-
"version": "
|
|
346
|
-
"signature": "
|
|
345
|
+
"version": "b2a26e7aa3352c53a370abc0799f3f95171e9e734319e06e014c7f5c35d86278",
|
|
346
|
+
"signature": "a4ec5d6d6d48c4d07fa061b1def09bb49e2d30c76706b832ed86b47fb84839c2"
|
|
347
347
|
},
|
|
348
348
|
"../src/components/essentials/title.ts": {
|
|
349
|
-
"version": "
|
|
349
|
+
"version": "ee6439e3044fa02f4989543f56a1b1bebce2a57ecd6467af60f0af11b280e66e",
|
|
350
350
|
"signature": "b127786ca37062997d849d548fd2b650c537d291d0f1821e25af2aea88388833"
|
|
351
351
|
},
|
|
352
352
|
"../../../node_modules/@carbon/utils-position/index.d.ts": {
|
|
@@ -354,51 +354,55 @@
|
|
|
354
354
|
"signature": "9deb9da13fcf21b24a0c57d549d6edff4ef8a05a3e4b1d955c71e581f56da75c"
|
|
355
355
|
},
|
|
356
356
|
"../src/components/essentials/tooltip.ts": {
|
|
357
|
-
"version": "
|
|
357
|
+
"version": "763deb02c181e88c0f34cd38a233a3537e641fafae248be6f86fb736bc7ef1c0",
|
|
358
358
|
"signature": "b88f307ccda2422c317325eb19e0717bc454d2523505d7a9a13f39771985c5d2"
|
|
359
359
|
},
|
|
360
360
|
"../src/components/essentials/tooltip-bar.ts": {
|
|
361
|
-
"version": "
|
|
362
|
-
"signature": "
|
|
361
|
+
"version": "59c041dfa5fa71771262fdae2bb8fa35fffc532767291b9b19551598636e830a",
|
|
362
|
+
"signature": "097561f6dda766e1e64bc3c993156af0c8173cd37e2bf7e6a5e0edeaa4c137e8"
|
|
363
|
+
},
|
|
364
|
+
"../src/components/essentials/tooltip-pie.ts": {
|
|
365
|
+
"version": "9090777f9aaebe3986c098b293b5e159448b8a48863c75db779e455bd8b27a2f",
|
|
366
|
+
"signature": "866c38648fc4a7615b123e5dc55b49e07bf2e186057c20408ddf6a4f88f8f4c7"
|
|
363
367
|
},
|
|
364
368
|
"../src/components/essentials/tooltip-scatter.ts": {
|
|
365
|
-
"version": "
|
|
366
|
-
"signature": "
|
|
369
|
+
"version": "421245f86502f3e32665aeacb4a45f1d4d48469a0dcf43c6f6c4023b44f559d8",
|
|
370
|
+
"signature": "a6b4152563181d281714b37fdd8c77e2df008bed9335180db778ff14cb25dbad"
|
|
367
371
|
},
|
|
368
372
|
"../src/components/graphs/bar.ts": {
|
|
369
|
-
"version": "
|
|
373
|
+
"version": "d31e1d3697f9bde8adf8da19506cdc9f317d072455712e08b79d5c2610468f6b",
|
|
370
374
|
"signature": "6aa2060d4da66c573181524a610c8d45546cfc9de450ced3e163c66f9a0373db"
|
|
371
375
|
},
|
|
372
376
|
"../src/components/graphs/bar-simple.ts": {
|
|
373
|
-
"version": "
|
|
374
|
-
"signature": "
|
|
377
|
+
"version": "f74509dde1ac8956f7433bc03d6215eab78723cef4c4b819d7ea59fc7c5a211e",
|
|
378
|
+
"signature": "27a283092b5aac1a68b37dbc110e6a20f16138e901ef093ccca15c0e89448772"
|
|
375
379
|
},
|
|
376
380
|
"../src/components/graphs/bar-grouped.ts": {
|
|
377
|
-
"version": "
|
|
378
|
-
"signature": "
|
|
381
|
+
"version": "0843d92b5975ddecbd90a9e347660a9add27f7e783edf3e3be9685677600163d",
|
|
382
|
+
"signature": "fc0a557aec2e58331efa26547eba09daa35549a19cf30c0175bdc21e22990496"
|
|
379
383
|
},
|
|
380
384
|
"../src/components/graphs/bar-stacked.ts": {
|
|
381
|
-
"version": "
|
|
382
|
-
"signature": "
|
|
385
|
+
"version": "e8b9e5380c17c247669f1f68998fc8497e7b8e1094a60295d9141a4b6eba3b84",
|
|
386
|
+
"signature": "ba967c3ba401b6e0790692f41c3c208f61fab36d49c41558e1e3b2172d87ca58"
|
|
383
387
|
},
|
|
384
388
|
"../src/components/graphs/scatter.ts": {
|
|
385
|
-
"version": "
|
|
386
|
-
"signature": "
|
|
389
|
+
"version": "d194b1071edacf20a873ca1ed73d154dc4003b46766c4c86b70ea71e124dc5b0",
|
|
390
|
+
"signature": "05a23d46dfec77a13197a6af1a111281d5bac89b8b785cd186f7ec382843c95d"
|
|
387
391
|
},
|
|
388
392
|
"../src/components/graphs/bubble.ts": {
|
|
389
|
-
"version": "
|
|
390
|
-
"signature": "
|
|
393
|
+
"version": "d60a3b1bef0cfb6a0f8bc739889bb13008b89a199f4cca6a2c4e1ba8eb395a2e",
|
|
394
|
+
"signature": "fc6e340453242001867c0679049961ef5221c96d6acaf3189fb3b5f10fdddc18"
|
|
391
395
|
},
|
|
392
396
|
"../src/components/graphs/line.ts": {
|
|
393
|
-
"version": "
|
|
394
|
-
"signature": "
|
|
397
|
+
"version": "8a407ba6c37e012cba836161d7269c61cac011749e9f2debbfc26f6732dd0d63",
|
|
398
|
+
"signature": "1947c1c2b4c2d1f0fc4da8f8bd6e8895c28c6d0b0a5b96c314b063269fc9957d"
|
|
395
399
|
},
|
|
396
400
|
"../src/components/graphs/pie.ts": {
|
|
397
|
-
"version": "
|
|
398
|
-
"signature": "
|
|
401
|
+
"version": "6c32369c7481c8c5d50bc9205495423c3bc2fd1bed9da6f68e2fcf226af47eb6",
|
|
402
|
+
"signature": "95760988a47b9f66bc73f6a07f1fec61dc53069ce3ca7284024d038a04cbb3b5"
|
|
399
403
|
},
|
|
400
404
|
"../src/components/graphs/donut.ts": {
|
|
401
|
-
"version": "
|
|
405
|
+
"version": "dde0f524a84b583c72663a9a79348a9cd9f2b90d767b0da67f766e32fcb0cb5d",
|
|
402
406
|
"signature": "82c7ff2a9e676b913390acdabd2254a93639d451164e4ef90c1eabe99086fdad"
|
|
403
407
|
},
|
|
404
408
|
"../src/components/layout/spacer.ts": {
|
|
@@ -422,7 +426,7 @@
|
|
|
422
426
|
"signature": "fa19d53832e7a2e867b5800a08f68e363e2ef58da4443cd420e8bf7b6b21a996"
|
|
423
427
|
},
|
|
424
428
|
"../src/components/axes/grid.ts": {
|
|
425
|
-
"version": "
|
|
429
|
+
"version": "3a185dd6f81a94a26fa1f97d837d050476a1781c53a4c92cc55eba89061204c9",
|
|
426
430
|
"signature": "cd1cf7bc95afbb710c2a1a716ec9eb12315877f9e84cfc84e1ffb7f0b0057847"
|
|
427
431
|
},
|
|
428
432
|
"../src/components/axes/zero-line.ts": {
|
|
@@ -430,28 +434,24 @@
|
|
|
430
434
|
"signature": "7ffc020d2131b23cee59b12e51ee0368f668a817b5a9e11e76ae8d35f01baffa"
|
|
431
435
|
},
|
|
432
436
|
"../src/components/index.ts": {
|
|
433
|
-
"version": "
|
|
434
|
-
"signature": "
|
|
437
|
+
"version": "7c9b0f8a9af059e1bf213fabfa8501db2ac1c504a708de5f4815fd3fb5dfbc5e",
|
|
438
|
+
"signature": "d8bb21e0e0067d60b486d89818f0bc7cc8184997fa698b5645e28c6e37552c0d"
|
|
435
439
|
},
|
|
436
440
|
"../src/chart.ts": {
|
|
437
|
-
"version": "
|
|
441
|
+
"version": "41dca13ae5cef53f34372d20cc9b83f4b724e70c037a18e5e1879225ff376d2b",
|
|
438
442
|
"signature": "3c993d9bc85997c543f58349feee84a8d03a9af668c1c39003a0403f524f147a"
|
|
439
443
|
},
|
|
440
444
|
"../src/axis-chart.ts": {
|
|
441
445
|
"version": "8c8868ad050f9317618657e16e508315e5cffdecf4b9c492c06406e4d3743c82",
|
|
442
446
|
"signature": "b99c159251d715d804656f7866906e4961a3e3b25a331f030b7201fa57bb8dbd"
|
|
443
447
|
},
|
|
444
|
-
"../src/model-simple-bar.ts": {
|
|
445
|
-
"version": "9773efe0452f72b28b8b3820f37fd1b0d9fc26a5c07ec63b13c5480cf6eefd50",
|
|
446
|
-
"signature": "2336da5955d27ea9457f88e5e25c1cfd83c3528a69baaad527c1a9090cc5cd61"
|
|
447
|
-
},
|
|
448
448
|
"../src/charts/bar-simple.ts": {
|
|
449
|
-
"version": "
|
|
450
|
-
"signature": "
|
|
449
|
+
"version": "7312c2ab7e379cea39ddfd8aebe1cfd566a20937e09d47fd73d45fc0a6c37433",
|
|
450
|
+
"signature": "cbb55db116d71dcdc01770f39c5d2081f01464a87440f4deb095ae6fe17d662e"
|
|
451
451
|
},
|
|
452
452
|
"../src/charts/bar-grouped.ts": {
|
|
453
|
-
"version": "
|
|
454
|
-
"signature": "
|
|
453
|
+
"version": "88f9a0078d128b217702ab21b5245968aa089c3f8a70892f3735a4c6e914b406",
|
|
454
|
+
"signature": "1bd4a1fc1b78bda6b83b8c954cd2017d7cd246907a1041470059f566612da604"
|
|
455
455
|
},
|
|
456
456
|
"../src/charts/bar-stacked.ts": {
|
|
457
457
|
"version": "131350849315d4415bc290cff1f88503dc13070a7b5cb3f5b7ab2176244ef418",
|
|
@@ -470,15 +470,15 @@
|
|
|
470
470
|
"signature": "41a01fadab7f900eef70c7f60cb72f44b66c1df0a673f9180197d49fb58ac33b"
|
|
471
471
|
},
|
|
472
472
|
"../src/model-pie.ts": {
|
|
473
|
-
"version": "
|
|
474
|
-
"signature": "
|
|
473
|
+
"version": "34160c9d75a18c5e13a087a67753e3c76e122ef0b5ec7674584f9d623762cce8",
|
|
474
|
+
"signature": "28be93c865805c51d75dad324fe207893f3b1ef38afc6c11ef794216b6be9bf3"
|
|
475
475
|
},
|
|
476
476
|
"../src/charts/pie.ts": {
|
|
477
|
-
"version": "
|
|
477
|
+
"version": "581dd6c6590b5f6b1b0ec0660ebfc3ea9bdabdb3e381f4b989cb3f918fbfd972",
|
|
478
478
|
"signature": "54c337e2837b4f488f12b93e61c6c0a2a700a9d2f2c13134fd7a528ae2d71048"
|
|
479
479
|
},
|
|
480
480
|
"../src/charts/donut.ts": {
|
|
481
|
-
"version": "
|
|
481
|
+
"version": "f1b148371b488946581f729921e476a1f849a57560d7fb6995bcff0ce0d60370",
|
|
482
482
|
"signature": "dac3c87dca1297656f125da85b22e4c52c161254ed7712d1b825d7e585ff2c68"
|
|
483
483
|
},
|
|
484
484
|
"../src/charts/index.ts": {
|
|
@@ -1253,7 +1253,10 @@
|
|
|
1253
1253
|
"../src/configuration.ts",
|
|
1254
1254
|
"../src/tools.ts",
|
|
1255
1255
|
"../src/services/colorPalettes.ts",
|
|
1256
|
+
"../src/interfaces/index.ts",
|
|
1256
1257
|
"../../../node_modules/@types/d3-scale/index.d.ts",
|
|
1258
|
+
"../../../node_modules/@types/d3-collection/index.d.ts",
|
|
1259
|
+
"../../../node_modules/@types/d3-shape/index.d.ts",
|
|
1257
1260
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1258
1261
|
"../node_modules/@types/node/fs.d.ts",
|
|
1259
1262
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
@@ -1277,6 +1280,7 @@
|
|
|
1277
1280
|
],
|
|
1278
1281
|
"../src/services/essentials/dom-utils.ts": [
|
|
1279
1282
|
"../src/services/service.ts",
|
|
1283
|
+
"../src/interfaces/index.ts",
|
|
1280
1284
|
"../../../node_modules/@types/d3-selection/index.d.ts",
|
|
1281
1285
|
"../src/tools.ts",
|
|
1282
1286
|
"../../../node_modules/resize-observer-polyfill/src/index.d.ts",
|
|
@@ -1312,6 +1316,7 @@
|
|
|
1312
1316
|
"../src/tools.ts",
|
|
1313
1317
|
"../../../node_modules/@types/d3-scale/index.d.ts",
|
|
1314
1318
|
"../../../node_modules/@types/d3-array/index.d.ts",
|
|
1319
|
+
"../../../node_modules/@types/d3-collection/index.d.ts",
|
|
1315
1320
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1316
1321
|
"../node_modules/@types/node/fs.d.ts",
|
|
1317
1322
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
@@ -1456,6 +1461,16 @@
|
|
|
1456
1461
|
"../node_modules/@types/node/util.d.ts",
|
|
1457
1462
|
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1458
1463
|
],
|
|
1464
|
+
"../src/components/essentials/tooltip-pie.ts": [
|
|
1465
|
+
"../src/components/essentials/tooltip.ts",
|
|
1466
|
+
"../src/tools.ts",
|
|
1467
|
+
"../src/interfaces/index.ts",
|
|
1468
|
+
"../../../node_modules/date-fns/typings.d.ts",
|
|
1469
|
+
"../node_modules/@types/node/fs.d.ts",
|
|
1470
|
+
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1471
|
+
"../node_modules/@types/node/util.d.ts",
|
|
1472
|
+
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1473
|
+
],
|
|
1459
1474
|
"../src/components/essentials/tooltip-scatter.ts": [
|
|
1460
1475
|
"../src/components/essentials/tooltip.ts",
|
|
1461
1476
|
"../src/tools.ts",
|
|
@@ -1468,7 +1483,6 @@
|
|
|
1468
1483
|
],
|
|
1469
1484
|
"../src/components/graphs/bar.ts": [
|
|
1470
1485
|
"../src/components/component.ts",
|
|
1471
|
-
"../src/interfaces/index.ts",
|
|
1472
1486
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1473
1487
|
"../node_modules/@types/node/fs.d.ts",
|
|
1474
1488
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
@@ -1491,6 +1505,7 @@
|
|
|
1491
1505
|
"../src/components/graphs/bar.ts",
|
|
1492
1506
|
"../src/tools.ts",
|
|
1493
1507
|
"../src/interfaces/index.ts",
|
|
1508
|
+
"../../../node_modules/@types/d3-collection/index.d.ts",
|
|
1494
1509
|
"../../../node_modules/@types/d3-selection/index.d.ts",
|
|
1495
1510
|
"../../../node_modules/@types/d3-color/index.d.ts",
|
|
1496
1511
|
"../../../node_modules/@types/d3-scale/index.d.ts",
|
|
@@ -1505,8 +1520,8 @@
|
|
|
1505
1520
|
"../src/components/graphs/bar.ts",
|
|
1506
1521
|
"../src/interfaces/index.ts",
|
|
1507
1522
|
"../../../node_modules/@types/d3-selection/index.d.ts",
|
|
1508
|
-
"../../../node_modules/@types/d3-shape/index.d.ts",
|
|
1509
1523
|
"../../../node_modules/@types/d3-color/index.d.ts",
|
|
1524
|
+
"../../../node_modules/@types/d3-collection/index.d.ts",
|
|
1510
1525
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1511
1526
|
"../node_modules/@types/node/fs.d.ts",
|
|
1512
1527
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
@@ -1663,6 +1678,7 @@
|
|
|
1663
1678
|
"../src/components/essentials/title.ts",
|
|
1664
1679
|
"../src/components/essentials/tooltip.ts",
|
|
1665
1680
|
"../src/components/essentials/tooltip-bar.ts",
|
|
1681
|
+
"../src/components/essentials/tooltip-pie.ts",
|
|
1666
1682
|
"../src/components/essentials/tooltip-scatter.ts",
|
|
1667
1683
|
"../src/components/graphs/bar-simple.ts",
|
|
1668
1684
|
"../src/components/graphs/bar-grouped.ts",
|
|
@@ -1708,24 +1724,11 @@
|
|
|
1708
1724
|
"../node_modules/@types/node/util.d.ts",
|
|
1709
1725
|
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1710
1726
|
],
|
|
1711
|
-
"../src/model-simple-bar.ts": [
|
|
1712
|
-
"../src/configuration.ts",
|
|
1713
|
-
"../src/model.ts",
|
|
1714
|
-
"../src/tools.ts",
|
|
1715
|
-
"../src/services/colorPalettes.ts",
|
|
1716
|
-
"../../../node_modules/@types/d3-scale/index.d.ts",
|
|
1717
|
-
"../../../node_modules/date-fns/typings.d.ts",
|
|
1718
|
-
"../node_modules/@types/node/fs.d.ts",
|
|
1719
|
-
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1720
|
-
"../node_modules/@types/node/util.d.ts",
|
|
1721
|
-
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1722
|
-
],
|
|
1723
1727
|
"../src/charts/bar-simple.ts": [
|
|
1724
1728
|
"../src/axis-chart.ts",
|
|
1725
1729
|
"../src/configuration.ts",
|
|
1726
1730
|
"../src/interfaces/index.ts",
|
|
1727
1731
|
"../src/tools.ts",
|
|
1728
|
-
"../src/model-simple-bar.ts",
|
|
1729
1732
|
"../src/components/index.ts",
|
|
1730
1733
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1731
1734
|
"../node_modules/@types/node/fs.d.ts",
|
|
@@ -1794,11 +1797,7 @@
|
|
|
1794
1797
|
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1795
1798
|
],
|
|
1796
1799
|
"../src/model-pie.ts": [
|
|
1797
|
-
"../src/configuration.ts",
|
|
1798
1800
|
"../src/model.ts",
|
|
1799
|
-
"../src/tools.ts",
|
|
1800
|
-
"../src/services/colorPalettes.ts",
|
|
1801
|
-
"../../../node_modules/@types/d3-scale/index.d.ts",
|
|
1802
1801
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1803
1802
|
"../node_modules/@types/node/fs.d.ts",
|
|
1804
1803
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
@@ -2532,7 +2531,6 @@
|
|
|
2532
2531
|
"../src/axis-chart.ts"
|
|
2533
2532
|
],
|
|
2534
2533
|
"../src/charts/bar-simple.ts": [
|
|
2535
|
-
"../src/model-simple-bar.ts",
|
|
2536
2534
|
"../src/interfaces/index.ts",
|
|
2537
2535
|
"../src/axis-chart.ts"
|
|
2538
2536
|
],
|
|
@@ -2555,6 +2553,7 @@
|
|
|
2555
2553
|
"../src/components/essentials/title.ts",
|
|
2556
2554
|
"../src/components/essentials/tooltip.ts",
|
|
2557
2555
|
"../src/components/essentials/tooltip-bar.ts",
|
|
2556
|
+
"../src/components/essentials/tooltip-pie.ts",
|
|
2558
2557
|
"../src/components/essentials/tooltip-scatter.ts",
|
|
2559
2558
|
"../src/components/graphs/bar-simple.ts",
|
|
2560
2559
|
"../src/components/graphs/bar-grouped.ts",
|
|
@@ -2612,13 +2611,14 @@
|
|
|
2612
2611
|
"../src/components/graphs/bar-simple.ts": [
|
|
2613
2612
|
"../src/components/graphs/bar.ts"
|
|
2614
2613
|
],
|
|
2615
|
-
"../src/components/graphs/bar.ts": [
|
|
2616
|
-
"../src/components/component.ts"
|
|
2617
|
-
],
|
|
2618
2614
|
"../src/components/essentials/tooltip-scatter.ts": [
|
|
2619
2615
|
"../src/interfaces/index.ts",
|
|
2620
2616
|
"../src/components/essentials/tooltip.ts"
|
|
2621
2617
|
],
|
|
2618
|
+
"../src/components/essentials/tooltip-pie.ts": [
|
|
2619
|
+
"../src/interfaces/index.ts",
|
|
2620
|
+
"../src/components/essentials/tooltip.ts"
|
|
2621
|
+
],
|
|
2622
2622
|
"../src/components/essentials/tooltip.ts": [
|
|
2623
2623
|
"../../../node_modules/@carbon/utils-position/index.d.ts",
|
|
2624
2624
|
"../src/model.ts",
|
|
@@ -2662,23 +2662,20 @@
|
|
|
2662
2662
|
"../src/components/layout/spacer.ts": [
|
|
2663
2663
|
"../src/components/component.ts"
|
|
2664
2664
|
],
|
|
2665
|
+
"../src/components/graphs/bar.ts": [
|
|
2666
|
+
"../src/components/component.ts"
|
|
2667
|
+
],
|
|
2665
2668
|
"../src/interfaces/components.ts": [
|
|
2666
2669
|
"../src/components/component.ts",
|
|
2667
2670
|
"../src/interfaces/enums.ts"
|
|
2668
2671
|
],
|
|
2669
|
-
"../src/
|
|
2670
|
-
"
|
|
2672
|
+
"../src/services/essentials/dom-utils.ts": [
|
|
2673
|
+
"../../../node_modules/@types/d3-selection/index.d.ts",
|
|
2674
|
+
"../src/services/service.ts"
|
|
2671
2675
|
],
|
|
2672
2676
|
"../src/model-pie.ts": [
|
|
2673
2677
|
"../src/model.ts"
|
|
2674
2678
|
],
|
|
2675
|
-
"../src/model-simple-bar.ts": [
|
|
2676
|
-
"../src/model.ts"
|
|
2677
|
-
],
|
|
2678
|
-
"../src/services/essentials/transitions.ts": [
|
|
2679
|
-
"../../../node_modules/@types/d3-transition/index.d.ts",
|
|
2680
|
-
"../src/services/service.ts"
|
|
2681
|
-
],
|
|
2682
2679
|
"../src/services/service.ts": [
|
|
2683
2680
|
"../src/model.ts"
|
|
2684
2681
|
],
|
|
@@ -2686,13 +2683,16 @@
|
|
|
2686
2683
|
"../../../node_modules/@types/d3-shape/index.d.ts",
|
|
2687
2684
|
"../src/services/service.ts"
|
|
2688
2685
|
],
|
|
2689
|
-
"../src/services/essentials/
|
|
2686
|
+
"../src/services/essentials/transitions.ts": [
|
|
2687
|
+
"../../../node_modules/@types/d3-transition/index.d.ts",
|
|
2690
2688
|
"../src/services/service.ts"
|
|
2691
2689
|
],
|
|
2692
|
-
"../src/services/essentials/
|
|
2693
|
-
"../../../node_modules/@types/d3-selection/index.d.ts",
|
|
2690
|
+
"../src/services/essentials/events.ts": [
|
|
2694
2691
|
"../src/services/service.ts"
|
|
2695
2692
|
],
|
|
2693
|
+
"../src/configuration.ts": [
|
|
2694
|
+
"../src/interfaces/index.ts"
|
|
2695
|
+
],
|
|
2696
2696
|
"../src/tools.ts": [
|
|
2697
2697
|
"../src/interfaces/index.ts"
|
|
2698
2698
|
],
|
|
@@ -3483,6 +3483,7 @@
|
|
|
3483
3483
|
"../../../node_modules/@carbon/utils-position/index.d.ts",
|
|
3484
3484
|
"../src/components/essentials/tooltip.ts",
|
|
3485
3485
|
"../src/components/essentials/tooltip-bar.ts",
|
|
3486
|
+
"../src/components/essentials/tooltip-pie.ts",
|
|
3486
3487
|
"../src/components/essentials/tooltip-scatter.ts",
|
|
3487
3488
|
"../src/components/graphs/bar.ts",
|
|
3488
3489
|
"../src/components/graphs/bar-simple.ts",
|
|
@@ -3503,7 +3504,6 @@
|
|
|
3503
3504
|
"../src/components/index.ts",
|
|
3504
3505
|
"../src/chart.ts",
|
|
3505
3506
|
"../src/axis-chart.ts",
|
|
3506
|
-
"../src/model-simple-bar.ts",
|
|
3507
3507
|
"../src/charts/bar-simple.ts",
|
|
3508
3508
|
"../src/charts/bar-grouped.ts",
|
|
3509
3509
|
"../src/charts/bar-stacked.ts",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ChartModel } from "./model";
|
|
2
|
-
/** The charting model layer which includes mainly the chart data and options,
|
|
3
|
-
* as well as some misc. information to be shared among components */
|
|
4
|
-
export declare class SimpleBarChartModel extends ChartModel {
|
|
5
|
-
constructor(services: any);
|
|
6
|
-
generateDataLabels(newData: any): {};
|
|
7
|
-
getDisplayData(): any;
|
|
8
|
-
setColorScale(): void;
|
|
9
|
-
getFillColor(label: string): any;
|
|
10
|
-
getStrokeColor(label: string): any;
|
|
11
|
-
}
|
package/model-simple-bar.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ChartModel } from "./model";
|
|
2
|
-
/** The charting model layer which includes mainly the chart data and options,
|
|
3
|
-
* as well as some misc. information to be shared among components */
|
|
4
|
-
export declare class SimpleBarChartModel extends ChartModel {
|
|
5
|
-
constructor(services: any);
|
|
6
|
-
generateDataLabels(newData: any): {};
|
|
7
|
-
getDisplayData(): any;
|
|
8
|
-
setColorScale(): void;
|
|
9
|
-
getFillColor(label: string): any;
|
|
10
|
-
getStrokeColor(label: string): any;
|
|
11
|
-
}
|
package/model-simple-bar.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
// Internal Imports
|
|
15
|
-
import * as Configuration from "./configuration";
|
|
16
|
-
import { ChartModel } from "./model";
|
|
17
|
-
import { Tools } from "./tools";
|
|
18
|
-
import * as colorPalettes from "./services/colorPalettes";
|
|
19
|
-
// D3 Imports
|
|
20
|
-
import { scaleOrdinal } from "d3-scale";
|
|
21
|
-
/** The charting model layer which includes mainly the chart data and options,
|
|
22
|
-
* as well as some misc. information to be shared among components */
|
|
23
|
-
var SimpleBarChartModel = /** @class */ (function (_super) {
|
|
24
|
-
__extends(SimpleBarChartModel, _super);
|
|
25
|
-
function SimpleBarChartModel(services) {
|
|
26
|
-
return _super.call(this, services) || this;
|
|
27
|
-
}
|
|
28
|
-
SimpleBarChartModel.prototype.generateDataLabels = function (newData) {
|
|
29
|
-
var dataLabels = {};
|
|
30
|
-
newData.labels.forEach(function (label) {
|
|
31
|
-
dataLabels[label] = Configuration.legend.items.status.ACTIVE;
|
|
32
|
-
});
|
|
33
|
-
return dataLabels;
|
|
34
|
-
};
|
|
35
|
-
SimpleBarChartModel.prototype.getDisplayData = function () {
|
|
36
|
-
var ACTIVE = Configuration.legend.items.status.ACTIVE;
|
|
37
|
-
var dataLabels = this.get("dataLabels");
|
|
38
|
-
if (!this.get("data")) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
// Remove datasets that have been disabled
|
|
42
|
-
var displayData = Tools.clone(this.get("data"));
|
|
43
|
-
var dataset = displayData.datasets[0];
|
|
44
|
-
// Remove data values that correspond to labels that are disabled
|
|
45
|
-
dataset.data = dataset.data.filter(function (datum, i) {
|
|
46
|
-
var label = displayData.labels[i];
|
|
47
|
-
return dataLabels[label] === ACTIVE;
|
|
48
|
-
});
|
|
49
|
-
// Remove labels that are disabled
|
|
50
|
-
displayData.labels = displayData.labels.filter(function (label) { return dataLabels[label] === ACTIVE; });
|
|
51
|
-
return displayData;
|
|
52
|
-
};
|
|
53
|
-
/*
|
|
54
|
-
* Fill scales
|
|
55
|
-
*
|
|
56
|
-
*/
|
|
57
|
-
SimpleBarChartModel.prototype.setColorScale = function () {
|
|
58
|
-
var dataset = this.getDisplayData().datasets[0];
|
|
59
|
-
if (dataset.fillColors) {
|
|
60
|
-
this.colorScale = scaleOrdinal().range(dataset.fillColors).domain(this.allDataLabels);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
var colors = colorPalettes.DEFAULT;
|
|
64
|
-
this.colorScale = scaleOrdinal().range(colors).domain(this.allDataLabels);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
SimpleBarChartModel.prototype.getFillColor = function (label) {
|
|
68
|
-
var options = this.getOptions();
|
|
69
|
-
if (options.getFillColor) {
|
|
70
|
-
return options.getFillColor(label);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
return this.getFillScale()(label);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
SimpleBarChartModel.prototype.getStrokeColor = function (label) {
|
|
77
|
-
var options = this.getOptions();
|
|
78
|
-
if (options.getStrokeColor) {
|
|
79
|
-
return options.getStrokeColor(label);
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
return this.colorScale(label);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
return SimpleBarChartModel;
|
|
86
|
-
}(ChartModel));
|
|
87
|
-
export { SimpleBarChartModel };
|
|
88
|
-
//# sourceMappingURL=../src/model-simple-bar.js.map
|
package/model-simple-bar.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-simple-bar.js","sourceRoot":"","sources":["model-simple-bar.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAE1D,aAAa;AACb,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;qEACqE;AACrE;IAAyC,uCAAU;IAClD,6BAAY,QAAa;eACxB,kBAAM,QAAQ,CAAC;IAChB,CAAC;IAED,gDAAkB,GAAlB,UAAmB,OAAO;QACzB,IAAM,UAAU,GAAG,EAAE,CAAC;QACtB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,UAAA,KAAK;YAC3B,UAAU,CAAC,KAAK,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;QAC9D,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,4CAAc,GAAd;QACS,IAAA,iDAAM,CAAuC;QACrD,IAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAE1C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;YACtB,OAAO,IAAI,CAAC;SACZ;QAED,0CAA0C;QAC1C,IAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;QAClD,IAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAExC,iEAAiE;QACjE,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,UAAC,KAAK,EAAE,CAAC;YAC3C,IAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAEpC,OAAO,UAAU,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC;QACrC,CAAC,CAAC,CAAC;QAEH,kCAAkC;QAClC,WAAW,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,UAAA,KAAK,IAAI,OAAA,UAAU,CAAC,KAAK,CAAC,KAAK,MAAM,EAA5B,CAA4B,CAAC,CAAC;QAEtF,OAAO,WAAW,CAAC;IACpB,CAAC;IAED;;;MAGE;IACF,2CAAa,GAAb;QACC,IAAM,OAAO,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAClD,IAAI,OAAO,CAAC,UAAU,EAAE;YACvB,IAAI,CAAC,UAAU,GAAG,YAAY,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SACtF;aAAM;YACN,IAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC;YACrC,IAAI,CAAC,UAAU,GAAG,YAAY,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SAC1E;IACF,CAAC;IAGD,0CAAY,GAAZ,UAAa,KAAa;QACzB,IAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAClC,IAAI,OAAO,CAAC,YAAY,EAAE;YACzB,OAAO,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;SACnC;aAAM;YACN,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,CAAC;SAClC;IACF,CAAC;IAED,4CAAc,GAAd,UAAe,KAAa;QAC3B,IAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAClC,IAAI,OAAO,CAAC,cAAc,EAAE;YAC3B,OAAO,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;SACrC;aAAM;YACN,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;SAC9B;IACF,CAAC;IACF,0BAAC;AAAD,CAAC,AAvED,CAAyC,UAAU,GAuElD","sourcesContent":["// Internal Imports\nimport * as Configuration from \"./configuration\";\nimport { ChartModel } from \"./model\";\nimport { Tools } from \"./tools\";\nimport * as colorPalettes from \"./services/colorPalettes\";\n\n// D3 Imports\nimport { scaleOrdinal } from \"d3-scale\";\n\n/** The charting model layer which includes mainly the chart data and options,\n * as well as some misc. information to be shared among components */\nexport class SimpleBarChartModel extends ChartModel {\n\tconstructor(services: any) {\n\t\tsuper(services);\n\t}\n\n\tgenerateDataLabels(newData) {\n\t\tconst dataLabels = {};\n\t\tnewData.labels.forEach(label => {\n\t\t\tdataLabels[label] = Configuration.legend.items.status.ACTIVE;\n\t\t});\n\n\t\treturn dataLabels;\n\t}\n\n\tgetDisplayData() {\n\t\tconst { ACTIVE } = Configuration.legend.items.status;\n\t\tconst dataLabels = this.get(\"dataLabels\");\n\n\t\tif (!this.get(\"data\")) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Remove datasets that have been disabled\n\t\tconst displayData = Tools.clone(this.get(\"data\"));\n\t\tconst dataset = displayData.datasets[0];\n\n\t\t// Remove data values that correspond to labels that are disabled\n\t\tdataset.data = dataset.data.filter((datum, i) => {\n\t\t\tconst label = displayData.labels[i];\n\n\t\t\treturn dataLabels[label] === ACTIVE;\n\t\t});\n\n\t\t// Remove labels that are disabled\n\t\tdisplayData.labels = displayData.labels.filter(label => dataLabels[label] === ACTIVE);\n\n\t\treturn displayData;\n\t}\n\n\t/*\n\t * Fill scales\n\t *\n\t*/\n\tsetColorScale() {\n\t\tconst dataset = this.getDisplayData().datasets[0];\n\t\tif (dataset.fillColors) {\n\t\t\tthis.colorScale = scaleOrdinal().range(dataset.fillColors).domain(this.allDataLabels);\n\t\t} else {\n\t\t\tconst colors = colorPalettes.DEFAULT;\n\t\t\tthis.colorScale = scaleOrdinal().range(colors).domain(this.allDataLabels);\n\t\t}\n\t}\n\n\n\tgetFillColor(label: string) {\n\t\tconst options = this.getOptions();\n\t\tif (options.getFillColor) {\n\t\t\treturn options.getFillColor(label);\n\t\t} else {\n\t\t\treturn this.getFillScale()(label);\n\t\t}\n\t}\n\n\tgetStrokeColor(label: string) {\n\t\tconst options = this.getOptions();\n\t\tif (options.getStrokeColor) {\n\t\t\treturn options.getStrokeColor(label);\n\t\t} else {\n\t\t\treturn this.colorScale(label);\n\t\t}\n\t}\n}\n"]}
|