@carbon/charts 0.33.0 → 0.34.2
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 +45 -1
- package/axis-chart.d.ts +2 -2
- package/axis-chart.js +6 -4
- package/axis-chart.js.map +1 -1
- package/build/demo/data/bar.d.ts +12 -48
- package/build/demo/data/bubble.d.ts +1 -0
- package/build/src/axis-chart.d.ts +2 -2
- package/build/src/chart.d.ts +2 -2
- package/build/src/components/axes/ruler-stacked-bar.d.ts +4 -0
- package/build/src/components/axes/ruler.d.ts +6 -1
- package/build/src/components/essentials/tooltip-axis.d.ts +4 -0
- package/build/src/components/essentials/tooltip.d.ts +4 -10
- package/build/src/components/index.d.ts +2 -4
- package/build/src/configuration.d.ts +1 -3
- package/build/src/interfaces/a11y.d.ts +2 -1
- package/build/src/interfaces/charts.d.ts +1 -3
- package/build/src/interfaces/components.d.ts +7 -52
- package/build/src/interfaces/enums.d.ts +0 -10
- package/build/src/interfaces/events.d.ts +1 -0
- package/build/src/services/scales-cartesian.d.ts +6 -1
- package/bundle.js +1 -1
- package/chart.d.ts +2 -2
- package/chart.js +2 -1
- package/chart.js.map +1 -1
- package/charts/area-stacked.js +1 -3
- package/charts/area-stacked.js.map +1 -1
- package/charts/area.js +1 -2
- package/charts/area.js.map +1 -1
- package/charts/bar-grouped.js +1 -2
- package/charts/bar-grouped.js.map +1 -1
- package/charts/bar-simple.js +1 -2
- package/charts/bar-simple.js.map +1 -1
- package/charts/bar-stacked.js +2 -2
- package/charts/bar-stacked.js.map +1 -1
- package/charts/bubble.js +1 -2
- package/charts/bubble.js.map +1 -1
- package/charts/donut.js +1 -2
- package/charts/donut.js.map +1 -1
- package/charts/gauge.js +1 -2
- package/charts/gauge.js.map +1 -1
- package/charts/line.js +1 -2
- package/charts/line.js.map +1 -1
- package/charts/pie.js +1 -4
- package/charts/pie.js.map +1 -1
- package/charts/radar.js +0 -3
- package/charts/radar.js.map +1 -1
- package/charts/scatter.js +1 -2
- package/charts/scatter.js.map +1 -1
- package/components/axes/axis.js +23 -8
- package/components/axes/axis.js.map +1 -1
- package/components/axes/grid.js.map +1 -1
- package/components/axes/ruler-stacked-bar.d.ts +4 -0
- package/components/axes/ruler-stacked-bar.js +26 -0
- package/components/axes/ruler-stacked-bar.js.map +1 -0
- package/components/axes/ruler.d.ts +6 -1
- package/components/axes/ruler.js +25 -13
- package/components/axes/ruler.js.map +1 -1
- package/components/essentials/legend.js +15 -14
- package/components/essentials/legend.js.map +1 -1
- package/components/essentials/threshold.js +2 -2
- package/components/essentials/threshold.js.map +1 -1
- package/components/essentials/title.js +10 -9
- package/components/essentials/title.js.map +1 -1
- package/components/essentials/tooltip-axis.d.ts +4 -0
- package/components/essentials/tooltip-axis.js +120 -0
- package/components/essentials/tooltip-axis.js.map +1 -0
- package/components/essentials/tooltip.d.ts +4 -10
- package/components/essentials/tooltip.js +73 -100
- package/components/essentials/tooltip.js.map +1 -1
- package/components/graphs/area-stacked.js.map +1 -1
- package/components/graphs/bar-grouped.js +5 -3
- package/components/graphs/bar-grouped.js.map +1 -1
- package/components/graphs/bar-simple.js +4 -2
- package/components/graphs/bar-simple.js.map +1 -1
- package/components/graphs/bar-stacked.js +17 -14
- package/components/graphs/bar-stacked.js.map +1 -1
- package/components/graphs/pie.js +31 -12
- package/components/graphs/pie.js.map +1 -1
- package/components/graphs/radar.js +23 -18
- package/components/graphs/radar.js.map +1 -1
- package/components/graphs/scatter-stacked.js.map +1 -1
- package/components/graphs/scatter.js +18 -13
- package/components/graphs/scatter.js.map +1 -1
- package/components/graphs/skeleton.js +2 -5
- package/components/graphs/skeleton.js.map +1 -1
- package/components/index.d.ts +2 -4
- package/components/index.js +2 -4
- package/components/index.js.map +1 -1
- package/components/layout/layout.js +3 -1
- package/components/layout/layout.js.map +1 -1
- package/configuration.d.ts +1 -3
- package/configuration.js +6 -26
- package/configuration.js.map +1 -1
- package/demo/data/bar.d.ts +12 -48
- package/demo/data/bar.js +22 -58
- package/demo/data/bar.js.map +1 -1
- package/demo/data/bubble.d.ts +1 -0
- package/demo/data/bubble.js +2 -1
- package/demo/data/bubble.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/index.js +1 -1
- package/demo/data/index.js.map +1 -1
- package/demo/data/line.js +5 -5
- package/demo/data/line.js.map +1 -1
- package/demo/styles.css +48 -100
- 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 +16 -16
- package/interfaces/a11y.d.ts +2 -1
- package/interfaces/a11y.js +1 -0
- package/interfaces/a11y.js.map +1 -1
- package/interfaces/charts.d.ts +1 -3
- package/interfaces/charts.js.map +1 -1
- package/interfaces/components.d.ts +7 -52
- package/interfaces/components.js.map +1 -1
- package/interfaces/enums.d.ts +0 -10
- package/interfaces/enums.js +0 -11
- package/interfaces/enums.js.map +1 -1
- package/interfaces/events.d.ts +1 -0
- package/interfaces/events.js +1 -0
- package/interfaces/events.js.map +1 -1
- package/model.js +3 -5
- package/model.js.map +1 -1
- package/package.json +1 -1
- package/services/essentials/dom-utils.js +3 -1
- package/services/essentials/dom-utils.js.map +1 -1
- package/services/scales-cartesian.d.ts +6 -1
- package/services/scales-cartesian.js +20 -1
- package/services/scales-cartesian.js.map +1 -1
- package/styles/components/_ruler.scss +0 -6
- package/styles/components/_tooltip.scss +3 -9
- package/styles/graphs/_scatter-stacked.scss +10 -0
- package/styles/graphs/index.scss +1 -0
- package/styles-g10.css +13 -25
- 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 +13 -25
- 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 +13 -25
- 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 +13 -25
- package/styles.css.map +1 -1
- package/styles.min.css +1 -1
- package/styles.min.css.map +1 -1
- package/tsconfig.tsbuildinfo +81 -138
- package/build/src/components/essentials/tooltip-bar.d.ts +0 -27
- package/build/src/components/essentials/tooltip-pie.d.ts +0 -5
- package/build/src/components/essentials/tooltip-radar.d.ts +0 -5
- package/build/src/components/essentials/tooltip-scatter.d.ts +0 -5
- package/components/essentials/tooltip-bar.d.ts +0 -27
- package/components/essentials/tooltip-bar.js +0 -193
- package/components/essentials/tooltip-bar.js.map +0 -1
- package/components/essentials/tooltip-pie.d.ts +0 -5
- package/components/essentials/tooltip-pie.js +0 -44
- package/components/essentials/tooltip-pie.js.map +0 -1
- package/components/essentials/tooltip-radar.d.ts +0 -5
- package/components/essentials/tooltip-radar.js +0 -45
- package/components/essentials/tooltip-radar.js.map +0 -1
- package/components/essentials/tooltip-scatter.d.ts +0 -5
- package/components/essentials/tooltip-scatter.js +0 -46
- package/components/essentials/tooltip-scatter.js.map +0 -1
|
@@ -138,8 +138,8 @@
|
|
|
138
138
|
"signature": "37dce3c308ecb1ef88ddf7c9f9346d64c2b09a36eb7dcd4fe9d9736f5608107f"
|
|
139
139
|
},
|
|
140
140
|
"../../demo/data/bar.ts": {
|
|
141
|
-
"version": "
|
|
142
|
-
"signature": "
|
|
141
|
+
"version": "59fab71a491f75d6aa0efe783643fd81c97f04703621c88c4e271e722c3bb54a",
|
|
142
|
+
"signature": "c9c14dd5986b9fbcbabe902ab0442fe6f672d2a07402ff7fd246f6bcbc3c5532"
|
|
143
143
|
},
|
|
144
144
|
"../../../../node_modules/@types/d3-array/index.d.ts": {
|
|
145
145
|
"version": "f5b8f86da74b4bfb29f85a631b725a47c8a3ab6c4ce91537e5b176bbe0cd0a7a",
|
|
@@ -270,12 +270,12 @@
|
|
|
270
270
|
"signature": "ff07d0e1e23dcc09b7868c330f7d1a554357c1ed2ec211b90dc4f4fbc406cd77"
|
|
271
271
|
},
|
|
272
272
|
"../../demo/data/line.ts": {
|
|
273
|
-
"version": "
|
|
273
|
+
"version": "1b429016770ea75d528b50197c281fac8b02675023c971373c879e44b4c003de",
|
|
274
274
|
"signature": "bf6a65cc7af41cf3b52202acc694c3bb1a474aa2c1025e10b26a8a62df533550"
|
|
275
275
|
},
|
|
276
276
|
"../../demo/data/bubble.ts": {
|
|
277
|
-
"version": "
|
|
278
|
-
"signature": "
|
|
277
|
+
"version": "b5d35bf3f1061e5a60b606fc42969942f0ccc71c0446b7536f8fff2600cfe6fe",
|
|
278
|
+
"signature": "4ca6aa75df0a88118f20fd87733039857d88fef211e5b4c3d7d6b6fdb7f284b3"
|
|
279
279
|
},
|
|
280
280
|
"../../demo/data/pie.ts": {
|
|
281
281
|
"version": "a169c39586edc85fc934cb85834e93ac7795f3a2d70d59ed1417821aebbbe311",
|
|
@@ -294,16 +294,16 @@
|
|
|
294
294
|
"signature": "748b4d1f4a8448ef21f35a92fccec9f5f349fb302e12d093db0916b613dd54af"
|
|
295
295
|
},
|
|
296
296
|
"../../src/interfaces/a11y.ts": {
|
|
297
|
-
"version": "
|
|
298
|
-
"signature": "
|
|
297
|
+
"version": "beb6bff76d01b4ac95b895f3a1cc3438e308cc652467445f37032cfff0f0f8f2",
|
|
298
|
+
"signature": "beb6bff76d01b4ac95b895f3a1cc3438e308cc652467445f37032cfff0f0f8f2"
|
|
299
299
|
},
|
|
300
300
|
"../../src/interfaces/events.ts": {
|
|
301
|
-
"version": "
|
|
302
|
-
"signature": "
|
|
301
|
+
"version": "dfc12ca58ea7e3709864145ab062a2af4385d87ef4e4065a610400091534c7cd",
|
|
302
|
+
"signature": "dfc12ca58ea7e3709864145ab062a2af4385d87ef4e4065a610400091534c7cd"
|
|
303
303
|
},
|
|
304
304
|
"../../src/interfaces/enums.ts": {
|
|
305
|
-
"version": "
|
|
306
|
-
"signature": "
|
|
305
|
+
"version": "150138513307b2cbd2f57bb220c25c899adb0f9b6fc9ef0965d0c5f729ed8560",
|
|
306
|
+
"signature": "150138513307b2cbd2f57bb220c25c899adb0f9b6fc9ef0965d0c5f729ed8560"
|
|
307
307
|
},
|
|
308
308
|
"../../src/model.ts": {
|
|
309
309
|
"version": "8489fa242b6c8c33d33505e266ea5e40dab339479fd88bc0b7aadeedbcf9722d",
|
|
@@ -318,16 +318,16 @@
|
|
|
318
318
|
"signature": "e13ca1760c1d894f0cbb054be895f12207ff8a8708be12a18944832c02dd7ab2"
|
|
319
319
|
},
|
|
320
320
|
"../../src/interfaces/components.ts": {
|
|
321
|
-
"version": "
|
|
322
|
-
"signature": "
|
|
321
|
+
"version": "48ff3567bbef047952c356843cebc7ab4d9d2727366ddfe4c6fe7a89f1f1a4e5",
|
|
322
|
+
"signature": "48ff3567bbef047952c356843cebc7ab4d9d2727366ddfe4c6fe7a89f1f1a4e5"
|
|
323
323
|
},
|
|
324
324
|
"../../src/interfaces/axis-scales.ts": {
|
|
325
325
|
"version": "7d83049c1ac328d34f48b5e65bd05c1477181123a86ba46bc3a7bffe58673716",
|
|
326
326
|
"signature": "7d83049c1ac328d34f48b5e65bd05c1477181123a86ba46bc3a7bffe58673716"
|
|
327
327
|
},
|
|
328
328
|
"../../src/interfaces/charts.ts": {
|
|
329
|
-
"version": "
|
|
330
|
-
"signature": "
|
|
329
|
+
"version": "798b0a3bc57192971fc8684770cb74404f3e302df5cc10969599e1b6f2b7195b",
|
|
330
|
+
"signature": "798b0a3bc57192971fc8684770cb74404f3e302df5cc10969599e1b6f2b7195b"
|
|
331
331
|
},
|
|
332
332
|
"../../src/interfaces/layout.ts": {
|
|
333
333
|
"version": "4d474058b20e782a7d01c499c6e5871a95dee4cbc1eed7d601e5cb246d3308d0",
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
"signature": "7fbd2c1dfdbbe5439288e7376d5b535a4fb03d7f30649924e5bcaa848fda0f6b"
|
|
363
363
|
},
|
|
364
364
|
"../../demo/data/index.ts": {
|
|
365
|
-
"version": "
|
|
365
|
+
"version": "1ede7f61fba849d2cca5eca3d219410f4646e254a879a6954d9b4af00e19c626",
|
|
366
366
|
"signature": "fbab21de19eee6ef5fde7e60a4bf13858e538d19d6652f1a5a857de33c307668"
|
|
367
367
|
},
|
|
368
368
|
"../../node_modules/@types/node/globals.d.ts": {
|
package/interfaces/a11y.d.ts
CHANGED
package/interfaces/a11y.js
CHANGED
package/interfaces/a11y.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y.js","sourceRoot":"","sources":["a11y.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"a11y.js","sourceRoot":"","sources":["a11y.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,KAMX;AAND,WAAY,KAAK;IAChB,gDAAuC,CAAA;IACvC,4CAAmC,CAAA;IACnC,4CAAmC,CAAA;IACnC,wBAAe,CAAA;IACf,8BAAqB,CAAA;AACtB,CAAC,EANW,KAAK,KAAL,KAAK,QAMhB","sourcesContent":["export enum Roles {\n\tGRAPHICS_DOCUMENT = \"graphics-document\",\n\tGRAPHICS_OBJECT = \"graphics-object\",\n\tGRAPHICS_SYMBOL = \"graphics-symbol\",\n\tGROUP = \"group\",\n\tDOCUMENT = \"document\"\n}\n"]}
|
package/interfaces/charts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GaugeTypes, Statuses, ArrowDirections } from "./enums";
|
|
2
2
|
import { LegendOptions, TooltipOptions, GridOptions, AxesOptions } from "./index";
|
|
3
|
-
import {
|
|
3
|
+
import { BarOptions, StackedBarOptions } from "./components";
|
|
4
4
|
import { TimeScaleOptions } from "./axis-scales";
|
|
5
5
|
/**
|
|
6
6
|
* Base chart options common to any chart
|
|
@@ -90,14 +90,12 @@ export interface AxisChartOptions extends BaseChartOptions {
|
|
|
90
90
|
axes?: AxesOptions;
|
|
91
91
|
grid?: GridOptions;
|
|
92
92
|
timeScale?: TimeScaleOptions;
|
|
93
|
-
tooltip?: AxisTooltipOptions;
|
|
94
93
|
}
|
|
95
94
|
/**
|
|
96
95
|
* options specific to bar charts
|
|
97
96
|
*/
|
|
98
97
|
export interface BarChartOptions extends AxisChartOptions {
|
|
99
98
|
bars?: BarOptions;
|
|
100
|
-
tooltip?: BarTooltipOptions;
|
|
101
99
|
}
|
|
102
100
|
/**
|
|
103
101
|
* options specific to stacked bar charts
|
package/interfaces/charts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charts.js","sourceRoot":"","sources":["charts.ts"],"names":[],"mappings":"","sourcesContent":["import { GaugeTypes, Statuses, ArrowDirections } from \"./enums\";\nimport {\n\tLegendOptions,\n\tTooltipOptions,\n\tGridOptions,\n\tAxesOptions\n} from \"./index\";\nimport {
|
|
1
|
+
{"version":3,"file":"charts.js","sourceRoot":"","sources":["charts.ts"],"names":[],"mappings":"","sourcesContent":["import { GaugeTypes, Statuses, ArrowDirections } from \"./enums\";\nimport {\n\tLegendOptions,\n\tTooltipOptions,\n\tGridOptions,\n\tAxesOptions\n} from \"./index\";\nimport { BarOptions, StackedBarOptions } from \"./components\";\nimport { TimeScaleOptions } from \"./axis-scales\";\n\n/**\n * Base chart options common to any chart\n */\nexport interface BaseChartOptions {\n\t/**\n\t * Optionally specify a title for the chart\n\t */\n\ttitle?: string;\n\t/**\n\t * boolean to disable animations (enabled by default)\n\t */\n\tanimations?: boolean;\n\t/**\n\t * boolean to prevent the container from resizing\n\t */\n\tresizable?: boolean;\n\t/**\n\t * Optionally specify a width for the chart\n\t */\n\twidth?: string;\n\t/**\n\t * Optionally specify a height for the chart\n\t */\n\theight?: string;\n\t/**\n\t * tooltip configuration\n\t */\n\ttooltip?: TooltipOptions;\n\t/**\n\t * legend configuration\n\t */\n\tlegend?: LegendOptions;\n\t/**\n\t * Optional function to determine whether is filled based on datasetLabel, label, and/or data\n\t */\n\tgetIsFilled?: (\n\t\tdatasetLabel: any,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultFilled?: boolean\n\t) => boolean;\n\t/**\n\t * Optional function to generate the fill color based on datasetLabel, label, and/or data\n\t */\n\tgetFillColor?: (\n\t\tdatasetLabel: any,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultFillColor?: string\n\t) => string;\n\t/**\n\t * Optional function to generate the stroke color based on datasetLabel, label, and/or data\n\t */\n\tgetStrokeColor?: (\n\t\tdatasetLabel: any,\n\t\tlabel?: any,\n\t\tdata?: any,\n\t\tdefaultStrokeColor?: string\n\t) => string;\n\t/**\n\t * stylesheet options\n\t */\n\tstyle?: {\n\t\t/**\n\t\t * optional prefixing string for css classes (defaults to 'cc')\n\t\t */\n\t\tprefix?: string;\n\t};\n\t/**\n\t * options related to charting data\n\t */\n\tdata?: {\n\t\t/**\n\t\t * identifier for data groups\n\t\t */\n\t\tgroupMapsTo?: string;\n\t\t/**\n\t\t * used to simulate data loading\n\t\t */\n\t\tloading?: Boolean;\n\t\t/**\n\t\t * options related to pre-selected data groups\n\t\t * Remains empty if every legend item is active or dataset doesn't have the data groups.\n\t\t */\n\t\tselectedGroups?: string[];\n\t};\n\t/**\n\t * options related to color scales\n\t */\n\tcolor?: {\n\t\t/**\n\t\t * e.g. { \"Dataset 1\": \"blue\" }\n\t\t */\n\t\tscale?: object;\n\t};\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}\n\n/**\n * options specific to bar charts\n */\nexport interface BarChartOptions extends AxisChartOptions {\n\tbars?: BarOptions;\n}\n\n/**\n * options specific to stacked bar charts\n */\nexport interface StackedBarChartOptions extends BarChartOptions {\n\tbars?: StackedBarOptions;\n}\n\n/**\n * options specific to scatter charts\n */\nexport interface ScatterChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the points\n\t */\n\tpoints?: {\n\t\t/**\n\t\t * sets the radius of the point\n\t\t */\n\t\tradius: number;\n\t\tfillOpacity?: number;\n\t\tfilled?: boolean;\n\t};\n}\n\n/**\n * options specific to bubble charts\n */\nexport interface BubbleChartOptions extends AxisChartOptions {\n\t/**\n\t * options for the individual bubbles\n\t */\n\tbubble?: {\n\t\t/**\n\t\t * the key to lookup in charting data for the bubble radius value\n\t\t */\n\t\tradiusMapsTo?: string;\n\t\t/**\n\t\t * A function that would determine the range of the bubble radius to use\n\t\t * Returns an array with the 1st value being the min and the 2nd value being the max radius\n\t\t */\n\t\tradiusRange?: Function;\n\t\t/**\n\t\t * Opacity of the fills used within each circle\n\t\t */\n\t\tfillOpacity?: number;\n\t};\n}\n\n/**\n * options specific to line charts\n */\nexport interface LineChartOptions extends ScatterChartOptions {\n\t/**\n\t * options for the curve of the line\n\t */\n\tcurve?:\n\t\t| string\n\t\t| {\n\t\t\t\tname: string;\n\t\t };\n}\n\n/**\n * options specific to 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"]}
|
|
@@ -61,32 +61,14 @@ export interface TooltipOptions {
|
|
|
61
61
|
*/
|
|
62
62
|
customHTML?: Function;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* offset of the tooltip from the mouse position
|
|
65
65
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
* toggles on/off datapoint tooltips.
|
|
73
|
-
*/
|
|
74
|
-
enabled?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* vertical offset for tooltip placement
|
|
77
|
-
*/
|
|
78
|
-
verticalOffset?: number;
|
|
79
|
-
};
|
|
80
|
-
title?: {
|
|
81
|
-
/**
|
|
82
|
-
* vertical offset for title tooltip placement. < 0 shifts the tooltip above title, > 0 shifts vertically down
|
|
83
|
-
*/
|
|
84
|
-
verticalOffset?: number;
|
|
85
|
-
/**
|
|
86
|
-
* max width of title tooltip relative to the width of the chart-svg (percentage should be < 1)
|
|
87
|
-
*/
|
|
88
|
-
width?: number;
|
|
89
|
-
};
|
|
66
|
+
horizontalOffset?: number;
|
|
67
|
+
/**
|
|
68
|
+
* show total of items
|
|
69
|
+
*/
|
|
70
|
+
showTotal?: boolean;
|
|
71
|
+
truncation?: TruncationOptions;
|
|
90
72
|
}
|
|
91
73
|
/**
|
|
92
74
|
* Threshold options
|
|
@@ -109,33 +91,6 @@ export interface ThresholdOptions {
|
|
|
109
91
|
*/
|
|
110
92
|
label: string;
|
|
111
93
|
}
|
|
112
|
-
/**
|
|
113
|
-
* extends tooltip options to provide support for multiple gridline tooltips
|
|
114
|
-
*/
|
|
115
|
-
export interface AxisTooltipOptions extends TooltipOptions {
|
|
116
|
-
/** options for gridline event listeners */
|
|
117
|
-
gridline?: {
|
|
118
|
-
/**
|
|
119
|
-
* controls whether the gridlines are active for tooltip support
|
|
120
|
-
*/
|
|
121
|
-
enabled?: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* optional set threshold (value between 0 and 1) for active gridlines
|
|
124
|
-
*/
|
|
125
|
-
threshold?: number;
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* extends tooltip for bar tooltip
|
|
130
|
-
*/
|
|
131
|
-
export interface BarTooltipOptions extends TooltipOptions {
|
|
132
|
-
datapoint: {
|
|
133
|
-
/**
|
|
134
|
-
* padding between the bar items and the tooltip
|
|
135
|
-
*/
|
|
136
|
-
verticalOffset: number;
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
94
|
export interface GridOptions {
|
|
140
95
|
y?: {
|
|
141
96
|
numberOfTicks?: number;
|
|
@@ -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\";\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 *
|
|
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 * offset of the tooltip from the mouse position\n\t */\n\thorizontalOffset?: number;\n\t/**\n\t * show total of items\n\t */\n\tshowTotal?: boolean;\n\ttruncation?: TruncationOptions;\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\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
|
@@ -54,16 +54,6 @@ export declare enum TooltipPosition {
|
|
|
54
54
|
TOP = "top",
|
|
55
55
|
BOTTOM = "bottom"
|
|
56
56
|
}
|
|
57
|
-
/**
|
|
58
|
-
* enum of tooltip types for custom tooltip event
|
|
59
|
-
*/
|
|
60
|
-
export declare enum TooltipTypes {
|
|
61
|
-
DATAPOINT = "datapoint",
|
|
62
|
-
GRIDLINE = "gridline",
|
|
63
|
-
TITLE = "title",
|
|
64
|
-
LEGEND = "legend",
|
|
65
|
-
AXISLABEL = "axislabel"
|
|
66
|
-
}
|
|
67
57
|
/**
|
|
68
58
|
* enum of all possible legend positions
|
|
69
59
|
*/
|
package/interfaces/enums.js
CHANGED
|
@@ -60,17 +60,6 @@ export var TooltipPosition;
|
|
|
60
60
|
TooltipPosition["TOP"] = "top";
|
|
61
61
|
TooltipPosition["BOTTOM"] = "bottom";
|
|
62
62
|
})(TooltipPosition || (TooltipPosition = {}));
|
|
63
|
-
/**
|
|
64
|
-
* enum of tooltip types for custom tooltip event
|
|
65
|
-
*/
|
|
66
|
-
export var TooltipTypes;
|
|
67
|
-
(function (TooltipTypes) {
|
|
68
|
-
TooltipTypes["DATAPOINT"] = "datapoint";
|
|
69
|
-
TooltipTypes["GRIDLINE"] = "gridline";
|
|
70
|
-
TooltipTypes["TITLE"] = "title";
|
|
71
|
-
TooltipTypes["LEGEND"] = "legend";
|
|
72
|
-
TooltipTypes["AXISLABEL"] = "axislabel";
|
|
73
|
-
})(TooltipTypes || (TooltipTypes = {}));
|
|
74
63
|
/**
|
|
75
64
|
* enum of all possible legend positions
|
|
76
65
|
*/
|
package/interfaces/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["enums.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,UAAU,CAAC;AACvC,MAAM,CAAC,IAAM,MAAM,GAAG,UAAU,CAAC;AAEjC;;GAEG;AACH,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACrB,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,yBAAW,CAAA;AACZ,CAAC,EAL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;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 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
package/interfaces/events.js
CHANGED
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;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;A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AuB,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 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\tMOVE = \"move-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"]}
|
package/model.js
CHANGED
|
@@ -277,7 +277,6 @@ var ChartModel = /** @class */ (function () {
|
|
|
277
277
|
// If every item is active, clear array
|
|
278
278
|
options.data.selectedGroups = [];
|
|
279
279
|
}
|
|
280
|
-
;
|
|
281
280
|
// dispatch legend filtering event with the status of all the dataLabels
|
|
282
281
|
this.services.events.dispatchEvent(Events.Legend.ITEMS_UPDATE, {
|
|
283
282
|
dataGroups: dataGroups
|
|
@@ -410,16 +409,15 @@ var ChartModel = /** @class */ (function () {
|
|
|
410
409
|
var uniqueDataGroups = map(data, function (datum) { return datum[groupMapsTo]; }).keys();
|
|
411
410
|
// check if selectedGroups can be applied to chart with current data groups
|
|
412
411
|
if (options.data.selectedGroups.length) {
|
|
413
|
-
var hasAllSelectedGroups = options.data.selectedGroups
|
|
414
|
-
.every(function (groupName) { return uniqueDataGroups.includes(groupName); });
|
|
412
|
+
var hasAllSelectedGroups = options.data.selectedGroups.every(function (groupName) { return uniqueDataGroups.includes(groupName); });
|
|
415
413
|
if (!hasAllSelectedGroups) {
|
|
416
414
|
options.data.selectedGroups = [];
|
|
417
415
|
}
|
|
418
|
-
;
|
|
419
416
|
}
|
|
420
417
|
// Get group status based on items in selected groups
|
|
421
418
|
var getStatus = function (groupName) {
|
|
422
|
-
return !options.data.selectedGroups.length ||
|
|
419
|
+
return !options.data.selectedGroups.length ||
|
|
420
|
+
options.data.selectedGroups.includes(groupName)
|
|
423
421
|
? ACTIVE
|
|
424
422
|
: DISABLED;
|
|
425
423
|
};
|
package/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["model.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAElD,KAAK;AACL,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,M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AAa,GAAvB;QACC,IAAI,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC;QAE1C,IAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAClC,IAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAEvE,0EAA0E;QAC1E,IACC,iBAAiB,KAAK,IAAI;YAC1B,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,MAAM,KAAK,CAAC,EAC1C;YACD,IAAI,CAAC,UAAU,GAAG,YAAY,EAAE;iBAC9B,KAAK,CAAC,aAAa,CAAC;iBACpB,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAE7B,OAAO;SACP;QAED;;;;WAIG;QACH,IAAM,UAAU,GAAG,EAAE,CAAC;QACtB,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAC,SAAS;YACpC,IAAI,iBAAiB,CAAC,SAAS,CAAC,EAAE;gBACjC,UAAU,CAAC,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;aAC9C;iBAAM;gBACN,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC;aAC3C;YAED,IAAI,UAAU,KAAK,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC5C,UAAU,GAAG,CAAC,CAAC;aACf;iBAAM;gBACN,UAAU,EAAE,CAAC;aACb;QACF,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,GAAG,YAAY,EAAE;aAC9B,KAAK,CAAC,UAAU,CAAC;aACjB,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9B,CAAC;IACF,iBAAC;AAAD,CAAC,AAhkBD,IAgkBC","sourcesContent":["// Internal Imports\nimport * as Configuration from \"./configuration\";\nimport { Tools } from \"./tools\";\nimport * as colorPalettes from \"./services/colorPalettes\";\nimport { Events, ScaleTypes } from \"./interfaces\";\n\n// D3\nimport { scaleOrdinal } from \"d3-scale\";\nimport { map } from \"d3-collection\";\nimport { stack } from \"d3-shape\";\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 ChartModel {\n\t// Callbacks\n\t/**\n\t * Function to be called when data or options update within the model\n\t * @type Function\n\t */\n\tprotected updateCallback: Function;\n\tprotected services: any;\n\n\t// Internal Model state\n\tprotected state: any = {\n\t\toptions: {}\n\t};\n\n\t// Data labels\n\t/**\n\t * A list of all the data groups that have existed within the lifetime of the chart\n\t * @type string[]\n\t */\n\tprotected allDataGroups: string[];\n\n\t// Fill scales & fill related objects\n\tprotected colorScale: any = {};\n\n\tconstructor(services: any) {\n\t\tthis.services = services;\n\t}\n\n\tgetAllDataFromDomain() {\n\t\tif (!this.get(\"data\")) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst dataGroups = this.getDataGroups();\n\n\t\t// Remove datasets that have been disabled\n\t\tlet displayData = Tools.clone(this.get(\"data\"));\n\t\tconst { groupMapsTo } = this.getOptions().data;\n\n\t\tconst axesOptions = this.getOptions().axes;\n\n\t\t// Check for custom domain\n\t\tif (axesOptions) {\n\t\t\tObject.keys(axesOptions).forEach((axis) => {\n\t\t\t\tif (axesOptions[axis].mapsTo && axesOptions[axis].domain) {\n\t\t\t\t\tconst mapsTo = axesOptions[axis].mapsTo;\n\n\t\t\t\t\tif (axesOptions[axis].scaleType === ScaleTypes.LABELS) {\n\t\t\t\t\t\tdisplayData = displayData.filter((datum) =>\n\t\t\t\t\t\t\taxesOptions[axis].domain.includes(datum[mapsTo])\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst [start, end] = axesOptions[axis].domain;\n\n\t\t\t\t\t\t// Filter out data outside domain\n\t\t\t\t\t\tdisplayData = displayData.filter(\n\t\t\t\t\t\t\t(datum) =>\n\t\t\t\t\t\t\t\tdatum[mapsTo] >= start && datum[mapsTo] <= end\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn displayData.filter((datum) => {\n\t\t\treturn dataGroups.find(\n\t\t\t\t(group) => group.name === datum[groupMapsTo]\n\t\t\t);\n\t\t});\n\t}\n\n\tgetDisplayData() {\n\t\tif (!this.get(\"data\")) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { ACTIVE } = Configuration.legend.items.status;\n\t\tconst dataGroups = this.getDataGroups();\n\t\tconst { groupMapsTo } = this.getOptions().data;\n\n\t\tconst allDataFromDomain = this.getAllDataFromDomain();\n\n\t\treturn allDataFromDomain.filter((datum) => {\n\t\t\tconst group = dataGroups.find(\n\t\t\t\t(group) => group.name === datum[groupMapsTo]\n\t\t\t);\n\n\t\t\treturn group.status === ACTIVE;\n\t\t});\n\t}\n\n\tgetData() {\n\t\treturn this.get(\"data\");\n\t}\n\n\tisDataEmpty() {\n\t\treturn !this.getData().length;\n\t}\n\n\t/**\n\t *\n\t * @param newData The new raw data to be set\n\t */\n\tsetData(newData) {\n\t\tconst sanitizedData = this.sanitize(Tools.clone(newData));\n\t\tconst dataGroups = this.generateDataGroups(sanitizedData);\n\n\t\tthis.set({\n\t\t\tdata: sanitizedData,\n\t\t\tdataGroups\n\t\t});\n\n\t\treturn sanitizedData;\n\t}\n\n\tgetDataGroups() {\n\t\treturn this.get(\"dataGroups\");\n\t}\n\n\tgetActiveDataGroups() {\n\t\tconst { ACTIVE } = Configuration.legend.items.status;\n\n\t\treturn this.getDataGroups().filter(\n\t\t\t(dataGroup) => dataGroup.status === ACTIVE\n\t\t);\n\t}\n\n\tgetDataGroupNames() {\n\t\treturn this.getDataGroups().map((dataGroup) => dataGroup.name);\n\t}\n\n\tgetActiveDataGroupNames() {\n\t\treturn this.getActiveDataGroups().map((dataGroup) => dataGroup.name);\n\t}\n\n\tgetGroupedData() {\n\t\tconst displayData = this.getDisplayData();\n\t\tconst groupedData = {};\n\t\tconst { groupMapsTo } = this.getOptions().data;\n\n\t\tdisplayData.map((datum) => {\n\t\t\tconst group = datum[groupMapsTo];\n\t\t\tif (\n\t\t\t\tgroupedData[group] !== null &&\n\t\t\t\tgroupedData[group] !== undefined\n\t\t\t) {\n\t\t\t\tgroupedData[group].push(datum);\n\t\t\t} else {\n\t\t\t\tgroupedData[group] = [datum];\n\t\t\t}\n\t\t});\n\n\t\treturn Object.keys(groupedData).map((groupName) => ({\n\t\t\tname: groupName,\n\t\t\tdata: groupedData[groupName]\n\t\t}));\n\t}\n\n\tgetDataValuesGroupedByKeys() {\n\t\tconst options = this.getOptions();\n\t\tconst { groupMapsTo } = options.data;\n\n\t\tconst displayData = this.getDisplayData();\n\t\tconst domainIdentifier = this.services.cartesianScales.getDomainIdentifier();\n\t\tconst rangeIdentifier = this.services.cartesianScales.getRangeIdentifier();\n\n\t\tconst stackKeys = map(\n\t\t\tdisplayData,\n\t\t\t(datum) => datum[domainIdentifier]\n\t\t).keys();\n\n\t\tconst axisPosition = this.services.cartesianScales.domainAxisPosition;\n\t\tconst scaleType = options.axes[axisPosition].scaleType;\n\n\t\t// Sort keys\n\t\tif (scaleType === ScaleTypes.TIME) {\n\t\t\tstackKeys.sort((a: any, b: any) => {\n\t\t\t\tconst dateA: any = new Date(a);\n\t\t\t\tconst dateB: any = new Date(b);\n\t\t\t\treturn dateA - dateB;\n\t\t\t});\n\t\t} else if (\n\t\t\tscaleType === ScaleTypes.LOG ||\n\t\t\tscaleType === ScaleTypes.LINEAR\n\t\t) {\n\t\t\tstackKeys.sort((a: any, b: any) => a - b);\n\t\t}\n\n\t\tconst dataGroupNames = this.getDataGroupNames();\n\n\t\treturn stackKeys.map((key) => {\n\t\t\tconst correspondingValues = { sharedStackKey: key };\n\t\t\tdataGroupNames.forEach((dataGroupName) => {\n\t\t\t\tconst correspondingDatum = displayData.find((datum) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tdatum[groupMapsTo] === dataGroupName &&\n\t\t\t\t\t\tdatum[domainIdentifier].toString() === key\n\t\t\t\t\t);\n\t\t\t\t});\n\n\t\t\t\tcorrespondingValues[dataGroupName] = correspondingDatum\n\t\t\t\t\t? correspondingDatum[rangeIdentifier]\n\t\t\t\t\t: null;\n\t\t\t});\n\t\t\treturn correspondingValues;\n\t\t}) as any;\n\t}\n\n\tgetStackedData({ percentage } = { percentage: false }) {\n\t\tconst options = this.getOptions();\n\t\tconst { groupMapsTo } = options.data;\n\n\t\tconst dataGroupNames = this.getDataGroupNames();\n\t\tconst dataValuesGroupedByKeys = this.getDataValuesGroupedByKeys();\n\n\t\tif (percentage) {\n\t\t\tconst maxByKey = Tools.fromPairs(\n\t\t\t\tdataValuesGroupedByKeys.map((d: any) => [d.sharedStackKey, 0])\n\t\t\t);\n\n\t\t\tdataValuesGroupedByKeys.forEach((d: any) => {\n\t\t\t\tdataGroupNames.forEach((name) => {\n\t\t\t\t\tmaxByKey[d.sharedStackKey] += d[name];\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// cycle through data values to get percentage\n\t\t\tdataValuesGroupedByKeys.forEach((d: any) => {\n\t\t\t\tdataGroupNames.forEach((name) => {\n\t\t\t\t\td[name] = (d[name] / maxByKey[d.sharedStackKey]) * 100;\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treturn stack()\n\t\t\t.keys(dataGroupNames)(dataValuesGroupedByKeys)\n\t\t\t.map((series, i) => {\n\t\t\t\t// Add data group names to each series\n\t\t\t\treturn Object.keys(series)\n\t\t\t\t\t.filter((key: any) => !isNaN(key))\n\t\t\t\t\t.map((key) => {\n\t\t\t\t\t\tconst element = series[key];\n\t\t\t\t\t\telement[groupMapsTo] = dataGroupNames[i];\n\n\t\t\t\t\t\treturn element;\n\t\t\t\t\t});\n\t\t\t});\n\t}\n\n\t/**\n\t * @return {Object} The chart's options\n\t */\n\tgetOptions() {\n\t\treturn this.state.options;\n\t}\n\n\tset(newState: any, skipUpdate = false) {\n\t\tthis.state = Object.assign({}, this.state, newState);\n\n\t\tif (!skipUpdate) {\n\t\t\tthis.update();\n\t\t}\n\t}\n\n\tget(property?: string) {\n\t\tif (property) {\n\t\t\treturn this.state[property];\n\t\t} else {\n\t\t\treturn this.state;\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param newOptions New options to be set\n\t */\n\tsetOptions(newOptions) {\n\t\tthis.set({\n\t\t\toptions: Tools.merge(this.getOptions(), newOptions)\n\t\t});\n\t}\n\n\t/**\n\t *\n\t * Updates miscellanous information within the model\n\t * such as the color scales, or the legend data labels\n\t */\n\tupdate() {\n\t\tif (!this.getDisplayData()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateAllDataGroups();\n\n\t\tthis.setColorScale();\n\t\tthis.services.events.dispatchEvent(Events.Model.UPDATE);\n\t}\n\n\tsetUpdateCallback(cb: Function) {\n\t\tthis.updateCallback = cb;\n\t}\n\n\t/*\n\t * Data labels\n\t */\n\ttoggleDataLabel(changedLabel: string) {\n\t\tconst { ACTIVE, DISABLED } = Configuration.legend.items.status;\n\t\tconst dataGroups = this.getDataGroups();\n\n\t\tconst hasDeactivatedItems = dataGroups.some(\n\t\t\t(group) => group.status === DISABLED\n\t\t);\n\t\tconst activeItems = dataGroups.filter(\n\t\t\t(group) => group.status === ACTIVE\n\t\t);\n\n\t\t// If there are deactivated items, toggle \"changedLabel\"\n\t\tif (hasDeactivatedItems) {\n\t\t\t// If the only active item is being toggled\n\t\t\t// Activate all items\n\t\t\tif (\n\t\t\t\tactiveItems.length === 1 &&\n\t\t\t\tactiveItems[0].name === changedLabel\n\t\t\t) {\n\t\t\t\t// If every item is active, then enable \"changedLabel\" and disable all other items\n\t\t\t\tdataGroups.forEach((group, i) => {\n\t\t\t\t\tdataGroups[i].status = ACTIVE;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tconst indexToChange = dataGroups.findIndex(\n\t\t\t\t\t(group) => group.name === changedLabel\n\t\t\t\t);\n\t\t\t\tdataGroups[indexToChange].status =\n\t\t\t\t\tdataGroups[indexToChange].status === DISABLED\n\t\t\t\t\t\t? ACTIVE\n\t\t\t\t\t\t: DISABLED;\n\t\t\t}\n\t\t} else {\n\t\t\t// If every item is active, then enable \"changedLabel\" and disable all other items\n\t\t\tdataGroups.forEach((group, i) => {\n\t\t\t\tdataGroups[i].status =\n\t\t\t\t\tgroup.name === changedLabel ? ACTIVE : DISABLED;\n\t\t\t});\n\t\t}\n\n\t\t// Updates selected groups\n\t\tconst updatedActiveItems = dataGroups.filter(group => group.status === ACTIVE);\n\t\tconst options = this.getOptions();\n\n\t\tconst hasUpdatedDeactivatedItems = dataGroups.some(\n\t\t\tgroup => group.status === DISABLED\n\t\t);\n\n\t\t// If there are deactivated items, map the item name into selected groups\n\t\tif (hasUpdatedDeactivatedItems) {\n\t\t\toptions.data.selectedGroups = updatedActiveItems.map(activeItem => activeItem.name);\n\t\t} else {\n\t\t\t// If every item is active, clear array\n\t\t\toptions.data.selectedGroups = [];\n\t\t};\n\n\t\t// dispatch legend filtering event with the status of all the dataLabels\n\t\tthis.services.events.dispatchEvent(Events.Legend.ITEMS_UPDATE, {\n\t\t\tdataGroups\n\t\t});\n\n\t\t// Update model\n\t\tthis.set({\n\t\t\tdataGroups\n\t\t});\n\t}\n\n\t/**\n\t * Should the data point be filled?\n\t * @param group\n\t * @param key\n\t * @param value\n\t * @param defaultFilled the default for this chart\n\t */\n\tgetIsFilled(group: any, key?: any, data?: any, defaultFilled?: boolean) {\n\t\tconst options = this.getOptions();\n\t\tif (options.getIsFilled) {\n\t\t\treturn options.getIsFilled(group, key, data, defaultFilled);\n\t\t} else {\n\t\t\treturn defaultFilled;\n\t\t}\n\t}\n\n\tgetFillColor(group: any, key?: any, data?: any) {\n\t\tconst options = this.getOptions();\n\t\tconst defaultFillColor = this.getFillScale()(group);\n\t\tif (options.getFillColor) {\n\t\t\treturn options.getFillColor(group, key, data, defaultFillColor);\n\t\t} else {\n\t\t\treturn defaultFillColor;\n\t\t}\n\t}\n\n\tgetStrokeColor(group: any, key?: any, data?: any) {\n\t\tconst options = this.getOptions();\n\t\tconst defaultStrokeColor = this.colorScale(group);\n\t\tif (options.getStrokeColor) {\n\t\t\treturn options.getStrokeColor(group, key, data, defaultStrokeColor);\n\t\t} else {\n\t\t\treturn defaultStrokeColor;\n\t\t}\n\t}\n\n\tgetFillScale() {\n\t\treturn this.colorScale;\n\t}\n\n\t/**\n\t * Converts data provided in the older format to tabular\n\t *\n\t */\n\tprotected transformToTabularData(data) {\n\t\tconsole.warn(\n\t\t\t\"We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format\"\n\t\t);\n\t\tconst tabularData = [];\n\t\tconst { datasets, labels } = data;\n\n\t\t// Loop through all datasets\n\t\tdatasets.forEach((dataset) => {\n\t\t\t// Update each data point to the new format\n\t\t\tdataset.data.forEach((datum, i) => {\n\t\t\t\tlet group;\n\n\t\t\t\tconst datasetLabel = Tools.getProperty(dataset, \"label\");\n\t\t\t\tif (datasetLabel === null) {\n\t\t\t\t\tconst correspondingLabel = Tools.getProperty(labels, i);\n\t\t\t\t\tif (correspondingLabel) {\n\t\t\t\t\t\tgroup = correspondingLabel;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgroup = \"Ungrouped\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tgroup = datasetLabel;\n\t\t\t\t}\n\n\t\t\t\tconst updatedDatum = {\n\t\t\t\t\tgroup,\n\t\t\t\t\tkey: labels[i]\n\t\t\t\t};\n\n\t\t\t\tif (isNaN(datum)) {\n\t\t\t\t\tupdatedDatum[\"value\"] = datum.value;\n\t\t\t\t\tupdatedDatum[\"date\"] = datum.date;\n\t\t\t\t} else {\n\t\t\t\t\tupdatedDatum[\"value\"] = datum;\n\t\t\t\t}\n\n\t\t\t\ttabularData.push(updatedDatum);\n\t\t\t});\n\t\t});\n\n\t\treturn tabularData;\n\t}\n\n\tprotected getTabularData(data) {\n\t\t// if data is not an array\n\t\tif (!Array.isArray(data)) {\n\t\t\treturn this.transformToTabularData(data);\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tprotected sanitize(data) {\n\t\treturn this.getTabularData(data);\n\t}\n\n\t/*\n\t * Data groups\n\t */\n\tprotected updateAllDataGroups() {\n\t\t// allDataGroups is used to generate a color scale that applies\n\t\t// to all the groups. Now when the data updates, you might remove a group,\n\t\t// and then bring it back in a newer data update, therefore\n\t\t// the order of the groups in allDataGroups matters so that you'd never\n\t\t// have an incorrect color assigned to a group.\n\n\t\t// Also, a new group should only be added to allDataGroups if\n\t\t// it doesn't currently exist\n\n\t\tif (!this.allDataGroups) {\n\t\t\tthis.allDataGroups = this.getDataGroupNames();\n\t\t} else {\n\t\t\t// Loop through current data groups\n\t\t\tthis.getDataGroupNames().forEach((dataGroupName) => {\n\t\t\t\t// If group name hasn't been stored yet, store it\n\t\t\t\tif (this.allDataGroups.indexOf(dataGroupName) === -1) {\n\t\t\t\t\tthis.allDataGroups.push(dataGroupName);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected generateDataGroups(data) {\n\t\tconst { groupMapsTo } = this.getOptions().data;\n\t\tconst { ACTIVE, DISABLED } = Configuration.legend.items.status;\n\t\tconst options = this.getOptions();\n\n\t\tconst uniqueDataGroups = map(\n\t\t\tdata,\n\t\t\t(datum) => datum[groupMapsTo]\n\t\t).keys();\n\n\t\t// check if selectedGroups can be applied to chart with current data groups\n\t\tif (options.data.selectedGroups.length) {\n\t\t\tconst hasAllSelectedGroups = options.data.selectedGroups\n\t\t\t\t.every(groupName => uniqueDataGroups.includes(groupName));\n\t\t\tif (!hasAllSelectedGroups) {\n\t\t\t\toptions.data.selectedGroups = [];\n\t\t\t};\n\t\t}\n\n\t\t// Get group status based on items in selected groups\n\t\tconst getStatus = (groupName) => \n\t\t\t!options.data.selectedGroups.length || options.data.selectedGroups.includes(groupName)\n\t\t\t\t? ACTIVE\n\t\t\t\t: DISABLED;\n\n\t\treturn uniqueDataGroups.map(groupName => ({\n\t\t\tname: groupName,\n\t\t\tstatus: getStatus(groupName)\n\t\t}));\n\t}\n\n\t/*\n\t * Fill scales\n\t */\n\tprotected setColorScale() {\n\t\tlet defaultColors = colorPalettes.DEFAULT;\n\n\t\tconst options = this.getOptions();\n\t\tconst userProvidedScale = Tools.getProperty(options, \"color\", \"scale\");\n\n\t\t// If there is no valid user provided scale, use the default set of colors\n\t\tif (\n\t\t\tuserProvidedScale === null ||\n\t\t\tObject.keys(userProvidedScale).length === 0\n\t\t) {\n\t\t\tthis.colorScale = scaleOrdinal()\n\t\t\t\t.range(defaultColors)\n\t\t\t\t.domain(this.allDataGroups);\n\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Go through allDataGroups. If a data group has a color value provided\n\t\t * by the user, add that to the color range\n\t\t * If not, add a default color\n\t\t */\n\t\tconst colorRange = [];\n\t\tlet colorIndex = 0;\n\t\tthis.allDataGroups.forEach((dataGroup) => {\n\t\t\tif (userProvidedScale[dataGroup]) {\n\t\t\t\tcolorRange.push(userProvidedScale[dataGroup]);\n\t\t\t} else {\n\t\t\t\tcolorRange.push(defaultColors[colorIndex]);\n\t\t\t}\n\n\t\t\tif (colorIndex === defaultColors.length - 1) {\n\t\t\t\tcolorIndex = 0;\n\t\t\t} else {\n\t\t\t\tcolorIndex++;\n\t\t\t}\n\t\t});\n\n\t\tthis.colorScale = scaleOrdinal()\n\t\t\t.range(colorRange)\n\t\t\t.domain(this.allDataGroups);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["model.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAElD,KAAK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./configuration\";\nimport { Tools } from \"./tools\";\nimport * as colorPalettes from \"./services/colorPalettes\";\nimport { Events, ScaleTypes } from \"./interfaces\";\n\n// D3\nimport { scaleOrdinal } from \"d3-scale\";\nimport { map } from \"d3-collection\";\nimport { stack } from \"d3-shape\";\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 ChartModel {\n\t// Callbacks\n\t/**\n\t * Function to be called when data or options update within the model\n\t * @type Function\n\t */\n\tprotected updateCallback: Function;\n\tprotected services: any;\n\n\t// Internal Model state\n\tprotected state: any = {\n\t\toptions: {}\n\t};\n\n\t// Data labels\n\t/**\n\t * A list of all the data groups that have existed within the lifetime of the chart\n\t * @type string[]\n\t */\n\tprotected allDataGroups: string[];\n\n\t// Fill scales & fill related objects\n\tprotected colorScale: any = {};\n\n\tconstructor(services: any) {\n\t\tthis.services = services;\n\t}\n\n\tgetAllDataFromDomain() {\n\t\tif (!this.get(\"data\")) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst dataGroups = this.getDataGroups();\n\n\t\t// Remove datasets that have been disabled\n\t\tlet displayData = Tools.clone(this.get(\"data\"));\n\t\tconst { groupMapsTo } = this.getOptions().data;\n\n\t\tconst axesOptions = this.getOptions().axes;\n\n\t\t// Check for custom domain\n\t\tif (axesOptions) {\n\t\t\tObject.keys(axesOptions).forEach((axis) => {\n\t\t\t\tif (axesOptions[axis].mapsTo && axesOptions[axis].domain) {\n\t\t\t\t\tconst mapsTo = axesOptions[axis].mapsTo;\n\n\t\t\t\t\tif (axesOptions[axis].scaleType === ScaleTypes.LABELS) {\n\t\t\t\t\t\tdisplayData = displayData.filter((datum) =>\n\t\t\t\t\t\t\taxesOptions[axis].domain.includes(datum[mapsTo])\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst [start, end] = axesOptions[axis].domain;\n\n\t\t\t\t\t\t// Filter out data outside domain\n\t\t\t\t\t\tdisplayData = displayData.filter(\n\t\t\t\t\t\t\t(datum) =>\n\t\t\t\t\t\t\t\tdatum[mapsTo] >= start && datum[mapsTo] <= end\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn displayData.filter((datum) => {\n\t\t\treturn dataGroups.find(\n\t\t\t\t(group) => group.name === datum[groupMapsTo]\n\t\t\t);\n\t\t});\n\t}\n\n\tgetDisplayData() {\n\t\tif (!this.get(\"data\")) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { ACTIVE } = Configuration.legend.items.status;\n\t\tconst dataGroups = this.getDataGroups();\n\t\tconst { groupMapsTo } = this.getOptions().data;\n\n\t\tconst allDataFromDomain = this.getAllDataFromDomain();\n\n\t\treturn allDataFromDomain.filter((datum) => {\n\t\t\tconst group = dataGroups.find(\n\t\t\t\t(group) => group.name === datum[groupMapsTo]\n\t\t\t);\n\n\t\t\treturn group.status === ACTIVE;\n\t\t});\n\t}\n\n\tgetData() {\n\t\treturn this.get(\"data\");\n\t}\n\n\tisDataEmpty() {\n\t\treturn !this.getData().length;\n\t}\n\n\t/**\n\t *\n\t * @param newData The new raw data to be set\n\t */\n\tsetData(newData) {\n\t\tconst sanitizedData = this.sanitize(Tools.clone(newData));\n\t\tconst dataGroups = this.generateDataGroups(sanitizedData);\n\n\t\tthis.set({\n\t\t\tdata: sanitizedData,\n\t\t\tdataGroups\n\t\t});\n\n\t\treturn sanitizedData;\n\t}\n\n\tgetDataGroups() {\n\t\treturn this.get(\"dataGroups\");\n\t}\n\n\tgetActiveDataGroups() {\n\t\tconst { ACTIVE } = Configuration.legend.items.status;\n\n\t\treturn this.getDataGroups().filter(\n\t\t\t(dataGroup) => dataGroup.status === ACTIVE\n\t\t);\n\t}\n\n\tgetDataGroupNames() {\n\t\treturn this.getDataGroups().map((dataGroup) => dataGroup.name);\n\t}\n\n\tgetActiveDataGroupNames() {\n\t\treturn this.getActiveDataGroups().map((dataGroup) => dataGroup.name);\n\t}\n\n\tgetGroupedData() {\n\t\tconst displayData = this.getDisplayData();\n\t\tconst groupedData = {};\n\t\tconst { groupMapsTo } = this.getOptions().data;\n\n\t\tdisplayData.map((datum) => {\n\t\t\tconst group = datum[groupMapsTo];\n\t\t\tif (\n\t\t\t\tgroupedData[group] !== null &&\n\t\t\t\tgroupedData[group] !== undefined\n\t\t\t) {\n\t\t\t\tgroupedData[group].push(datum);\n\t\t\t} else {\n\t\t\t\tgroupedData[group] = [datum];\n\t\t\t}\n\t\t});\n\n\t\treturn Object.keys(groupedData).map((groupName) => ({\n\t\t\tname: groupName,\n\t\t\tdata: groupedData[groupName]\n\t\t}));\n\t}\n\n\tgetDataValuesGroupedByKeys() {\n\t\tconst options = this.getOptions();\n\t\tconst { groupMapsTo } = options.data;\n\n\t\tconst displayData = this.getDisplayData();\n\t\tconst domainIdentifier = this.services.cartesianScales.getDomainIdentifier();\n\t\tconst rangeIdentifier = this.services.cartesianScales.getRangeIdentifier();\n\n\t\tconst stackKeys = map(\n\t\t\tdisplayData,\n\t\t\t(datum) => datum[domainIdentifier]\n\t\t).keys();\n\n\t\tconst axisPosition = this.services.cartesianScales.domainAxisPosition;\n\t\tconst scaleType = options.axes[axisPosition].scaleType;\n\n\t\t// Sort keys\n\t\tif (scaleType === ScaleTypes.TIME) {\n\t\t\tstackKeys.sort((a: any, b: any) => {\n\t\t\t\tconst dateA: any = new Date(a);\n\t\t\t\tconst dateB: any = new Date(b);\n\t\t\t\treturn dateA - dateB;\n\t\t\t});\n\t\t} else if (\n\t\t\tscaleType === ScaleTypes.LOG ||\n\t\t\tscaleType === ScaleTypes.LINEAR\n\t\t) {\n\t\t\tstackKeys.sort((a: any, b: any) => a - b);\n\t\t}\n\n\t\tconst dataGroupNames = this.getDataGroupNames();\n\n\t\treturn stackKeys.map((key) => {\n\t\t\tconst correspondingValues = { sharedStackKey: key };\n\t\t\tdataGroupNames.forEach((dataGroupName) => {\n\t\t\t\tconst correspondingDatum = displayData.find((datum) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tdatum[groupMapsTo] === dataGroupName &&\n\t\t\t\t\t\tdatum[domainIdentifier].toString() === key\n\t\t\t\t\t);\n\t\t\t\t});\n\n\t\t\t\tcorrespondingValues[dataGroupName] = correspondingDatum\n\t\t\t\t\t? correspondingDatum[rangeIdentifier]\n\t\t\t\t\t: null;\n\t\t\t});\n\t\t\treturn correspondingValues;\n\t\t}) as any;\n\t}\n\n\tgetStackedData({ percentage } = { percentage: false }) {\n\t\tconst options = this.getOptions();\n\t\tconst { groupMapsTo } = options.data;\n\n\t\tconst dataGroupNames = this.getDataGroupNames();\n\t\tconst dataValuesGroupedByKeys = this.getDataValuesGroupedByKeys();\n\n\t\tif (percentage) {\n\t\t\tconst maxByKey = Tools.fromPairs(\n\t\t\t\tdataValuesGroupedByKeys.map((d: any) => [d.sharedStackKey, 0])\n\t\t\t);\n\n\t\t\tdataValuesGroupedByKeys.forEach((d: any) => {\n\t\t\t\tdataGroupNames.forEach((name) => {\n\t\t\t\t\tmaxByKey[d.sharedStackKey] += d[name];\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// cycle through data values to get percentage\n\t\t\tdataValuesGroupedByKeys.forEach((d: any) => {\n\t\t\t\tdataGroupNames.forEach((name) => {\n\t\t\t\t\td[name] = (d[name] / maxByKey[d.sharedStackKey]) * 100;\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treturn stack()\n\t\t\t.keys(dataGroupNames)(dataValuesGroupedByKeys)\n\t\t\t.map((series, i) => {\n\t\t\t\t// Add data group names to each series\n\t\t\t\treturn Object.keys(series)\n\t\t\t\t\t.filter((key: any) => !isNaN(key))\n\t\t\t\t\t.map((key) => {\n\t\t\t\t\t\tconst element = series[key];\n\t\t\t\t\t\telement[groupMapsTo] = dataGroupNames[i];\n\n\t\t\t\t\t\treturn element;\n\t\t\t\t\t});\n\t\t\t});\n\t}\n\n\t/**\n\t * @return {Object} The chart's options\n\t */\n\tgetOptions() {\n\t\treturn this.state.options;\n\t}\n\n\tset(newState: any, skipUpdate = false) {\n\t\tthis.state = Object.assign({}, this.state, newState);\n\n\t\tif (!skipUpdate) {\n\t\t\tthis.update();\n\t\t}\n\t}\n\n\tget(property?: string) {\n\t\tif (property) {\n\t\t\treturn this.state[property];\n\t\t} else {\n\t\t\treturn this.state;\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param newOptions New options to be set\n\t */\n\tsetOptions(newOptions) {\n\t\tthis.set({\n\t\t\toptions: Tools.merge(this.getOptions(), newOptions)\n\t\t});\n\t}\n\n\t/**\n\t *\n\t * Updates miscellanous information within the model\n\t * such as the color scales, or the legend data labels\n\t */\n\tupdate() {\n\t\tif (!this.getDisplayData()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateAllDataGroups();\n\n\t\tthis.setColorScale();\n\t\tthis.services.events.dispatchEvent(Events.Model.UPDATE);\n\t}\n\n\tsetUpdateCallback(cb: Function) {\n\t\tthis.updateCallback = cb;\n\t}\n\n\t/*\n\t * Data labels\n\t */\n\ttoggleDataLabel(changedLabel: string) {\n\t\tconst { ACTIVE, DISABLED } = Configuration.legend.items.status;\n\t\tconst dataGroups = this.getDataGroups();\n\n\t\tconst hasDeactivatedItems = dataGroups.some(\n\t\t\t(group) => group.status === DISABLED\n\t\t);\n\t\tconst activeItems = dataGroups.filter(\n\t\t\t(group) => group.status === ACTIVE\n\t\t);\n\n\t\t// If there are deactivated items, toggle \"changedLabel\"\n\t\tif (hasDeactivatedItems) {\n\t\t\t// If the only active item is being toggled\n\t\t\t// Activate all items\n\t\t\tif (\n\t\t\t\tactiveItems.length === 1 &&\n\t\t\t\tactiveItems[0].name === changedLabel\n\t\t\t) {\n\t\t\t\t// If every item is active, then enable \"changedLabel\" and disable all other items\n\t\t\t\tdataGroups.forEach((group, i) => {\n\t\t\t\t\tdataGroups[i].status = ACTIVE;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tconst indexToChange = dataGroups.findIndex(\n\t\t\t\t\t(group) => group.name === changedLabel\n\t\t\t\t);\n\t\t\t\tdataGroups[indexToChange].status =\n\t\t\t\t\tdataGroups[indexToChange].status === DISABLED\n\t\t\t\t\t\t? ACTIVE\n\t\t\t\t\t\t: DISABLED;\n\t\t\t}\n\t\t} else {\n\t\t\t// If every item is active, then enable \"changedLabel\" and disable all other items\n\t\t\tdataGroups.forEach((group, i) => {\n\t\t\t\tdataGroups[i].status =\n\t\t\t\t\tgroup.name === changedLabel ? ACTIVE : DISABLED;\n\t\t\t});\n\t\t}\n\n\t\t// Updates selected groups\n\t\tconst updatedActiveItems = dataGroups.filter(\n\t\t\t(group) => group.status === ACTIVE\n\t\t);\n\t\tconst options = this.getOptions();\n\n\t\tconst hasUpdatedDeactivatedItems = dataGroups.some(\n\t\t\t(group) => group.status === DISABLED\n\t\t);\n\n\t\t// If there are deactivated items, map the item name into selected groups\n\t\tif (hasUpdatedDeactivatedItems) {\n\t\t\toptions.data.selectedGroups = updatedActiveItems.map(\n\t\t\t\t(activeItem) => activeItem.name\n\t\t\t);\n\t\t} else {\n\t\t\t// If every item is active, clear array\n\t\t\toptions.data.selectedGroups = [];\n\t\t}\n\n\t\t// dispatch legend filtering event with the status of all the dataLabels\n\t\tthis.services.events.dispatchEvent(Events.Legend.ITEMS_UPDATE, {\n\t\t\tdataGroups\n\t\t});\n\n\t\t// Update model\n\t\tthis.set({\n\t\t\tdataGroups\n\t\t});\n\t}\n\n\t/**\n\t * Should the data point be filled?\n\t * @param group\n\t * @param key\n\t * @param value\n\t * @param defaultFilled the default for this chart\n\t */\n\tgetIsFilled(group: any, key?: any, data?: any, defaultFilled?: boolean) {\n\t\tconst options = this.getOptions();\n\t\tif (options.getIsFilled) {\n\t\t\treturn options.getIsFilled(group, key, data, defaultFilled);\n\t\t} else {\n\t\t\treturn defaultFilled;\n\t\t}\n\t}\n\n\tgetFillColor(group: any, key?: any, data?: any) {\n\t\tconst options = this.getOptions();\n\t\tconst defaultFillColor = this.getFillScale()(group);\n\t\tif (options.getFillColor) {\n\t\t\treturn options.getFillColor(group, key, data, defaultFillColor);\n\t\t} else {\n\t\t\treturn defaultFillColor;\n\t\t}\n\t}\n\n\tgetStrokeColor(group: any, key?: any, data?: any) {\n\t\tconst options = this.getOptions();\n\t\tconst defaultStrokeColor = this.colorScale(group);\n\t\tif (options.getStrokeColor) {\n\t\t\treturn options.getStrokeColor(group, key, data, defaultStrokeColor);\n\t\t} else {\n\t\t\treturn defaultStrokeColor;\n\t\t}\n\t}\n\n\tgetFillScale() {\n\t\treturn this.colorScale;\n\t}\n\n\t/**\n\t * Converts data provided in the older format to tabular\n\t *\n\t */\n\tprotected transformToTabularData(data) {\n\t\tconsole.warn(\n\t\t\t\"We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format\"\n\t\t);\n\t\tconst tabularData = [];\n\t\tconst { datasets, labels } = data;\n\n\t\t// Loop through all datasets\n\t\tdatasets.forEach((dataset) => {\n\t\t\t// Update each data point to the new format\n\t\t\tdataset.data.forEach((datum, i) => {\n\t\t\t\tlet group;\n\n\t\t\t\tconst datasetLabel = Tools.getProperty(dataset, \"label\");\n\t\t\t\tif (datasetLabel === null) {\n\t\t\t\t\tconst correspondingLabel = Tools.getProperty(labels, i);\n\t\t\t\t\tif (correspondingLabel) {\n\t\t\t\t\t\tgroup = correspondingLabel;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgroup = \"Ungrouped\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tgroup = datasetLabel;\n\t\t\t\t}\n\n\t\t\t\tconst updatedDatum = {\n\t\t\t\t\tgroup,\n\t\t\t\t\tkey: labels[i]\n\t\t\t\t};\n\n\t\t\t\tif (isNaN(datum)) {\n\t\t\t\t\tupdatedDatum[\"value\"] = datum.value;\n\t\t\t\t\tupdatedDatum[\"date\"] = datum.date;\n\t\t\t\t} else {\n\t\t\t\t\tupdatedDatum[\"value\"] = datum;\n\t\t\t\t}\n\n\t\t\t\ttabularData.push(updatedDatum);\n\t\t\t});\n\t\t});\n\n\t\treturn tabularData;\n\t}\n\n\tprotected getTabularData(data) {\n\t\t// if data is not an array\n\t\tif (!Array.isArray(data)) {\n\t\t\treturn this.transformToTabularData(data);\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tprotected sanitize(data) {\n\t\treturn this.getTabularData(data);\n\t}\n\n\t/*\n\t * Data groups\n\t */\n\tprotected updateAllDataGroups() {\n\t\t// allDataGroups is used to generate a color scale that applies\n\t\t// to all the groups. Now when the data updates, you might remove a group,\n\t\t// and then bring it back in a newer data update, therefore\n\t\t// the order of the groups in allDataGroups matters so that you'd never\n\t\t// have an incorrect color assigned to a group.\n\n\t\t// Also, a new group should only be added to allDataGroups if\n\t\t// it doesn't currently exist\n\n\t\tif (!this.allDataGroups) {\n\t\t\tthis.allDataGroups = this.getDataGroupNames();\n\t\t} else {\n\t\t\t// Loop through current data groups\n\t\t\tthis.getDataGroupNames().forEach((dataGroupName) => {\n\t\t\t\t// If group name hasn't been stored yet, store it\n\t\t\t\tif (this.allDataGroups.indexOf(dataGroupName) === -1) {\n\t\t\t\t\tthis.allDataGroups.push(dataGroupName);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected generateDataGroups(data) {\n\t\tconst { groupMapsTo } = this.getOptions().data;\n\t\tconst { ACTIVE, DISABLED } = Configuration.legend.items.status;\n\t\tconst options = this.getOptions();\n\n\t\tconst uniqueDataGroups = map(\n\t\t\tdata,\n\t\t\t(datum) => datum[groupMapsTo]\n\t\t).keys();\n\n\t\t// check if selectedGroups can be applied to chart with current data groups\n\t\tif (options.data.selectedGroups.length) {\n\t\t\tconst hasAllSelectedGroups = options.data.selectedGroups.every(\n\t\t\t\t(groupName) => uniqueDataGroups.includes(groupName)\n\t\t\t);\n\t\t\tif (!hasAllSelectedGroups) {\n\t\t\t\toptions.data.selectedGroups = [];\n\t\t\t}\n\t\t}\n\n\t\t// Get group status based on items in selected groups\n\t\tconst getStatus = (groupName) =>\n\t\t\t!options.data.selectedGroups.length ||\n\t\t\toptions.data.selectedGroups.includes(groupName)\n\t\t\t\t? ACTIVE\n\t\t\t\t: DISABLED;\n\n\t\treturn uniqueDataGroups.map((groupName) => ({\n\t\t\tname: groupName,\n\t\t\tstatus: getStatus(groupName)\n\t\t}));\n\t}\n\n\t/*\n\t * Fill scales\n\t */\n\tprotected setColorScale() {\n\t\tlet defaultColors = colorPalettes.DEFAULT;\n\n\t\tconst options = this.getOptions();\n\t\tconst userProvidedScale = Tools.getProperty(options, \"color\", \"scale\");\n\n\t\t// If there is no valid user provided scale, use the default set of colors\n\t\tif (\n\t\t\tuserProvidedScale === null ||\n\t\t\tObject.keys(userProvidedScale).length === 0\n\t\t) {\n\t\t\tthis.colorScale = scaleOrdinal()\n\t\t\t\t.range(defaultColors)\n\t\t\t\t.domain(this.allDataGroups);\n\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Go through allDataGroups. If a data group has a color value provided\n\t\t * by the user, add that to the color range\n\t\t * If not, add a default color\n\t\t */\n\t\tconst colorRange = [];\n\t\tlet colorIndex = 0;\n\t\tthis.allDataGroups.forEach((dataGroup) => {\n\t\t\tif (userProvidedScale[dataGroup]) {\n\t\t\t\tcolorRange.push(userProvidedScale[dataGroup]);\n\t\t\t} else {\n\t\t\t\tcolorRange.push(defaultColors[colorIndex]);\n\t\t\t}\n\n\t\t\tif (colorIndex === defaultColors.length - 1) {\n\t\t\t\tcolorIndex = 0;\n\t\t\t} else {\n\t\t\t\tcolorIndex++;\n\t\t\t}\n\t\t});\n\n\t\tthis.colorScale = scaleOrdinal()\n\t\t\t.range(colorRange)\n\t\t\t.domain(this.allDataGroups);\n\t}\n}\n"]}
|
package/package.json
CHANGED
|
@@ -165,12 +165,14 @@ var DOMUtils = /** @class */ (function (_super) {
|
|
|
165
165
|
return this.model.get("holder");
|
|
166
166
|
};
|
|
167
167
|
DOMUtils.prototype.addSVGElement = function () {
|
|
168
|
-
var
|
|
168
|
+
var options = this.model.getOptions();
|
|
169
|
+
var chartsprefix = Tools.getProperty(options, "style", "prefix");
|
|
169
170
|
var svg = select(this.getHolder())
|
|
170
171
|
.append("svg")
|
|
171
172
|
.classed(settings.prefix + "--" + chartsprefix + "--chart-svg", true)
|
|
172
173
|
.attr("height", "100%")
|
|
173
174
|
.attr("width", "100%");
|
|
175
|
+
svg.append("title").text(Tools.getProperty(options, "title") || "Chart");
|
|
174
176
|
this.svg = svg.node();
|
|
175
177
|
};
|
|
176
178
|
DOMUtils.prototype.getMainSVG = function () {
|