@carbon/charts 1.9.0-rc.5 → 1.10.1
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 +31 -0
- package/LICENSE.md +201 -0
- package/README.md +9 -19
- package/dist/_baseEach-603421de.mjs.map +1 -1
- package/dist/_baseEach-cdac417f.js.map +1 -1
- package/dist/angle-utils-6f166b40.js.map +1 -1
- package/dist/angle-utils-8b6ce998.mjs.map +1 -1
- package/dist/axis-chart.d.ts +13 -13
- package/dist/chart.d.ts +18 -18
- package/dist/charts/alluvial.d.ts +10 -10
- package/dist/charts/area-stacked.d.ts +8 -8
- package/dist/charts/area.d.ts +8 -8
- package/dist/charts/bar-grouped.d.ts +8 -8
- package/dist/charts/bar-simple.d.ts +8 -8
- package/dist/charts/bar-stacked.d.ts +8 -8
- package/dist/charts/boxplot.d.ts +10 -10
- package/dist/charts/bubble.d.ts +8 -8
- package/dist/charts/bullet.d.ts +10 -10
- package/dist/charts/choropleth.d.ts +14 -14
- package/dist/charts/circle-pack.d.ts +10 -10
- package/dist/charts/combo.d.ts +9 -9
- package/dist/charts/donut.d.ts +8 -8
- package/dist/charts/gauge.d.ts +10 -10
- package/dist/charts/heatmap.d.ts +14 -14
- package/dist/charts/histogram.d.ts +10 -10
- package/dist/charts/index.d.ts +27 -27
- package/dist/charts/line.d.ts +8 -8
- package/dist/charts/lollipop.d.ts +8 -8
- package/dist/charts/meter.d.ts +10 -10
- package/dist/charts/pie.d.ts +10 -10
- package/dist/charts/radar.d.ts +10 -10
- package/dist/charts/scatter.d.ts +8 -8
- package/dist/charts/tree.d.ts +10 -10
- package/dist/charts/treemap.d.ts +10 -10
- package/dist/charts/wordcloud.d.ts +10 -10
- package/dist/choropleth-4ac6ac20.js.map +1 -1
- package/dist/choropleth-f473ea0d.mjs.map +1 -1
- package/dist/color-scale-utils-5eb3eeaa.mjs.map +1 -1
- package/dist/color-scale-utils-7d463811.js.map +1 -1
- package/dist/components/axes/axis.d.ts +24 -24
- package/dist/components/axes/chart-clip.d.ts +13 -13
- package/dist/components/axes/grid-brush.d.ts +10 -10
- package/dist/components/axes/grid.d.ts +22 -22
- package/dist/components/axes/hover-axis.d.ts +10 -10
- package/dist/components/axes/index.d.ts +12 -12
- package/dist/components/axes/ruler-binned.d.ts +10 -7
- package/dist/components/axes/ruler-stacked.d.ts +4 -4
- package/dist/components/axes/ruler.d.ts +30 -27
- package/dist/components/axes/toolbar.d.ts +40 -40
- package/dist/components/axes/two-dimensional-axes.d.ts +16 -16
- package/dist/components/axes/zero-line.d.ts +7 -7
- package/dist/components/axes/zoom-bar.d.ts +31 -28
- package/dist/components/component.d.ts +30 -30
- package/dist/components/diagrams/buildPaths.d.ts +40 -40
- package/dist/components/diagrams/index.d.ts +2 -2
- package/dist/components/diagrams/markerDefinitions.d.ts +37 -37
- package/dist/components/essentials/canvas-chart-clip.d.ts +6 -6
- package/dist/components/essentials/color-scale-legend.d.ts +20 -20
- package/dist/components/essentials/geo-projection.d.ts +16 -16
- package/dist/components/essentials/highlights.d.ts +13 -13
- package/dist/components/essentials/index.d.ts +11 -11
- package/dist/components/essentials/legend.d.ts +11 -11
- package/dist/components/essentials/modal.d.ts +14 -14
- package/dist/components/essentials/threshold.d.ts +20 -20
- package/dist/components/essentials/title-meter.d.ts +30 -30
- package/dist/components/essentials/title.d.ts +20 -20
- package/dist/components/essentials/tooltip-axis.d.ts +4 -4
- package/dist/components/essentials/tooltip.d.ts +22 -22
- package/dist/components/graphs/alluvial.d.ts +14 -14
- package/dist/components/graphs/area-stacked.d.ts +11 -11
- package/dist/components/graphs/area.d.ts +12 -12
- package/dist/components/graphs/bar-grouped.d.ts +22 -22
- package/dist/components/graphs/bar-simple.d.ts +12 -12
- package/dist/components/graphs/bar-stacked.d.ts +13 -13
- package/dist/components/graphs/bar.d.ts +5 -5
- package/dist/components/graphs/boxplot.d.ts +9 -9
- package/dist/components/graphs/bubble.d.ts +13 -13
- package/dist/components/graphs/bullet.d.ts +12 -12
- package/dist/components/graphs/choropleth.d.ts +6 -6
- package/dist/components/graphs/circle-pack.d.ts +19 -19
- package/dist/components/graphs/donut.d.ts +9 -9
- package/dist/components/graphs/gauge.d.ts +27 -27
- package/dist/components/graphs/heatmap.d.ts +25 -25
- package/dist/components/graphs/histogram.d.ts +12 -12
- package/dist/components/graphs/index.d.ts +28 -28
- package/dist/components/graphs/line.d.ts +11 -11
- package/dist/components/graphs/lollipop.d.ts +14 -14
- package/dist/components/graphs/meter.d.ts +10 -10
- package/dist/components/graphs/pie.d.ts +16 -16
- package/dist/components/graphs/radar.d.ts +25 -25
- package/dist/components/graphs/scatter-stacked.d.ts +8 -8
- package/dist/components/graphs/scatter.d.ts +21 -21
- package/dist/components/graphs/skeleton-lines.d.ts +12 -12
- package/dist/components/graphs/skeleton.d.ts +23 -23
- package/dist/components/graphs/tree.d.ts +9 -9
- package/dist/components/graphs/treemap.d.ts +11 -11
- package/dist/components/graphs/wordcloud.d.ts +12 -12
- package/dist/components/index.d.ts +6 -6
- package/dist/components/layout/index.d.ts +2 -2
- package/dist/components/layout/layout.d.ts +18 -18
- package/dist/components/layout/spacer.d.ts +5 -5
- package/dist/configuration-non-customizable.d.ts +263 -263
- package/dist/configuration.d.ts +48 -48
- package/dist/demo/charts/alluvial.d.ts +109 -109
- package/dist/demo/charts/area.d.ts +224 -224
- package/dist/demo/charts/bar.d.ts +681 -681
- package/dist/demo/charts/boxplot.d.ts +34 -34
- package/dist/demo/charts/bubble.d.ts +141 -141
- package/dist/demo/charts/bullet.d.ts +24 -24
- package/dist/demo/charts/chart-types.d.ts +128 -128
- package/dist/demo/charts/choropleth.d.ts +738 -738
- package/dist/demo/charts/circle-pack.d.ts +91 -91
- package/dist/demo/charts/combo.d.ts +482 -482
- package/dist/demo/charts/donut.d.ts +64 -64
- package/dist/demo/charts/gauge.d.ts +40 -40
- package/dist/demo/charts/heatmap.d.ts +125 -125
- package/dist/demo/charts/hightlight.d.ts +40 -40
- package/dist/demo/charts/histogram.d.ts +63 -63
- package/dist/demo/charts/index.d.ts +55 -62
- package/dist/demo/charts/line.d.ts +361 -361
- package/dist/demo/charts/lollipop.d.ts +39 -39
- package/dist/demo/charts/meter.d.ts +95 -95
- package/dist/demo/charts/pie.d.ts +46 -46
- package/dist/demo/charts/radar.d.ts +63 -63
- package/dist/demo/charts/scatter.d.ts +118 -118
- package/dist/demo/charts/step.d.ts +96 -96
- package/dist/demo/charts/time-series-axis.d.ts +293 -293
- package/dist/demo/charts/toolbar.d.ts +12 -12
- package/dist/demo/charts/topojson-110.d.ts +360 -360
- package/dist/demo/charts/tree.d.ts +30 -30
- package/dist/demo/charts/treemap.d.ts +15 -15
- package/dist/demo/charts/wordcloud.d.ts +14 -14
- package/dist/demo/charts/zoom-bar.d.ts +79 -79
- package/dist/demo/index.d.ts +4 -4
- package/dist/demo/index.js +153 -166
- package/dist/demo/index.js.map +1 -1
- package/dist/demo/index.mjs +1645 -1834
- package/dist/demo/index.mjs.map +1 -1
- package/dist/demo/styles.css +567 -262
- package/dist/demo/styles.css.map +1 -1
- package/dist/demo/utils/index.d.ts +2 -2
- package/dist/demo/utils/sandbox.d.ts +38 -39
- package/dist/demo/utils/story-widgets.d.ts +7 -7
- package/dist/index-a266373c.mjs.map +1 -1
- package/dist/index-becfb567.mjs.map +1 -1
- package/dist/index-d865d500.js.map +1 -1
- package/dist/index-f23685eb.js.map +1 -1
- package/dist/index.d.ts +13 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/a11y.d.ts +12 -12
- package/dist/interfaces/axis-scales.d.ts +201 -201
- package/dist/interfaces/charts.d.ts +520 -517
- package/dist/interfaces/components.d.ts +231 -231
- package/dist/interfaces/enums.d.ts +261 -261
- package/dist/interfaces/events.d.ts +239 -239
- package/dist/interfaces/index.d.ts +12 -11
- package/dist/interfaces/layout.d.ts +21 -21
- package/dist/interfaces/model.d.ts +35 -35
- package/dist/interfaces/services.d.ts +20 -20
- package/dist/interfaces/truncation.d.ts +17 -17
- package/dist/model/alluvial.d.ts +8 -8
- package/dist/model/binned-charts.d.ts +7 -7
- package/dist/model/boxplot.d.ts +14 -14
- package/dist/model/bullet.d.ts +14 -14
- package/dist/model/cartesian-charts.d.ts +24 -24
- package/dist/model/choropleth.d.ts +29 -29
- package/dist/model/circle-pack.d.ts +36 -36
- package/dist/model/gauge.d.ts +9 -9
- package/dist/model/heatmap.d.ts +57 -57
- package/dist/model/index.d.ts +16 -16
- package/dist/model/index.js.map +1 -1
- package/dist/model/index.mjs.map +1 -1
- package/dist/model/meter.d.ts +20 -20
- package/dist/model/model.d.ts +110 -110
- package/dist/model/pie.d.ts +9 -9
- package/dist/model/radar.d.ts +7 -7
- package/dist/model/tree.d.ts +14 -14
- package/dist/model/treemap.d.ts +8 -8
- package/dist/model/wordcloud.d.ts +7 -7
- package/dist/services/angle-utils.d.ts +15 -15
- package/dist/services/canvas-zoom.d.ts +11 -11
- package/dist/services/color-scale-utils.d.ts +2 -2
- package/dist/services/curves.d.ts +24 -24
- package/dist/services/essentials/dom-utils.d.ts +45 -45
- package/dist/services/essentials/events.d.ts +8 -8
- package/dist/services/essentials/files.d.ts +7 -7
- package/dist/services/essentials/gradient-utils.d.ts +6 -6
- package/dist/services/essentials/index.d.ts +5 -5
- package/dist/services/essentials/transitions.d.ts +13 -13
- package/dist/services/index.d.ts +9 -9
- package/dist/services/scales-cartesian.d.ts +89 -89
- package/dist/services/service.d.ts +11 -11
- package/dist/services/time-series.d.ts +13 -13
- package/dist/services/zoom.d.ts +21 -21
- package/dist/styles.css +0 -21919
- package/dist/styles.css.map +1 -1
- package/dist/styles.min.css +1 -1
- package/dist/styles.min.css.map +1 -1
- package/dist/tools.d.ts +150 -144
- package/package.json +48 -33
- package/{dist/styles/colors.scss → scss/_colors.scss} +1 -1
- package/{dist/styles/tokens.scss → scss/_tokens.scss} +6 -15
- package/scss/demos.scss +427 -0
- package/scss/index.scss +31 -0
- package/dist/styles/styles.scss +0 -40
- /package/{dist/styles → scss}/_chart-holder.scss +0 -0
- /package/{dist/styles/color-palatte.scss → scss/_color-palette.scss} +0 -0
- /package/{dist/styles → scss}/_type.scss +0 -0
- /package/{dist/styles → scss}/components/_axis.scss +0 -0
- /package/{dist/styles → scss}/components/_callouts.scss +0 -0
- /package/{dist/styles → scss}/components/_color-legend.scss +0 -0
- /package/{dist/styles → scss}/components/_edge.scss +0 -0
- /package/{dist/styles → scss}/components/_grid-brush.scss +0 -0
- /package/{dist/styles → scss}/components/_grid.scss +0 -0
- /package/{dist/styles → scss}/components/_highlights.scss +0 -0
- /package/{dist/styles → scss}/components/_layout.scss +0 -0
- /package/{dist/styles → scss}/components/_legend.scss +0 -0
- /package/{dist/styles → scss}/components/_marker.scss +0 -0
- /package/{dist/styles → scss}/components/_meter-title.scss +0 -0
- /package/{dist/styles → scss}/components/_modal.scss +0 -0
- /package/{dist/styles → scss}/components/_ruler.scss +0 -0
- /package/{dist/styles → scss}/components/_skeleton-lines.scss +0 -0
- /package/{dist/styles → scss}/components/_skeleton.scss +0 -0
- /package/{dist/styles → scss}/components/_threshold.scss +0 -0
- /package/{dist/styles → scss}/components/_title.scss +0 -0
- /package/{dist/styles → scss}/components/_toolbar.scss +0 -0
- /package/{dist/styles → scss}/components/_tooltip.scss +0 -0
- /package/{dist/styles → scss}/components/_zero-line.scss +0 -0
- /package/{dist/styles → scss}/components/_zoom-bar.scss +0 -0
- /package/{dist/styles → scss}/components/diagrams/_card-node.scss +0 -0
- /package/{dist/styles → scss}/components/diagrams/_edge.scss +0 -0
- /package/{dist/styles → scss}/components/diagrams/_marker.scss +0 -0
- /package/{dist/styles → scss}/components/diagrams/_shape-node.scss +0 -0
- /package/{dist/styles → scss}/components/diagrams/index.scss +0 -0
- /package/{dist/styles → scss}/components/index.scss +0 -0
- /package/{dist/styles → scss}/graphs/_alluvial.scss +0 -0
- /package/{dist/styles → scss}/graphs/_area.scss +0 -0
- /package/{dist/styles → scss}/graphs/_bubble.scss +0 -0
- /package/{dist/styles → scss}/graphs/_bullet.scss +0 -0
- /package/{dist/styles → scss}/graphs/_choropleth.scss +0 -0
- /package/{dist/styles → scss}/graphs/_circle-pack.scss +0 -0
- /package/{dist/styles → scss}/graphs/_donut.scss +0 -0
- /package/{dist/styles → scss}/graphs/_gauge.scss +0 -0
- /package/{dist/styles → scss}/graphs/_heatmap.scss +0 -0
- /package/{dist/styles → scss}/graphs/_line.scss +0 -0
- /package/{dist/styles → scss}/graphs/_lollipop.scss +0 -0
- /package/{dist/styles → scss}/graphs/_meter.scss +0 -0
- /package/{dist/styles → scss}/graphs/_pie.scss +0 -0
- /package/{dist/styles → scss}/graphs/_radar.scss +0 -0
- /package/{dist/styles → scss}/graphs/_scatter-stacked.scss +0 -0
- /package/{dist/styles → scss}/graphs/_scatter.scss +0 -0
- /package/{dist/styles → scss}/graphs/_tree.scss +0 -0
- /package/{dist/styles → scss}/graphs/_treemap.scss +0 -0
- /package/{dist/styles → scss}/graphs/_wordcloud.scss +0 -0
- /package/{dist/styles → scss}/graphs/index.scss +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,37 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.10.1](https://github.com/carbon-design-system/carbon-charts/compare/v1.10.0...v1.10.1) (2023-06-26)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **package.json:** missing devDependencies for storybook
|
|
11
|
+
([#1580](https://github.com/carbon-design-system/carbon-charts/issues/1580))
|
|
12
|
+
([e208fcc](https://github.com/carbon-design-system/carbon-charts/commit/e208fcc77f2adee30800356f974e7f6d0a5103e1))
|
|
13
|
+
|
|
14
|
+
# Change Log
|
|
15
|
+
|
|
16
|
+
All notable changes to this project will be documented in this file. See
|
|
17
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
18
|
+
|
|
19
|
+
# [1.10.0](https://github.com/carbon-design-system/carbon-charts/compare/v1.9.0...v1.10.0) (2023-06-26)
|
|
20
|
+
|
|
21
|
+
**Note:** Version bump only for package @carbon/charts
|
|
22
|
+
|
|
23
|
+
# Change Log
|
|
24
|
+
|
|
25
|
+
All notable changes to this project will be documented in this file. See
|
|
26
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
27
|
+
|
|
28
|
+
# [1.9.0](https://github.com/carbon-design-system/carbon-charts/compare/v1.8.0...v1.9.0) (2023-06-26)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package @carbon/charts
|
|
31
|
+
|
|
32
|
+
# Change Log
|
|
33
|
+
|
|
34
|
+
All notable changes to this project will be documented in this file. See
|
|
35
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
36
|
+
|
|
6
37
|
# [1.8.0](https://github.com/carbon-design-system/carbon-charts/compare/v1.7.6...v1.8.0) (2023-06-03)
|
|
7
38
|
|
|
8
39
|
### Features
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2018 IBM
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,53 +1,43 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Carbon Charts
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Carbon Charts is a component library for vanilla JavaScript. Chart visualizations are based on D3.js, a peer dependency.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
> Carbon Charting components
|
|
5
|
+
The required styles should be imported from `@carbon/charts/styles.css` and `@carbon/styles/css/styles.css`. Additional documentation is provided in the Storybook demos.
|
|
8
6
|
|
|
9
7
|
## Getting started
|
|
10
8
|
|
|
11
9
|
Run the following command using [npm](https://www.npmjs.com/):
|
|
12
10
|
|
|
13
11
|
```bash
|
|
14
|
-
npm install -S @carbon/charts d3
|
|
12
|
+
npm install -S @carbon/charts @carbon/styles d3 d3-cloud d3-sankey
|
|
15
13
|
```
|
|
16
14
|
|
|
17
15
|
If you prefer [Yarn](https://yarnpkg.com/en/), use the following command instead:
|
|
18
16
|
|
|
19
17
|
```bash
|
|
20
|
-
yarn add @carbon/charts d3
|
|
18
|
+
yarn add @carbon/charts @carbon/styles d3 d3-cloud d3-sankey
|
|
21
19
|
```
|
|
22
20
|
|
|
23
|
-
**Note:** you'd also need to install `carbon-components` if you're not using a bundled version of
|
|
24
|
-
the library.
|
|
25
|
-
|
|
26
21
|
## Step-by-step instructions
|
|
27
22
|
|
|
28
23
|
Read
|
|
29
24
|
[here](https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-getting-started--vanilla)
|
|
30
25
|
|
|
31
|
-
##
|
|
26
|
+
## StackBlitz examples
|
|
32
27
|
|
|
33
28
|
[Sample use cases can be seen here](https://carbon-design-system.github.io/carbon-charts).
|
|
34
29
|
|
|
35
|
-
**When opening the link above**, click on the **Edit on
|
|
30
|
+
**When opening the link above**, click on the **Edit on StackBlitz** button for each demo to see an
|
|
36
31
|
isolated project showing you how to reproduce the demo.
|
|
37
32
|
|
|
38
33
|
## Charting data & options
|
|
39
34
|
|
|
40
|
-
Although
|
|
41
|
-
such as maps, Data and options follow the same model in all charts, with minor exceptions and
|
|
42
|
-
differences in specific components.
|
|
43
|
-
|
|
44
|
-
For instance in the case of a donut chart you're able to pass in an additional field called `center`
|
|
45
|
-
in your options configuring the donut center.
|
|
35
|
+
Although new charts will be introduced in the future (such as a choropleth), data and options follow the same model for all charts with minor exceptions. For example, in the case of a donut chart, you're able to pass in an additional field called `center` in your options to configure the donut center.
|
|
46
36
|
|
|
47
37
|
For instructions on using the **tabular data format**, see
|
|
48
38
|
[here](https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format)
|
|
49
39
|
|
|
50
|
-
|
|
40
|
+
Additional options are available depending on the chart type being used,
|
|
51
41
|
[see our demo examples here](https://github.com/carbon-design-system/carbon-charts/tree/master/packages/core/demo/data).
|
|
52
42
|
|
|
53
43
|
Customizable options (specific to chart type) can be found
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_baseEach-603421de.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"_baseEach-603421de.mjs","sources":["../node_modules/lodash-es/_baseForOwn.js","../node_modules/lodash-es/_createBaseEach.js","../node_modules/lodash-es/_baseEach.js"],"sourcesContent":["import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n","import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nexport default createBaseEach;\n","import baseForOwn from './_baseForOwn.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nexport default baseEach;\n"],"names":["baseForOwn","object","iteratee","baseFor","keys","createBaseEach","eachFunc","fromRight","collection","isArrayLike","length","index","iterable","baseEach","baseEach$1"],"mappings":";AAWA,SAASA,EAAWC,GAAQC,GAAU;AACpC,SAAOD,KAAUE,EAAQF,GAAQC,GAAUE,CAAI;AACjD;ACHA,SAASC,EAAeC,GAAUC,GAAW;AAC3C,SAAO,SAASC,GAAYN,GAAU;AACpC,QAAIM,KAAc;AAChB,aAAOA;AAET,QAAI,CAACC,EAAYD,CAAU;AACzB,aAAOF,EAASE,GAAYN,CAAQ;AAMtC,aAJIQ,IAASF,EAAW,QACpBG,IAAQJ,IAAYG,IAAS,IAC7BE,IAAW,OAAOJ,CAAU,IAExBD,IAAYI,MAAU,EAAEA,IAAQD,MAClCR,EAASU,EAASD,CAAK,GAAGA,GAAOC,CAAQ,MAAM;AAAnD;AAIF,WAAOJ;AAAA,EACX;AACA;AClBA,IAAIK,IAAWR,EAAeL,CAAU;AAExC,MAAAc,IAAeD;","x_google_ignoreList":[0,1,2]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_baseEach-cdac417f.js","sources":["
|
|
1
|
+
{"version":3,"file":"_baseEach-cdac417f.js","sources":["../node_modules/lodash-es/_baseForOwn.js","../node_modules/lodash-es/_createBaseEach.js","../node_modules/lodash-es/_baseEach.js"],"sourcesContent":["import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n","import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nexport default createBaseEach;\n","import baseForOwn from './_baseForOwn.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nexport default baseEach;\n"],"names":["baseForOwn","object","iteratee","baseFor","keys","createBaseEach","eachFunc","fromRight","collection","isArrayLike","length","index","iterable","baseEach","baseEach$1"],"mappings":"gEAWA,SAASA,EAAWC,EAAQC,EAAU,CACpC,OAAOD,GAAUE,EAAO,QAACF,EAAQC,EAAUE,EAAI,IAAA,CACjD,CCHA,SAASC,EAAeC,EAAUC,EAAW,CAC3C,OAAO,SAASC,EAAYN,EAAU,CACpC,GAAIM,GAAc,KAChB,OAAOA,EAET,GAAI,CAACC,EAAAA,YAAYD,CAAU,EACzB,OAAOF,EAASE,EAAYN,CAAQ,EAMtC,QAJIQ,EAASF,EAAW,OACpBG,EAAQJ,EAAYG,EAAS,GAC7BE,EAAW,OAAOJ,CAAU,GAExBD,EAAYI,IAAU,EAAEA,EAAQD,IAClCR,EAASU,EAASD,CAAK,EAAGA,EAAOC,CAAQ,IAAM,IAAnD,CAIF,OAAOJ,CACX,CACA,CClBA,IAAIK,EAAWR,EAAeL,CAAU,EAExC,MAAAc,EAAeD","x_google_ignoreList":[0,1,2]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angle-utils-6f166b40.js","sources":["../../../node_modules/lodash-es/_trimmedEndIndex.js","../../../node_modules/lodash-es/_baseTrim.js","../../../node_modules/lodash-es/toNumber.js","../../../node_modules/lodash-es/now.js","../../../node_modules/lodash-es/debounce.js","../src/services/service.ts","../src/services/essentials/dom-utils.ts","../src/services/essentials/gradient-utils.ts","../src/services/angle-utils.ts"],"sourcesContent":["/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","import type { ChartModel } from '@/model/model'\nimport type { Services } from '@/interfaces/services'\n\nexport class Service {\n\tprotected model: ChartModel\n\tprotected services: Services\n\n\tconstructor(model: ChartModel, services: Services) {\n\t\tthis.model = model\n\t\tthis.services = services\n\n\t\tthis.init()\n\t}\n\n\tinit() {\n\t\t// do nothing.\n\t}\n\n\tupdate() {\n\t\t// do nothing.\n\t}\n\n\t// Used to pass down information to the components\n\tsetModel(newObj: ChartModel) {\n\t\tthis.model = newObj\n\t}\n\n\t// Used to pass down services to the components\n\tsetServices(newObj: Services) {\n\t\tthis.services = newObj\n\t}\n}\n","import { select, type Selection } from 'd3'\nimport domToImage from 'dom-to-image-more'\nimport { debounce, getProperty } from '@/tools'\nimport { carbonPrefix } from '@/configuration-non-customizable' // CSS prefix\nimport type { ChartModel } from '@/model/model'\nimport { Service } from '@/services/service'\nimport { Events } from '@/interfaces/enums'\n\nconst CSS_VERIFIER_ELEMENT_CLASSNAME = 'DONT_STYLE_ME_css_styles_verifier'\n\n// Functions like validateAndSetDimensions() may return strings or numbers\nexport interface Dimensions {\n height: number\n width: number\n}\n\nexport interface getSVGElementSizeOptions {\n\tuseAttrs?: boolean\n\tuseClientDimensions?: boolean\n\tuseBBox?: boolean\n\tuseBoundingRect?: boolean\n}\n\nexport class DOMUtils extends Service {\n\tprivate chartID = '' // initialized in initializeID() called by init()\n\n\tconstructor(model: ChartModel, services: any) {\n\t\tsuper(model, services)\n\t}\n\n\tstatic getHTMLElementSize(element: HTMLElement) {\n\t\treturn {\n\t\t\twidth: element.clientWidth,\n\t\t\theight: element.clientHeight\n\t\t}\n\t}\n\n\tstatic getSVGElementSize(\n\t\tsvgSelector: Selection<SVGGraphicsElement, any, Element, any>,\n\t\toptions: getSVGElementSizeOptions = {\n\t\t\tuseAttrs: false,\n\t\t\tuseClientDimensions: false,\n\t\t\tuseBBox: false,\n\t\t\tuseBoundingRect: false\n\t\t}\n\t) {\n\t\tif (!svgSelector.attr) {\n\t\t\tsvgSelector = select<SVGGraphicsElement, any>(svgSelector as any) // issue with @types/d3 - select can handle Selection parameters just fine\n\t\t}\n\n\t\tconst finalDimensions = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t}\n\n\t\t// Dimensions can be width and height as numbers or strings\n\t\tconst validateAndSetDimensions = (dimensions: any) => {\n\t\t\tif (dimensions) {\n\t\t\t\tObject.keys(finalDimensions).forEach((dimensionKey: 'width' | 'height') => {\n\t\t\t\t\tif (dimensions[dimensionKey]) {\n\t\t\t\t\t\tconst dimension = dimensions[dimensionKey]\n\t\t\t\t\t\tconst dimensionNumber = parseFloat(dimension)\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tdimension &&\n\t\t\t\t\t\t\tdimensionNumber > finalDimensions[dimensionKey] &&\n\t\t\t\t\t\t\t('' + dimension).indexOf('%') === -1\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tfinalDimensions[dimensionKey] = dimensionNumber\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\tconst attrDimensions = {\n\t\t\twidth: svgSelector.attr('width'),\n\t\t\theight: svgSelector.attr('height')\n\t\t}\n\n\t\tconst svgElement = svgSelector.node()\n\n\t\tlet bbox: DOMRect,\n\t\t\tbboxDimensions: Dimensions,\n\t\t\tboundingRect: DOMRect,\n\t\t\tboundingRectDimensions: Dimensions\n\n\t\ttry {\n\t\t\t// Not all SVG graphics elements have bounding boxes (eg <defs>, <title>, <styles>)\n\t\t\tif (typeof svgElement.getBBox === 'function') {\n\t\t\t\tbbox = svgElement.getBBox()\n\t\t\t\tbboxDimensions = {\n\t\t\t\t\twidth: bbox.width,\n\t\t\t\t\theight: bbox.height\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\ttry {\n\t\t\t// Not all SVG graphics elements have...\n\t\t\tif (typeof svgElement?.getBoundingClientRect === 'function') {\n\t\t\t\tboundingRect = svgElement.getBoundingClientRect()\n\t\t\t\tboundingRectDimensions = {\n\t\t\t\t\twidth: boundingRect.width,\n\t\t\t\t\theight: boundingRect.height\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\t// Not all SVG graphics elements have...\n\t\tlet clientDimensions: Dimensions\n\t\tif (svgElement instanceof SVGSVGElement) {\n\t\t\tclientDimensions = {\n\t\t\t\twidth: svgElement.clientWidth,\n\t\t\t\theight: svgElement.clientHeight\n\t\t\t}\n\t\t}\n\n\t\t// If both attribute values are numbers\n\t\t// And not percentages or NaN\n\t\tif (options) {\n\t\t\tif (options.useAttrs) {\n\t\t\t\tvalidateAndSetDimensions(attrDimensions)\n\n\t\t\t\tif (finalDimensions.width > 0 && finalDimensions.height > 0) {\n\t\t\t\t\treturn finalDimensions\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.useClientDimensions) {\n\t\t\t\tvalidateAndSetDimensions(clientDimensions)\n\n\t\t\t\tif (finalDimensions.width > 0 && finalDimensions.height > 0) {\n\t\t\t\t\treturn clientDimensions\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.useBBox) {\n\t\t\t\tvalidateAndSetDimensions(bboxDimensions)\n\n\t\t\t\tif (finalDimensions.width > 0 && finalDimensions.height > 0) {\n\t\t\t\t\treturn bboxDimensions\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.useBoundingRect) {\n\t\t\t\tvalidateAndSetDimensions(boundingRectDimensions)\n\n\t\t\t\tif (finalDimensions.width > 0 && finalDimensions.height > 0) {\n\t\t\t\t\treturn boundingRectDimensions\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tconst nativeDimensions = {\n\t\t\t\twidth: getProperty(svgSelector.node(), 'width', 'baseVal', 'value'),\n\t\t\t\theight: getProperty(svgSelector.node(), 'height', 'baseVal', 'value')\n\t\t\t}\n\n\t\t\tvalidateAndSetDimensions(nativeDimensions)\n\t\t} catch (e) {\n\t\t\tvalidateAndSetDimensions(clientDimensions)\n\t\t\tvalidateAndSetDimensions(bboxDimensions)\n\t\t\tvalidateAndSetDimensions(attrDimensions)\n\t\t}\n\t\treturn finalDimensions\n\t}\n\n\tstatic appendOrSelect(parent: Selection<SVGElement | HTMLDivElement, any, Element, any>, query: string) {\n\t\tconst selection = parent.select(`${query}`)\n\n\t\tif (selection.empty()) {\n\t\t\t// see if there is an id\n\t\t\tlet querySections = query.split('#')\n\t\t\tlet elementToAppend: any\n\t\t\tlet id: string\n\t\t\t// if there is an id\n\t\t\tif (querySections.length === 2) {\n\t\t\t\t// take out the element to append\n\t\t\t\telementToAppend = querySections[0]\n\t\t\t\t// split it by classes\n\t\t\t\tquerySections = querySections[1].split('.')\n\t\t\t\t// the first string is the id\n\t\t\t\tid = querySections[0]\n\t\t\t} else {\n\t\t\t\tquerySections = query.split('.')\n\t\t\t\telementToAppend = querySections[0]\n\t\t\t}\n\n\t\t\treturn parent\n\t\t\t\t.append(elementToAppend)\n\t\t\t\t.attr('id', id)\n\t\t\t\t.attr('class', querySections.slice(1).join(' '))\n\t\t}\n\n\t\treturn selection\n\t}\n\n\tprotected mainContainer: HTMLDivElement\n\tprotected width: string\n\tprotected height: string\n\n\tinit() {\n\t\t// Add width & height to the chart holder if necessary, and add a classname\n\t\tthis.styleHolderElement()\n\n\t\t// Initialize chart ID\n\t\tthis.initializeID()\n\n\t\tthis.addMainContainer()\n\n\t\tif (this.model.getOptions().resizable) {\n\t\t\tthis.addResizeListener()\n\t\t}\n\n\t\tthis.addHolderListeners()\n\n\t\tthis.handleFullscreenChange()\n\t}\n\n\tgetChartID() {\n\t\treturn this.chartID\n\t}\n\n\tgenerateElementIDString(originalID: string | number) {\n\t\treturn `chart-${this.chartID}-${originalID}`\n\t}\n\n\tprivate initializeID() {\n\t\tthis.chartID = Math.floor((1 + Math.random()) * 0x1000000000000).toString(16)\n\t}\n\n\taddMainContainer() {\n\t\tconst options = this.model.getOptions()\n\t\tconst chartsprefix = getProperty(options, 'style', 'prefix')\n\n\t\tconst mainContainer = select(this.getHolder())\n\t\t\t.append('div')\n\t\t\t.classed(`${carbonPrefix}--${chartsprefix}--chart-wrapper`, true)\n\t\t\t.attr('id', `chart-${this.getChartID()}`)\n\t\t\t.style('height', '100%')\n\t\t\t.style('width', '100%')\n\n\t\tmainContainer.append('g').attr('class', CSS_VERIFIER_ELEMENT_CLASSNAME)\n\n\t\tthis.mainContainer = mainContainer.node()\n\t}\n\n\tupdate() {\n\t\tthis.styleHolderElement()\n\t}\n\n\tstyleHolderElement() {\n\t\tconst holderElement = this.getHolder() as HTMLElement\n\n\t\t// In order for resize events to not clash with these updates\n\t\t// We'll check if the width & height values passed in options\n\t\t// Have changed, before setting them to the holder\n\t\tconst { width, height, theme } = this.model.getOptions()\n\t\tif (width !== this.width) {\n\t\t\t// Apply formatted width attribute to chart\n\t\t\tholderElement.style.width = width\n\n\t\t\tthis.width = width\n\t\t}\n\n\t\tif (height !== this.height) {\n\t\t\t// Apply formatted width attribute to chart\n\t\t\tholderElement.style.height = height\n\n\t\t\tthis.height = height\n\t\t}\n\n\t\t// Add class to chart holder\n\t\tselect(this.getHolder())\n\t\t\t.classed(`${carbonPrefix}--chart-holder`, true)\n\t\t\t.attr('data-carbon-theme', theme)\n\t}\n\n\tgetHolder() {\n\t\treturn this.model.get('holder')\n\t}\n\n\texportToJPG() {\n\t\tconst self = this\n\n\t\tconst holder = this.getHolder()\n\t\tconst holderSelection = select(holder)\n\t\tholderSelection.classed('filled', true)\n\n\t\tdomToImage\n\t\t\t.toJpeg(this.getMainContainer(), {\n\t\t\t\tbgcolor:\n\t\t\t\t\ttypeof window !== 'undefined'\n\t\t\t\t\t\t? window.getComputedStyle(holder).getPropertyValue('background-color')\n\t\t\t\t\t\t: undefined,\n\t\t\t\tquality: 1,\n\t\t\t\t// Remove the toolbar\n\t\t\t\tfilter: (node: any) => {\n\t\t\t\t\tif (node.classList && node.classList.contains('cds--cc--toolbar')) {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t})\n\t\t\t.then(function (dataUrl: string) {\n\t\t\t\tself.services.files?.downloadImage(dataUrl, 'myChart.jpg')\n\t\t\t\tholderSelection.classed('filled', false)\n\t\t\t})\n\t}\n\n\texportToPNG() {\n\t\tconst self = this\n\n\t\tconst holder = this.getHolder()\n\t\tconst holderSelection = select(holder)\n\t\tholderSelection.classed('filled', true)\n\n\t\tdomToImage\n\t\t\t.toPng(this.getMainContainer(), {\n\t\t\t\tbgcolor:\n\t\t\t\t\ttypeof window !== 'undefined'\n\t\t\t\t\t\t? window.getComputedStyle(holder).getPropertyValue('background-color')\n\t\t\t\t\t\t: undefined,\n\t\t\t\tquality: 1,\n\t\t\t\t// Remove the toolbar\n\t\t\t\tfilter: (node: HTMLElement) => {\n\t\t\t\t\tif (node.classList && node.classList.contains('cds--cc--toolbar')) {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t})\n\t\t\t.then(function (dataUrl: string) {\n\t\t\t\tself.services.files?.downloadImage(dataUrl, 'myChart.png')\n\t\t\t\tholderSelection.classed('filled', false)\n\t\t\t})\n\t\t\t.catch(function (error: Error) {\n\t\t\t\tconsole.error('oops, something went wrong!', error)\n\t\t\t})\n\t}\n\n\ttoggleFullscreen() {\n\t\tconst holder = this.getHolder()\n\t\tconst holderSelection = select(holder)\n\n\t\tconst isFullScreen = holderSelection.classed('fullscreen')\n\n\t\tif (\n\t\t\tisFullScreen &&\n\t\t\t(document.fullscreenElement ||\n\t\t\t\tdocument['webkitFullscreenElement'] ||\n\t\t\t\tdocument['mozFullScreenElement'] ||\n\t\t\t\tdocument['msFullscreenElement'])\n\t\t) {\n\t\t\t// Call the correct function depending on the browser\n\t\t\tif (document.exitFullscreen) {\n\t\t\t\tdocument.exitFullscreen()\n\t\t\t} else if (document['webkitExitFullscreen']) {\n\t\t\t\tdocument['webkitExitFullscreen']()\n\t\t\t} else if (document['mozCancelFullScreen']) {\n\t\t\t\tdocument['mozCancelFullScreen']()\n\t\t\t} else if (document['msExitFullscreen']) {\n\t\t\t\tdocument['msExitFullscreen']()\n\t\t\t}\n\t\t} else {\n\t\t\t// Call the correct function depending on the browser\n\t\t\tif (holder.requestFullscreen) {\n\t\t\t\tholder.requestFullscreen()\n\t\t\t} else if (holder.webkitRequestFullscreen) {\n\t\t\t\tholder.webkitRequestFullscreen()\n\t\t\t} else if (holder.mozRequestFullScreen) {\n\t\t\t\tholder.mozRequestFullScreen()\n\t\t\t} else if (holder.msRequestFullscreen) {\n\t\t\t\tholder.msRequestFullscreen()\n\t\t\t}\n\t\t}\n\t}\n\n\thandleFullscreenChange() {\n\t\tdocument.addEventListener('fullscreenchange', () => {\n\t\t\tconst holderSelection = select(this.getHolder())\n\t\t\tconst isFullScreen = holderSelection.classed('fullscreen')\n\n\t\t\t// Toggle the `fullscreen` classname\n\t\t\tholderSelection.classed('fullscreen', !isFullScreen)\n\t\t})\n\t}\n\n\tsetSVGMaxHeight() {\n\t\t// if there is a set height on the holder, leave the chart svg height at 100%\n\t\tif (!this.model.getOptions().height) {\n\t\t\tconst { height: chartHeight } = DOMUtils.getSVGElementSize(\n\t\t\t\tselect(this.mainContainer) as any,\n\t\t\t\t{\n\t\t\t\t\tuseBBox: true\n\t\t\t\t}\n\t\t\t)\n\t\t\tconst chartSVGSelector = select(this.mainContainer).attr('class')\n\t\t\tconst children = select(this.mainContainer).selectAll(`.${chartSVGSelector} > svg`)\n\n\t\t\t// get the height of the children SVGs (spacers, titles, etc)\n\t\t\tlet childrenHeight = 0\n\t\t\tchildren.nodes().forEach(function (childSVG) {\n\t\t\t\tchildrenHeight += Number(\n\t\t\t\t\tDOMUtils.getSVGElementSize(select<SVGGraphicsElement, any>(childSVG as any), {\n\t\t\t\t\t\tuseBBox: true\n\t\t\t\t\t}).height\n\t\t\t\t)\n\t\t\t})\n\n\t\t\t// set the chart svg height to the children height\n\t\t\t// forcing the chart not to take up any more space than it requires\n\t\t\tchildrenHeight <= chartHeight\n\t\t\t\t? select(this.mainContainer).attr('height', childrenHeight)\n\t\t\t\t: select(this.mainContainer).attr('height', '100%')\n\t\t}\n\t}\n\n\tgetMainContainer() {\n\t\treturn this.mainContainer\n\t}\n\n\taddHolderListeners() {\n\t\tconst holder = this.getHolder()\n\n\t\tif (!holder) {\n\t\t\treturn\n\t\t}\n\n\t\tselect(holder)\n\t\t\t.on('mouseover', () => {\n\t\t\t\t// Dispatch event\n\t\t\t\tthis.services.events?.dispatchEvent(Events.Chart.MOUSEOVER)\n\t\t\t})\n\t\t\t.on('mouseout', () => {\n\t\t\t\t// Dispatch event\n\t\t\t\tthis.services.events?.dispatchEvent(Events.Chart.MOUSEOUT)\n\t\t\t})\n\t}\n\n\taddResizeListener() {\n\t\tconst holder = this.getHolder()\n\n\t\tif (!holder) {\n\t\t\treturn\n\t\t}\n\n\t\t// Grab current dimensions of the chart holder\n\t\tlet containerWidth = holder.clientWidth\n\t\tlet containerHeight = holder.clientHeight\n\n\t\t// The resize callback function\n\t\tconst resizeCallback = debounce(() => {\n\t\t\tif (!holder) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tMath.abs(containerWidth - holder.clientWidth) > 1 ||\n\t\t\t\tMath.abs(containerHeight - holder.clientHeight) > 1\n\t\t\t) {\n\t\t\t\tcontainerWidth = holder.clientWidth\n\t\t\t\tcontainerHeight = holder.clientHeight\n\n\t\t\t\tthis.services.events?.dispatchEvent(Events.Chart.RESIZE)\n\t\t\t}\n\t\t}, 12.5)\n\n\t\t// Observe the behaviour of resizing on the holder\n\t\tconst resizeObserver = new ResizeObserver(resizeCallback)\n\t\tresizeObserver.observe(holder)\n\t}\n}\n","import { Service } from '@/services/service'\n\nexport class GradientUtils extends Service {\n\tstatic appendOrUpdateLinearGradient(configs: any) {\n\t\tlet lg = configs.svg.select(`defs linearGradient#${configs.id}`)\n\t\tif (lg.empty()) {\n\t\t\tlg = configs.svg\n\t\t\t\t.append('defs')\n\t\t\t\t.append('linearGradient')\n\t\t\t\t.attr('id', configs.id)\n\t\t\t\t.attr('x1', configs.x1)\n\t\t\t\t.attr('x2', configs.x2)\n\t\t\t\t.attr('y1', configs.y1)\n\t\t\t\t.attr('y2', configs.y2)\n\t\t}\n\n\t\tlg.selectAll('stop').remove()\n\t\tlg.selectAll('stop')\n\t\t\t.data(configs.stops)\n\t\t\t.enter()\n\t\t\t.append('stop')\n\t\t\t.attr('offset', (d: any) => d.offset)\n\t\t\t.style('stop-color', (d: any) => d.color)\n\t\t\t.style('stop-opacity', (d: any) => d.opacity)\n\t}\n\n\tstatic getOffsetRatio(domain: any) {\n\t\tconst offsetRatio =\n\t\t\t((Math.abs(domain[1]) * 100) / Math.abs(domain[0] - domain[1])).toFixed(2) + '%'\n\t\treturn offsetRatio\n\t}\n\n\tstatic getStops(domain: any, color: string) {\n\t\tconst need3Stops = domain[0] < 0 && domain[1] > 0\n\t\tlet stops: object[] = [\n\t\t\t{\n\t\t\t\toffset: '0%',\n\t\t\t\tcolor: color,\n\t\t\t\topacity: '0.6'\n\t\t\t},\n\t\t\t{\n\t\t\t\toffset: '80%',\n\t\t\t\tcolor: color,\n\t\t\t\topacity: '0'\n\t\t\t}\n\t\t]\n\n\t\tif (need3Stops) {\n\t\t\tstops = [\n\t\t\t\t{\n\t\t\t\t\toffset: '0%',\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: '0.6'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toffset: GradientUtils.getOffsetRatio(domain),\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: '0'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toffset: '100%',\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: '0.6'\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t\treturn stops\n\t}\n}\n","import { TextAnchor, DominantBaseline } from '@/interfaces/enums'\n\nexport interface Point {\n\tx: number\n\ty: number\n}\n\nexport type Angle = number\n\nexport interface LabelAlignment {\n\ttextAnchor: TextAnchor\n\tdominantBaseline: DominantBaseline\n}\n\nexport function radialLabelPlacement(angleRadians: Angle): LabelAlignment {\n\tconst angle = mod(radToDeg(angleRadians), 360)\n\n\tif (isInRange(angle, [0, 10]) || isInRange(angle, [350, 0])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.START,\n\t\t\tdominantBaseline: DominantBaseline.MIDDLE\n\t\t}\n\t} else if (isInRange(angle, [10, 80])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.START,\n\t\t\tdominantBaseline: DominantBaseline.HANGING\n\t\t}\n\t} else if (isInRange(angle, [80, 100])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.MIDDLE,\n\t\t\tdominantBaseline: DominantBaseline.HANGING\n\t\t}\n\t} else if (isInRange(angle, [100, 170])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.END,\n\t\t\tdominantBaseline: DominantBaseline.HANGING\n\t\t}\n\t} else if (isInRange(angle, [170, 190])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.END,\n\t\t\tdominantBaseline: DominantBaseline.MIDDLE\n\t\t}\n\t} else if (isInRange(angle, [190, 260])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.END,\n\t\t\tdominantBaseline: DominantBaseline.BASELINE\n\t\t}\n\t} else if (isInRange(angle, [260, 280])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.MIDDLE,\n\t\t\tdominantBaseline: DominantBaseline.BASELINE\n\t\t}\n\t} else {\n\t\t// 280 - 350\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.START,\n\t\t\tdominantBaseline: DominantBaseline.BASELINE\n\t\t}\n\t}\n}\n\nfunction mod(n: number, m: number) {\n\treturn ((n % m) + m) % m\n}\n\nfunction isInRange(x: number, [min, max]: [number, number]) {\n\treturn x >= min && x <= max\n}\n\nexport function radToDeg(rad: Angle): Angle {\n\treturn rad * (180 / Math.PI)\n}\n\nexport function degToRad(deg: Angle): Angle {\n\treturn deg * (Math.PI / 180)\n}\n\nexport function polarToCartesianCoords(a: Angle, r: number, t: Point = { x: 0, y: 0 }): Point {\n\tconst x = r * Math.cos(a) + t.x\n\tconst y = r * Math.sin(a) + t.y\n\n\t// NaN is rendered at coordinate 0 in browsers\n\t// By setting it to 0, further operations can be performed\n\treturn { x: isNaN(x) ? 0 : x, y: isNaN(y) ? 0 : y }\n}\n\n// Return the distance between a point (described with polar coordinates)\n// on a circumference and the vertical diameter.\n// If the point is on the left if the diameter, its distance is positive,\n// if it is on the right of the diameter, its distance is negative.\nexport function distanceBetweenPointOnCircAndVerticalDiameter(a: Angle, r: number) {\n\treturn r * Math.sin(a - Math.PI / 2)\n}\n"],"names":["reWhitespace","trimmedEndIndex","string","index","reTrimStart","baseTrim","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","isSymbol","isObject","other","isBinary","now","root","now$1","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","Service","model","services","newObj","CSS_VERIFIER_ELEMENT_CLASSNAME","DOMUtils","element","svgSelector","select","finalDimensions","validateAndSetDimensions","dimensions","dimensionKey","dimension","dimensionNumber","attrDimensions","svgElement","bbox","bboxDimensions","boundingRect","boundingRectDimensions","e","clientDimensions","nativeDimensions","getProperty","parent","query","selection","querySections","elementToAppend","id","originalID","chartsprefix","mainContainer","carbonPrefix","holderElement","width","height","theme","self","holder","holderSelection","domToImage","node","dataUrl","_a","error","isFullScreen","chartHeight","chartSVGSelector","children","childrenHeight","childSVG","Events","containerWidth","containerHeight","resizeCallback","GradientUtils","configs","lg","d","domain","color","need3Stops","stops","radialLabelPlacement","angleRadians","angle","mod","radToDeg","isInRange","TextAnchor","DominantBaseline","n","m","x","min","max","rad","degToRad","deg","polarToCartesianCoords","a","r","y","distanceBetweenPointOnCircAndVerticalDiameter"],"mappings":"iHACA,IAAIA,EAAe,KAUnB,SAASC,EAAgBC,EAAQ,CAG/B,QAFIC,EAAQD,EAAO,OAEZC,KAAWH,EAAa,KAAKE,EAAO,OAAOC,CAAK,CAAC,GAAG,CAC3D,OAAOA,CACT,CCbA,IAAIC,EAAc,OASlB,SAASC,EAASH,EAAQ,CACxB,OAAOA,GACHA,EAAO,MAAM,EAAGD,EAAgBC,CAAM,EAAI,CAAC,EAAE,QAAQE,EAAa,EAAE,CAE1E,CCXA,IAAIE,EAAM,EAAI,EAGVC,EAAa,qBAGbC,EAAa,aAGbC,EAAY,cAGZC,EAAe,SAyBnB,SAASC,EAASC,EAAO,CACvB,GAAI,OAAOA,GAAS,SAClB,OAAOA,EAET,GAAIC,EAAAA,SAASD,CAAK,EAChB,OAAON,EAET,GAAIQ,EAAAA,SAASF,CAAK,EAAG,CACnB,IAAIG,EAAQ,OAAOH,EAAM,SAAW,WAAaA,EAAM,QAAS,EAAGA,EACnEA,EAAQE,EAAQ,SAACC,CAAK,EAAKA,EAAQ,GAAMA,EAE3C,GAAI,OAAOH,GAAS,SAClB,OAAOA,IAAU,EAAIA,EAAQ,CAACA,EAEhCA,EAAQP,EAASO,CAAK,EACtB,IAAII,EAAWR,EAAW,KAAKI,CAAK,EACpC,OAAQI,GAAYP,EAAU,KAAKG,CAAK,EACpCF,EAAaE,EAAM,MAAM,CAAC,EAAGI,EAAW,EAAI,CAAC,EAC5CT,EAAW,KAAKK,CAAK,EAAIN,EAAM,CAACM,CACvC,CC3CA,IAAIK,EAAM,UAAW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W,CACzB,OAAAD,EAAIC,EAAKA,GAAKA,CACxB,CAEA,SAASJ,EAAUK,EAAW,CAACC,EAAKC,CAAG,EAAqB,CACpD,OAAAF,GAAKC,GAAOD,GAAKE,CACzB,CAEO,SAASR,EAASS,EAAmB,CACpC,OAAAA,GAAO,IAAM,KAAK,GAC1B,CAEO,SAASC,EAASC,EAAmB,CACpC,OAAAA,GAAO,KAAK,GAAK,IACzB,CAEgB,SAAAC,GAAuBC,EAAUC,EAAW,EAAW,CAAE,EAAG,EAAG,EAAG,GAAY,CAC7F,MAAMR,EAAIQ,EAAI,KAAK,IAAID,CAAC,EAAI,EAAE,EACxBE,EAAID,EAAI,KAAK,IAAID,CAAC,EAAI,EAAE,EAI9B,MAAO,CAAE,EAAG,MAAMP,CAAC,EAAI,EAAIA,EAAG,EAAG,MAAMS,CAAC,EAAI,EAAIA,CAAE,CACnD,CAMgB,SAAAC,GAA8CH,EAAUC,EAAW,CAClF,OAAOA,EAAI,KAAK,IAAID,EAAI,KAAK,GAAK,CAAC,CACpC","x_google_ignoreList":[0,1,2,3,4]}
|
|
1
|
+
{"version":3,"file":"angle-utils-6f166b40.js","sources":["../node_modules/lodash-es/_trimmedEndIndex.js","../node_modules/lodash-es/_baseTrim.js","../node_modules/lodash-es/toNumber.js","../node_modules/lodash-es/now.js","../node_modules/lodash-es/debounce.js","../src/services/service.ts","../src/services/essentials/dom-utils.ts","../src/services/essentials/gradient-utils.ts","../src/services/angle-utils.ts"],"sourcesContent":["/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","import type { ChartModel } from '@/model/model'\nimport type { Services } from '@/interfaces/services'\n\nexport class Service {\n\tprotected model: ChartModel\n\tprotected services: Services\n\n\tconstructor(model: ChartModel, services: Services) {\n\t\tthis.model = model\n\t\tthis.services = services\n\n\t\tthis.init()\n\t}\n\n\tinit() {\n\t\t// do nothing.\n\t}\n\n\tupdate() {\n\t\t// do nothing.\n\t}\n\n\t// Used to pass down information to the components\n\tsetModel(newObj: ChartModel) {\n\t\tthis.model = newObj\n\t}\n\n\t// Used to pass down services to the components\n\tsetServices(newObj: Services) {\n\t\tthis.services = newObj\n\t}\n}\n","import { select, type Selection } from 'd3'\nimport domToImage from 'dom-to-image-more'\nimport { debounce, getProperty } from '@/tools'\nimport { carbonPrefix } from '@/configuration-non-customizable' // CSS prefix\nimport type { ChartModel } from '@/model/model'\nimport { Service } from '@/services/service'\nimport { Events } from '@/interfaces/enums'\n\nconst CSS_VERIFIER_ELEMENT_CLASSNAME = 'DONT_STYLE_ME_css_styles_verifier'\n\n// Functions like validateAndSetDimensions() may return strings or numbers\nexport interface Dimensions {\n height: number\n width: number\n}\n\nexport interface getSVGElementSizeOptions {\n\tuseAttrs?: boolean\n\tuseClientDimensions?: boolean\n\tuseBBox?: boolean\n\tuseBoundingRect?: boolean\n}\n\nexport class DOMUtils extends Service {\n\tprivate chartID = '' // initialized in initializeID() called by init()\n\n\tconstructor(model: ChartModel, services: any) {\n\t\tsuper(model, services)\n\t}\n\n\tstatic getHTMLElementSize(element: HTMLElement) {\n\t\treturn {\n\t\t\twidth: element.clientWidth,\n\t\t\theight: element.clientHeight\n\t\t}\n\t}\n\n\tstatic getSVGElementSize(\n\t\tsvgSelector: Selection<SVGGraphicsElement, any, Element, any>,\n\t\toptions: getSVGElementSizeOptions = {\n\t\t\tuseAttrs: false,\n\t\t\tuseClientDimensions: false,\n\t\t\tuseBBox: false,\n\t\t\tuseBoundingRect: false\n\t\t}\n\t) {\n\t\tif (!svgSelector.attr) {\n\t\t\tsvgSelector = select<SVGGraphicsElement, any>(svgSelector as any) // issue with @types/d3 - select can handle Selection parameters just fine\n\t\t}\n\n\t\tconst finalDimensions = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t}\n\n\t\t// Dimensions can be width and height as numbers or strings\n\t\tconst validateAndSetDimensions = (dimensions: any) => {\n\t\t\tif (dimensions) {\n\t\t\t\tObject.keys(finalDimensions).forEach((dimensionKey: 'width' | 'height') => {\n\t\t\t\t\tif (dimensions[dimensionKey]) {\n\t\t\t\t\t\tconst dimension = dimensions[dimensionKey]\n\t\t\t\t\t\tconst dimensionNumber = parseFloat(dimension)\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tdimension &&\n\t\t\t\t\t\t\tdimensionNumber > finalDimensions[dimensionKey] &&\n\t\t\t\t\t\t\t('' + dimension).indexOf('%') === -1\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tfinalDimensions[dimensionKey] = dimensionNumber\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\tconst attrDimensions = {\n\t\t\twidth: svgSelector.attr('width'),\n\t\t\theight: svgSelector.attr('height')\n\t\t}\n\n\t\tconst svgElement = svgSelector.node()\n\n\t\tlet bbox: DOMRect,\n\t\t\tbboxDimensions: Dimensions,\n\t\t\tboundingRect: DOMRect,\n\t\t\tboundingRectDimensions: Dimensions\n\n\t\ttry {\n\t\t\t// Not all SVG graphics elements have bounding boxes (eg <defs>, <title>, <styles>)\n\t\t\tif (typeof svgElement.getBBox === 'function') {\n\t\t\t\tbbox = svgElement.getBBox()\n\t\t\t\tbboxDimensions = {\n\t\t\t\t\twidth: bbox.width,\n\t\t\t\t\theight: bbox.height\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\ttry {\n\t\t\t// Not all SVG graphics elements have...\n\t\t\tif (typeof svgElement?.getBoundingClientRect === 'function') {\n\t\t\t\tboundingRect = svgElement.getBoundingClientRect()\n\t\t\t\tboundingRectDimensions = {\n\t\t\t\t\twidth: boundingRect.width,\n\t\t\t\t\theight: boundingRect.height\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\t// Not all SVG graphics elements have...\n\t\tlet clientDimensions: Dimensions\n\t\tif (svgElement instanceof SVGSVGElement) {\n\t\t\tclientDimensions = {\n\t\t\t\twidth: svgElement.clientWidth,\n\t\t\t\theight: svgElement.clientHeight\n\t\t\t}\n\t\t}\n\n\t\t// If both attribute values are numbers\n\t\t// And not percentages or NaN\n\t\tif (options) {\n\t\t\tif (options.useAttrs) {\n\t\t\t\tvalidateAndSetDimensions(attrDimensions)\n\n\t\t\t\tif (finalDimensions.width > 0 && finalDimensions.height > 0) {\n\t\t\t\t\treturn finalDimensions\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.useClientDimensions) {\n\t\t\t\tvalidateAndSetDimensions(clientDimensions)\n\n\t\t\t\tif (finalDimensions.width > 0 && finalDimensions.height > 0) {\n\t\t\t\t\treturn clientDimensions\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.useBBox) {\n\t\t\t\tvalidateAndSetDimensions(bboxDimensions)\n\n\t\t\t\tif (finalDimensions.width > 0 && finalDimensions.height > 0) {\n\t\t\t\t\treturn bboxDimensions\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options.useBoundingRect) {\n\t\t\t\tvalidateAndSetDimensions(boundingRectDimensions)\n\n\t\t\t\tif (finalDimensions.width > 0 && finalDimensions.height > 0) {\n\t\t\t\t\treturn boundingRectDimensions\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tconst nativeDimensions = {\n\t\t\t\twidth: getProperty(svgSelector.node(), 'width', 'baseVal', 'value'),\n\t\t\t\theight: getProperty(svgSelector.node(), 'height', 'baseVal', 'value')\n\t\t\t}\n\n\t\t\tvalidateAndSetDimensions(nativeDimensions)\n\t\t} catch (e) {\n\t\t\tvalidateAndSetDimensions(clientDimensions)\n\t\t\tvalidateAndSetDimensions(bboxDimensions)\n\t\t\tvalidateAndSetDimensions(attrDimensions)\n\t\t}\n\t\treturn finalDimensions\n\t}\n\n\tstatic appendOrSelect(parent: Selection<SVGElement | HTMLDivElement, any, Element, any>, query: string) {\n\t\tconst selection = parent.select(`${query}`)\n\n\t\tif (selection.empty()) {\n\t\t\t// see if there is an id\n\t\t\tlet querySections = query.split('#')\n\t\t\tlet elementToAppend: any\n\t\t\tlet id: string\n\t\t\t// if there is an id\n\t\t\tif (querySections.length === 2) {\n\t\t\t\t// take out the element to append\n\t\t\t\telementToAppend = querySections[0]\n\t\t\t\t// split it by classes\n\t\t\t\tquerySections = querySections[1].split('.')\n\t\t\t\t// the first string is the id\n\t\t\t\tid = querySections[0]\n\t\t\t} else {\n\t\t\t\tquerySections = query.split('.')\n\t\t\t\telementToAppend = querySections[0]\n\t\t\t}\n\n\t\t\treturn parent\n\t\t\t\t.append(elementToAppend)\n\t\t\t\t.attr('id', id)\n\t\t\t\t.attr('class', querySections.slice(1).join(' '))\n\t\t}\n\n\t\treturn selection\n\t}\n\n\tprotected mainContainer: HTMLDivElement\n\tprotected width: string\n\tprotected height: string\n\n\tinit() {\n\t\t// Add width & height to the chart holder if necessary, and add a classname\n\t\tthis.styleHolderElement()\n\n\t\t// Initialize chart ID\n\t\tthis.initializeID()\n\n\t\tthis.addMainContainer()\n\n\t\tif (this.model.getOptions().resizable) {\n\t\t\tthis.addResizeListener()\n\t\t}\n\n\t\tthis.addHolderListeners()\n\n\t\tthis.handleFullscreenChange()\n\t}\n\n\tgetChartID() {\n\t\treturn this.chartID\n\t}\n\n\tgenerateElementIDString(originalID: string | number) {\n\t\treturn `chart-${this.chartID}-${originalID}`\n\t}\n\n\tprivate initializeID() {\n\t\tthis.chartID = Math.floor((1 + Math.random()) * 0x1000000000000).toString(16)\n\t}\n\n\taddMainContainer() {\n\t\tconst options = this.model.getOptions()\n\t\tconst chartsprefix = getProperty(options, 'style', 'prefix')\n\n\t\tconst mainContainer = select(this.getHolder())\n\t\t\t.append('div')\n\t\t\t.classed(`${carbonPrefix}--${chartsprefix}--chart-wrapper`, true)\n\t\t\t.attr('id', `chart-${this.getChartID()}`)\n\t\t\t.style('height', '100%')\n\t\t\t.style('width', '100%')\n\n\t\tmainContainer.append('g').attr('class', CSS_VERIFIER_ELEMENT_CLASSNAME)\n\n\t\tthis.mainContainer = mainContainer.node()\n\t}\n\n\tupdate() {\n\t\tthis.styleHolderElement()\n\t}\n\n\tstyleHolderElement() {\n\t\tconst holderElement = this.getHolder() as HTMLElement\n\n\t\t// In order for resize events to not clash with these updates\n\t\t// We'll check if the width & height values passed in options\n\t\t// Have changed, before setting them to the holder\n\t\tconst { width, height, theme } = this.model.getOptions()\n\t\tif (width !== this.width) {\n\t\t\t// Apply formatted width attribute to chart\n\t\t\tholderElement.style.width = width\n\n\t\t\tthis.width = width\n\t\t}\n\n\t\tif (height !== this.height) {\n\t\t\t// Apply formatted width attribute to chart\n\t\t\tholderElement.style.height = height\n\n\t\t\tthis.height = height\n\t\t}\n\n\t\t// Add class to chart holder\n\t\tselect(this.getHolder())\n\t\t\t.classed(`${carbonPrefix}--chart-holder`, true)\n\t\t\t.attr('data-carbon-theme', theme)\n\t}\n\n\tgetHolder() {\n\t\treturn this.model.get('holder')\n\t}\n\n\texportToJPG() {\n\t\tconst self = this\n\n\t\tconst holder = this.getHolder()\n\t\tconst holderSelection = select(holder)\n\t\tholderSelection.classed('filled', true)\n\n\t\tdomToImage\n\t\t\t.toJpeg(this.getMainContainer(), {\n\t\t\t\tbgcolor:\n\t\t\t\t\ttypeof window !== 'undefined'\n\t\t\t\t\t\t? window.getComputedStyle(holder).getPropertyValue('background-color')\n\t\t\t\t\t\t: undefined,\n\t\t\t\tquality: 1,\n\t\t\t\t// Remove the toolbar\n\t\t\t\tfilter: (node: any) => {\n\t\t\t\t\tif (node.classList && node.classList.contains('cds--cc--toolbar')) {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t})\n\t\t\t.then(function (dataUrl: string) {\n\t\t\t\tself.services.files?.downloadImage(dataUrl, 'myChart.jpg')\n\t\t\t\tholderSelection.classed('filled', false)\n\t\t\t})\n\t}\n\n\texportToPNG() {\n\t\tconst self = this\n\n\t\tconst holder = this.getHolder()\n\t\tconst holderSelection = select(holder)\n\t\tholderSelection.classed('filled', true)\n\n\t\tdomToImage\n\t\t\t.toPng(this.getMainContainer(), {\n\t\t\t\tbgcolor:\n\t\t\t\t\ttypeof window !== 'undefined'\n\t\t\t\t\t\t? window.getComputedStyle(holder).getPropertyValue('background-color')\n\t\t\t\t\t\t: undefined,\n\t\t\t\tquality: 1,\n\t\t\t\t// Remove the toolbar\n\t\t\t\tfilter: (node: HTMLElement) => {\n\t\t\t\t\tif (node.classList && node.classList.contains('cds--cc--toolbar')) {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t})\n\t\t\t.then(function (dataUrl: string) {\n\t\t\t\tself.services.files?.downloadImage(dataUrl, 'myChart.png')\n\t\t\t\tholderSelection.classed('filled', false)\n\t\t\t})\n\t\t\t.catch(function (error: Error) {\n\t\t\t\tconsole.error('oops, something went wrong!', error)\n\t\t\t})\n\t}\n\n\ttoggleFullscreen() {\n\t\tconst holder = this.getHolder()\n\t\tconst holderSelection = select(holder)\n\n\t\tconst isFullScreen = holderSelection.classed('fullscreen')\n\n\t\tif (\n\t\t\tisFullScreen &&\n\t\t\t(document.fullscreenElement ||\n\t\t\t\tdocument['webkitFullscreenElement'] ||\n\t\t\t\tdocument['mozFullScreenElement'] ||\n\t\t\t\tdocument['msFullscreenElement'])\n\t\t) {\n\t\t\t// Call the correct function depending on the browser\n\t\t\tif (document.exitFullscreen) {\n\t\t\t\tdocument.exitFullscreen()\n\t\t\t} else if (document['webkitExitFullscreen']) {\n\t\t\t\tdocument['webkitExitFullscreen']()\n\t\t\t} else if (document['mozCancelFullScreen']) {\n\t\t\t\tdocument['mozCancelFullScreen']()\n\t\t\t} else if (document['msExitFullscreen']) {\n\t\t\t\tdocument['msExitFullscreen']()\n\t\t\t}\n\t\t} else {\n\t\t\t// Call the correct function depending on the browser\n\t\t\tif (holder.requestFullscreen) {\n\t\t\t\tholder.requestFullscreen()\n\t\t\t} else if (holder.webkitRequestFullscreen) {\n\t\t\t\tholder.webkitRequestFullscreen()\n\t\t\t} else if (holder.mozRequestFullScreen) {\n\t\t\t\tholder.mozRequestFullScreen()\n\t\t\t} else if (holder.msRequestFullscreen) {\n\t\t\t\tholder.msRequestFullscreen()\n\t\t\t}\n\t\t}\n\t}\n\n\thandleFullscreenChange() {\n\t\tdocument.addEventListener('fullscreenchange', () => {\n\t\t\tconst holderSelection = select(this.getHolder())\n\t\t\tconst isFullScreen = holderSelection.classed('fullscreen')\n\n\t\t\t// Toggle the `fullscreen` classname\n\t\t\tholderSelection.classed('fullscreen', !isFullScreen)\n\t\t})\n\t}\n\n\tsetSVGMaxHeight() {\n\t\t// if there is a set height on the holder, leave the chart svg height at 100%\n\t\tif (!this.model.getOptions().height) {\n\t\t\tconst { height: chartHeight } = DOMUtils.getSVGElementSize(\n\t\t\t\tselect(this.mainContainer) as any,\n\t\t\t\t{\n\t\t\t\t\tuseBBox: true\n\t\t\t\t}\n\t\t\t)\n\t\t\tconst chartSVGSelector = select(this.mainContainer).attr('class')\n\t\t\tconst children = select(this.mainContainer).selectAll(`.${chartSVGSelector} > svg`)\n\n\t\t\t// get the height of the children SVGs (spacers, titles, etc)\n\t\t\tlet childrenHeight = 0\n\t\t\tchildren.nodes().forEach(function (childSVG) {\n\t\t\t\tchildrenHeight += Number(\n\t\t\t\t\tDOMUtils.getSVGElementSize(select<SVGGraphicsElement, any>(childSVG as any), {\n\t\t\t\t\t\tuseBBox: true\n\t\t\t\t\t}).height\n\t\t\t\t)\n\t\t\t})\n\n\t\t\t// set the chart svg height to the children height\n\t\t\t// forcing the chart not to take up any more space than it requires\n\t\t\tchildrenHeight <= chartHeight\n\t\t\t\t? select(this.mainContainer).attr('height', childrenHeight)\n\t\t\t\t: select(this.mainContainer).attr('height', '100%')\n\t\t}\n\t}\n\n\tgetMainContainer() {\n\t\treturn this.mainContainer\n\t}\n\n\taddHolderListeners() {\n\t\tconst holder = this.getHolder()\n\n\t\tif (!holder) {\n\t\t\treturn\n\t\t}\n\n\t\tselect(holder)\n\t\t\t.on('mouseover', () => {\n\t\t\t\t// Dispatch event\n\t\t\t\tthis.services.events?.dispatchEvent(Events.Chart.MOUSEOVER)\n\t\t\t})\n\t\t\t.on('mouseout', () => {\n\t\t\t\t// Dispatch event\n\t\t\t\tthis.services.events?.dispatchEvent(Events.Chart.MOUSEOUT)\n\t\t\t})\n\t}\n\n\taddResizeListener() {\n\t\tconst holder = this.getHolder()\n\n\t\tif (!holder) {\n\t\t\treturn\n\t\t}\n\n\t\t// Grab current dimensions of the chart holder\n\t\tlet containerWidth = holder.clientWidth\n\t\tlet containerHeight = holder.clientHeight\n\n\t\t// The resize callback function\n\t\tconst resizeCallback = debounce(() => {\n\t\t\tif (!holder) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tMath.abs(containerWidth - holder.clientWidth) > 1 ||\n\t\t\t\tMath.abs(containerHeight - holder.clientHeight) > 1\n\t\t\t) {\n\t\t\t\tcontainerWidth = holder.clientWidth\n\t\t\t\tcontainerHeight = holder.clientHeight\n\n\t\t\t\tthis.services.events?.dispatchEvent(Events.Chart.RESIZE)\n\t\t\t}\n\t\t}, 12.5)\n\n\t\t// Observe the behaviour of resizing on the holder\n\t\tconst resizeObserver = new ResizeObserver(resizeCallback)\n\t\tresizeObserver.observe(holder)\n\t}\n}\n","import { Service } from '@/services/service'\n\nexport class GradientUtils extends Service {\n\tstatic appendOrUpdateLinearGradient(configs: any) {\n\t\tlet lg = configs.svg.select(`defs linearGradient#${configs.id}`)\n\t\tif (lg.empty()) {\n\t\t\tlg = configs.svg\n\t\t\t\t.append('defs')\n\t\t\t\t.append('linearGradient')\n\t\t\t\t.attr('id', configs.id)\n\t\t\t\t.attr('x1', configs.x1)\n\t\t\t\t.attr('x2', configs.x2)\n\t\t\t\t.attr('y1', configs.y1)\n\t\t\t\t.attr('y2', configs.y2)\n\t\t}\n\n\t\tlg.selectAll('stop').remove()\n\t\tlg.selectAll('stop')\n\t\t\t.data(configs.stops)\n\t\t\t.enter()\n\t\t\t.append('stop')\n\t\t\t.attr('offset', (d: any) => d.offset)\n\t\t\t.style('stop-color', (d: any) => d.color)\n\t\t\t.style('stop-opacity', (d: any) => d.opacity)\n\t}\n\n\tstatic getOffsetRatio(domain: any) {\n\t\tconst offsetRatio =\n\t\t\t((Math.abs(domain[1]) * 100) / Math.abs(domain[0] - domain[1])).toFixed(2) + '%'\n\t\treturn offsetRatio\n\t}\n\n\tstatic getStops(domain: any, color: string) {\n\t\tconst need3Stops = domain[0] < 0 && domain[1] > 0\n\t\tlet stops: object[] = [\n\t\t\t{\n\t\t\t\toffset: '0%',\n\t\t\t\tcolor: color,\n\t\t\t\topacity: '0.6'\n\t\t\t},\n\t\t\t{\n\t\t\t\toffset: '80%',\n\t\t\t\tcolor: color,\n\t\t\t\topacity: '0'\n\t\t\t}\n\t\t]\n\n\t\tif (need3Stops) {\n\t\t\tstops = [\n\t\t\t\t{\n\t\t\t\t\toffset: '0%',\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: '0.6'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toffset: GradientUtils.getOffsetRatio(domain),\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: '0'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toffset: '100%',\n\t\t\t\t\tcolor: color,\n\t\t\t\t\topacity: '0.6'\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t\treturn stops\n\t}\n}\n","import { TextAnchor, DominantBaseline } from '@/interfaces/enums'\n\nexport interface Point {\n\tx: number\n\ty: number\n}\n\nexport type Angle = number\n\nexport interface LabelAlignment {\n\ttextAnchor: TextAnchor\n\tdominantBaseline: DominantBaseline\n}\n\nexport function radialLabelPlacement(angleRadians: Angle): LabelAlignment {\n\tconst angle = mod(radToDeg(angleRadians), 360)\n\n\tif (isInRange(angle, [0, 10]) || isInRange(angle, [350, 0])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.START,\n\t\t\tdominantBaseline: DominantBaseline.MIDDLE\n\t\t}\n\t} else if (isInRange(angle, [10, 80])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.START,\n\t\t\tdominantBaseline: DominantBaseline.HANGING\n\t\t}\n\t} else if (isInRange(angle, [80, 100])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.MIDDLE,\n\t\t\tdominantBaseline: DominantBaseline.HANGING\n\t\t}\n\t} else if (isInRange(angle, [100, 170])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.END,\n\t\t\tdominantBaseline: DominantBaseline.HANGING\n\t\t}\n\t} else if (isInRange(angle, [170, 190])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.END,\n\t\t\tdominantBaseline: DominantBaseline.MIDDLE\n\t\t}\n\t} else if (isInRange(angle, [190, 260])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.END,\n\t\t\tdominantBaseline: DominantBaseline.BASELINE\n\t\t}\n\t} else if (isInRange(angle, [260, 280])) {\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.MIDDLE,\n\t\t\tdominantBaseline: DominantBaseline.BASELINE\n\t\t}\n\t} else {\n\t\t// 280 - 350\n\t\treturn {\n\t\t\ttextAnchor: TextAnchor.START,\n\t\t\tdominantBaseline: DominantBaseline.BASELINE\n\t\t}\n\t}\n}\n\nfunction mod(n: number, m: number) {\n\treturn ((n % m) + m) % m\n}\n\nfunction isInRange(x: number, [min, max]: [number, number]) {\n\treturn x >= min && x <= max\n}\n\nexport function radToDeg(rad: Angle): Angle {\n\treturn rad * (180 / Math.PI)\n}\n\nexport function degToRad(deg: Angle): Angle {\n\treturn deg * (Math.PI / 180)\n}\n\nexport function polarToCartesianCoords(a: Angle, r: number, t: Point = { x: 0, y: 0 }): Point {\n\tconst x = r * Math.cos(a) + t.x\n\tconst y = r * Math.sin(a) + t.y\n\n\t// NaN is rendered at coordinate 0 in browsers\n\t// By setting it to 0, further operations can be performed\n\treturn { x: isNaN(x) ? 0 : x, y: isNaN(y) ? 0 : y }\n}\n\n// Return the distance between a point (described with polar coordinates)\n// on a circumference and the vertical diameter.\n// If the point is on the left if the diameter, its distance is positive,\n// if it is on the right of the diameter, its distance is negative.\nexport function distanceBetweenPointOnCircAndVerticalDiameter(a: Angle, r: number) {\n\treturn r * Math.sin(a - Math.PI / 2)\n}\n"],"names":["reWhitespace","trimmedEndIndex","string","index","reTrimStart","baseTrim","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","isSymbol","isObject","other","isBinary","now","root","now$1","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","Service","model","services","newObj","CSS_VERIFIER_ELEMENT_CLASSNAME","DOMUtils","element","svgSelector","select","finalDimensions","validateAndSetDimensions","dimensions","dimensionKey","dimension","dimensionNumber","attrDimensions","svgElement","bbox","bboxDimensions","boundingRect","boundingRectDimensions","e","clientDimensions","nativeDimensions","getProperty","parent","query","selection","querySections","elementToAppend","id","originalID","chartsprefix","mainContainer","carbonPrefix","holderElement","width","height","theme","self","holder","holderSelection","domToImage","node","dataUrl","_a","error","isFullScreen","chartHeight","chartSVGSelector","children","childrenHeight","childSVG","Events","containerWidth","containerHeight","resizeCallback","GradientUtils","configs","lg","d","domain","color","need3Stops","stops","radialLabelPlacement","angleRadians","angle","mod","radToDeg","isInRange","TextAnchor","DominantBaseline","n","m","x","min","max","rad","degToRad","deg","polarToCartesianCoords","a","r","y","distanceBetweenPointOnCircAndVerticalDiameter"],"mappings":"iHACA,IAAIA,EAAe,KAUnB,SAASC,EAAgBC,EAAQ,CAG/B,QAFIC,EAAQD,EAAO,OAEZC,KAAWH,EAAa,KAAKE,EAAO,OAAOC,CAAK,CAAC,GAAG,CAC3D,OAAOA,CACT,CCbA,IAAIC,EAAc,OASlB,SAASC,EAASH,EAAQ,CACxB,OAAOA,GACHA,EAAO,MAAM,EAAGD,EAAgBC,CAAM,EAAI,CAAC,EAAE,QAAQE,EAAa,EAAE,CAE1E,CCXA,IAAIE,EAAM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