@carbon/charts 0.32.8 → 0.32.12
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/area.d.ts +17 -0
- package/build/demo/data/bar.d.ts +51 -0
- package/build/demo/data/gauge.d.ts +40 -0
- package/build/demo/data/index.d.ts +6 -0
- package/build/demo/data/line.d.ts +26 -0
- package/build/demo/data/scatter.d.ts +18 -0
- package/build/src/charts/gauge.d.ts +6 -0
- package/build/src/charts/index.d.ts +1 -0
- package/build/src/components/essentials/tooltip-bar.d.ts +2 -2
- package/build/src/components/essentials/tooltip-radar.d.ts +2 -1
- package/build/src/components/essentials/tooltip.d.ts +2 -2
- package/build/src/components/graphs/gauge.d.ts +26 -0
- package/build/src/components/index.d.ts +1 -0
- package/build/src/configuration.d.ts +2 -1
- package/build/src/interfaces/axis-scales.d.ts +2 -0
- package/build/src/interfaces/charts.d.ts +20 -0
- package/build/src/interfaces/components.d.ts +2 -0
- package/build/src/interfaces/enums.d.ts +31 -1
- package/build/src/interfaces/events.d.ts +9 -0
- package/build/src/interfaces/truncation.d.ts +17 -0
- package/build/src/tools.d.ts +9 -0
- package/bundle.js +1 -1
- package/chart.js +21 -22
- package/chart.js.map +1 -1
- package/charts/gauge.d.ts +6 -0
- package/charts/gauge.js +41 -0
- package/charts/gauge.js.map +1 -0
- package/charts/index.d.ts +1 -0
- package/charts/index.js +1 -0
- package/charts/index.js.map +1 -1
- package/components/axes/axis.js +61 -1
- package/components/axes/axis.js.map +1 -1
- package/components/essentials/legend.js +39 -6
- package/components/essentials/legend.js.map +1 -1
- package/components/essentials/tooltip-bar.d.ts +2 -2
- package/components/essentials/tooltip-bar.js +20 -7
- package/components/essentials/tooltip-bar.js.map +1 -1
- package/components/essentials/tooltip-pie.js +3 -0
- package/components/essentials/tooltip-pie.js.map +1 -1
- package/components/essentials/tooltip-radar.d.ts +2 -1
- package/components/essentials/tooltip-radar.js +1 -1
- package/components/essentials/tooltip-radar.js.map +1 -1
- package/components/essentials/tooltip-scatter.js +6 -0
- package/components/essentials/tooltip-scatter.js.map +1 -1
- package/components/essentials/tooltip.d.ts +2 -2
- package/components/essentials/tooltip.js +11 -6
- package/components/essentials/tooltip.js.map +1 -1
- package/components/graphs/area-stacked.js +7 -4
- package/components/graphs/area-stacked.js.map +1 -1
- package/components/graphs/gauge.d.ts +26 -0
- package/components/graphs/gauge.js +301 -0
- package/components/graphs/gauge.js.map +1 -0
- package/components/graphs/line.js +13 -7
- package/components/graphs/line.js.map +1 -1
- package/components/graphs/scatter-stacked.js +1 -1
- package/components/graphs/scatter-stacked.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.d.ts +2 -1
- package/configuration.js +100 -65
- package/configuration.js.map +1 -1
- package/demo/data/area.d.ts +17 -0
- package/demo/data/area.js +45 -19
- package/demo/data/area.js.map +1 -1
- package/demo/data/bar.d.ts +51 -0
- package/demo/data/bar.js +52 -0
- package/demo/data/bar.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/donut.js +10 -10
- package/demo/data/donut.js.map +1 -1
- package/demo/data/gauge.d.ts +40 -0
- package/demo/data/gauge.js +41 -0
- package/demo/data/gauge.js.map +1 -0
- package/demo/data/index.d.ts +6 -0
- package/demo/data/index.js +163 -120
- package/demo/data/index.js.map +1 -1
- package/demo/data/line.d.ts +26 -0
- package/demo/data/line.js +37 -0
- package/demo/data/line.js.map +1 -1
- package/demo/data/scatter.d.ts +18 -0
- package/demo/data/scatter.js +35 -0
- package/demo/data/scatter.js.map +1 -1
- package/demo/styles.css +80 -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 +62 -23
- package/interfaces/axis-scales.d.ts +2 -0
- package/interfaces/axis-scales.js.map +1 -1
- package/interfaces/charts.d.ts +20 -0
- package/interfaces/charts.js.map +1 -1
- package/interfaces/components.d.ts +2 -0
- package/interfaces/components.js.map +1 -1
- package/interfaces/enums.d.ts +31 -1
- package/interfaces/enums.js +34 -0
- package/interfaces/enums.js.map +1 -1
- package/interfaces/events.d.ts +9 -0
- package/interfaces/events.js +10 -0
- package/interfaces/events.js.map +1 -1
- package/interfaces/truncation.d.ts +17 -0
- package/interfaces/truncation.js +1 -0
- package/interfaces/truncation.js.map +1 -0
- package/model.js +15 -0
- package/model.js.map +1 -1
- package/package.json +1 -1
- package/styles/components/_tooltip.scss +2 -0
- package/styles/graphs/_gauge.scss +19 -0
- package/styles/graphs/index.scss +1 -0
- package/styles-g10.css +21 -0
- package/styles-g10.css.map +1 -1
- package/styles-g10.min.css +1 -1
- package/styles-g10.min.css.map +1 -1
- package/styles-g100.css +21 -0
- package/styles-g100.css.map +1 -1
- package/styles-g100.min.css +1 -1
- package/styles-g100.min.css.map +1 -1
- package/styles-g90.css +21 -0
- package/styles-g90.css.map +1 -1
- package/styles-g90.min.css +1 -1
- package/styles-g90.min.css.map +1 -1
- package/styles.css +21 -0
- package/styles.css.map +1 -1
- package/styles.min.css +1 -1
- package/styles.min.css.map +1 -1
- package/tools.d.ts +9 -0
- package/tools.js +24 -1
- package/tools.js.map +1 -1
- package/tsconfig.tsbuildinfo +106 -40
|
@@ -126,8 +126,8 @@
|
|
|
126
126
|
"signature": "1c93a4a4302316313fdc8aeda3003738ffdc57df20fe88262fd15eaba01d0059"
|
|
127
127
|
},
|
|
128
128
|
"../../demo/data/area.ts": {
|
|
129
|
-
"version": "
|
|
130
|
-
"signature": "
|
|
129
|
+
"version": "6145166b004ca4335f81953a55588d0c2fa0f0d00ccf0e0d719d5c597b01cb60",
|
|
130
|
+
"signature": "2a146d816d3d5fd2deed70ffb028193bfcc679f3961e17a54062b3fbfecb8351"
|
|
131
131
|
},
|
|
132
132
|
"../../../../node_modules/date-fns/typings.d.ts": {
|
|
133
133
|
"version": "0d1954e6a821396de9f72b8d2e8553096a755eb76ad99b63857da0b9a23723a0",
|
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
"signature": "37dce3c308ecb1ef88ddf7c9f9346d64c2b09a36eb7dcd4fe9d9736f5608107f"
|
|
139
139
|
},
|
|
140
140
|
"../../demo/data/bar.ts": {
|
|
141
|
-
"version": "
|
|
142
|
-
"signature": "
|
|
141
|
+
"version": "de372e1425c5a1c538184954e785fe2af0023ee35bb7873ce6dd84d3e382a33a",
|
|
142
|
+
"signature": "768fda6a8d4a3e84302e7ba07374d6660f2f2d5112dfaf3a875dda77a8098df0"
|
|
143
143
|
},
|
|
144
144
|
"../../../../node_modules/@types/d3-array/index.d.ts": {
|
|
145
145
|
"version": "f5b8f86da74b4bfb29f85a631b725a47c8a3ab6c4ce91537e5b176bbe0cd0a7a",
|
|
@@ -270,8 +270,8 @@
|
|
|
270
270
|
"signature": "ff07d0e1e23dcc09b7868c330f7d1a554357c1ed2ec211b90dc4f4fbc406cd77"
|
|
271
271
|
},
|
|
272
272
|
"../../demo/data/line.ts": {
|
|
273
|
-
"version": "
|
|
274
|
-
"signature": "
|
|
273
|
+
"version": "ad818542c4e028af5464a0bb3099864580626769c922cc31c43cafcdc3808e75",
|
|
274
|
+
"signature": "34990abce0a80b184a19ab29ee88f758a79381e224c84f74f3e302a83db58552"
|
|
275
275
|
},
|
|
276
276
|
"../../demo/data/bubble.ts": {
|
|
277
277
|
"version": "139b3aa80b2e101799c2b64b68f600dde5a3d21b611d60bfabc4592c1f88042b",
|
|
@@ -282,24 +282,28 @@
|
|
|
282
282
|
"signature": "af77c4b8b8b5e5edc9f9df8e5c1ece6898ca16edc0579059a4c42486e5c1bd21"
|
|
283
283
|
},
|
|
284
284
|
"../../demo/data/donut.ts": {
|
|
285
|
-
"version": "
|
|
285
|
+
"version": "4af2bb8382ce73fb17a4d6725b1e5d23a1a790ef148b0dc4959368c773364475",
|
|
286
286
|
"signature": "31a0a774b1b9474e0a573f90d3cfa4edecf298c8c06dfba37846e94a63b00e07"
|
|
287
287
|
},
|
|
288
|
+
"../../demo/data/gauge.ts": {
|
|
289
|
+
"version": "1ecfcd9bca6634828418374581df97169a96979883341c355f354ae311538a63",
|
|
290
|
+
"signature": "1356f9fd82a936b9e50f2cf0f191486b56799341f8f2ad001cbed37662e2a681"
|
|
291
|
+
},
|
|
288
292
|
"../../demo/data/scatter.ts": {
|
|
289
|
-
"version": "
|
|
290
|
-
"signature": "
|
|
293
|
+
"version": "83a055d6ef2ab377b927ecf355a6163a3927226c0f69fc6a39e7c41d89ca1c31",
|
|
294
|
+
"signature": "748b4d1f4a8448ef21f35a92fccec9f5f349fb302e12d093db0916b613dd54af"
|
|
291
295
|
},
|
|
292
296
|
"../../src/interfaces/a11y.ts": {
|
|
293
297
|
"version": "0d4aed71a8b1dfaf64b2bc13434c2f6b8e19670c16b0c4f090293a2efab8518b",
|
|
294
298
|
"signature": "0d4aed71a8b1dfaf64b2bc13434c2f6b8e19670c16b0c4f090293a2efab8518b"
|
|
295
299
|
},
|
|
296
300
|
"../../src/interfaces/events.ts": {
|
|
297
|
-
"version": "
|
|
298
|
-
"signature": "
|
|
301
|
+
"version": "081c0488677e9ca915af5dcbb5c6d6e656032dce35836bc76f9aea9dd7781cb5",
|
|
302
|
+
"signature": "081c0488677e9ca915af5dcbb5c6d6e656032dce35836bc76f9aea9dd7781cb5"
|
|
299
303
|
},
|
|
300
304
|
"../../src/interfaces/enums.ts": {
|
|
301
|
-
"version": "
|
|
302
|
-
"signature": "
|
|
305
|
+
"version": "d550d9abf8402753e195d6168082eb0a1e857857ec0f27f37aee33223973894a",
|
|
306
|
+
"signature": "d550d9abf8402753e195d6168082eb0a1e857857ec0f27f37aee33223973894a"
|
|
303
307
|
},
|
|
304
308
|
"../../src/model.ts": {
|
|
305
309
|
"version": "3dffcbdd5112386a0b0cf2de6d58d9a32b5c240fea4fd996ead7c2ed556d2363",
|
|
@@ -309,17 +313,21 @@
|
|
|
309
313
|
"version": "e26a591e02fc2b57848b7a548d747f5148aa51f2f223f4b598b944e7d084120d",
|
|
310
314
|
"signature": "e26a591e02fc2b57848b7a548d747f5148aa51f2f223f4b598b944e7d084120d"
|
|
311
315
|
},
|
|
316
|
+
"../../src/interfaces/truncation.ts": {
|
|
317
|
+
"version": "e13ca1760c1d894f0cbb054be895f12207ff8a8708be12a18944832c02dd7ab2",
|
|
318
|
+
"signature": "e13ca1760c1d894f0cbb054be895f12207ff8a8708be12a18944832c02dd7ab2"
|
|
319
|
+
},
|
|
312
320
|
"../../src/interfaces/components.ts": {
|
|
313
|
-
"version": "
|
|
314
|
-
"signature": "
|
|
321
|
+
"version": "aaa3d5843260e4e2d8c40198baa194777db25aa5360406cc71ef55196d1b1fd8",
|
|
322
|
+
"signature": "aaa3d5843260e4e2d8c40198baa194777db25aa5360406cc71ef55196d1b1fd8"
|
|
315
323
|
},
|
|
316
324
|
"../../src/interfaces/axis-scales.ts": {
|
|
317
|
-
"version": "
|
|
318
|
-
"signature": "
|
|
325
|
+
"version": "7d83049c1ac328d34f48b5e65bd05c1477181123a86ba46bc3a7bffe58673716",
|
|
326
|
+
"signature": "7d83049c1ac328d34f48b5e65bd05c1477181123a86ba46bc3a7bffe58673716"
|
|
319
327
|
},
|
|
320
328
|
"../../src/interfaces/charts.ts": {
|
|
321
|
-
"version": "
|
|
322
|
-
"signature": "
|
|
329
|
+
"version": "e7b7c31eaef3bcb7f93f1ca4d510efd849b6d145e4fa034b26231272fdf5c22d",
|
|
330
|
+
"signature": "e7b7c31eaef3bcb7f93f1ca4d510efd849b6d145e4fa034b26231272fdf5c22d"
|
|
323
331
|
},
|
|
324
332
|
"../../src/interfaces/layout.ts": {
|
|
325
333
|
"version": "4d474058b20e782a7d01c499c6e5871a95dee4cbc1eed7d601e5cb246d3308d0",
|
|
@@ -334,8 +342,8 @@
|
|
|
334
342
|
"signature": "76155b4beaf0aa54eb99042bf954e56d47f803147ea42fefb4758e39f222b3d6"
|
|
335
343
|
},
|
|
336
344
|
"../../src/tools.ts": {
|
|
337
|
-
"version": "
|
|
338
|
-
"signature": "
|
|
345
|
+
"version": "43d2e2dc6323d6f67c1a572b921e195d8dfb309fc7b1ccaf7e6f642f6562af81",
|
|
346
|
+
"signature": "43d2e2dc6323d6f67c1a572b921e195d8dfb309fc7b1ccaf7e6f642f6562af81"
|
|
339
347
|
},
|
|
340
348
|
"../../demo/data/step.ts": {
|
|
341
349
|
"version": "a00e2e4e6dad931dde458d72de7cabfec33bc49e05593663b433ceae4d6cc250",
|
|
@@ -354,8 +362,8 @@
|
|
|
354
362
|
"signature": "7fbd2c1dfdbbe5439288e7376d5b535a4fb03d7f30649924e5bcaa848fda0f6b"
|
|
355
363
|
},
|
|
356
364
|
"../../demo/data/index.ts": {
|
|
357
|
-
"version": "
|
|
358
|
-
"signature": "
|
|
365
|
+
"version": "e03047127ccaa3caabba8a56d102b96f2792d8674baf48ca8681dc2d2decad4b",
|
|
366
|
+
"signature": "fbab21de19eee6ef5fde7e60a4bf13858e538d19d6652f1a5a857de33c307668"
|
|
359
367
|
},
|
|
360
368
|
"../../node_modules/@types/node/globals.d.ts": {
|
|
361
369
|
"version": "6cf62fbc792aa81fa62f99dab5cc692c5315ecd5da09dd35f1ccc82778c4d5bc",
|
|
@@ -1126,6 +1134,13 @@
|
|
|
1126
1134
|
"../../node_modules/@types/node/util.d.ts",
|
|
1127
1135
|
"../../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1128
1136
|
],
|
|
1137
|
+
"../../demo/data/gauge.ts": [
|
|
1138
|
+
"../../../../node_modules/date-fns/typings.d.ts",
|
|
1139
|
+
"../../node_modules/@types/node/fs.d.ts",
|
|
1140
|
+
"../../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1141
|
+
"../../node_modules/@types/node/util.d.ts",
|
|
1142
|
+
"../../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1143
|
+
],
|
|
1129
1144
|
"../../demo/data/scatter.ts": [
|
|
1130
1145
|
"../../demo/data/line.ts",
|
|
1131
1146
|
"../../../../node_modules/date-fns/typings.d.ts",
|
|
@@ -1171,9 +1186,17 @@
|
|
|
1171
1186
|
"../../node_modules/@types/node/util.d.ts",
|
|
1172
1187
|
"../../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1173
1188
|
],
|
|
1189
|
+
"../../src/interfaces/truncation.ts": [
|
|
1190
|
+
"../../../../node_modules/date-fns/typings.d.ts",
|
|
1191
|
+
"../../node_modules/@types/node/fs.d.ts",
|
|
1192
|
+
"../../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1193
|
+
"../../node_modules/@types/node/util.d.ts",
|
|
1194
|
+
"../../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1195
|
+
],
|
|
1174
1196
|
"../../src/interfaces/components.ts": [
|
|
1175
1197
|
"../interfaces/enums.d.ts",
|
|
1176
1198
|
"../components/component.d.ts",
|
|
1199
|
+
"../interfaces/truncation.d.ts",
|
|
1177
1200
|
"../../../../node_modules/date-fns/typings.d.ts",
|
|
1178
1201
|
"../../node_modules/@types/node/fs.d.ts",
|
|
1179
1202
|
"../../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
@@ -1185,12 +1208,14 @@
|
|
|
1185
1208
|
"../../../../node_modules/@types/d3/index.d.ts",
|
|
1186
1209
|
"../../../../node_modules/date-fns/typings.d.ts",
|
|
1187
1210
|
"../interfaces/components.d.ts",
|
|
1211
|
+
"../interfaces/truncation.d.ts",
|
|
1188
1212
|
"../../node_modules/@types/node/fs.d.ts",
|
|
1189
1213
|
"../../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1190
1214
|
"../../node_modules/@types/node/util.d.ts",
|
|
1191
1215
|
"../../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1192
1216
|
],
|
|
1193
1217
|
"../../src/interfaces/charts.ts": [
|
|
1218
|
+
"../interfaces/enums.d.ts",
|
|
1194
1219
|
"../interfaces/index.d.ts",
|
|
1195
1220
|
"../interfaces/components.d.ts",
|
|
1196
1221
|
"../interfaces/axis-scales.d.ts",
|
|
@@ -1276,6 +1301,7 @@
|
|
|
1276
1301
|
"../../demo/data/donut.ts",
|
|
1277
1302
|
"../../demo/data/line.ts",
|
|
1278
1303
|
"../../demo/data/pie.ts",
|
|
1304
|
+
"../../demo/data/gauge.ts",
|
|
1279
1305
|
"../../demo/data/scatter.ts",
|
|
1280
1306
|
"../../demo/data/step.ts",
|
|
1281
1307
|
"../../demo/data/time-series-axis.ts",
|
|
@@ -1924,6 +1950,7 @@
|
|
|
1924
1950
|
"../../demo/data/donut.ts",
|
|
1925
1951
|
"../../demo/data/line.ts",
|
|
1926
1952
|
"../../demo/data/pie.ts",
|
|
1953
|
+
"../../demo/data/gauge.ts",
|
|
1927
1954
|
"../../demo/data/scatter.ts",
|
|
1928
1955
|
"../../demo/data/step.ts",
|
|
1929
1956
|
"../../demo/data/radar.ts"
|
|
@@ -2000,6 +2027,7 @@
|
|
|
2000
2027
|
"../../../../node_modules/@types/d3/index.d.ts",
|
|
2001
2028
|
"../../../../node_modules/date-fns/typings.d.ts",
|
|
2002
2029
|
"../interfaces/components.d.ts",
|
|
2030
|
+
"../interfaces/truncation.d.ts",
|
|
2003
2031
|
"../../node_modules/@types/node/fs.d.ts",
|
|
2004
2032
|
"../../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
2005
2033
|
"../../node_modules/@types/node/util.d.ts",
|
|
@@ -2020,6 +2048,7 @@
|
|
|
2020
2048
|
"../../node_modules/@types/node/ts3.2/util.d.ts"
|
|
2021
2049
|
],
|
|
2022
2050
|
"../../src/interfaces/charts.ts": [
|
|
2051
|
+
"../interfaces/enums.d.ts",
|
|
2023
2052
|
"../interfaces/index.d.ts",
|
|
2024
2053
|
"../interfaces/components.d.ts",
|
|
2025
2054
|
"../interfaces/axis-scales.d.ts",
|
|
@@ -2291,6 +2320,7 @@
|
|
|
2291
2320
|
"../../src/interfaces/components.ts": [
|
|
2292
2321
|
"../interfaces/enums.d.ts",
|
|
2293
2322
|
"../components/component.d.ts",
|
|
2323
|
+
"../interfaces/truncation.d.ts",
|
|
2294
2324
|
"../../../../node_modules/date-fns/typings.d.ts",
|
|
2295
2325
|
"../../node_modules/@types/node/fs.d.ts",
|
|
2296
2326
|
"../../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
@@ -2312,6 +2342,13 @@
|
|
|
2312
2342
|
"../../node_modules/@types/node/util.d.ts",
|
|
2313
2343
|
"../../node_modules/@types/node/ts3.2/util.d.ts"
|
|
2314
2344
|
],
|
|
2345
|
+
"../../src/interfaces/truncation.ts": [
|
|
2346
|
+
"../../../../node_modules/date-fns/typings.d.ts",
|
|
2347
|
+
"../../node_modules/@types/node/fs.d.ts",
|
|
2348
|
+
"../../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
2349
|
+
"../../node_modules/@types/node/util.d.ts",
|
|
2350
|
+
"../../node_modules/@types/node/ts3.2/util.d.ts"
|
|
2351
|
+
],
|
|
2315
2352
|
"../../../../node_modules/date-fns/locale/fr/index.d.ts": [
|
|
2316
2353
|
"../../../../node_modules/date-fns/typings.d.ts",
|
|
2317
2354
|
"../../node_modules/@types/node/fs.d.ts",
|
|
@@ -2780,12 +2817,14 @@
|
|
|
2780
2817
|
"../../demo/data/bubble.ts",
|
|
2781
2818
|
"../../demo/data/pie.ts",
|
|
2782
2819
|
"../../demo/data/donut.ts",
|
|
2820
|
+
"../../demo/data/gauge.ts",
|
|
2783
2821
|
"../../demo/data/scatter.ts",
|
|
2784
2822
|
"../../src/interfaces/a11y.ts",
|
|
2785
2823
|
"../../src/interfaces/events.ts",
|
|
2786
2824
|
"../../src/interfaces/enums.ts",
|
|
2787
2825
|
"../../src/model.ts",
|
|
2788
2826
|
"../../src/components/component.ts",
|
|
2827
|
+
"../../src/interfaces/truncation.ts",
|
|
2789
2828
|
"../../src/interfaces/components.ts",
|
|
2790
2829
|
"../../src/interfaces/axis-scales.ts",
|
|
2791
2830
|
"../../src/interfaces/charts.ts",
|
|
@@ -2,6 +2,7 @@ import { ScaleTypes } from "./enums";
|
|
|
2
2
|
import { AxisDomain } from "d3";
|
|
3
3
|
import { Locale } from "date-fns";
|
|
4
4
|
import { ThresholdOptions } from "./components";
|
|
5
|
+
import { TruncationOptions } from "./truncation";
|
|
5
6
|
/**
|
|
6
7
|
* options to configure a scale. not all options are used by all scales
|
|
7
8
|
*/
|
|
@@ -77,6 +78,7 @@ export interface AxisOptions {
|
|
|
77
78
|
*/
|
|
78
79
|
formatter?: Function;
|
|
79
80
|
};
|
|
81
|
+
truncation?: TruncationOptions;
|
|
80
82
|
}
|
|
81
83
|
/**
|
|
82
84
|
* customize time series scales
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis-scales.js","sourceRoot":"","sources":["axis-scales.ts"],"names":[],"mappings":"","sourcesContent":["import { ScaleTypes } from \"./enums\";\nimport { AxisDomain } from \"d3\";\nimport { Locale } from \"date-fns\";\nimport { ThresholdOptions } from \"./components\";\n\n/**\n * options to configure a scale. not all options are used by all scales\n */\nexport interface AxisOptions {\n\t/**\n\t * type of the scale used on axis\n\t */\n\tscaleType?: ScaleTypes;\n\t/**\n\t * option for stacked axis\n\t */\n\tstacked?: boolean;\n\t/**\n\t * option for percentage axis scale\n\t */\n\tpercentage?: boolean;\n\t/**\n\t * Whether the Axis should use the specified domain\n\t * instead of it being dynamically generated based on data extents.\n\t * The type of values should depend on the scale type.\n\t * Example for continuous axis scale: [-100, 100]\n\t * Example for discrete axis scale: ['Qty', 'More', 'Sold']\n\t * No need to define domain for percentage axis scale\n\t */\n\tdomain?: AxisDomain[];\n\t/**\n\t * Whether the Axis should be forced to include 0 as a starting point\n\t * (or ending point, in case of all negative axis).\n\t * Default: true\n\t */\n\tincludeZero?: boolean;\n\t/**\n\t * identifies what key within the data the axis values would map to\n\t */\n\tmapsTo?: string;\n\t/**\n\t * optional title for the scales\n\t */\n\ttitle?: string;\n\t/**\n\t * thresholds\n\t * Example:\n\t * [\n\t *\t\t{value: 10000},\n\t *\t\t{value: 40020, valueFormatter: (x) => x},\n\t *\t\t{value: 55000, label: \"Custom label\", fillColor: \"#03a9f4\"},\n\t * ]\n\t */\n\tthresholds?: ThresholdOptions[];\n\t/**\n\t * tick configuration\n\t */\n\tticks?: {\n\t\t/**\n\t\t * number of ticks to show\n\t\t */\n\t\tnumber?: number;\n\t\t/**\n\t\t * minimum tick value\n\t\t */\n\t\tmin?: number;\n\t\t/**\n\t\t * maximum tick value\n\t\t */\n\t\tmax?: number;\n\t\t/**\n\t\t * minimum width of a tick\n\t\t * before getting rotated (in pixels)\n\t\t */\n\t\trotateIfSmallerThan?: number;\n\t\t/**\n\t\t * function to format the ticks\n\t\t */\n\t\tformatter?: Function;\n\t};\n}\n\n/**\n * customize time series scales\n */\nexport interface TimeScaleOptions {\n\taddSpaceOnEdges?: number;\n\t/**\n\t * if it's true, days are shown as mon-sun,\n\t * otherwise days are shown as number 1-31\n\t */\n\tshowDayName?: boolean;\n\t/**\n\t * formats for each time interval\n\t */\n\ttimeIntervalFormats?: TimeIntervalFormats;\n\t/**\n\t * locale object, for more information see https://date-fns.org/v2.11.0/docs/Locale.\n\t * example: `import enUSLocaleObject from \"date-fns/locale/en-US/index\"`.\n\t * available locale objects are: https://github.com/date-fns/date-fns/tree/master/src/locale\n\t */\n\tlocaleObject?: Locale;\n}\n\n/**\n * time scales: customize ticks format for different time intervals\n */\nexport interface TickFormats {\n\tprimary?: string;\n\tsecondary?: string;\n}\n\nexport interface TimeIntervalFormats {\n\t\"15seconds\"?: TickFormats;\n\tminute?: TickFormats;\n\t\"30minutes\"?: TickFormats;\n\thourly?: TickFormats;\n\tdaily?: TickFormats;\n\tweekly?: TickFormats;\n\tmonthly?: TickFormats;\n\tquarterly?: TickFormats;\n\tyearly?: TickFormats;\n}\n\n/**\n * customize the axes components\n */\nexport interface AxesOptions {\n\tleft?: AxisOptions;\n\tbottom?: AxisOptions;\n\tright?: AxisOptions;\n\ttop?: AxisOptions;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"axis-scales.js","sourceRoot":"","sources":["axis-scales.ts"],"names":[],"mappings":"","sourcesContent":["import { ScaleTypes } from \"./enums\";\nimport { AxisDomain } from \"d3\";\nimport { Locale } from \"date-fns\";\nimport { ThresholdOptions } from \"./components\";\nimport { TruncationOptions } from \"./truncation\";\n\n/**\n * options to configure a scale. not all options are used by all scales\n */\nexport interface AxisOptions {\n\t/**\n\t * type of the scale used on axis\n\t */\n\tscaleType?: ScaleTypes;\n\t/**\n\t * option for stacked axis\n\t */\n\tstacked?: boolean;\n\t/**\n\t * option for percentage axis scale\n\t */\n\tpercentage?: boolean;\n\t/**\n\t * Whether the Axis should use the specified domain\n\t * instead of it being dynamically generated based on data extents.\n\t * The type of values should depend on the scale type.\n\t * Example for continuous axis scale: [-100, 100]\n\t * Example for discrete axis scale: ['Qty', 'More', 'Sold']\n\t * No need to define domain for percentage axis scale\n\t */\n\tdomain?: AxisDomain[];\n\t/**\n\t * Whether the Axis should be forced to include 0 as a starting point\n\t * (or ending point, in case of all negative axis).\n\t * Default: true\n\t */\n\tincludeZero?: boolean;\n\t/**\n\t * identifies what key within the data the axis values would map to\n\t */\n\tmapsTo?: string;\n\t/**\n\t * optional title for the scales\n\t */\n\ttitle?: string;\n\t/**\n\t * thresholds\n\t * Example:\n\t * [\n\t *\t\t{value: 10000},\n\t *\t\t{value: 40020, valueFormatter: (x) => x},\n\t *\t\t{value: 55000, label: \"Custom label\", fillColor: \"#03a9f4\"},\n\t * ]\n\t */\n\tthresholds?: ThresholdOptions[];\n\t/**\n\t * tick configuration\n\t */\n\tticks?: {\n\t\t/**\n\t\t * number of ticks to show\n\t\t */\n\t\tnumber?: number;\n\t\t/**\n\t\t * minimum tick value\n\t\t */\n\t\tmin?: number;\n\t\t/**\n\t\t * maximum tick value\n\t\t */\n\t\tmax?: number;\n\t\t/**\n\t\t * minimum width of a tick\n\t\t * before getting rotated (in pixels)\n\t\t */\n\t\trotateIfSmallerThan?: number;\n\t\t/**\n\t\t * function to format the ticks\n\t\t */\n\t\tformatter?: Function;\n\t};\n\ttruncation?: TruncationOptions;\n}\n\n/**\n * customize time series scales\n */\nexport interface TimeScaleOptions {\n\taddSpaceOnEdges?: number;\n\t/**\n\t * if it's true, days are shown as mon-sun,\n\t * otherwise days are shown as number 1-31\n\t */\n\tshowDayName?: boolean;\n\t/**\n\t * formats for each time interval\n\t */\n\ttimeIntervalFormats?: TimeIntervalFormats;\n\t/**\n\t * locale object, for more information see https://date-fns.org/v2.11.0/docs/Locale.\n\t * example: `import enUSLocaleObject from \"date-fns/locale/en-US/index\"`.\n\t * available locale objects are: https://github.com/date-fns/date-fns/tree/master/src/locale\n\t */\n\tlocaleObject?: Locale;\n}\n\n/**\n * time scales: customize ticks format for different time intervals\n */\nexport interface TickFormats {\n\tprimary?: string;\n\tsecondary?: string;\n}\n\nexport interface TimeIntervalFormats {\n\t\"15seconds\"?: TickFormats;\n\tminute?: TickFormats;\n\t\"30minutes\"?: TickFormats;\n\thourly?: TickFormats;\n\tdaily?: TickFormats;\n\tweekly?: TickFormats;\n\tmonthly?: TickFormats;\n\tquarterly?: TickFormats;\n\tyearly?: TickFormats;\n}\n\n/**\n * customize the axes components\n */\nexport interface AxesOptions {\n\tleft?: AxisOptions;\n\tbottom?: AxisOptions;\n\tright?: AxisOptions;\n\ttop?: AxisOptions;\n}\n"]}
|
package/interfaces/charts.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GaugeTypes, Statuses, ArrowDirections } from "./enums";
|
|
1
2
|
import { LegendOptions, TooltipOptions, GridOptions, AxesOptions } from "./index";
|
|
2
3
|
import { AxisTooltipOptions, BarTooltipOptions, BarOptions, StackedBarOptions } from "./components";
|
|
3
4
|
import { TimeScaleOptions } from "./axis-scales";
|
|
@@ -197,6 +198,25 @@ export interface PieChartOptions extends BaseChartOptions {
|
|
|
197
198
|
};
|
|
198
199
|
};
|
|
199
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* options specific to gauge charts
|
|
203
|
+
*/
|
|
204
|
+
export interface GaugeChartOptions extends PieChartOptions {
|
|
205
|
+
gauge?: {
|
|
206
|
+
arcWidth?: number;
|
|
207
|
+
deltaArrow?: {
|
|
208
|
+
direction?: ArrowDirections;
|
|
209
|
+
size?: Function;
|
|
210
|
+
enabled: Boolean;
|
|
211
|
+
};
|
|
212
|
+
status?: Statuses;
|
|
213
|
+
deltaFontSize?: Function;
|
|
214
|
+
numberSpacing?: number;
|
|
215
|
+
numberFormatter?: Function;
|
|
216
|
+
valueFontSize?: Function;
|
|
217
|
+
type?: GaugeTypes;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
200
220
|
/**
|
|
201
221
|
* options specific to donut charts
|
|
202
222
|
*/
|
package/interfaces/charts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charts.js","sourceRoot":"","sources":["charts.ts"],"names":[],"mappings":"","sourcesContent":["import {\n\tLegendOptions,\n\tTooltipOptions,\n\tGridOptions,\n\tAxesOptions
|
|
1
|
+
{"version":3,"file":"charts.js","sourceRoot":"","sources":["charts.ts"],"names":[],"mappings":"","sourcesContent":["import {\n\tGaugeTypes,\n\tStatuses,\n\tArrowDirections\n} from \"./enums\";\nimport {\n\tLegendOptions,\n\tTooltipOptions,\n\tGridOptions,\n\tAxesOptions\n} from \"./index\";\nimport {\n\tAxisTooltipOptions,\n\tBarTooltipOptions,\n\tBarOptions,\n\tStackedBarOptions\n} 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\n\t\t */\n\t\tloading?: Boolean;\n\t};\n\t/**\n\t * options related to color scales\n\t */\n\tcolor?: {\n\t\t/**\n\t\t * e.g. { \"Dataset 1\": \"blue\" }\n\t\t */\n\t\tscale?: object;\n\t};\n}\n\n/**\n * Options common to any chart with an axis\n */\nexport interface AxisChartOptions extends BaseChartOptions {\n\taxes?: AxesOptions;\n\tgrid?: GridOptions;\n\ttimeScale?: TimeScaleOptions;\n\ttooltip?: AxisTooltipOptions;\n}\n\n/**\n * options specific to bar charts\n */\nexport interface BarChartOptions extends AxisChartOptions {\n\tbars?: BarOptions;\n\ttooltip?: BarTooltipOptions;\n}\n\n/**\n * options specific to stacked bar charts\n */\nexport interface StackedBarChartOptions extends BarChartOptions {\n\tbars?: StackedBarOptions;\n}\n\n/**\n * options specific to scatter charts\n */\nexport interface ScatterChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the points\n\t */\n\tpoints?: {\n\t\t/**\n\t\t * sets the radius of the point\n\t\t */\n\t\tradius: number;\n\t\tfillOpacity?: number;\n\t\tfilled?: boolean;\n\t};\n}\n\n/**\n * options specific to bubble charts\n */\nexport interface BubbleChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the individual bubbles\n\t */\n\tbubble?: {\n\t\t/**\n\t\t * the key to lookup in charting data for the bubble radius value\n\t\t */\n\t\tradiusMapsTo?: string;\n\t\t/**\n\t\t * A function that would determine the range of the bubble radius to use\n\t\t * Returns an array with the 1st value being the min and the 2nd value being the max radius\n\t\t */\n\t\tradiusRange?: Function;\n\t\t/**\n\t\t * Opacity of the fills used within each circle\n\t\t */\n\t\tfillOpacity?: number;\n\t};\n}\n\n/**\n * options specific to line charts\n */\nexport interface LineChartOptions extends ScatterChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t| string\n\t| {\n\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\tradiusOffset?: number;\n\t\tinnerRadius?: number;\n\t\tpadAngle?: number;\n\t\thoverArc?: {\n\t\t\touterRadiusOffset?: number;\n\t\t};\n\t\txOffset?: number;\n\t\tyOffset?: number;\n\t\tyOffsetCallout?: number;\n\t\tcallout?: {\n\t\t\tminSliceDegree?: number;\n\t\t\toffsetX?: number;\n\t\t\toffsetY?: number;\n\t\t\thorizontalLineLength?: number;\n\t\t\ttextMargin?: number;\n\t\t};\n\t\tlabels?: {\n\t\t\tformatter?: Function;\n\t\t};\n\t};\n}\n\n/**\n * options specific to gauge charts\n */\nexport interface GaugeChartOptions extends PieChartOptions {\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};\n}\n\n/**\n * options specific to donut charts\n */\nexport interface DonutChartOptions extends PieChartOptions {\n\tdonut?: {\n\t\tcenter?: {\n\t\t\tlabel?: string;\n\t\t\tnumberFontSize?: Function;\n\t\t\ttitleFontSize?: Function;\n\t\t\ttitleYPosition?: Function;\n\t\t\tnumberFormatter?: Function;\n\t\t};\n\t};\n}\n\n/**\n * options specific to radar charts\n */\nexport interface RadarChartOptions extends BaseChartOptions {\n\tradar?: {\n\t\topacity: {\n\t\t\tunselected: number;\n\t\t\tselected: number;\n\t\t};\n\t\taxes: {\n\t\t\tangle: string;\n\t\t\tvalue: string;\n\t\t};\n\t\txLabelPadding: number;\n\t\tyLabelPadding: number;\n\t\tyTicksNumber: number;\n\t\tminRange: number;\n\t\txAxisRectHeight: number;\n\t\tdotsRadius: number;\n\t};\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LayoutGrowth, LegendPositions } from "./enums";
|
|
2
2
|
import { Component } from "../components/component";
|
|
3
|
+
import { TruncationOptions } from "./truncation";
|
|
3
4
|
/**
|
|
4
5
|
* customize the overlay contents
|
|
5
6
|
*/
|
|
@@ -47,6 +48,7 @@ export interface LegendOptions {
|
|
|
47
48
|
radius?: Number;
|
|
48
49
|
spaceAfter?: Number;
|
|
49
50
|
};
|
|
51
|
+
truncation?: TruncationOptions;
|
|
50
52
|
}
|
|
51
53
|
export interface TooltipOptions {
|
|
52
54
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["components.ts"],"names":[],"mappings":"","sourcesContent":["import { LayoutGrowth, LegendPositions } from \"./enums\";\nimport { Component } from \"../components/component\";\n\n/**\n * customize the overlay contents\n */\nexport interface LayoutComponentChild {\n\tid: string;\n\t/**\n\t * the component that'll be rendered inside layout child\n\t */\n\tcomponents: Component[];\n\t/**\n\t * size of the layout child\n\t */\n\tsize?: number;\n\t/**\n\t * how the layout child will grow or shrink in x & y directions\n\t */\n\tgrowth?: {\n\t\tx: LayoutGrowth;\n\t\ty: LayoutGrowth;\n\t};\n}\n\n/**\n * customize the legend component\n */\nexport interface LegendOptions {\n\tposition?: LegendPositions;\n\t/**\n\t * the clickability of legend items\n\t */\n\tclickable?: boolean;\n\t/**\n\t * is the legend visible or not\n\t */\n\tenabled?: boolean;\n\titems?: {\n\t\tstatus?: {\n\t\t\tACTIVE?: Number;\n\t\t\tDISABLED?: Number;\n\t\t};\n\t\thorizontalSpace?: Number;\n\t\tverticalSpace?: Number;\n\t\ttextYOffset?: Number;\n\t};\n\tcheckbox?: {\n\t\tradius?: Number;\n\t\tspaceAfter?: Number;\n\t};\n}\n\nexport interface TooltipOptions {\n\t/**\n\t * a function to format the tooltip values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * custom function for returning tooltip HTML\n\t * passed an array or object with the data, and then the default tooltip markup\n\t */\n\tcustomHTML?: Function;\n\t/**\n\t * options to configure the datapoint tooltip\n\t */\n\tdatapoint?: {\n\t\t/**\n\t\t * offset of the tooltip from the mouse position\n\t\t */\n\t\thorizontalOffset?: number;\n\t\t/**\n\t\t * toggles on/off datapoint tooltips.\n\t\t */\n\t\tenabled?: boolean;\n\t\t/**\n\t\t * vertical offset for tooltip placement\n\t\t */\n\t\tverticalOffset?: number;\n\t};\n\ttitle?: {\n\t\t/**\n\t\t * vertical offset for title tooltip placement. < 0 shifts the tooltip above title, > 0 shifts vertically down\n\t\t */\n\t\tverticalOffset?: number;\n\t\t/**\n\t\t * max width of title tooltip relative to the width of the chart-svg (percentage should be < 1)\n\t\t */\n\t\twidth?: number;\n\t};\n}\n\n/**\n * Threshold options\n */\nexport interface ThresholdOptions {\n\t/**\n\t * threshold value\n\t */\n\tvalue: number | Date;\n\t/**\n\t * a function to format the threshold values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * hex threshold line color\n\t */\n\tfillColor: string;\n\t/**\n\t * threshold label\n\t */\n\tlabel: string;\n}\n\n/**\n * extends tooltip options to provide support for multiple gridline tooltips\n */\nexport interface AxisTooltipOptions extends TooltipOptions {\n\t/** options for gridline event listeners */\n\tgridline?: {\n\t\t/**\n\t\t * controls whether the gridlines are active for tooltip support\n\t\t */\n\t\tenabled?: boolean;\n\t\t/**\n\t\t * optional set threshold (value between 0 and 1) for active gridlines\n\t\t */\n\t\tthreshold?: number;\n\t};\n}\n\n/**\n * extends tooltip for bar tooltip\n */\nexport interface BarTooltipOptions extends TooltipOptions {\n\tdatapoint: {\n\t\t/**\n\t\t * padding between the bar items and the tooltip\n\t\t */\n\t\tverticalOffset: number;\n\t};\n}\n\nexport interface GridOptions {\n\ty?: {\n\t\tnumberOfTicks?: number;\n\t};\n\tx?: {\n\t\tnumberOfTicks?: number;\n\t};\n\tstrokeColor?: string;\n}\n\nexport interface BarOptions {\n\twidth?: number;\n\tmaxWidth?: number;\n}\n\nexport interface StackedBarOptions extends BarOptions {\n\tdividerSize?: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["components.ts"],"names":[],"mappings":"","sourcesContent":["import { LayoutGrowth, LegendPositions } from \"./enums\";\nimport { Component } from \"../components/component\";\nimport { TruncationOptions } from \"./truncation\";\n\n/**\n * customize the overlay contents\n */\nexport interface LayoutComponentChild {\n\tid: string;\n\t/**\n\t * the component that'll be rendered inside layout child\n\t */\n\tcomponents: Component[];\n\t/**\n\t * size of the layout child\n\t */\n\tsize?: number;\n\t/**\n\t * how the layout child will grow or shrink in x & y directions\n\t */\n\tgrowth?: {\n\t\tx: LayoutGrowth;\n\t\ty: LayoutGrowth;\n\t};\n}\n\n/**\n * customize the legend component\n */\nexport interface LegendOptions {\n\tposition?: LegendPositions;\n\t/**\n\t * the clickability of legend items\n\t */\n\tclickable?: boolean;\n\t/**\n\t * is the legend visible or not\n\t */\n\tenabled?: boolean;\n\titems?: {\n\t\tstatus?: {\n\t\t\tACTIVE?: Number;\n\t\t\tDISABLED?: Number;\n\t\t};\n\t\thorizontalSpace?: Number;\n\t\tverticalSpace?: Number;\n\t\ttextYOffset?: Number;\n\t};\n\tcheckbox?: {\n\t\tradius?: Number;\n\t\tspaceAfter?: Number;\n\t};\n\ttruncation?: TruncationOptions;\n}\n\nexport interface TooltipOptions {\n\t/**\n\t * a function to format the tooltip values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * custom function for returning tooltip HTML\n\t * passed an array or object with the data, and then the default tooltip markup\n\t */\n\tcustomHTML?: Function;\n\t/**\n\t * options to configure the datapoint tooltip\n\t */\n\tdatapoint?: {\n\t\t/**\n\t\t * offset of the tooltip from the mouse position\n\t\t */\n\t\thorizontalOffset?: number;\n\t\t/**\n\t\t * toggles on/off datapoint tooltips.\n\t\t */\n\t\tenabled?: boolean;\n\t\t/**\n\t\t * vertical offset for tooltip placement\n\t\t */\n\t\tverticalOffset?: number;\n\t};\n\ttitle?: {\n\t\t/**\n\t\t * vertical offset for title tooltip placement. < 0 shifts the tooltip above title, > 0 shifts vertically down\n\t\t */\n\t\tverticalOffset?: number;\n\t\t/**\n\t\t * max width of title tooltip relative to the width of the chart-svg (percentage should be < 1)\n\t\t */\n\t\twidth?: number;\n\t};\n}\n\n/**\n * Threshold options\n */\nexport interface ThresholdOptions {\n\t/**\n\t * threshold value\n\t */\n\tvalue: number | Date;\n\t/**\n\t * a function to format the threshold values\n\t */\n\tvalueFormatter?: Function;\n\t/**\n\t * hex threshold line color\n\t */\n\tfillColor: string;\n\t/**\n\t * threshold label\n\t */\n\tlabel: string;\n}\n\n/**\n * extends tooltip options to provide support for multiple gridline tooltips\n */\nexport interface AxisTooltipOptions extends TooltipOptions {\n\t/** options for gridline event listeners */\n\tgridline?: {\n\t\t/**\n\t\t * controls whether the gridlines are active for tooltip support\n\t\t */\n\t\tenabled?: boolean;\n\t\t/**\n\t\t * optional set threshold (value between 0 and 1) for active gridlines\n\t\t */\n\t\tthreshold?: number;\n\t};\n}\n\n/**\n * extends tooltip for bar tooltip\n */\nexport interface BarTooltipOptions extends TooltipOptions {\n\tdatapoint: {\n\t\t/**\n\t\t * padding between the bar items and the tooltip\n\t\t */\n\t\tverticalOffset: number;\n\t};\n}\n\nexport interface GridOptions {\n\ty?: {\n\t\tnumberOfTicks?: number;\n\t};\n\tx?: {\n\t\tnumberOfTicks?: number;\n\t};\n\tstrokeColor?: string;\n}\n\nexport interface BarOptions {\n\twidth?: number;\n\tmaxWidth?: number;\n}\n\nexport interface StackedBarOptions extends BarOptions {\n\tdividerSize?: number;\n}\n"]}
|
package/interfaces/enums.d.ts
CHANGED
|
@@ -18,6 +18,15 @@ export declare enum AxisPositions {
|
|
|
18
18
|
TOP = "top",
|
|
19
19
|
BOTTOM = "bottom"
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* enum of all possible truncation types
|
|
23
|
+
*/
|
|
24
|
+
export declare enum TruncationTypes {
|
|
25
|
+
END_LINE = "end_line",
|
|
26
|
+
MID_LINE = "mid_line",
|
|
27
|
+
FRONT_LINE = "front_line",
|
|
28
|
+
NONE = "none"
|
|
29
|
+
}
|
|
21
30
|
/**
|
|
22
31
|
* enum of all possible cartesian orientations
|
|
23
32
|
* to be used for determining the orientation
|
|
@@ -51,7 +60,9 @@ export declare enum TooltipPosition {
|
|
|
51
60
|
export declare enum TooltipTypes {
|
|
52
61
|
DATAPOINT = "datapoint",
|
|
53
62
|
GRIDLINE = "gridline",
|
|
54
|
-
TITLE = "title"
|
|
63
|
+
TITLE = "title",
|
|
64
|
+
LEGEND = "legend",
|
|
65
|
+
AXISLABEL = "axislabel"
|
|
55
66
|
}
|
|
56
67
|
/**
|
|
57
68
|
* enum of all possible legend positions
|
|
@@ -118,3 +129,22 @@ export declare enum DominantBaseline {
|
|
|
118
129
|
MIDDLE = "middle",
|
|
119
130
|
HANGING = "hanging"
|
|
120
131
|
}
|
|
132
|
+
export declare enum GaugeTypes {
|
|
133
|
+
SEMI = "semi",
|
|
134
|
+
FULL = "full"
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* enum of all possible callout directions
|
|
138
|
+
*/
|
|
139
|
+
export declare enum ArrowDirections {
|
|
140
|
+
UP = "up",
|
|
141
|
+
DOWN = "down"
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* enum of carbon statuses
|
|
145
|
+
*/
|
|
146
|
+
export declare enum Statuses {
|
|
147
|
+
SUCCESS = "success",
|
|
148
|
+
WARNING = "warning",
|
|
149
|
+
DANGER = "danger"
|
|
150
|
+
}
|
package/interfaces/enums.js
CHANGED
|
@@ -20,6 +20,16 @@ export var AxisPositions;
|
|
|
20
20
|
AxisPositions["TOP"] = "top";
|
|
21
21
|
AxisPositions["BOTTOM"] = "bottom";
|
|
22
22
|
})(AxisPositions || (AxisPositions = {}));
|
|
23
|
+
/**
|
|
24
|
+
* enum of all possible truncation types
|
|
25
|
+
*/
|
|
26
|
+
export var TruncationTypes;
|
|
27
|
+
(function (TruncationTypes) {
|
|
28
|
+
TruncationTypes["END_LINE"] = "end_line";
|
|
29
|
+
TruncationTypes["MID_LINE"] = "mid_line";
|
|
30
|
+
TruncationTypes["FRONT_LINE"] = "front_line";
|
|
31
|
+
TruncationTypes["NONE"] = "none";
|
|
32
|
+
})(TruncationTypes || (TruncationTypes = {}));
|
|
23
33
|
/**
|
|
24
34
|
* enum of all possible cartesian orientations
|
|
25
35
|
* to be used for determining the orientation
|
|
@@ -58,6 +68,8 @@ export var TooltipTypes;
|
|
|
58
68
|
TooltipTypes["DATAPOINT"] = "datapoint";
|
|
59
69
|
TooltipTypes["GRIDLINE"] = "gridline";
|
|
60
70
|
TooltipTypes["TITLE"] = "title";
|
|
71
|
+
TooltipTypes["LEGEND"] = "legend";
|
|
72
|
+
TooltipTypes["AXISLABEL"] = "axislabel";
|
|
61
73
|
})(TooltipTypes || (TooltipTypes = {}));
|
|
62
74
|
/**
|
|
63
75
|
* enum of all possible legend positions
|
|
@@ -132,4 +144,26 @@ export var DominantBaseline;
|
|
|
132
144
|
DominantBaseline["MIDDLE"] = "middle";
|
|
133
145
|
DominantBaseline["HANGING"] = "hanging";
|
|
134
146
|
})(DominantBaseline || (DominantBaseline = {}));
|
|
147
|
+
export var GaugeTypes;
|
|
148
|
+
(function (GaugeTypes) {
|
|
149
|
+
GaugeTypes["SEMI"] = "semi";
|
|
150
|
+
GaugeTypes["FULL"] = "full";
|
|
151
|
+
})(GaugeTypes || (GaugeTypes = {}));
|
|
152
|
+
/**
|
|
153
|
+
* enum of all possible callout directions
|
|
154
|
+
*/
|
|
155
|
+
export var ArrowDirections;
|
|
156
|
+
(function (ArrowDirections) {
|
|
157
|
+
ArrowDirections["UP"] = "up";
|
|
158
|
+
ArrowDirections["DOWN"] = "down";
|
|
159
|
+
})(ArrowDirections || (ArrowDirections = {}));
|
|
160
|
+
/**
|
|
161
|
+
* enum of carbon statuses
|
|
162
|
+
*/
|
|
163
|
+
export var Statuses;
|
|
164
|
+
(function (Statuses) {
|
|
165
|
+
Statuses["SUCCESS"] = "success";
|
|
166
|
+
Statuses["WARNING"] = "warning";
|
|
167
|
+
Statuses["DANGER"] = "danger";
|
|
168
|
+
})(Statuses || (Statuses = {}));
|
|
135
169
|
//# sourceMappingURL=../../src/interfaces/enums.js.map
|
package/interfaces/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["enums.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,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,UAGX;AAHD,WAAY,UAAU;IACrB,2BAAa,CAAA;IACb,2BAAa,CAAA;AACd,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IAC1B,4BAAS,CAAA;IACT,gCAAa,CAAA;AACd,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IACnB,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;IACnB,6BAAiB,CAAA;AAClB,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB","sourcesContent":["import * as EventEnums from \"./events\";\nexport const Events = EventEnums;\n\n/**\n * enum of all supported chart themes\n */\nexport enum ChartTheme {\n\tDEFAULT = \"default\",\n\tG100 = \"g100\",\n\tG90 = \"g90\",\n\tG10 = \"g10\"\n}\n\n/**\n * enum of all possible axis positions\n */\nexport enum AxisPositions {\n\tLEFT = \"left\",\n\tRIGHT = \"right\",\n\tTOP = \"top\",\n\tBOTTOM = \"bottom\"\n}\n\n/**\n * enum of all possible truncation types\n */\nexport enum TruncationTypes {\n\tEND_LINE = \"end_line\",\n\tMID_LINE = \"mid_line\",\n\tFRONT_LINE = \"front_line\",\n\tNONE = \"none\",\n}\n\n/**\n * enum of all possible cartesian orientations\n * to be used for determining the orientation\n * of graphs being draw over\n * cartesian scales\n */\nexport enum CartesianOrientations {\n\tVERTICAL = \"vertical\",\n\tHORIZONTAL = \"horizontal\"\n}\n\n/**\n * enum of all possible scale types\n */\nexport enum ScaleTypes {\n\tTIME = \"time\",\n\tLINEAR = \"linear\",\n\tLOG = \"log\",\n\tLABELS = \"labels\"\n}\n\n/**\n * enum of supported tooltip position relative to\n */\nexport enum TooltipPosition {\n\tMOUSE = \"mouse\",\n\tTOP = \"top\",\n\tBOTTOM = \"bottom\"\n}\n\n/**\n * enum of tooltip types for custom tooltip event\n */\nexport enum TooltipTypes {\n\tDATAPOINT = \"datapoint\",\n\tGRIDLINE = \"gridline\",\n\tTITLE = \"title\",\n\tLEGEND = \"legend\",\n\tAXISLABEL = \"axislabel\",\n}\n\n/**\n * enum of all possible legend positions\n */\nexport enum LegendPositions {\n\tRIGHT = \"right\",\n\tLEFT = \"left\",\n\tTOP = \"top\",\n\tBOTTOM = \"bottom\"\n}\n\n/**\n * enum of all possible legend orientations\n */\nexport enum LegendOrientations {\n\tHORIZONTAL = \"horizontal\",\n\tVERTICAL = \"vertical\"\n}\n\n/**\n * enum of all possible layout directions\n */\nexport enum LayoutDirection {\n\tROW = \"row\",\n\tCOLUMN = \"column\",\n\tROW_REVERSE = \"row-reverse\",\n\tCOLUMN_REVERSE = \"column-reverse\"\n}\n\n/**\n * enum of all possible layout growth values\n */\nexport enum LayoutGrowth {\n\tFIXED = \"fixed\",\n\tPREFERRED = \"preferred\",\n\tSTRETCH = \"stretch\"\n}\n\n/**\n * enum of all possible callout directions\n */\nexport enum CalloutDirections {\n\tLEFT = \"left\",\n\tRIGHT = \"right\"\n}\n\n/**\n * enum of all possible skeleton/empty state types\n */\nexport enum Skeletons {\n\tGRID = \"grid\",\n\tVERT_OR_HORIZ = \"vertOrHoriz\",\n\tPIE = \"pie\",\n\tDONUT = \"donut\"\n}\n\n/**\n * enum of all possible attributes used to aling text horizontally\n */\nexport enum TextAnchor {\n\tSTART = \"start\",\n\tMIDDLE = \"middle\",\n\tEND = \"end\"\n}\n\n/**\n * enum of all possible attributes used to aling text vertically\n */\nexport enum DominantBaseline {\n\tBASELINE = \"baseline\",\n\tMIDDLE = \"middle\",\n\tHANGING = \"hanging\"\n}\n\nexport enum GaugeTypes {\n\tSEMI = \"semi\",\n\tFULL = \"full\"\n}\n\n/**\n * enum of all possible callout directions\n */\nexport enum ArrowDirections {\n\tUP = \"up\",\n\tDOWN = \"down\"\n}\n\n/**\n * enum of carbon statuses\n */\nexport enum Statuses {\n\tSUCCESS = \"success\",\n\tWARNING = \"warning\",\n\tDANGER = \"danger\"\n}\n"]}
|
package/interfaces/events.d.ts
CHANGED
|
@@ -40,6 +40,15 @@ export declare enum Pie {
|
|
|
40
40
|
SLICE_CLICK = "pie-slice-click",
|
|
41
41
|
SLICE_MOUSEOUT = "pie-slice-mouseout"
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* enum of all gauge graph events
|
|
45
|
+
*/
|
|
46
|
+
export declare enum Gauge {
|
|
47
|
+
ARC_MOUSEOVER = "gauge-arc-mouseover",
|
|
48
|
+
ARC_MOUSEMOVE = "gauge-arc-mousemove",
|
|
49
|
+
ARC_CLICK = "gauge-arc-click",
|
|
50
|
+
ARC_MOUSEOUT = "gauge-arc-mouseout"
|
|
51
|
+
}
|
|
43
52
|
/**
|
|
44
53
|
* enum of all bar graph events
|
|
45
54
|
*/
|
package/interfaces/events.js
CHANGED
|
@@ -47,6 +47,16 @@ export var Pie;
|
|
|
47
47
|
Pie["SLICE_CLICK"] = "pie-slice-click";
|
|
48
48
|
Pie["SLICE_MOUSEOUT"] = "pie-slice-mouseout";
|
|
49
49
|
})(Pie || (Pie = {}));
|
|
50
|
+
/**
|
|
51
|
+
* enum of all gauge graph events
|
|
52
|
+
*/
|
|
53
|
+
export var Gauge;
|
|
54
|
+
(function (Gauge) {
|
|
55
|
+
Gauge["ARC_MOUSEOVER"] = "gauge-arc-mouseover";
|
|
56
|
+
Gauge["ARC_MOUSEMOVE"] = "gauge-arc-mousemove";
|
|
57
|
+
Gauge["ARC_CLICK"] = "gauge-arc-click";
|
|
58
|
+
Gauge["ARC_MOUSEOUT"] = "gauge-arc-mouseout";
|
|
59
|
+
})(Gauge || (Gauge = {}));
|
|
50
60
|
/**
|
|
51
61
|
* enum of all bar graph events
|
|
52
62
|
*/
|
package/interfaces/events.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["events.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,KAOX;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,IAAY,IAKX;AALD,WAAY,IAAI;IACf,6CAAqC,CAAA;IACrC,6CAAqC,CAAA;IACrC,qCAA6B,CAAA;IAC7B,2CAAmC,CAAA;AACpC,CAAC,EALW,IAAI,KAAJ,IAAI,QAKf;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,KAKX;AALD,WAAY,KAAK;IAChB,oDAA2C,CAAA;IAC3C,oDAA2C,CAAA;IAC3C,4CAAmC,CAAA;IACnC,kDAAyC,CAAA;AAC1C,CAAC,EALW,KAAK,KAAL,KAAK,QAKhB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,OAGX;AAHD,WAAY,OAAO;IAClB,gCAAqB,CAAA;IACrB,gCAAqB,CAAA;AACtB,CAAC,EAHW,OAAO,KAAP,OAAO,QAGlB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACpB,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;AACxB,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,MAKX;AALD,WAAY,MAAM;IACjB,4CAAkC,CAAA;IAClC,4CAAkC,CAAA;IAClC,kDAAwC,CAAA;IACxC,8CAAoC,CAAA;AACrC,CAAC,EALW,MAAM,KAAN,MAAM,QAKjB","sourcesContent":["/**\n * enum of all events related to the chart on the DOM\n */\nexport enum Chart {\n\tRENDER_FINISHED = \"render-finished\",\n\tRESIZE = \"chart-resize\",\n\tMOUSEOVER = \"chart-mouseover\",\n\t// MOUSEMOVE = \"chart-mousemove\",\n\t// CLICK = \"chart-click\",\n\tMOUSEOUT = \"chart-mouseout\",\n}\n\n/**\n * enum of all events related to the chart model\n */\nexport enum Model {\n\tUPDATE = \"model-update\",\n}\n\n/**\n * enum of all axis-related events\n */\nexport enum Axis {\n\tLABEL_MOUSEOVER = \"axis-label-mouseover\",\n\tLABEL_MOUSEMOVE = \"axis-label-mousemove\",\n\tLABEL_CLICK = \"axis-label-click\",\n\tLABEL_MOUSEOUT = \"axis-label-mouseout\",\n}\n\n/**\n * enum of all area graph events\n */\nexport enum Area {\n\tAREA_MOUSEOVER = \"area-mouseover\",\n\tAREA_MOUSEMOVE = \"area-mousemove\",\n\tAREA_CLICK = \"area-click\",\n\tAREA_MOUSEOUT = \"area-mouseout\",\n}\n\n/**\n * enum of all pie graph events\n */\nexport enum Pie {\n\tSLICE_MOUSEOVER = \"pie-slice-mouseover\",\n\tSLICE_MOUSEMOVE = \"pie-slice-mousemove\",\n\tSLICE_CLICK = \"pie-slice-click\",\n\tSLICE_MOUSEOUT = \"pie-slice-mouseout\",\n}\n\n/**\n * enum of all bar graph events\n */\nexport enum Bar {\n\tBAR_MOUSEOVER = \"bar-mouseover\",\n\tBAR_MOUSEMOVE = \"bar-mousemove\",\n\tBAR_CLICK = \"bar-click\",\n\tBAR_MOUSEOUT = \"bar-mouseout\",\n}\n\n/**\n * enum of all scatter graph events\n */\nexport enum Scatter {\n\tSCATTER_MOUSEOVER = \"scatter-mouseover\",\n\tSCATTER_MOUSEMOVE = \"scatter-mousemove\",\n\tSCATTER_CLICK = \"scatter-click\",\n\tSCATTER_MOUSEOUT = \"scatter-mouseout\",\n}\n\n/**\n * enum of all line graph events\n */\nexport enum Line {\n\tPOINT_MOUSEOVER = \"scatter-mouseover\",\n\tPOINT_MOUSEMOVE = \"scatter-mousemove\",\n\tPOINT_CLICK = \"scatter-click\",\n\tPOINT_MOUSEOUT = \"scatter-mouseout\",\n}\n\n/**\n * enum of all radar graph events\n */\nexport enum Radar {\n\tX_AXIS_MOUSEOVER = \"radar-x-axis-mouseover\",\n\tX_AXIS_MOUSEMOVE = \"radar-x-axis-mousemove\",\n\tX_AXIS_CLICK = \"radar-x-axis-click\",\n\tX_AXIS_MOUSEOUT = \"radar-x-axis-mouseout\",\n}\n\n/**\n * enum of all tooltip events\n */\nexport enum Tooltip {\n\tSHOW = \"show-tooltip\",\n\tHIDE = \"hide-tooltip\",\n}\n\n/**\n * enum of all threshold events\n */\nexport enum Threshold {\n\tSHOW = \"show-threshold\",\n\tHIDE = \"hide-threshold\",\n}\n\n/**\n * enum of all legend related events\n */\nexport enum Legend {\n\tITEM_HOVER = \"legend-item-onhover\",\n\tITEM_CLICK = \"legend-item-onclick\",\n\tITEM_MOUSEOUT = \"legend-item-onmouseout\",\n\tITEMS_UPDATE = \"legend-items-update\",\n}\n"]}
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["events.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,KAOX;AAPD,WAAY,KAAK;IAChB,4CAAmC,CAAA;IACnC,gCAAuB,CAAA;IACvB,sCAA6B,CAAA;IAC7B,iCAAiC;IACjC,yBAAyB;IACzB,oCAA2B,CAAA;AAC5B,CAAC,EAPW,KAAK,KAAL,KAAK,QAOhB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,KAEX;AAFD,WAAY,KAAK;IAChB,gCAAuB,CAAA;AACxB,CAAC,EAFW,KAAK,KAAL,KAAK,QAEhB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,IAKX;AALD,WAAY,IAAI;IACf,gDAAwC,CAAA;IACxC,gDAAwC,CAAA;IACxC,wCAAgC,CAAA;IAChC,8CAAsC,CAAA;AACvC,CAAC,EALW,IAAI,KAAJ,IAAI,QAKf;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,IAKX;AALD,WAAY,IAAI;IACf,yCAAiC,CAAA;IACjC,yCAAiC,CAAA;IACjC,iCAAyB,CAAA;IACzB,uCAA+B,CAAA;AAChC,CAAC,EALW,IAAI,KAAJ,IAAI,QAKf;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,GAKX;AALD,WAAY,GAAG;IACd,8CAAuC,CAAA;IACvC,8CAAuC,CAAA;IACvC,sCAA+B,CAAA;IAC/B,4CAAqC,CAAA;AACtC,CAAC,EALW,GAAG,KAAH,GAAG,QAKd;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,KAKX;AALD,WA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IAClC,4CAAkC,CAAA;IAClC,kDAAwC,CAAA;IACxC,8CAAoC,CAAA;AACrC,CAAC,EALW,MAAM,KAAN,MAAM,QAKjB","sourcesContent":["/**\n * enum of all events related to the chart on the DOM\n */\nexport enum Chart {\n\tRENDER_FINISHED = \"render-finished\",\n\tRESIZE = \"chart-resize\",\n\tMOUSEOVER = \"chart-mouseover\",\n\t// MOUSEMOVE = \"chart-mousemove\",\n\t// CLICK = \"chart-click\",\n\tMOUSEOUT = \"chart-mouseout\",\n}\n\n/**\n * enum of all events related to the chart model\n */\nexport enum Model {\n\tUPDATE = \"model-update\",\n}\n\n/**\n * enum of all axis-related events\n */\nexport enum Axis {\n\tLABEL_MOUSEOVER = \"axis-label-mouseover\",\n\tLABEL_MOUSEMOVE = \"axis-label-mousemove\",\n\tLABEL_CLICK = \"axis-label-click\",\n\tLABEL_MOUSEOUT = \"axis-label-mouseout\",\n}\n\n/**\n * enum of all area graph events\n */\nexport enum Area {\n\tAREA_MOUSEOVER = \"area-mouseover\",\n\tAREA_MOUSEMOVE = \"area-mousemove\",\n\tAREA_CLICK = \"area-click\",\n\tAREA_MOUSEOUT = \"area-mouseout\",\n}\n\n/**\n * enum of all pie graph events\n */\nexport enum Pie {\n\tSLICE_MOUSEOVER = \"pie-slice-mouseover\",\n\tSLICE_MOUSEMOVE = \"pie-slice-mousemove\",\n\tSLICE_CLICK = \"pie-slice-click\",\n\tSLICE_MOUSEOUT = \"pie-slice-mouseout\",\n}\n\n/**\n * enum of all gauge graph events\n */\nexport enum Gauge {\n\tARC_MOUSEOVER = \"gauge-arc-mouseover\",\n\tARC_MOUSEMOVE = \"gauge-arc-mousemove\",\n\tARC_CLICK = \"gauge-arc-click\",\n\tARC_MOUSEOUT = \"gauge-arc-mouseout\",\n}\n\n/**\n * enum of all bar graph events\n */\nexport enum Bar {\n\tBAR_MOUSEOVER = \"bar-mouseover\",\n\tBAR_MOUSEMOVE = \"bar-mousemove\",\n\tBAR_CLICK = \"bar-click\",\n\tBAR_MOUSEOUT = \"bar-mouseout\",\n}\n\n/**\n * enum of all scatter graph events\n */\nexport enum Scatter {\n\tSCATTER_MOUSEOVER = \"scatter-mouseover\",\n\tSCATTER_MOUSEMOVE = \"scatter-mousemove\",\n\tSCATTER_CLICK = \"scatter-click\",\n\tSCATTER_MOUSEOUT = \"scatter-mouseout\",\n}\n\n/**\n * enum of all line graph events\n */\nexport enum Line {\n\tPOINT_MOUSEOVER = \"scatter-mouseover\",\n\tPOINT_MOUSEMOVE = \"scatter-mousemove\",\n\tPOINT_CLICK = \"scatter-click\",\n\tPOINT_MOUSEOUT = \"scatter-mouseout\",\n}\n\n/**\n * enum of all radar graph events\n */\nexport enum Radar {\n\tX_AXIS_MOUSEOVER = \"radar-x-axis-mouseover\",\n\tX_AXIS_MOUSEMOVE = \"radar-x-axis-mousemove\",\n\tX_AXIS_CLICK = \"radar-x-axis-click\",\n\tX_AXIS_MOUSEOUT = \"radar-x-axis-mouseout\",\n}\n\n/**\n * enum of all tooltip events\n */\nexport enum Tooltip {\n\tSHOW = \"show-tooltip\",\n\tHIDE = \"hide-tooltip\",\n}\n\n/**\n * enum of all threshold events\n */\nexport enum Threshold {\n\tSHOW = \"show-threshold\",\n\tHIDE = \"hide-threshold\",\n}\n\n/**\n * enum of all legend related events\n */\nexport enum Legend {\n\tITEM_HOVER = \"legend-item-onhover\",\n\tITEM_CLICK = \"legend-item-onclick\",\n\tITEM_MOUSEOUT = \"legend-item-onmouseout\",\n\tITEMS_UPDATE = \"legend-items-update\",\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface TruncationOptions {
|
|
2
|
+
/**
|
|
3
|
+
* truncation configuration
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* truncation type
|
|
7
|
+
*/
|
|
8
|
+
type?: string;
|
|
9
|
+
/**
|
|
10
|
+
* truncation threshold
|
|
11
|
+
*/
|
|
12
|
+
threshold?: Number;
|
|
13
|
+
/**
|
|
14
|
+
* how many characters to be shown
|
|
15
|
+
*/
|
|
16
|
+
numCharacter?: Number;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=../../src/interfaces/truncation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"truncation.js","sourceRoot":"","sources":["truncation.ts"],"names":[],"mappings":"","sourcesContent":["export interface TruncationOptions {\n\t/**\n\t * truncation configuration\n\t */\n\t/**\n\t * truncation type\n\t */\n\ttype?: string;\n\t/**\n\t * truncation threshold\n\t */\n\tthreshold?: Number;\n\t/**\n\t * how many characters to be shown\n\t */\n\tnumCharacter?: Number;\n}\n"]}
|
package/model.js
CHANGED
|
@@ -110,6 +110,21 @@ var ChartModel = /** @class */ (function () {
|
|
|
110
110
|
var domainIdentifier = this.services.cartesianScales.getDomainIdentifier();
|
|
111
111
|
var rangeIdentifier = this.services.cartesianScales.getRangeIdentifier();
|
|
112
112
|
var stackKeys = map(displayData, function (datum) { return datum[domainIdentifier]; }).keys();
|
|
113
|
+
var axisPosition = this.services.cartesianScales.domainAxisPosition;
|
|
114
|
+
var scaleType = options.axes[axisPosition].scaleType;
|
|
115
|
+
// Sort keys
|
|
116
|
+
if (scaleType === ScaleTypes.TIME) {
|
|
117
|
+
stackKeys.sort(function (a, b) {
|
|
118
|
+
var dateA = new Date(a);
|
|
119
|
+
var dateB = new Date(b);
|
|
120
|
+
return dateA - dateB;
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
else if (scaleType === ScaleTypes.LOG ||
|
|
124
|
+
scaleType === ScaleTypes.LINEAR) {
|
|
125
|
+
stackKeys.sort(function (a, b) { return a - b; });
|
|
126
|
+
}
|
|
127
|
+
;
|
|
113
128
|
var dataGroupNames = this.getDataGroupNames();
|
|
114
129
|
return stackKeys.map(function (key) {
|
|
115
130
|
var correspondingValues = { sharedStackKey: key };
|