@carbon/charts 1.7.6 → 1.9.0-next.0
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 +97 -155
- package/README.md +18 -20
- package/dist/_baseEach-603421de.mjs +21 -0
- package/dist/_baseEach-603421de.mjs.map +1 -0
- package/dist/_baseEach-cdac417f.js +2 -0
- package/dist/_baseEach-cdac417f.js.map +1 -0
- package/dist/a11y-7bad4f48.mjs +5 -0
- package/dist/a11y-7bad4f48.mjs.map +1 -0
- package/dist/a11y-c7c9d087.js +2 -0
- package/dist/a11y-c7c9d087.js.map +1 -0
- package/dist/angle-utils-6f166b40.js +2 -0
- package/dist/angle-utils-6f166b40.js.map +1 -0
- package/dist/angle-utils-8b6ce998.mjs +387 -0
- package/dist/angle-utils-8b6ce998.mjs.map +1 -0
- package/dist/axis-chart.d.ts +13 -0
- package/dist/chart.d.ts +18 -0
- package/dist/charts/alluvial.d.ts +10 -0
- package/dist/charts/area-stacked.d.ts +8 -0
- package/dist/charts/area.d.ts +8 -0
- package/dist/charts/bar-grouped.d.ts +8 -0
- package/dist/charts/bar-simple.d.ts +8 -0
- package/dist/charts/bar-stacked.d.ts +8 -0
- package/dist/charts/boxplot.d.ts +10 -0
- package/dist/charts/bubble.d.ts +8 -0
- package/dist/charts/bullet.d.ts +10 -0
- package/dist/charts/choropleth.d.ts +14 -0
- package/dist/charts/circle-pack.d.ts +10 -0
- package/dist/charts/combo.d.ts +9 -0
- package/dist/charts/donut.d.ts +8 -0
- package/dist/charts/gauge.d.ts +10 -0
- package/dist/charts/heatmap.d.ts +14 -0
- package/dist/charts/histogram.d.ts +10 -0
- package/dist/charts/index.d.ts +27 -0
- package/dist/charts/line.d.ts +8 -0
- package/dist/charts/lollipop.d.ts +8 -0
- package/dist/charts/meter.d.ts +10 -0
- package/dist/charts/pie.d.ts +10 -0
- package/dist/charts/radar.d.ts +10 -0
- package/dist/charts/scatter.d.ts +8 -0
- package/dist/charts/tree.d.ts +10 -0
- package/dist/charts/treemap.d.ts +10 -0
- package/dist/charts/wordcloud.d.ts +10 -0
- package/dist/choropleth-4ac6ac20.js +82 -0
- package/dist/choropleth-4ac6ac20.js.map +1 -0
- package/dist/choropleth-f473ea0d.mjs +7997 -0
- package/dist/choropleth-f473ea0d.mjs.map +1 -0
- package/dist/color-scale-utils-5eb3eeaa.mjs +3809 -0
- package/dist/color-scale-utils-5eb3eeaa.mjs.map +1 -0
- package/dist/color-scale-utils-7d463811.js +3 -0
- package/dist/color-scale-utils-7d463811.js.map +1 -0
- package/dist/components/axes/axis.d.ts +24 -0
- package/dist/components/axes/chart-clip.d.ts +13 -0
- package/dist/components/axes/grid-brush.d.ts +10 -0
- package/dist/components/axes/grid.d.ts +22 -0
- package/dist/components/axes/index.d.ts +12 -0
- package/dist/components/axes/ruler-binned.d.ts +10 -0
- package/dist/components/axes/ruler.d.ts +30 -0
- package/dist/components/axes/toolbar.d.ts +40 -0
- package/dist/components/axes/two-dimensional-axes.d.ts +16 -0
- package/dist/components/axes/zero-line.d.ts +7 -0
- package/dist/components/axes/zoom-bar.d.ts +31 -0
- package/dist/components/component.d.ts +30 -0
- package/dist/components/diagrams/buildPaths.d.ts +40 -0
- package/dist/components/diagrams/index.d.ts +2 -0
- package/dist/components/essentials/canvas-chart-clip.d.ts +6 -0
- package/dist/components/essentials/color-scale-legend.d.ts +20 -0
- package/dist/components/essentials/geo-projection.d.ts +16 -0
- package/dist/components/essentials/highlights.d.ts +13 -0
- package/dist/components/essentials/index.d.ts +11 -0
- package/dist/components/essentials/legend.d.ts +11 -0
- package/dist/components/essentials/modal.d.ts +14 -0
- package/dist/components/essentials/threshold.d.ts +20 -0
- package/dist/components/essentials/title-meter.d.ts +30 -0
- package/dist/components/essentials/title.d.ts +20 -0
- package/dist/components/essentials/tooltip.d.ts +22 -0
- package/dist/components/graphs/alluvial.d.ts +14 -0
- package/dist/components/graphs/area-stacked.d.ts +11 -0
- package/dist/components/graphs/area.d.ts +12 -0
- package/dist/components/graphs/bar-grouped.d.ts +22 -0
- package/dist/components/graphs/bar-simple.d.ts +12 -0
- package/dist/components/graphs/bar-stacked.d.ts +13 -0
- package/dist/components/graphs/bar.d.ts +5 -0
- package/dist/components/graphs/boxplot.d.ts +9 -0
- package/dist/components/graphs/bubble.d.ts +13 -0
- package/dist/components/graphs/bullet.d.ts +12 -0
- package/dist/components/graphs/choropleth.d.ts +6 -0
- package/dist/components/graphs/circle-pack.d.ts +19 -0
- package/dist/components/graphs/donut.d.ts +9 -0
- package/dist/components/graphs/gauge.d.ts +27 -0
- package/dist/components/graphs/heatmap.d.ts +25 -0
- package/dist/components/graphs/histogram.d.ts +12 -0
- package/dist/components/graphs/index.d.ts +28 -0
- package/dist/components/graphs/line.d.ts +11 -0
- package/dist/components/graphs/lollipop.d.ts +14 -0
- package/dist/components/graphs/meter.d.ts +10 -0
- package/dist/components/graphs/pie.d.ts +16 -0
- package/dist/components/graphs/radar.d.ts +25 -0
- package/dist/components/graphs/scatter-stacked.d.ts +8 -0
- package/dist/components/graphs/scatter.d.ts +21 -0
- package/dist/components/graphs/skeleton-lines.d.ts +12 -0
- package/dist/components/graphs/skeleton.d.ts +23 -0
- package/dist/components/graphs/tree.d.ts +9 -0
- package/dist/components/graphs/treemap.d.ts +11 -0
- package/dist/components/graphs/wordcloud.d.ts +12 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +76 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/layout.d.ts +18 -0
- package/dist/components/layout/spacer.d.ts +5 -0
- package/dist/configuration-non-customizable.d.ts +263 -0
- package/dist/configuration.d.ts +48 -0
- package/dist/demo/charts/alluvial.d.ts +109 -0
- package/dist/demo/charts/area.d.ts +224 -0
- package/dist/demo/charts/bar.d.ts +681 -0
- package/dist/demo/charts/boxplot.d.ts +34 -0
- package/dist/demo/charts/bubble.d.ts +141 -0
- package/dist/demo/charts/bullet.d.ts +24 -0
- package/dist/demo/charts/chart-types.d.ts +128 -0
- package/dist/demo/charts/choropleth.d.ts +738 -0
- package/dist/demo/charts/circle-pack.d.ts +91 -0
- package/dist/demo/charts/combo.d.ts +482 -0
- package/dist/demo/charts/donut.d.ts +64 -0
- package/dist/demo/charts/gauge.d.ts +40 -0
- package/dist/demo/charts/heatmap.d.ts +125 -0
- package/dist/demo/charts/hightlight.d.ts +40 -0
- package/dist/demo/charts/histogram.d.ts +63 -0
- package/dist/demo/charts/index.d.ts +62 -0
- package/dist/demo/charts/line.d.ts +361 -0
- package/dist/demo/charts/lollipop.d.ts +39 -0
- package/dist/demo/charts/meter.d.ts +95 -0
- package/dist/demo/charts/pie.d.ts +46 -0
- package/dist/demo/charts/radar.d.ts +63 -0
- package/dist/demo/charts/scatter.d.ts +118 -0
- package/dist/demo/charts/step.d.ts +96 -0
- package/dist/demo/charts/time-series-axis.d.ts +293 -0
- package/dist/demo/charts/toolbar.d.ts +12 -0
- package/dist/demo/charts/topojson-110.d.ts +360 -0
- package/dist/demo/charts/tree.d.ts +30 -0
- package/dist/demo/charts/treemap.d.ts +15 -0
- package/dist/demo/charts/wordcloud.d.ts +14 -0
- package/dist/demo/charts/zoom-bar.d.ts +79 -0
- package/dist/demo/index.d.ts +4 -0
- package/dist/demo/index.js +470 -0
- package/dist/demo/index.js.map +1 -0
- package/dist/demo/index.mjs +51789 -0
- package/dist/demo/index.mjs.map +1 -0
- package/dist/demo/styles.css +30574 -0
- package/dist/demo/styles.css.map +1 -0
- package/dist/demo/utils/index.d.ts +2 -0
- package/dist/demo/utils/sandbox.d.ts +39 -0
- package/dist/demo/utils/story-widgets.d.ts +7 -0
- package/dist/enums-a96ef472.mjs +89 -0
- package/dist/enums-a96ef472.mjs.map +1 -0
- package/dist/enums-aa2efd99.js +2 -0
- package/dist/enums-aa2efd99.js.map +1 -0
- package/dist/index-822564ed.js +2 -0
- package/dist/index-822564ed.js.map +1 -0
- package/dist/index-a266373c.mjs +749 -0
- package/dist/index-a266373c.mjs.map +1 -0
- package/dist/index-becfb567.mjs +72 -0
- package/dist/index-becfb567.mjs.map +1 -0
- package/dist/index-d865d500.js +2 -0
- package/dist/index-d865d500.js.map +1 -0
- package/dist/index-ec554115.mjs +62 -0
- package/dist/index-ec554115.mjs.map +1 -0
- package/dist/index-f23685eb.js +2 -0
- package/dist/index-f23685eb.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1121 -0
- package/dist/index.mjs.map +1 -0
- package/dist/interfaces/axis-scales.d.ts +201 -0
- package/dist/interfaces/charts.d.ts +520 -0
- package/dist/interfaces/components.d.ts +231 -0
- package/dist/interfaces/enums.d.ts +261 -0
- package/dist/interfaces/events.d.ts +239 -0
- package/dist/interfaces/index.d.ts +12 -0
- package/dist/interfaces/index.js +2 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/index.mjs +58 -0
- package/dist/interfaces/index.mjs.map +1 -0
- package/dist/interfaces/layout.d.ts +21 -0
- package/dist/interfaces/model.d.ts +35 -0
- package/dist/interfaces/services.d.ts +20 -0
- package/dist/interfaces/truncation.d.ts +17 -0
- package/dist/model/binned-charts.d.ts +7 -0
- package/dist/model/cartesian-charts.d.ts +24 -0
- package/dist/model/choropleth.d.ts +29 -0
- package/dist/model/heatmap.d.ts +57 -0
- package/dist/model/index.d.ts +16 -0
- package/dist/model/index.js +3 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/index.mjs +1107 -0
- package/dist/model/index.mjs.map +1 -0
- package/dist/model/meter.d.ts +20 -0
- package/dist/model/model.d.ts +110 -0
- package/dist/services/angle-utils.d.ts +15 -0
- package/dist/services/color-scale-utils.d.ts +2 -0
- package/dist/services/curves.d.ts +24 -0
- package/dist/services/essentials/dom-utils.d.ts +45 -0
- package/dist/services/essentials/events.d.ts +8 -0
- package/dist/services/essentials/files.d.ts +7 -0
- package/dist/services/essentials/gradient-utils.d.ts +6 -0
- package/dist/services/essentials/index.d.ts +5 -0
- package/dist/services/essentials/transitions.d.ts +13 -0
- package/dist/services/index.d.ts +9 -0
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/index.mjs +32 -0
- package/dist/services/index.mjs.map +1 -0
- package/dist/services/scales-cartesian.d.ts +89 -0
- package/dist/services/service.d.ts +11 -0
- package/dist/services/zoom.d.ts +21 -0
- package/dist/styles/_chart-holder.scss +50 -0
- package/dist/styles/color-palatte.scss +458 -0
- package/dist/styles/colors.scss +131 -0
- package/dist/styles/components/_color-legend.scss +11 -0
- package/dist/styles/components/_edge.scss +65 -0
- package/dist/styles/components/_grid.scss +30 -0
- package/dist/styles/components/_marker.scss +7 -0
- package/dist/styles/components/_meter-title.scss +37 -0
- package/dist/styles/components/_tooltip.scss +132 -0
- package/dist/styles/components/diagrams/_card-node.scss +97 -0
- package/dist/styles/components/diagrams/_edge.scss +66 -0
- package/dist/styles/components/diagrams/_shape-node.scss +89 -0
- package/dist/styles/components/diagrams/index.scss +4 -0
- package/dist/styles/graphs/_alluvial.scss +17 -0
- package/dist/styles/graphs/_bullet.scss +36 -0
- package/dist/styles/graphs/_choropleth.scss +18 -0
- package/dist/styles/graphs/_circle-pack.scss +36 -0
- package/dist/styles/graphs/_gauge.scss +23 -0
- package/dist/styles/graphs/_heatmap.scss +60 -0
- package/dist/styles/graphs/_meter.scss +34 -0
- package/dist/styles/graphs/_radar.scss +18 -0
- package/dist/styles/graphs/_scatter-stacked.scss +12 -0
- package/dist/styles/graphs/_tree.scss +46 -0
- package/dist/styles/graphs/index.scss +19 -0
- package/dist/styles/styles.scss +40 -0
- package/dist/styles/tokens.scss +407 -0
- package/dist/styles.css +28463 -0
- package/dist/styles.css.map +1 -0
- package/dist/styles.min.css +1 -0
- package/dist/styles.min.css.map +1 -0
- package/dist/tools.d.ts +150 -0
- package/package.json +140 -101
- package/axis-chart.d.ts +0 -10
- package/axis-chart.js +0 -169
- package/axis-chart.js.map +0 -1
- package/build/demo/create-codesandbox.d.ts +0 -113
- package/build/demo/data/CHART_TYPES.d.ts +0 -123
- package/build/demo/data/alluvial.d.ts +0 -109
- package/build/demo/data/area.d.ts +0 -224
- package/build/demo/data/bar.d.ts +0 -681
- package/build/demo/data/boxplot.d.ts +0 -34
- package/build/demo/data/bubble.d.ts +0 -141
- package/build/demo/data/bullet.d.ts +0 -24
- package/build/demo/data/circle-pack.d.ts +0 -91
- package/build/demo/data/combo.d.ts +0 -482
- package/build/demo/data/donut.d.ts +0 -64
- package/build/demo/data/gauge.d.ts +0 -40
- package/build/demo/data/heatmap.d.ts +0 -125
- package/build/demo/data/high-scale.d.ts +0 -1
- package/build/demo/data/hightlight.d.ts +0 -40
- package/build/demo/data/histogram.d.ts +0 -63
- package/build/demo/data/index.d.ts +0 -32
- package/build/demo/data/line.d.ts +0 -361
- package/build/demo/data/lollipop.d.ts +0 -39
- package/build/demo/data/meter.d.ts +0 -95
- package/build/demo/data/pie.d.ts +0 -46
- package/build/demo/data/radar.d.ts +0 -63
- package/build/demo/data/scatter.d.ts +0 -118
- package/build/demo/data/step.d.ts +0 -96
- package/build/demo/data/time-series-axis.d.ts +0 -368
- package/build/demo/data/toolbar.d.ts +0 -12
- package/build/demo/data/tree.d.ts +0 -30
- package/build/demo/data/treemap.d.ts +0 -15
- package/build/demo/data/wordcloud.d.ts +0 -14
- package/build/demo/data/zoom-bar.d.ts +0 -94
- package/build/demo/utils.d.ts +0 -40
- package/build/src/axis-chart.d.ts +0 -10
- package/build/src/chart.d.ts +0 -14
- package/build/src/charts/alluvial.d.ts +0 -8
- package/build/src/charts/area-stacked.d.ts +0 -6
- package/build/src/charts/area.d.ts +0 -6
- package/build/src/charts/bar-grouped.d.ts +0 -6
- package/build/src/charts/bar-simple.d.ts +0 -6
- package/build/src/charts/bar-stacked.d.ts +0 -6
- package/build/src/charts/boxplot.d.ts +0 -8
- package/build/src/charts/bubble.d.ts +0 -6
- package/build/src/charts/bullet.d.ts +0 -8
- package/build/src/charts/circle-pack.d.ts +0 -8
- package/build/src/charts/combo.d.ts +0 -7
- package/build/src/charts/donut.d.ts +0 -6
- package/build/src/charts/gauge.d.ts +0 -8
- package/build/src/charts/heatmap.d.ts +0 -10
- package/build/src/charts/histogram.d.ts +0 -8
- package/build/src/charts/index.d.ts +0 -24
- package/build/src/charts/line.d.ts +0 -6
- package/build/src/charts/lollipop.d.ts +0 -6
- package/build/src/charts/meter.d.ts +0 -8
- package/build/src/charts/pie.d.ts +0 -8
- package/build/src/charts/radar.d.ts +0 -8
- package/build/src/charts/scatter.d.ts +0 -6
- package/build/src/charts/tree.d.ts +0 -8
- package/build/src/charts/treemap.d.ts +0 -8
- package/build/src/charts/wordcloud.d.ts +0 -8
- package/build/src/components/axes/axis.d.ts +0 -24
- package/build/src/components/axes/chart-clip.d.ts +0 -13
- package/build/src/components/axes/grid-brush.d.ts +0 -10
- package/build/src/components/axes/grid.d.ts +0 -22
- package/build/src/components/axes/hover-axis.d.ts +0 -10
- package/build/src/components/axes/ruler-binned.d.ts +0 -7
- package/build/src/components/axes/ruler-stacked.d.ts +0 -4
- package/build/src/components/axes/ruler.d.ts +0 -27
- package/build/src/components/axes/toolbar.d.ts +0 -40
- package/build/src/components/axes/two-dimensional-axes.d.ts +0 -16
- package/build/src/components/axes/zero-line.d.ts +0 -7
- package/build/src/components/axes/zoom-bar.d.ts +0 -28
- package/build/src/components/component.d.ts +0 -28
- package/build/src/components/diagrams/buildPaths.d.ts +0 -63
- package/build/src/components/diagrams/markerDefinitions.d.ts +0 -37
- package/build/src/components/essentials/canvas-chart-clip.d.ts +0 -6
- package/build/src/components/essentials/color-scale-legend.d.ts +0 -17
- package/build/src/components/essentials/highlights.d.ts +0 -13
- package/build/src/components/essentials/legend.d.ts +0 -11
- package/build/src/components/essentials/modal.d.ts +0 -14
- package/build/src/components/essentials/threshold.d.ts +0 -20
- package/build/src/components/essentials/title-meter.d.ts +0 -30
- package/build/src/components/essentials/title.d.ts +0 -20
- package/build/src/components/essentials/tooltip-axis.d.ts +0 -4
- package/build/src/components/essentials/tooltip.d.ts +0 -22
- package/build/src/components/graphs/alluvial.d.ts +0 -14
- package/build/src/components/graphs/area-stacked.d.ts +0 -11
- package/build/src/components/graphs/area.d.ts +0 -12
- package/build/src/components/graphs/bar-grouped.d.ts +0 -22
- package/build/src/components/graphs/bar-simple.d.ts +0 -12
- package/build/src/components/graphs/bar-stacked.d.ts +0 -13
- package/build/src/components/graphs/bar.d.ts +0 -5
- package/build/src/components/graphs/boxplot.d.ts +0 -9
- package/build/src/components/graphs/bubble.d.ts +0 -13
- package/build/src/components/graphs/bullet.d.ts +0 -12
- package/build/src/components/graphs/circle-pack.d.ts +0 -19
- package/build/src/components/graphs/donut.d.ts +0 -9
- package/build/src/components/graphs/gauge.d.ts +0 -27
- package/build/src/components/graphs/heatmap.d.ts +0 -25
- package/build/src/components/graphs/histogram.d.ts +0 -12
- package/build/src/components/graphs/line.d.ts +0 -11
- package/build/src/components/graphs/lollipop.d.ts +0 -14
- package/build/src/components/graphs/meter.d.ts +0 -10
- package/build/src/components/graphs/pie.d.ts +0 -16
- package/build/src/components/graphs/radar.d.ts +0 -25
- package/build/src/components/graphs/scatter-stacked.d.ts +0 -8
- package/build/src/components/graphs/scatter.d.ts +0 -21
- package/build/src/components/graphs/skeleton-lines.d.ts +0 -11
- package/build/src/components/graphs/skeleton.d.ts +0 -22
- package/build/src/components/graphs/tree.d.ts +0 -9
- package/build/src/components/graphs/treemap.d.ts +0 -11
- package/build/src/components/graphs/wordcloud.d.ts +0 -12
- package/build/src/components/index.d.ts +0 -51
- package/build/src/components/layout/layout.d.ts +0 -17
- package/build/src/components/layout/spacer.d.ts +0 -5
- package/build/src/configuration-non-customizable.d.ts +0 -263
- package/build/src/configuration.d.ts +0 -44
- package/build/src/interfaces/a11y.d.ts +0 -12
- package/build/src/interfaces/axis-scales.d.ts +0 -201
- package/build/src/interfaces/charts.d.ts +0 -485
- package/build/src/interfaces/components.d.ts +0 -231
- package/build/src/interfaces/enums.d.ts +0 -249
- package/build/src/interfaces/events.d.ts +0 -230
- package/build/src/interfaces/index.d.ts +0 -7
- package/build/src/interfaces/layout.d.ts +0 -15
- package/build/src/interfaces/model.d.ts +0 -35
- package/build/src/interfaces/truncation.d.ts +0 -17
- package/build/src/model/alluvial.d.ts +0 -8
- package/build/src/model/binned-charts.d.ts +0 -7
- package/build/src/model/boxplot.d.ts +0 -14
- package/build/src/model/bullet.d.ts +0 -14
- package/build/src/model/cartesian-charts.d.ts +0 -24
- package/build/src/model/circle-pack.d.ts +0 -36
- package/build/src/model/gauge.d.ts +0 -9
- package/build/src/model/heatmap.d.ts +0 -57
- package/build/src/model/meter.d.ts +0 -19
- package/build/src/model/model.d.ts +0 -107
- package/build/src/model/pie.d.ts +0 -9
- package/build/src/model/radar.d.ts +0 -7
- package/build/src/model/tree.d.ts +0 -14
- package/build/src/model/treemap.d.ts +0 -8
- package/build/src/model/wordcloud.d.ts +0 -7
- package/build/src/services/angle-utils.d.ts +0 -205
- package/build/src/services/canvas-zoom.d.ts +0 -11
- package/build/src/services/curves.d.ts +0 -25
- package/build/src/services/essentials/dom-utils.d.ts +0 -39
- package/build/src/services/essentials/events.d.ts +0 -8
- package/build/src/services/essentials/files.d.ts +0 -6
- package/build/src/services/essentials/gradient-utils.d.ts +0 -6
- package/build/src/services/essentials/transitions.d.ts +0 -13
- package/build/src/services/index.d.ts +0 -9
- package/build/src/services/scales-cartesian.d.ts +0 -86
- package/build/src/services/service.d.ts +0 -10
- package/build/src/services/time-series.d.ts +0 -787
- package/build/src/services/zoom.d.ts +0 -21
- package/build/src/tools.d.ts +0 -2427
- package/build/stories/all.stories.d.ts +0 -1
- package/build/stories/tutorials/api.d.ts +0 -4
- package/build/stories/tutorials/color-palette.d.ts +0 -4
- package/build/stories/tutorials/combo-charts.d.ts +0 -4
- package/build/stories/tutorials/dual-axes.d.ts +0 -4
- package/build/stories/tutorials/event-listeners.d.ts +0 -4
- package/build/stories/tutorials/getting-started/angular.d.ts +0 -5
- package/build/stories/tutorials/getting-started/react.d.ts +0 -5
- package/build/stories/tutorials/getting-started/vanilla.d.ts +0 -5
- package/build/stories/tutorials/getting-started/vue.d.ts +0 -5
- package/build/stories/tutorials/index.d.ts +0 -11
- package/build/stories/tutorials/tabular-data-format.d.ts +0 -4
- package/build/stories/tutorials/themes.d.ts +0 -4
- package/build/stories/tutorials.stories.d.ts +0 -1
- package/bundle.js +0 -17
- package/chart.d.ts +0 -14
- package/chart.js +0 -198
- package/chart.js.map +0 -1
- package/charts/alluvial.d.ts +0 -8
- package/charts/alluvial.js +0 -46
- package/charts/alluvial.js.map +0 -1
- package/charts/area-stacked.d.ts +0 -6
- package/charts/area-stacked.js +0 -55
- package/charts/area-stacked.js.map +0 -1
- package/charts/area.d.ts +0 -6
- package/charts/area.js +0 -54
- package/charts/area.js.map +0 -1
- package/charts/bar-grouped.d.ts +0 -6
- package/charts/bar-grouped.js +0 -49
- package/charts/bar-grouped.js.map +0 -1
- package/charts/bar-simple.d.ts +0 -6
- package/charts/bar-simple.js +0 -49
- package/charts/bar-simple.js.map +0 -1
- package/charts/bar-stacked.d.ts +0 -6
- package/charts/bar-stacked.js +0 -50
- package/charts/bar-stacked.js.map +0 -1
- package/charts/boxplot.d.ts +0 -8
- package/charts/boxplot.js +0 -55
- package/charts/boxplot.js.map +0 -1
- package/charts/bubble.d.ts +0 -6
- package/charts/bubble.js +0 -49
- package/charts/bubble.js.map +0 -1
- package/charts/bullet.d.ts +0 -8
- package/charts/bullet.js +0 -50
- package/charts/bullet.js.map +0 -1
- package/charts/circle-pack.d.ts +0 -8
- package/charts/circle-pack.js +0 -45
- package/charts/circle-pack.js.map +0 -1
- package/charts/combo.d.ts +0 -7
- package/charts/combo.js +0 -132
- package/charts/combo.js.map +0 -1
- package/charts/donut.d.ts +0 -6
- package/charts/donut.js +0 -46
- package/charts/donut.js.map +0 -1
- package/charts/gauge.d.ts +0 -8
- package/charts/gauge.js +0 -42
- package/charts/gauge.js.map +0 -1
- package/charts/heatmap.d.ts +0 -10
- package/charts/heatmap.js +0 -138
- package/charts/heatmap.js.map +0 -1
- package/charts/histogram.d.ts +0 -8
- package/charts/histogram.js +0 -48
- package/charts/histogram.js.map +0 -1
- package/charts/index.d.ts +0 -24
- package/charts/index.js +0 -25
- package/charts/index.js.map +0 -1
- package/charts/line.d.ts +0 -6
- package/charts/line.js +0 -48
- package/charts/line.js.map +0 -1
- package/charts/lollipop.d.ts +0 -6
- package/charts/lollipop.js +0 -50
- package/charts/lollipop.js.map +0 -1
- package/charts/meter.d.ts +0 -8
- package/charts/meter.js +0 -94
- package/charts/meter.js.map +0 -1
- package/charts/pie.d.ts +0 -8
- package/charts/pie.js +0 -55
- package/charts/pie.js.map +0 -1
- package/charts/radar.d.ts +0 -8
- package/charts/radar.js +0 -44
- package/charts/radar.js.map +0 -1
- package/charts/scatter.d.ts +0 -6
- package/charts/scatter.js +0 -49
- package/charts/scatter.js.map +0 -1
- package/charts/tree.d.ts +0 -8
- package/charts/tree.js +0 -47
- package/charts/tree.js.map +0 -1
- package/charts/treemap.d.ts +0 -8
- package/charts/treemap.js +0 -43
- package/charts/treemap.js.map +0 -1
- package/charts/wordcloud.d.ts +0 -8
- package/charts/wordcloud.js +0 -49
- package/charts/wordcloud.js.map +0 -1
- package/components/axes/axis.d.ts +0 -24
- package/components/axes/axis.js +0 -587
- package/components/axes/axis.js.map +0 -1
- package/components/axes/chart-clip.d.ts +0 -13
- package/components/axes/chart-clip.js +0 -63
- package/components/axes/chart-clip.js.map +0 -1
- package/components/axes/grid-brush.d.ts +0 -10
- package/components/axes/grid-brush.js +0 -170
- package/components/axes/grid-brush.js.map +0 -1
- package/components/axes/grid.d.ts +0 -22
- package/components/axes/grid.js +0 -235
- package/components/axes/grid.js.map +0 -1
- package/components/axes/hover-axis.js +0 -243
- package/components/axes/hover-axis.js.map +0 -1
- package/components/axes/ruler-binned.d.ts +0 -7
- package/components/axes/ruler-binned.js +0 -136
- package/components/axes/ruler-binned.js.map +0 -1
- package/components/axes/ruler-stacked.js +0 -26
- package/components/axes/ruler-stacked.js.map +0 -1
- package/components/axes/ruler.d.ts +0 -27
- package/components/axes/ruler.js +0 -209
- package/components/axes/ruler.js.map +0 -1
- package/components/axes/toolbar.d.ts +0 -40
- package/components/axes/toolbar.js +0 -558
- package/components/axes/toolbar.js.map +0 -1
- package/components/axes/two-dimensional-axes.d.ts +0 -16
- package/components/axes/two-dimensional-axes.js +0 -134
- package/components/axes/two-dimensional-axes.js.map +0 -1
- package/components/axes/zero-line.d.ts +0 -7
- package/components/axes/zero-line.js +0 -76
- package/components/axes/zero-line.js.map +0 -1
- package/components/axes/zoom-bar.d.ts +0 -28
- package/components/axes/zoom-bar.js +0 -490
- package/components/axes/zoom-bar.js.map +0 -1
- package/components/component.d.ts +0 -28
- package/components/component.js +0 -102
- package/components/component.js.map +0 -1
- package/components/diagrams/buildPaths.d.ts +0 -39
- package/components/diagrams/buildPaths.js +0 -71
- package/components/diagrams/buildPaths.js.map +0 -1
- package/components/diagrams/markerDefinitions.js +0 -38
- package/components/diagrams/markerDefinitions.js.map +0 -1
- package/components/essentials/canvas-chart-clip.d.ts +0 -6
- package/components/essentials/canvas-chart-clip.js +0 -46
- package/components/essentials/canvas-chart-clip.js.map +0 -1
- package/components/essentials/color-scale-legend.d.ts +0 -17
- package/components/essentials/color-scale-legend.js +0 -230
- package/components/essentials/color-scale-legend.js.map +0 -1
- package/components/essentials/highlights.d.ts +0 -13
- package/components/essentials/highlights.js +0 -196
- package/components/essentials/highlights.js.map +0 -1
- package/components/essentials/legend.d.ts +0 -11
- package/components/essentials/legend.js +0 -428
- package/components/essentials/legend.js.map +0 -1
- package/components/essentials/modal.d.ts +0 -14
- package/components/essentials/modal.js +0 -89
- package/components/essentials/modal.js.map +0 -1
- package/components/essentials/threshold.d.ts +0 -20
- package/components/essentials/threshold.js +0 -306
- package/components/essentials/threshold.js.map +0 -1
- package/components/essentials/title-meter.d.ts +0 -30
- package/components/essentials/title-meter.js +0 -279
- package/components/essentials/title-meter.js.map +0 -1
- package/components/essentials/title.d.ts +0 -20
- package/components/essentials/title.js +0 -138
- package/components/essentials/title.js.map +0 -1
- package/components/essentials/tooltip-axis.js +0 -142
- package/components/essentials/tooltip-axis.js.map +0 -1
- package/components/essentials/tooltip.d.ts +0 -22
- package/components/essentials/tooltip.js +0 -263
- package/components/essentials/tooltip.js.map +0 -1
- package/components/graphs/alluvial.d.ts +0 -14
- package/components/graphs/alluvial.js +0 -535
- package/components/graphs/alluvial.js.map +0 -1
- package/components/graphs/area-stacked.d.ts +0 -11
- package/components/graphs/area-stacked.js +0 -131
- package/components/graphs/area-stacked.js.map +0 -1
- package/components/graphs/area.d.ts +0 -12
- package/components/graphs/area.js +0 -260
- package/components/graphs/area.js.map +0 -1
- package/components/graphs/bar-grouped.d.ts +0 -22
- package/components/graphs/bar-grouped.js +0 -312
- package/components/graphs/bar-grouped.js.map +0 -1
- package/components/graphs/bar-simple.d.ts +0 -12
- package/components/graphs/bar-simple.js +0 -218
- package/components/graphs/bar-simple.js.map +0 -1
- package/components/graphs/bar-stacked.d.ts +0 -13
- package/components/graphs/bar-stacked.js +0 -281
- package/components/graphs/bar-stacked.js.map +0 -1
- package/components/graphs/bar.d.ts +0 -5
- package/components/graphs/bar.js +0 -58
- package/components/graphs/bar.js.map +0 -1
- package/components/graphs/boxplot.d.ts +0 -9
- package/components/graphs/boxplot.js +0 -485
- package/components/graphs/boxplot.js.map +0 -1
- package/components/graphs/bubble.d.ts +0 -13
- package/components/graphs/bubble.js +0 -113
- package/components/graphs/bubble.js.map +0 -1
- package/components/graphs/bullet.d.ts +0 -12
- package/components/graphs/bullet.js +0 -395
- package/components/graphs/bullet.js.map +0 -1
- package/components/graphs/circle-pack.d.ts +0 -19
- package/components/graphs/circle-pack.js +0 -388
- package/components/graphs/circle-pack.js.map +0 -1
- package/components/graphs/donut.d.ts +0 -9
- package/components/graphs/donut.js +0 -116
- package/components/graphs/donut.js.map +0 -1
- package/components/graphs/gauge.d.ts +0 -27
- package/components/graphs/gauge.js +0 -347
- package/components/graphs/gauge.js.map +0 -1
- package/components/graphs/heatmap.d.ts +0 -25
- package/components/graphs/heatmap.js +0 -388
- package/components/graphs/heatmap.js.map +0 -1
- package/components/graphs/histogram.d.ts +0 -12
- package/components/graphs/histogram.js +0 -220
- package/components/graphs/histogram.js.map +0 -1
- package/components/graphs/line.d.ts +0 -11
- package/components/graphs/line.js +0 -179
- package/components/graphs/line.js.map +0 -1
- package/components/graphs/lollipop.d.ts +0 -14
- package/components/graphs/lollipop.js +0 -164
- package/components/graphs/lollipop.js.map +0 -1
- package/components/graphs/meter.d.ts +0 -10
- package/components/graphs/meter.js +0 -284
- package/components/graphs/meter.js.map +0 -1
- package/components/graphs/pie.d.ts +0 -16
- package/components/graphs/pie.js +0 -438
- package/components/graphs/pie.js.map +0 -1
- package/components/graphs/radar.d.ts +0 -25
- package/components/graphs/radar.js +0 -737
- package/components/graphs/radar.js.map +0 -1
- package/components/graphs/scatter-stacked.d.ts +0 -8
- package/components/graphs/scatter-stacked.js +0 -140
- package/components/graphs/scatter-stacked.js.map +0 -1
- package/components/graphs/scatter.d.ts +0 -21
- package/components/graphs/scatter.js +0 -360
- package/components/graphs/scatter.js.map +0 -1
- package/components/graphs/skeleton-lines.d.ts +0 -11
- package/components/graphs/skeleton-lines.js +0 -84
- package/components/graphs/skeleton-lines.js.map +0 -1
- package/components/graphs/skeleton.d.ts +0 -22
- package/components/graphs/skeleton.js +0 -272
- package/components/graphs/skeleton.js.map +0 -1
- package/components/graphs/tree.d.ts +0 -9
- package/components/graphs/tree.js +0 -262
- package/components/graphs/tree.js.map +0 -1
- package/components/graphs/treemap.d.ts +0 -11
- package/components/graphs/treemap.js +0 -344
- package/components/graphs/treemap.js.map +0 -1
- package/components/graphs/wordcloud.d.ts +0 -12
- package/components/graphs/wordcloud.js +0 -268
- package/components/graphs/wordcloud.js.map +0 -1
- package/components/index.d.ts +0 -51
- package/components/index.js +0 -57
- package/components/index.js.map +0 -1
- package/components/layout/layout.d.ts +0 -17
- package/components/layout/layout.js +0 -191
- package/components/layout/layout.js.map +0 -1
- package/components/layout/spacer.d.ts +0 -5
- package/components/layout/spacer.js +0 -33
- package/components/layout/spacer.js.map +0 -1
- package/configuration-non-customizable.d.ts +0 -263
- package/configuration-non-customizable.js +0 -276
- package/configuration-non-customizable.js.map +0 -1
- package/configuration.d.ts +0 -44
- package/configuration.js +0 -535
- package/configuration.js.map +0 -1
- package/demo/create-codesandbox.d.ts +0 -65
- package/demo/create-codesandbox.js +0 -155
- package/demo/create-codesandbox.js.map +0 -1
- package/demo/data/CHART_TYPES.d.ts +0 -123
- package/demo/data/CHART_TYPES.js +0 -123
- package/demo/data/CHART_TYPES.js.map +0 -1
- package/demo/data/alluvial.d.ts +0 -109
- package/demo/data/alluvial.js +0 -328
- package/demo/data/alluvial.js.map +0 -1
- package/demo/data/area.d.ts +0 -224
- package/demo/data/area.js +0 -330
- package/demo/data/area.js.map +0 -1
- package/demo/data/bar.d.ts +0 -681
- package/demo/data/bar.js +0 -915
- package/demo/data/bar.js.map +0 -1
- package/demo/data/boxplot.d.ts +0 -34
- package/demo/data/boxplot.js +0 -48
- package/demo/data/boxplot.js.map +0 -1
- package/demo/data/bubble.d.ts +0 -141
- package/demo/data/bubble.js +0 -182
- package/demo/data/bubble.js.map +0 -1
- package/demo/data/bullet.d.ts +0 -24
- package/demo/data/bullet.js +0 -55
- package/demo/data/bullet.js.map +0 -1
- package/demo/data/bundle.js +0 -1
- package/demo/data/circle-pack.d.ts +0 -91
- package/demo/data/circle-pack.js +0 -224
- package/demo/data/circle-pack.js.map +0 -1
- package/demo/data/combo.d.ts +0 -482
- package/demo/data/combo.js +0 -571
- package/demo/data/combo.js.map +0 -1
- package/demo/data/donut.d.ts +0 -64
- package/demo/data/donut.js +0 -60
- package/demo/data/donut.js.map +0 -1
- package/demo/data/gauge.d.ts +0 -40
- package/demo/data/gauge.js +0 -41
- package/demo/data/gauge.js.map +0 -1
- package/demo/data/heatmap.d.ts +0 -125
- package/demo/data/heatmap.js +0 -1149
- package/demo/data/heatmap.js.map +0 -1
- package/demo/data/high-scale.d.ts +0 -1
- package/demo/data/high-scale.js +0 -5
- package/demo/data/high-scale.js.map +0 -1
- package/demo/data/hightlight.d.ts +0 -40
- package/demo/data/hightlight.js +0 -44
- package/demo/data/hightlight.js.map +0 -1
- package/demo/data/histogram.d.ts +0 -63
- package/demo/data/histogram.js +0 -312
- package/demo/data/histogram.js.map +0 -1
- package/demo/data/index.d.ts +0 -32
- package/demo/data/index.js +0 -1265
- package/demo/data/index.js.map +0 -1
- package/demo/data/line.d.ts +0 -361
- package/demo/data/line.js +0 -480
- package/demo/data/line.js.map +0 -1
- package/demo/data/lollipop.d.ts +0 -39
- package/demo/data/lollipop.js +0 -37
- package/demo/data/lollipop.js.map +0 -1
- package/demo/data/meter.d.ts +0 -95
- package/demo/data/meter.js +0 -114
- package/demo/data/meter.js.map +0 -1
- package/demo/data/pie.d.ts +0 -46
- package/demo/data/pie.js +0 -55
- package/demo/data/pie.js.map +0 -1
- package/demo/data/radar.d.ts +0 -63
- package/demo/data/radar.js +0 -118
- package/demo/data/radar.js.map +0 -1
- package/demo/data/scatter.d.ts +0 -118
- package/demo/data/scatter.js +0 -143
- package/demo/data/scatter.js.map +0 -1
- package/demo/data/step.d.ts +0 -96
- package/demo/data/step.js +0 -27
- package/demo/data/step.js.map +0 -1
- package/demo/data/time-series-axis.d.ts +0 -368
- package/demo/data/time-series-axis.js +0 -436
- package/demo/data/time-series-axis.js.map +0 -1
- package/demo/data/toolbar.d.ts +0 -12
- package/demo/data/toolbar.js +0 -67
- package/demo/data/toolbar.js.map +0 -1
- package/demo/data/tree.d.ts +0 -30
- package/demo/data/tree.js +0 -209
- package/demo/data/tree.js.map +0 -1
- package/demo/data/treemap.d.ts +0 -15
- package/demo/data/treemap.js +0 -93
- package/demo/data/treemap.js.map +0 -1
- package/demo/data/wordcloud.d.ts +0 -14
- package/demo/data/wordcloud.js +0 -105
- package/demo/data/wordcloud.js.map +0 -1
- package/demo/data/zoom-bar.d.ts +0 -94
- package/demo/data/zoom-bar.js +0 -187
- package/demo/data/zoom-bar.js.map +0 -1
- package/demo/styles.css +0 -31006
- package/demo/styles.css.map +0 -1
- package/demo/styles.min.css +0 -1
- package/demo/styles.min.css.map +0 -1
- package/demo/tsconfig.tsbuildinfo +0 -1432
- package/demo/utils.d.ts +0 -24
- package/demo/utils.js +0 -194
- package/demo/utils.js.map +0 -1
- package/index.d.ts +0 -4
- package/index.js +0 -6
- package/index.js.map +0 -1
- package/interfaces/a11y.js +0 -14
- package/interfaces/a11y.js.map +0 -1
- package/interfaces/axis-scales.d.ts +0 -201
- package/interfaces/axis-scales.js +0 -1
- package/interfaces/axis-scales.js.map +0 -1
- package/interfaces/charts.d.ts +0 -485
- package/interfaces/charts.js +0 -1
- package/interfaces/charts.js.map +0 -1
- package/interfaces/components.d.ts +0 -231
- package/interfaces/components.js +0 -1
- package/interfaces/components.js.map +0 -1
- package/interfaces/enums.d.ts +0 -249
- package/interfaces/enums.js +0 -280
- package/interfaces/enums.js.map +0 -1
- package/interfaces/events.d.ts +0 -230
- package/interfaces/events.js +0 -259
- package/interfaces/events.js.map +0 -1
- package/interfaces/index.d.ts +0 -7
- package/interfaces/index.js +0 -3
- package/interfaces/index.js.map +0 -1
- package/interfaces/layout.d.ts +0 -15
- package/interfaces/layout.js +0 -1
- package/interfaces/layout.js.map +0 -1
- package/interfaces/model.d.ts +0 -35
- package/interfaces/model.js +0 -1
- package/interfaces/model.js.map +0 -1
- package/interfaces/truncation.d.ts +0 -17
- package/interfaces/truncation.js +0 -1
- package/interfaces/truncation.js.map +0 -1
- package/model/alluvial.js +0 -47
- package/model/alluvial.js.map +0 -1
- package/model/binned-charts.d.ts +0 -7
- package/model/binned-charts.js +0 -52
- package/model/binned-charts.js.map +0 -1
- package/model/boxplot.js +0 -174
- package/model/boxplot.js.map +0 -1
- package/model/bullet.js +0 -74
- package/model/bullet.js.map +0 -1
- package/model/cartesian-charts.d.ts +0 -24
- package/model/cartesian-charts.js +0 -202
- package/model/cartesian-charts.js.map +0 -1
- package/model/circle-pack.js +0 -189
- package/model/circle-pack.js.map +0 -1
- package/model/gauge.js +0 -51
- package/model/gauge.js.map +0 -1
- package/model/heatmap.d.ts +0 -57
- package/model/heatmap.js +0 -281
- package/model/heatmap.js.map +0 -1
- package/model/meter.d.ts +0 -19
- package/model/meter.js +0 -118
- package/model/meter.js.map +0 -1
- package/model/model.d.ts +0 -107
- package/model/model.js +0 -712
- package/model/model.js.map +0 -1
- package/model/pie.js +0 -66
- package/model/pie.js.map +0 -1
- package/model/radar.js +0 -52
- package/model/radar.js.map +0 -1
- package/model/tree.js +0 -56
- package/model/tree.js.map +0 -1
- package/model/treemap.js +0 -44
- package/model/treemap.js.map +0 -1
- package/model/wordcloud.js +0 -47
- package/model/wordcloud.js.map +0 -1
- package/polyfills.d.ts +0 -0
- package/polyfills.js +0 -29
- package/polyfills.js.map +0 -1
- package/services/angle-utils.d.ts +0 -16
- package/services/angle-utils.js +0 -82
- package/services/angle-utils.js.map +0 -1
- package/services/canvas-zoom.js +0 -72
- package/services/canvas-zoom.js.map +0 -1
- package/services/curves.d.ts +0 -25
- package/services/curves.js +0 -77
- package/services/curves.js.map +0 -1
- package/services/essentials/dom-utils.d.ts +0 -39
- package/services/essentials/dom-utils.js +0 -423
- package/services/essentials/dom-utils.js.map +0 -1
- package/services/essentials/events.d.ts +0 -8
- package/services/essentials/events.js +0 -53
- package/services/essentials/events.js.map +0 -1
- package/services/essentials/files.d.ts +0 -6
- package/services/essentials/files.js +0 -60
- package/services/essentials/files.js.map +0 -1
- package/services/essentials/gradient-utils.d.ts +0 -6
- package/services/essentials/gradient-utils.js +0 -85
- package/services/essentials/gradient-utils.js.map +0 -1
- package/services/essentials/transitions.d.ts +0 -13
- package/services/essentials/transitions.js +0 -51
- package/services/essentials/transitions.js.map +0 -1
- package/services/index.d.ts +0 -9
- package/services/index.js +0 -12
- package/services/index.js.map +0 -1
- package/services/scales-cartesian.d.ts +0 -86
- package/services/scales-cartesian.js +0 -656
- package/services/scales-cartesian.js.map +0 -1
- package/services/service.d.ts +0 -10
- package/services/service.js +0 -24
- package/services/service.js.map +0 -1
- package/services/time-series.js +0 -147
- package/services/time-series.js.map +0 -1
- package/services/zoom.d.ts +0 -21
- package/services/zoom.js +0 -217
- package/services/zoom.js.map +0 -1
- package/styles/_chart-holder.scss +0 -50
- package/styles/color-palatte.scss +0 -362
- package/styles/colors.scss +0 -140
- package/styles/components/_color-legend.scss +0 -11
- package/styles/components/_edge.scss +0 -65
- package/styles/components/_grid.scss +0 -30
- package/styles/components/_marker.scss +0 -7
- package/styles/components/_meter-title.scss +0 -37
- package/styles/components/_tooltip.scss +0 -132
- package/styles/components/diagrams/_card-node.scss +0 -97
- package/styles/components/diagrams/_edge.scss +0 -66
- package/styles/components/diagrams/_shape-node.scss +0 -89
- package/styles/components/diagrams/index.scss +0 -4
- package/styles/graphs/_alluvial.scss +0 -17
- package/styles/graphs/_bullet.scss +0 -36
- package/styles/graphs/_circle-pack.scss +0 -36
- package/styles/graphs/_gauge.scss +0 -23
- package/styles/graphs/_heatmap.scss +0 -60
- package/styles/graphs/_meter.scss +0 -34
- package/styles/graphs/_radar.scss +0 -18
- package/styles/graphs/_scatter-stacked.scss +0 -12
- package/styles/graphs/_tree.scss +0 -47
- package/styles/graphs/index.scss +0 -18
- package/styles/styles.scss +0 -35
- package/styles/tokens.scss +0 -416
- package/styles.css +0 -6313
- package/styles.css.map +0 -1
- package/styles.min.css +0 -1
- package/styles.min.css.map +0 -1
- package/tools.d.ts +0 -144
- package/tools.js +0 -348
- package/tools.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -3444
- /package/{components → dist/components}/axes/hover-axis.d.ts +0 -0
- /package/{components → dist/components}/axes/ruler-stacked.d.ts +0 -0
- /package/{components → dist/components}/diagrams/markerDefinitions.d.ts +0 -0
- /package/{components → dist/components}/essentials/tooltip-axis.d.ts +0 -0
- /package/{interfaces → dist/interfaces}/a11y.d.ts +0 -0
- /package/{model → dist/model}/alluvial.d.ts +0 -0
- /package/{model → dist/model}/boxplot.d.ts +0 -0
- /package/{model → dist/model}/bullet.d.ts +0 -0
- /package/{model → dist/model}/circle-pack.d.ts +0 -0
- /package/{model → dist/model}/gauge.d.ts +0 -0
- /package/{model → dist/model}/pie.d.ts +0 -0
- /package/{model → dist/model}/radar.d.ts +0 -0
- /package/{model → dist/model}/tree.d.ts +0 -0
- /package/{model → dist/model}/treemap.d.ts +0 -0
- /package/{model → dist/model}/wordcloud.d.ts +0 -0
- /package/{services → dist/services}/canvas-zoom.d.ts +0 -0
- /package/{services → dist/services}/time-series.d.ts +0 -0
- /package/{styles → dist/styles}/_type.scss +0 -0
- /package/{styles → dist/styles}/components/_axis.scss +0 -0
- /package/{styles → dist/styles}/components/_callouts.scss +0 -0
- /package/{styles → dist/styles}/components/_grid-brush.scss +0 -0
- /package/{styles → dist/styles}/components/_highlights.scss +0 -0
- /package/{styles → dist/styles}/components/_layout.scss +0 -0
- /package/{styles → dist/styles}/components/_legend.scss +0 -0
- /package/{styles → dist/styles}/components/_modal.scss +0 -0
- /package/{styles → dist/styles}/components/_ruler.scss +0 -0
- /package/{styles → dist/styles}/components/_skeleton-lines.scss +0 -0
- /package/{styles → dist/styles}/components/_skeleton.scss +0 -0
- /package/{styles → dist/styles}/components/_threshold.scss +0 -0
- /package/{styles → dist/styles}/components/_title.scss +0 -0
- /package/{styles → dist/styles}/components/_toolbar.scss +0 -0
- /package/{styles → dist/styles}/components/_zero-line.scss +0 -0
- /package/{styles → dist/styles}/components/_zoom-bar.scss +0 -0
- /package/{styles → dist/styles}/components/diagrams/_marker.scss +0 -0
- /package/{styles → dist/styles}/components/index.scss +0 -0
- /package/{styles → dist/styles}/graphs/_area.scss +0 -0
- /package/{styles → dist/styles}/graphs/_bubble.scss +0 -0
- /package/{styles → dist/styles}/graphs/_donut.scss +0 -0
- /package/{styles → dist/styles}/graphs/_line.scss +0 -0
- /package/{styles → dist/styles}/graphs/_lollipop.scss +0 -0
- /package/{styles → dist/styles}/graphs/_pie.scss +0 -0
- /package/{styles → dist/styles}/graphs/_scatter.scss +0 -0
- /package/{styles → dist/styles}/graphs/_treemap.scss +0 -0
- /package/{styles → dist/styles}/graphs/_wordcloud.scss +0 -0
|
@@ -0,0 +1,1107 @@
|
|
|
1
|
+
import { U as z, W as F, ad as U, g as u, z as S, f as G, y as j, ab as M, N as k, ae as L, h as _, v as V, a2 as K, a3 as y, P as R, a0 as x } from "../color-scale-utils-5eb3eeaa.mjs";
|
|
2
|
+
import { bin as Z, stack as A, stackOffsetDiverging as H, scaleOrdinal as $, quantile as E, ascending as Q, min as P, max as N, extent as W, scaleLinear as X, scaleQuantize as Y } from "d3";
|
|
3
|
+
import { S as D, _ as B, d as w, e as O, s as J } from "../enums-a96ef472.mjs";
|
|
4
|
+
import { b as tt } from "../_baseEach-603421de.mjs";
|
|
5
|
+
import "../index-becfb567.mjs";
|
|
6
|
+
function et(h, t, e, s) {
|
|
7
|
+
for (var a = -1, o = h == null ? 0 : h.length; ++a < o; ) {
|
|
8
|
+
var i = h[a];
|
|
9
|
+
t(s, i, e(i), h);
|
|
10
|
+
}
|
|
11
|
+
return s;
|
|
12
|
+
}
|
|
13
|
+
function st(h, t, e, s) {
|
|
14
|
+
return tt(h, function(a, o, i) {
|
|
15
|
+
t(s, a, e(a), i);
|
|
16
|
+
}), s;
|
|
17
|
+
}
|
|
18
|
+
function at(h, t) {
|
|
19
|
+
return function(e, s) {
|
|
20
|
+
var a = z(e) ? et : st, o = t ? t() : {};
|
|
21
|
+
return a(e, h, F(s), o);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function ot(h) {
|
|
25
|
+
for (var t = -1, e = h == null ? 0 : h.length, s = {}; ++t < e; ) {
|
|
26
|
+
var a = h[t];
|
|
27
|
+
s[a[0]] = a[1];
|
|
28
|
+
}
|
|
29
|
+
return s;
|
|
30
|
+
}
|
|
31
|
+
var it = Object.prototype, rt = it.hasOwnProperty, nt = at(function(h, t, e) {
|
|
32
|
+
rt.call(h, e) ? h[e].push(t) : U(h, e, [t]);
|
|
33
|
+
});
|
|
34
|
+
const lt = nt;
|
|
35
|
+
class m {
|
|
36
|
+
constructor(t) {
|
|
37
|
+
this.state = {
|
|
38
|
+
options: {}
|
|
39
|
+
}, this.colorScale = {}, this.colorClassNames = {}, this.services = t;
|
|
40
|
+
}
|
|
41
|
+
getAllDataFromDomain(t) {
|
|
42
|
+
if (!this.getData())
|
|
43
|
+
return null;
|
|
44
|
+
const e = this.getOptions();
|
|
45
|
+
let s = this.getData();
|
|
46
|
+
const a = this.getDataGroups(), { groupMapsTo: o } = u(e, "data"), i = u(e, "axes");
|
|
47
|
+
return t && (s = s.filter((r) => t.includes(r[o]))), i && Object.keys(i).forEach((r) => {
|
|
48
|
+
const n = i[r].mapsTo, l = i[r].scaleType;
|
|
49
|
+
if ((l === D.LINEAR || l === D.LOG) && (s = s.map((c) => ({
|
|
50
|
+
...c,
|
|
51
|
+
[n]: c[n] === null ? c[n] : Number(c[n])
|
|
52
|
+
}))), n && i[r].domain)
|
|
53
|
+
if (l === D.LABELS)
|
|
54
|
+
s = s.filter(
|
|
55
|
+
(c) => i[r].domain.includes(c[n])
|
|
56
|
+
);
|
|
57
|
+
else {
|
|
58
|
+
const [c, p] = i[r].domain;
|
|
59
|
+
s = s.filter(
|
|
60
|
+
(g) => !(n in g) || g[n] >= c && g[n] <= p
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}), s.filter((r) => a.find((n) => n.name === r[o]));
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Charts that have group configs passed into them, only want to retrieve the display data relevant to that chart
|
|
67
|
+
* @param groups the included datasets for the particular chart
|
|
68
|
+
*/
|
|
69
|
+
getDisplayData(t) {
|
|
70
|
+
if (!this.get("data"))
|
|
71
|
+
return null;
|
|
72
|
+
const { ACTIVE: e } = S.items.status, s = this.getDataGroups(t), { groupMapsTo: a } = this.getOptions().data;
|
|
73
|
+
return this.getAllDataFromDomain(t).filter((i) => s.find(
|
|
74
|
+
(r) => r.name === i[a] && r.status === e
|
|
75
|
+
));
|
|
76
|
+
}
|
|
77
|
+
getData() {
|
|
78
|
+
return this.get("data");
|
|
79
|
+
}
|
|
80
|
+
isDataEmpty() {
|
|
81
|
+
return !this.getData().length;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @param newData The new raw data to be set
|
|
86
|
+
*/
|
|
87
|
+
setData(t) {
|
|
88
|
+
const e = this.sanitize(G(t)), s = this.generateDataGroups(e);
|
|
89
|
+
return this.set({
|
|
90
|
+
data: e,
|
|
91
|
+
dataGroups: s
|
|
92
|
+
}), e;
|
|
93
|
+
}
|
|
94
|
+
getDataGroups(t) {
|
|
95
|
+
return u(this.getOptions(), "data", "loading") ? [] : t ? this.get("dataGroups").filter((s) => t.includes(s.name)) : this.get("dataGroups");
|
|
96
|
+
}
|
|
97
|
+
getActiveDataGroups(t) {
|
|
98
|
+
const { ACTIVE: e } = S.items.status;
|
|
99
|
+
return this.getDataGroups(t).filter((s) => s.status === e);
|
|
100
|
+
}
|
|
101
|
+
getDataGroupNames(t) {
|
|
102
|
+
return this.getDataGroups(t).map((s) => s.name);
|
|
103
|
+
}
|
|
104
|
+
getActiveDataGroupNames(t) {
|
|
105
|
+
return this.getActiveDataGroups(t).map((s) => s.name);
|
|
106
|
+
}
|
|
107
|
+
aggregateBinDataByGroup(t) {
|
|
108
|
+
return lt(t, "group");
|
|
109
|
+
}
|
|
110
|
+
getBinConfigurations() {
|
|
111
|
+
const t = this.getDisplayData(), e = this.getOptions(), s = this.services.cartesianScales.getMainXAxisPosition(), a = this.services.cartesianScales.getDomainIdentifier(), o = e.axes[s], { groupMapsTo: i } = e.data, { bins: r = j.defaultBins } = o, n = Array.isArray(r), l = Z().value((d) => d[a]).thresholds(r)(t);
|
|
112
|
+
if (n)
|
|
113
|
+
l[l.length - 1].x1 = r[r.length - 1];
|
|
114
|
+
else {
|
|
115
|
+
const d = l[0].x1 - l[0].x0;
|
|
116
|
+
l[l.length - 1].x1 = +l[l.length - 1].x0 + d;
|
|
117
|
+
}
|
|
118
|
+
const c = n ? [r[0], r[r.length - 1]] : [l[0].x0, l[l.length - 1].x1], p = Array.from(new Set(t.map((d) => d[i]))), g = [];
|
|
119
|
+
return l.forEach((d) => {
|
|
120
|
+
const f = `${d.x0}-${d.x1}`, b = this.aggregateBinDataByGroup(d);
|
|
121
|
+
p.forEach((C) => {
|
|
122
|
+
g.push({
|
|
123
|
+
group: C,
|
|
124
|
+
key: f,
|
|
125
|
+
value: b[C] || 0,
|
|
126
|
+
bin: d.x0
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}), {
|
|
130
|
+
bins: l,
|
|
131
|
+
binsDomain: c
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
getBinnedStackedData() {
|
|
135
|
+
const t = this.getOptions(), { groupMapsTo: e } = t.data, s = this.getActiveDataGroupNames(), { bins: a } = this.getBinConfigurations(), o = this.getDataValuesGroupedByKeys({
|
|
136
|
+
bins: a
|
|
137
|
+
});
|
|
138
|
+
return A().keys(s)(o).map((i, r) => Object.keys(i).filter((n) => !isNaN(n)).map((n) => {
|
|
139
|
+
const l = i[n];
|
|
140
|
+
return l[e] = s[r], l;
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
getGroupedData(t) {
|
|
144
|
+
const e = this.getDisplayData(t), s = {}, { groupMapsTo: a } = this.getOptions().data;
|
|
145
|
+
return e.map((o) => {
|
|
146
|
+
const i = o[a];
|
|
147
|
+
s[i] !== null && s[i] !== void 0 ? s[i].push(o) : s[i] = [o];
|
|
148
|
+
}), Object.keys(s).map((o) => ({
|
|
149
|
+
name: o,
|
|
150
|
+
data: s[o]
|
|
151
|
+
}));
|
|
152
|
+
}
|
|
153
|
+
getStackKeys({ bins: t = null, groups: e = null } = { bins: null, groups: null }) {
|
|
154
|
+
const s = this.getOptions(), a = this.getDisplayData(e);
|
|
155
|
+
let o;
|
|
156
|
+
t ? o = t.map((n) => `${n.x0}-${n.x1}`) : o = M(
|
|
157
|
+
a.map((n) => {
|
|
158
|
+
const l = this.services.cartesianScales.getDomainIdentifier(n);
|
|
159
|
+
return n[l] instanceof Date ? k(n[l]) : n[l] && typeof n[l].toString == "function" ? n[l].toString() : n[l];
|
|
160
|
+
})
|
|
161
|
+
);
|
|
162
|
+
const i = this.services.cartesianScales.domainAxisPosition, r = s.axes[i].scaleType;
|
|
163
|
+
return r === D.TIME ? o.sort((n, l) => {
|
|
164
|
+
const c = new Date(n), p = new Date(l);
|
|
165
|
+
return c - p;
|
|
166
|
+
}) : (r === D.LOG || r === D.LINEAR) && o.sort((n, l) => n - l), o;
|
|
167
|
+
}
|
|
168
|
+
getDataValuesGroupedByKeys({ bins: t = null, groups: e = null }) {
|
|
169
|
+
const s = this.getOptions(), { groupMapsTo: a } = s.data, o = this.getDisplayData(e), i = this.getDataGroupNames(), r = this.getStackKeys({ bins: t, groups: e });
|
|
170
|
+
return t ? r.map((n) => {
|
|
171
|
+
const [l, c] = n.split("-"), p = { x0: l, x1: c }, g = t.find((d) => d.x0.toString() === l.toString());
|
|
172
|
+
return i.forEach((d) => {
|
|
173
|
+
p[d] = g.filter(
|
|
174
|
+
(f) => f[a] === d
|
|
175
|
+
).length;
|
|
176
|
+
}), p;
|
|
177
|
+
}) : r.map((n) => {
|
|
178
|
+
const l = { sharedStackKey: n };
|
|
179
|
+
return i.forEach((c) => {
|
|
180
|
+
const p = o.find((d) => {
|
|
181
|
+
const f = this.services.cartesianScales.getDomainIdentifier(d);
|
|
182
|
+
return d[a] === c && Object.prototype.hasOwnProperty.call(d, f) && (d[f] instanceof Date ? k(d[f]) === n : d[f].toString() === n);
|
|
183
|
+
}), g = this.services.cartesianScales.getRangeIdentifier(l);
|
|
184
|
+
l[c] = p ? p[g] : null;
|
|
185
|
+
}), l;
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
getStackedData({ percentage: t = !1, groups: e = null, divergent: s = !1 }) {
|
|
189
|
+
const a = this.getOptions(), { groupMapsTo: o } = a.data, i = this.getActiveDataGroupNames(e), r = this.getDataValuesGroupedByKeys({
|
|
190
|
+
groups: e
|
|
191
|
+
});
|
|
192
|
+
if (t) {
|
|
193
|
+
const l = ot(r.map((c) => [c.sharedStackKey, 0]));
|
|
194
|
+
r.forEach((c) => {
|
|
195
|
+
i.forEach((p) => {
|
|
196
|
+
l[c.sharedStackKey] += c[p];
|
|
197
|
+
});
|
|
198
|
+
}), r.forEach((c) => {
|
|
199
|
+
i.forEach((p) => {
|
|
200
|
+
const g = l[c.sharedStackKey];
|
|
201
|
+
l[c.sharedStackKey] ? c[p] = c[p] / g * 100 : c[p] = 0;
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
return (s ? A().offset(H) : A()).keys(i)(r).map((l, c) => Object.keys(l).filter((p) => !isNaN(p)).map((p) => {
|
|
206
|
+
const g = l[p];
|
|
207
|
+
return g[o] = i[c], g;
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* @return {Object} The chart's options
|
|
212
|
+
*/
|
|
213
|
+
getOptions() {
|
|
214
|
+
return this.state.options;
|
|
215
|
+
}
|
|
216
|
+
set(t, e) {
|
|
217
|
+
this.state = Object.assign({}, this.state, t);
|
|
218
|
+
const s = Object.assign(
|
|
219
|
+
{ skipUpdate: !1, animate: !0 },
|
|
220
|
+
// default configs
|
|
221
|
+
e
|
|
222
|
+
);
|
|
223
|
+
s.skipUpdate || this.update(s.animate);
|
|
224
|
+
}
|
|
225
|
+
get(t) {
|
|
226
|
+
return t ? this.state[t] : this.state;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
*
|
|
230
|
+
* @param newOptions New options to be set
|
|
231
|
+
*/
|
|
232
|
+
setOptions(t) {
|
|
233
|
+
const e = this.getOptions();
|
|
234
|
+
L(e, t), this.set({
|
|
235
|
+
options: _(e, t)
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
*
|
|
240
|
+
* Updates miscellanous information within the model
|
|
241
|
+
* such as the color scales, or the legend data labels
|
|
242
|
+
*/
|
|
243
|
+
update(t = !0) {
|
|
244
|
+
this.getDisplayData() && (this.updateAllDataGroups(), this.setCustomColorScale(), this.setColorClassNames(), this.services.events.dispatchEvent(B.Model.UPDATE, { animate: t }));
|
|
245
|
+
}
|
|
246
|
+
/*
|
|
247
|
+
* Data labels
|
|
248
|
+
*/
|
|
249
|
+
toggleDataLabel(t) {
|
|
250
|
+
const { ACTIVE: e, DISABLED: s } = S.items.status, a = this.getDataGroups(), o = a.some((c) => c.status === s), i = a.filter((c) => c.status === e);
|
|
251
|
+
if (o)
|
|
252
|
+
if (i.length === 1 && i[0].name === t)
|
|
253
|
+
a.forEach((c, p) => {
|
|
254
|
+
a[p].status = e;
|
|
255
|
+
});
|
|
256
|
+
else {
|
|
257
|
+
const c = a.findIndex((p) => p.name === t);
|
|
258
|
+
a[c].status = a[c].status === s ? e : s;
|
|
259
|
+
}
|
|
260
|
+
else
|
|
261
|
+
a.forEach((c, p) => {
|
|
262
|
+
a[p].status = c.name === t ? e : s;
|
|
263
|
+
});
|
|
264
|
+
const r = a.filter((c) => c.status === e), n = this.getOptions();
|
|
265
|
+
a.some((c) => c.status === s) ? n.data.selectedGroups = r.map((c) => c.name) : n.data.selectedGroups = [], this.services.events.dispatchEvent(B.Legend.ITEMS_UPDATE, {
|
|
266
|
+
dataGroups: a
|
|
267
|
+
}), this.set({
|
|
268
|
+
dataGroups: a
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Should the data point be filled?
|
|
273
|
+
* @param group
|
|
274
|
+
* @param key
|
|
275
|
+
* @param value
|
|
276
|
+
* @param defaultFilled the default for this chart
|
|
277
|
+
*/
|
|
278
|
+
getIsFilled(t, e, s, a) {
|
|
279
|
+
const o = this.getOptions();
|
|
280
|
+
return o.getIsFilled ? o.getIsFilled(t, e, s, a) : a;
|
|
281
|
+
}
|
|
282
|
+
getFillColor(t, e, s) {
|
|
283
|
+
const a = this.getOptions(), o = u(this.colorScale, t);
|
|
284
|
+
return a.getFillColor ? a.getFillColor(t, e, s, o) : o;
|
|
285
|
+
}
|
|
286
|
+
getStrokeColor(t, e, s) {
|
|
287
|
+
const a = this.getOptions(), o = u(this.colorScale, t);
|
|
288
|
+
return a.getStrokeColor ? a.getStrokeColor(t, e, s, o) : o;
|
|
289
|
+
}
|
|
290
|
+
isUserProvidedColorScaleValid() {
|
|
291
|
+
const t = u(this.getOptions(), "color", "scale"), e = this.getDataGroups();
|
|
292
|
+
return t == null || Object.keys(t).length == 0 ? !1 : e.some(
|
|
293
|
+
(s) => Object.keys(t).includes(s.name)
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
getColorClassName(t) {
|
|
297
|
+
const e = this.colorClassNames(t.dataGroupName);
|
|
298
|
+
let s = t.originalClassName;
|
|
299
|
+
return t.classNameTypes.forEach(
|
|
300
|
+
(a) => s = t.originalClassName ? `${s} ${a}-${e}` : `${a}-${e}`
|
|
301
|
+
), s || "";
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* For charts that might hold an associated status for their dataset
|
|
305
|
+
*/
|
|
306
|
+
getStatus() {
|
|
307
|
+
return null;
|
|
308
|
+
}
|
|
309
|
+
getAllDataGroupsNames() {
|
|
310
|
+
return this.allDataGroups;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Converts data provided in the older format to tabular
|
|
314
|
+
*
|
|
315
|
+
*/
|
|
316
|
+
transformToTabularData(t) {
|
|
317
|
+
console.warn(
|
|
318
|
+
"We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format"
|
|
319
|
+
);
|
|
320
|
+
const e = [], { datasets: s, labels: a } = t;
|
|
321
|
+
return s.forEach((o) => {
|
|
322
|
+
o.data.forEach((i, r) => {
|
|
323
|
+
let n;
|
|
324
|
+
const l = u(o, "label");
|
|
325
|
+
if (l === null) {
|
|
326
|
+
const p = u(a, r);
|
|
327
|
+
p ? n = p : n = "Ungrouped";
|
|
328
|
+
} else
|
|
329
|
+
n = l;
|
|
330
|
+
const c = {
|
|
331
|
+
group: n,
|
|
332
|
+
key: a[r]
|
|
333
|
+
};
|
|
334
|
+
isNaN(i) ? (c.value = i.value, c.date = i.date) : c.value = i, e.push(c);
|
|
335
|
+
});
|
|
336
|
+
}), e;
|
|
337
|
+
}
|
|
338
|
+
getTabularDataArray() {
|
|
339
|
+
return [];
|
|
340
|
+
}
|
|
341
|
+
exportToCSV() {
|
|
342
|
+
const t = this.getTabularDataArray().map(
|
|
343
|
+
(a) => a.map((o) => `"${o === "–" ? "–" : o}"`)
|
|
344
|
+
);
|
|
345
|
+
let e = "", s = "";
|
|
346
|
+
t.forEach(function(a, o) {
|
|
347
|
+
s = a.join(","), e += o < t.length ? s + `
|
|
348
|
+
` : s;
|
|
349
|
+
}), this.services.files.downloadCSV(e, "myChart.csv");
|
|
350
|
+
}
|
|
351
|
+
getTabularData(t) {
|
|
352
|
+
return Array.isArray(t) ? t : this.transformToTabularData(t);
|
|
353
|
+
}
|
|
354
|
+
sanitize(t) {
|
|
355
|
+
return t = this.getTabularData(t), t;
|
|
356
|
+
}
|
|
357
|
+
/*
|
|
358
|
+
* Data groups
|
|
359
|
+
*/
|
|
360
|
+
updateAllDataGroups() {
|
|
361
|
+
this.allDataGroups ? this.getDataGroupNames().forEach((t) => {
|
|
362
|
+
this.allDataGroups.indexOf(t) === -1 && this.allDataGroups.push(t);
|
|
363
|
+
}) : this.allDataGroups = this.getDataGroupNames();
|
|
364
|
+
}
|
|
365
|
+
generateDataGroups(t) {
|
|
366
|
+
const { groupMapsTo: e } = this.getOptions().data, { ACTIVE: s, DISABLED: a } = S.items.status, o = this.getOptions(), i = M(t.map((n) => n[e]));
|
|
367
|
+
o.data.selectedGroups.length && (o.data.selectedGroups.every(
|
|
368
|
+
(l) => i.includes(l)
|
|
369
|
+
) || (o.data.selectedGroups = []));
|
|
370
|
+
const r = (n) => !o.data.selectedGroups.length || o.data.selectedGroups.includes(n) ? s : a;
|
|
371
|
+
return i.map((n) => ({
|
|
372
|
+
name: n,
|
|
373
|
+
status: r(n)
|
|
374
|
+
}));
|
|
375
|
+
}
|
|
376
|
+
/*
|
|
377
|
+
* Fill scales
|
|
378
|
+
*/
|
|
379
|
+
setCustomColorScale() {
|
|
380
|
+
if (!this.isUserProvidedColorScaleValid())
|
|
381
|
+
return;
|
|
382
|
+
const t = this.getOptions(), e = u(t, "color", "scale");
|
|
383
|
+
Object.keys(e).forEach((a) => {
|
|
384
|
+
this.allDataGroups.includes(a) || console.warn(`"${a}" does not exist in data groups.`);
|
|
385
|
+
}), this.allDataGroups.filter(
|
|
386
|
+
(a) => e[a]
|
|
387
|
+
).forEach(
|
|
388
|
+
(a) => this.colorScale[a] = e[a]
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
/*
|
|
392
|
+
* Color palette
|
|
393
|
+
*/
|
|
394
|
+
setColorClassNames() {
|
|
395
|
+
const t = u(this.getOptions(), "color", "pairing");
|
|
396
|
+
let e = u(t, "numberOfVariants");
|
|
397
|
+
(!e || e < this.allDataGroups.length) && (e = this.allDataGroups.length);
|
|
398
|
+
let s = u(t, "option");
|
|
399
|
+
const a = V.pairingOptions, o = e > 5 ? 14 : e, i = `${o}-color`;
|
|
400
|
+
s = s <= a[i] ? s : 1;
|
|
401
|
+
const r = this.allDataGroups.map(
|
|
402
|
+
(n, l) => `${o}-${s}-${l % 14 + 1}`
|
|
403
|
+
);
|
|
404
|
+
this.colorClassNames = $().range(r).domain(this.allDataGroups);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
class T extends m {
|
|
408
|
+
// can't be protected as it's used by two-dimensional-axes.ts
|
|
409
|
+
constructor(t) {
|
|
410
|
+
super(t), this.axisFlavor = w.DEFAULT;
|
|
411
|
+
}
|
|
412
|
+
// get the scales information
|
|
413
|
+
// needed for getTabularArray()
|
|
414
|
+
assignRangeAndDomains() {
|
|
415
|
+
const { cartesianScales: t } = this.services, e = this.getOptions(), s = t.isDualAxes(), a = {
|
|
416
|
+
primaryDomain: t.domainAxisPosition,
|
|
417
|
+
primaryRange: t.rangeAxisPosition,
|
|
418
|
+
secondaryDomain: null,
|
|
419
|
+
secondaryRange: null
|
|
420
|
+
};
|
|
421
|
+
return s && (a.secondaryDomain = t.secondaryDomainAxisPosition, a.secondaryRange = t.secondaryRangeAxisPosition), Object.keys(a).forEach((o) => {
|
|
422
|
+
const i = a[o];
|
|
423
|
+
t.scales[i] ? a[o] = {
|
|
424
|
+
position: i,
|
|
425
|
+
label: t.getScaleLabel(i),
|
|
426
|
+
identifier: u(e, "axes", i, "mapsTo")
|
|
427
|
+
} : a[o] = null;
|
|
428
|
+
}), a;
|
|
429
|
+
}
|
|
430
|
+
getTabularDataArray() {
|
|
431
|
+
const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, { cartesianScales: a } = this.services, { primaryDomain: o, primaryRange: i, secondaryDomain: r, secondaryRange: n } = this.assignRangeAndDomains(), l = a.getDomainAxisScaleType();
|
|
432
|
+
let c;
|
|
433
|
+
return l === D.TIME && (c = (g) => K(g, "MMM d, yyyy")), [
|
|
434
|
+
[
|
|
435
|
+
"Group",
|
|
436
|
+
o.label,
|
|
437
|
+
i.label,
|
|
438
|
+
...r ? [r.label] : [],
|
|
439
|
+
...n ? [n.label] : []
|
|
440
|
+
],
|
|
441
|
+
...t.map((g) => [
|
|
442
|
+
g[s],
|
|
443
|
+
g[o.identifier] === null ? "–" : c ? c(g[o.identifier]) : g[o.identifier],
|
|
444
|
+
g[i.identifier] === null || isNaN(g[i.identifier]) ? "–" : g[i.identifier].toLocaleString(),
|
|
445
|
+
...r ? [
|
|
446
|
+
g[r.identifier] === null ? "–" : g[r.identifier]
|
|
447
|
+
] : [],
|
|
448
|
+
...n ? [
|
|
449
|
+
g[n.identifier] === null || isNaN(g[n.identifier]) ? "–" : g[n.identifier]
|
|
450
|
+
] : []
|
|
451
|
+
])
|
|
452
|
+
];
|
|
453
|
+
}
|
|
454
|
+
setData(t) {
|
|
455
|
+
let e;
|
|
456
|
+
if (t && (e = super.setData(t), u(this.getOptions(), "zoomBar", O.TOP, "enabled"))) {
|
|
457
|
+
const s = u(
|
|
458
|
+
this.getOptions(),
|
|
459
|
+
"zoomBar",
|
|
460
|
+
O.TOP,
|
|
461
|
+
"data"
|
|
462
|
+
);
|
|
463
|
+
this.setZoomBarData(s);
|
|
464
|
+
}
|
|
465
|
+
return e;
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* @param zoomBarData any special zoom bar data to use instead of the model data
|
|
469
|
+
*/
|
|
470
|
+
setZoomBarData(t) {
|
|
471
|
+
const e = t ? this.sanitize(G(t)) : this.getDisplayData();
|
|
472
|
+
let s = e;
|
|
473
|
+
const { cartesianScales: a } = this.services;
|
|
474
|
+
if (e && a.domainAxisPosition && a.rangeAxisPosition) {
|
|
475
|
+
const o = a.getDomainIdentifier(), i = a.getRangeIdentifier();
|
|
476
|
+
let r = e.map((n) => n[o].getTime());
|
|
477
|
+
r = M(r).sort(), s = r.map((n) => {
|
|
478
|
+
let l = 0;
|
|
479
|
+
const c = {};
|
|
480
|
+
return e.forEach((p) => {
|
|
481
|
+
p[o].getTime() === n && (l += p[i]);
|
|
482
|
+
}), c[o] = new Date(n), c[i] = l, c;
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
this.set({ zoomBarData: s });
|
|
486
|
+
}
|
|
487
|
+
getZoomBarData() {
|
|
488
|
+
return this.get("zoomBarData");
|
|
489
|
+
}
|
|
490
|
+
sanitizeDateValues(t) {
|
|
491
|
+
const e = this.getOptions();
|
|
492
|
+
if (!e.axes)
|
|
493
|
+
return t;
|
|
494
|
+
const s = [];
|
|
495
|
+
return Object.keys(O).forEach((a) => {
|
|
496
|
+
const o = O[a], i = e.axes[o];
|
|
497
|
+
if (i && i.scaleType === D.TIME) {
|
|
498
|
+
const r = i.mapsTo;
|
|
499
|
+
(r !== null || r !== void 0) && s.push(r);
|
|
500
|
+
}
|
|
501
|
+
}), s.length > 0 && t.forEach((a) => {
|
|
502
|
+
s.forEach((o) => {
|
|
503
|
+
u(a, o, "getTime") === null && (a[o] = new Date(a[o]));
|
|
504
|
+
});
|
|
505
|
+
}), t;
|
|
506
|
+
}
|
|
507
|
+
sanitize(t) {
|
|
508
|
+
return t = super.sanitize(t), t = this.sanitizeDateValues(t), t;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
class dt extends T {
|
|
512
|
+
constructor(t) {
|
|
513
|
+
super(t);
|
|
514
|
+
}
|
|
515
|
+
getTabularDataArray() {
|
|
516
|
+
const t = this.getDisplayData();
|
|
517
|
+
return t.sort((s, a) => s.source.localeCompare(a.source)), [
|
|
518
|
+
["Source", "Target", "Value"],
|
|
519
|
+
...t.map((s) => [s.source, s.target, s.value])
|
|
520
|
+
];
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
class Dt extends T {
|
|
524
|
+
constructor(t) {
|
|
525
|
+
super(t);
|
|
526
|
+
}
|
|
527
|
+
getBoxQuartiles(t) {
|
|
528
|
+
return {
|
|
529
|
+
q_25: E(t, 0.25),
|
|
530
|
+
q_50: E(t, 0.5),
|
|
531
|
+
q_75: E(t, 0.75)
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
getBoxplotData() {
|
|
535
|
+
const t = this.getOptions(), { groupMapsTo: e } = t.data, s = this.getGroupedData(), a = [];
|
|
536
|
+
for (const { name: o, data: i } of s) {
|
|
537
|
+
const r = this.services.cartesianScales.getRangeIdentifier(), n = i.map((v) => v[r]).sort(Q), l = {
|
|
538
|
+
[e]: o,
|
|
539
|
+
counts: n,
|
|
540
|
+
quartiles: this.getBoxQuartiles(n),
|
|
541
|
+
outliers: null,
|
|
542
|
+
whiskers: null
|
|
543
|
+
}, c = l.quartiles.q_25, p = l.quartiles.q_75, g = (p - c) * 1.5, d = c - g, f = p + g, b = [], C = [];
|
|
544
|
+
for (const v of n)
|
|
545
|
+
v < d || v > f ? b.push(v) : C.push(v);
|
|
546
|
+
l.outliers = b;
|
|
547
|
+
const I = P(C), q = N(C);
|
|
548
|
+
l.whiskers = {
|
|
549
|
+
min: I || P([l.quartiles.q_25, l.quartiles.q_50, l.quartiles.q_75]),
|
|
550
|
+
max: q || N([l.quartiles.q_25, l.quartiles.q_50, l.quartiles.q_75])
|
|
551
|
+
}, a.push(l);
|
|
552
|
+
}
|
|
553
|
+
return a;
|
|
554
|
+
}
|
|
555
|
+
getTabularDataArray() {
|
|
556
|
+
const t = this.getOptions(), { groupMapsTo: e } = t.data, s = this.getBoxplotData();
|
|
557
|
+
return [
|
|
558
|
+
["Group", "Minimum", "Q1", "Median", "Q3", "Maximum", "IQR", "Outlier(s)"],
|
|
559
|
+
...s.map((o) => {
|
|
560
|
+
let i = u(o, "outliers");
|
|
561
|
+
return (i === null || i.length === 0) && (i = ["–"]), [
|
|
562
|
+
o[e],
|
|
563
|
+
u(o, "whiskers", "min") !== null ? u(o, "whiskers", "min").toLocaleString() : "–",
|
|
564
|
+
u(o, "quartiles", "q_25") !== null ? u(o, "quartiles", "q_25").toLocaleString() : "–",
|
|
565
|
+
u(o, "quartiles", "q_50") !== null ? u(o, "quartiles", "q_50").toLocaleString() : "–",
|
|
566
|
+
u(o, "quartiles", "q_75") !== null ? u(o, "quartiles", "q_75").toLocaleString() : "–",
|
|
567
|
+
u(o, "whiskers", "max") !== null ? u(o, "whiskers", "max").toLocaleString() : "–",
|
|
568
|
+
u(o, "quartiles", "q_75") !== null && u(o, "quartiles", "q_25") !== null ? (u(o, "quartiles", "q_75") - u(o, "quartiles", "q_25")).toLocaleString() : "–",
|
|
569
|
+
i.map((r) => r.toLocaleString()).join(",")
|
|
570
|
+
];
|
|
571
|
+
})
|
|
572
|
+
];
|
|
573
|
+
}
|
|
574
|
+
setColorClassNames() {
|
|
575
|
+
const e = u(this.getOptions(), "color", "pairing");
|
|
576
|
+
let s = u(e, "option");
|
|
577
|
+
const a = V.pairingOptions;
|
|
578
|
+
s = s <= a["1-color"] ? s : 1;
|
|
579
|
+
const o = this.allDataGroups.map(() => `1-${s}-1`);
|
|
580
|
+
this.colorClassNames = $().range(o).domain(this.allDataGroups);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
class ft extends T {
|
|
584
|
+
constructor(t) {
|
|
585
|
+
super(t);
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Determines the index of the performance area titles to use
|
|
589
|
+
* @param datum
|
|
590
|
+
* @returns number
|
|
591
|
+
*/
|
|
592
|
+
getMatchingRangeIndexForDatapoint(t) {
|
|
593
|
+
let e;
|
|
594
|
+
for (let s = t.ranges.length - 1; s > 0; s--) {
|
|
595
|
+
const a = t.ranges[s];
|
|
596
|
+
if (t.value >= a)
|
|
597
|
+
return e = s, e;
|
|
598
|
+
}
|
|
599
|
+
return 0;
|
|
600
|
+
}
|
|
601
|
+
getTabularDataArray() {
|
|
602
|
+
const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, a = this.services.cartesianScales.getRangeIdentifier(), o = u(e, "bullet", "performanceAreaTitles");
|
|
603
|
+
return [
|
|
604
|
+
["Title", "Group", "Value", "Target", "Percentage", "Performance"],
|
|
605
|
+
...t.map((r) => [
|
|
606
|
+
r.title,
|
|
607
|
+
r[s],
|
|
608
|
+
r.value === null ? "–" : r.value,
|
|
609
|
+
u(r, "marker") === null ? "–" : r.marker,
|
|
610
|
+
u(r, "marker") === null ? "–" : `${Math.floor(r[a] / r.marker * 100)}%`,
|
|
611
|
+
o[this.getMatchingRangeIndexForDatapoint(r)]
|
|
612
|
+
])
|
|
613
|
+
];
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
class mt extends m {
|
|
617
|
+
constructor(t) {
|
|
618
|
+
super(t), this._colorScale = void 0, this._matrix = {};
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* @override
|
|
622
|
+
* @param value
|
|
623
|
+
* @returns string
|
|
624
|
+
*/
|
|
625
|
+
getFillColor(t) {
|
|
626
|
+
return this._colorScale(t);
|
|
627
|
+
}
|
|
628
|
+
/**
|
|
629
|
+
* Helper function that will generate a dictionary
|
|
630
|
+
*/
|
|
631
|
+
getCombinedData() {
|
|
632
|
+
if (y(this._matrix)) {
|
|
633
|
+
const t = this.getOptions(), e = this.getDisplayData();
|
|
634
|
+
!y(e) && !y(t.geoData.objects.countries) && (t.geoData.objects.countries.geometries.forEach((s) => {
|
|
635
|
+
this._matrix[s.properties.NAME] = s;
|
|
636
|
+
}), e.forEach((s) => {
|
|
637
|
+
this._matrix[s.name] ? this._matrix[s.name].value = s.value || null : console.warn(`Data point ${s} is missing geographical data.`);
|
|
638
|
+
}));
|
|
639
|
+
}
|
|
640
|
+
return this._matrix;
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Generate tabular data from display data
|
|
644
|
+
* @returns Array<Object>
|
|
645
|
+
*/
|
|
646
|
+
getTabularDataArray() {
|
|
647
|
+
const t = this.getDisplayData();
|
|
648
|
+
return [
|
|
649
|
+
["Country ID", "Country Name", "Value"],
|
|
650
|
+
...t.map((s) => [
|
|
651
|
+
s.id === null ? "–" : s.id,
|
|
652
|
+
s.name,
|
|
653
|
+
s.value
|
|
654
|
+
])
|
|
655
|
+
];
|
|
656
|
+
}
|
|
657
|
+
// Uses quantize scale to return class names
|
|
658
|
+
getColorClassName(t) {
|
|
659
|
+
return `${t.originalClassName} ${this._colorScale(t.value)}`;
|
|
660
|
+
}
|
|
661
|
+
setColorClassNames() {
|
|
662
|
+
const t = u(this.getOptions(), "color");
|
|
663
|
+
this._colorScale = R(this.getDisplayData(), t);
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
class yt extends m {
|
|
667
|
+
constructor(t) {
|
|
668
|
+
super(t), this.parentNode = !1, this.set({ depth: 2 }, { skipUpdate: !0 });
|
|
669
|
+
}
|
|
670
|
+
setData(t) {
|
|
671
|
+
super.setData(t), this.setDataGroups(), t.length === 1 && (this.parentNode = !0), this.setZoom();
|
|
672
|
+
}
|
|
673
|
+
setOptions(t) {
|
|
674
|
+
const e = this.getOptions(), s = _({}, t, this.getZoomOptions(t));
|
|
675
|
+
L(e, s);
|
|
676
|
+
const a = this.getHierarchyLevel(), o = u(e, "circlePack", "hierarchyLevel");
|
|
677
|
+
this.set({
|
|
678
|
+
options: _(e, s),
|
|
679
|
+
depth: o && o < 4 ? o : a
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
getZoomOptions(t) {
|
|
683
|
+
if (!this.getDisplayData())
|
|
684
|
+
return {};
|
|
685
|
+
const e = this.getDisplayData(), s = t || this.getOptions(), a = e.length === 1 && u(e, 0, "children") ? u(e, 0, "children") : e;
|
|
686
|
+
let o = this.getHierarchyLevel();
|
|
687
|
+
return a.some((i) => {
|
|
688
|
+
if (i.children && i.children.some((r) => r.children))
|
|
689
|
+
return o = 3, !1;
|
|
690
|
+
}), u(s, "canvasZoom", "enabled") === !0 && o > 2 ? {
|
|
691
|
+
legend: {
|
|
692
|
+
additionalItems: [
|
|
693
|
+
{
|
|
694
|
+
type: J.ZOOM,
|
|
695
|
+
name: "Click to zoom"
|
|
696
|
+
}
|
|
697
|
+
]
|
|
698
|
+
}
|
|
699
|
+
} : null;
|
|
700
|
+
}
|
|
701
|
+
setZoom(t) {
|
|
702
|
+
this.setOptions(this.getZoomOptions(t));
|
|
703
|
+
}
|
|
704
|
+
// update the hierarchy level
|
|
705
|
+
updateHierarchyLevel(t) {
|
|
706
|
+
this.set({ depth: t });
|
|
707
|
+
}
|
|
708
|
+
getHierarchyLevel() {
|
|
709
|
+
return this.get("depth");
|
|
710
|
+
}
|
|
711
|
+
hasParentNode() {
|
|
712
|
+
return this.parentNode;
|
|
713
|
+
}
|
|
714
|
+
// set the datagroup name on the items that are it's children
|
|
715
|
+
setDataGroups() {
|
|
716
|
+
const t = this.getData(), e = this.getOptions(), { groupMapsTo: s } = e.data, a = t.map((o) => {
|
|
717
|
+
const i = o[s];
|
|
718
|
+
return this.setChildrenDataGroup(o, i);
|
|
719
|
+
});
|
|
720
|
+
this.set(
|
|
721
|
+
{
|
|
722
|
+
data: a
|
|
723
|
+
},
|
|
724
|
+
{ skipUpdate: !0 }
|
|
725
|
+
);
|
|
726
|
+
}
|
|
727
|
+
// sets name recursively down the node tree
|
|
728
|
+
setChildrenDataGroup(t, e) {
|
|
729
|
+
return t.children ? {
|
|
730
|
+
...t,
|
|
731
|
+
dataGroupName: e,
|
|
732
|
+
children: t.children.map((s) => this.setChildrenDataGroup(s, e))
|
|
733
|
+
} : { ...t, dataGroupName: e };
|
|
734
|
+
}
|
|
735
|
+
getTabularDataArray() {
|
|
736
|
+
const t = this.getDisplayData(), e = [["Child", "Parent", "Value"]];
|
|
737
|
+
return t.forEach((s) => {
|
|
738
|
+
let a = s.value ? s.value : 0;
|
|
739
|
+
s.children && (a += this.getChildrenDatums(s.children, s.name, e, 0)), e.push(["–", s.name, a]);
|
|
740
|
+
}), e;
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* Recursively determine the relationship between all the nested elements in the child
|
|
744
|
+
* @param children: Object
|
|
745
|
+
* @param parent: String
|
|
746
|
+
* @param result: Array<Object>
|
|
747
|
+
* @param totalSum: number
|
|
748
|
+
* @returns: number
|
|
749
|
+
*/
|
|
750
|
+
getChildrenDatums(t, e, s = [], a = 0) {
|
|
751
|
+
const o = e;
|
|
752
|
+
return t.forEach((i) => {
|
|
753
|
+
const r = i.name;
|
|
754
|
+
let n = 0;
|
|
755
|
+
if (i.children)
|
|
756
|
+
i.children.length > 0 && (typeof i.value == "number" && (a += i.value), n += this.getChildrenDatums(i.children, r, s, n), s.push([r, o, n]), a += n);
|
|
757
|
+
else {
|
|
758
|
+
let l = 0;
|
|
759
|
+
typeof i.value == "number" && (l = i.value, a += i.value), s.push([i.name, o, l]);
|
|
760
|
+
}
|
|
761
|
+
}), a;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
class vt extends m {
|
|
765
|
+
constructor(t) {
|
|
766
|
+
super(t);
|
|
767
|
+
}
|
|
768
|
+
getTabularData(t) {
|
|
769
|
+
const e = super.getTabularData(t);
|
|
770
|
+
return t !== e && e.forEach((s) => {
|
|
771
|
+
s.key && s.key !== s.group && (s.group = s.key);
|
|
772
|
+
}), e;
|
|
773
|
+
}
|
|
774
|
+
getTabularDataArray() {
|
|
775
|
+
const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data;
|
|
776
|
+
return [
|
|
777
|
+
["Group", "Value"],
|
|
778
|
+
...t.map((o) => [
|
|
779
|
+
o[s],
|
|
780
|
+
o.value === null ? "–" : o.value.toLocaleString()
|
|
781
|
+
])
|
|
782
|
+
];
|
|
783
|
+
}
|
|
784
|
+
sanitize(t) {
|
|
785
|
+
return this.getTabularData(t).sort((s, a) => a.value - s.value);
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
class xt extends m {
|
|
789
|
+
constructor(t) {
|
|
790
|
+
super(t);
|
|
791
|
+
}
|
|
792
|
+
getDataGroups() {
|
|
793
|
+
return super.getDataGroups().filter((t) => t.name !== "delta");
|
|
794
|
+
}
|
|
795
|
+
getTabularDataArray() {
|
|
796
|
+
const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data;
|
|
797
|
+
return [
|
|
798
|
+
["Group", "Value"],
|
|
799
|
+
...t.map((o) => [
|
|
800
|
+
o[s],
|
|
801
|
+
o.value === null ? "–" : o.value.toLocaleString()
|
|
802
|
+
])
|
|
803
|
+
];
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
class Ct extends T {
|
|
807
|
+
constructor(t) {
|
|
808
|
+
super(t), this.axisFlavor = w.HOVERABLE, this._colorScale = void 0, this._domains = [], this._ranges = [], this._matrix = {};
|
|
809
|
+
const e = u(this.getOptions(), "axes");
|
|
810
|
+
if (u(e, "left", "scaleType") && u(e, "left", "scaleType") !== D.LABELS || u(e, "right", "scaleType") && u(e, "right", "scaleType") !== D.LABELS || u(e, "top", "scaleType") && u(e, "top", "scaleType") !== D.LABELS || u(e, "bottom", "scaleType") && u(e, "bottom", "scaleType") !== D.LABELS)
|
|
811
|
+
throw Error("Heatmap only supports label scaletypes.");
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* Get min and maximum value of the display data
|
|
815
|
+
* @returns Array consisting of smallest and largest values in data
|
|
816
|
+
*/
|
|
817
|
+
getValueDomain() {
|
|
818
|
+
const t = W(this.getDisplayData(), (s) => s.value), e = X().domain(t).nice().domain();
|
|
819
|
+
if (e[0] > 0)
|
|
820
|
+
e[0] = 0;
|
|
821
|
+
else if (e[0] === 0 && e[1] === 0)
|
|
822
|
+
return [0, 1];
|
|
823
|
+
return e[0] < 0 && e[1] > 0 && (Math.abs(e[0]) > e[1] ? e[1] = Math.abs(e[0]) : e[0] = -e[1]), e;
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* @override
|
|
827
|
+
* @param value
|
|
828
|
+
* @returns string
|
|
829
|
+
*/
|
|
830
|
+
getFillColor(t) {
|
|
831
|
+
return this._colorScale(t);
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Generate a list of all unique domains
|
|
835
|
+
* @returns String[]
|
|
836
|
+
*/
|
|
837
|
+
getUniqueDomain() {
|
|
838
|
+
if (y(this._domains)) {
|
|
839
|
+
const t = this.getDisplayData(), { cartesianScales: e } = this.services, s = e.getDomainIdentifier(), a = e.getMainXAxisPosition(), o = e.getCustomDomainValuesByposition(a);
|
|
840
|
+
if (o)
|
|
841
|
+
return o;
|
|
842
|
+
this._domains = Array.from(
|
|
843
|
+
new Set(
|
|
844
|
+
t.map((i) => i[s])
|
|
845
|
+
)
|
|
846
|
+
);
|
|
847
|
+
}
|
|
848
|
+
return this._domains;
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* Generates a list of all unique ranges
|
|
852
|
+
* @returns String[]
|
|
853
|
+
*/
|
|
854
|
+
getUniqueRanges() {
|
|
855
|
+
if (y(this._ranges)) {
|
|
856
|
+
const t = this.getDisplayData(), { cartesianScales: e } = this.services, s = e.getRangeIdentifier(), a = e.getMainYAxisPosition(), o = e.getCustomDomainValuesByposition(a);
|
|
857
|
+
if (o)
|
|
858
|
+
return o;
|
|
859
|
+
this._ranges = Array.from(
|
|
860
|
+
new Set(
|
|
861
|
+
t.map((i) => i[s])
|
|
862
|
+
)
|
|
863
|
+
);
|
|
864
|
+
}
|
|
865
|
+
return this._ranges;
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* Generates a matrix (If doesn't exist) and returns it
|
|
869
|
+
* @returns Object
|
|
870
|
+
*/
|
|
871
|
+
getMatrix() {
|
|
872
|
+
if (y(this._matrix)) {
|
|
873
|
+
const t = this.getUniqueDomain(), e = this.getUniqueRanges(), s = this.services.cartesianScales.getDomainIdentifier(), a = this.services.cartesianScales.getRangeIdentifier(), o = {};
|
|
874
|
+
e.forEach((i) => {
|
|
875
|
+
o[i] = {
|
|
876
|
+
value: null,
|
|
877
|
+
index: -1
|
|
878
|
+
};
|
|
879
|
+
}), t.forEach((i) => {
|
|
880
|
+
this._matrix[i] = G(o);
|
|
881
|
+
}), this.getDisplayData().forEach((i, r) => {
|
|
882
|
+
this._matrix[i[s]][i[a]] = {
|
|
883
|
+
value: i.value,
|
|
884
|
+
index: r
|
|
885
|
+
};
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
return this._matrix;
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
*
|
|
892
|
+
* @param newData The new raw data to be set
|
|
893
|
+
*/
|
|
894
|
+
setData(t) {
|
|
895
|
+
const e = this.sanitize(G(t)), s = this.generateDataGroups(e);
|
|
896
|
+
return this.set({
|
|
897
|
+
data: e,
|
|
898
|
+
dataGroups: s
|
|
899
|
+
}), this._domains = [], this._ranges = [], this._matrix = {}, e;
|
|
900
|
+
}
|
|
901
|
+
/**
|
|
902
|
+
* Converts Object matrix into a single array
|
|
903
|
+
* @returns object[]
|
|
904
|
+
*/
|
|
905
|
+
getMatrixAsArray() {
|
|
906
|
+
y(this._matrix) && this.getMatrix();
|
|
907
|
+
const t = this.getUniqueDomain(), e = this.getUniqueRanges(), s = this.services.cartesianScales.getDomainIdentifier(), a = this.services.cartesianScales.getRangeIdentifier(), o = [];
|
|
908
|
+
return t.forEach((i) => {
|
|
909
|
+
e.forEach((r) => {
|
|
910
|
+
const n = {
|
|
911
|
+
value: this._matrix[i][r].value,
|
|
912
|
+
index: this._matrix[i][r].index
|
|
913
|
+
};
|
|
914
|
+
n[s] = i, n[a] = r, o.push(n);
|
|
915
|
+
});
|
|
916
|
+
}), o;
|
|
917
|
+
}
|
|
918
|
+
/**
|
|
919
|
+
* Generate tabular data from display data
|
|
920
|
+
* @returns Array<Object>
|
|
921
|
+
*/
|
|
922
|
+
getTabularDataArray() {
|
|
923
|
+
const t = this.getDisplayData(), { primaryDomain: e, primaryRange: s } = this.assignRangeAndDomains();
|
|
924
|
+
return [
|
|
925
|
+
[e.label, s.label, "Value"],
|
|
926
|
+
...t.map((o) => [
|
|
927
|
+
o[e.identifier] === null ? "–" : o[e.identifier],
|
|
928
|
+
o[s.identifier] === null ? "–" : o[s.identifier].toLocaleString(),
|
|
929
|
+
o.value
|
|
930
|
+
])
|
|
931
|
+
];
|
|
932
|
+
}
|
|
933
|
+
// Uses quantize scale to return class names
|
|
934
|
+
getColorClassName(t) {
|
|
935
|
+
return `${t.originalClassName} ${this._colorScale(t.value)}`;
|
|
936
|
+
}
|
|
937
|
+
setColorClassNames() {
|
|
938
|
+
const t = this.getOptions(), e = u(t, "color", "gradient", "colors"), s = !y(e);
|
|
939
|
+
let a = u(t, "color", "pairing", "option");
|
|
940
|
+
const o = this.getValueDomain(), i = o[0] < 0 && o[1] > 0 ? "diverge" : "mono";
|
|
941
|
+
(a < 1 && a > 4 && i === "mono" || a < 1 && a > 2 && i === "diverge") && (a = 1);
|
|
942
|
+
const r = s ? e : [];
|
|
943
|
+
if (!s) {
|
|
944
|
+
const l = i === "diverge" ? 17 : 11;
|
|
945
|
+
for (let c = 1; c < l + 1; c++)
|
|
946
|
+
r.push(`fill-${i}-${a}-${c}`);
|
|
947
|
+
}
|
|
948
|
+
this._colorScale = Y().domain(o).range(r);
|
|
949
|
+
const n = u(this.getOptions(), "color");
|
|
950
|
+
this._colorScale = R(this.getDisplayData(), n);
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
class Tt extends T {
|
|
954
|
+
getTabularDataArray() {
|
|
955
|
+
const t = this.getOptions(), { groupMapsTo: e } = t.data, s = this.getBinnedStackedData();
|
|
956
|
+
return [
|
|
957
|
+
[
|
|
958
|
+
x(t, "bins.rangeLabel") || "Range",
|
|
959
|
+
...s.map((o) => x(o, `0.${e}`))
|
|
960
|
+
],
|
|
961
|
+
...x(s, 0).map((o, i) => [
|
|
962
|
+
`${x(o, "data.x0")} – ${x(o, "data.x1")}`,
|
|
963
|
+
...s.map((r) => x(r[i], `data.${x(r[i], e)}`))
|
|
964
|
+
])
|
|
965
|
+
];
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
class bt extends m {
|
|
969
|
+
constructor(t) {
|
|
970
|
+
super(t);
|
|
971
|
+
}
|
|
972
|
+
getMaximumDomain(t) {
|
|
973
|
+
return t.reduce((s, a) => s + a.value, 0);
|
|
974
|
+
}
|
|
975
|
+
/**
|
|
976
|
+
* Use a provided color for the bar or default to carbon color if no status provided.
|
|
977
|
+
* Defaults to carbon color otherwise.
|
|
978
|
+
* @param group dataset group label
|
|
979
|
+
*/
|
|
980
|
+
getFillColor(t) {
|
|
981
|
+
const e = this.getOptions(), s = u(e, "color", "scale"), a = this.getStatus();
|
|
982
|
+
return s || !a ? super.getFillColor(t) : null;
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* Get the associated status for the data by checking the ranges
|
|
986
|
+
*/
|
|
987
|
+
getStatus() {
|
|
988
|
+
const t = this.getOptions(), e = u(this.getDisplayData()), { value: s } = e ? e.reduce((i, r) => ({ value: i.value + r.value })) : 0, a = u(t, "meter", "proportional") ? s : s > 100 ? 100 : s, o = u(t, "meter", "status", "ranges");
|
|
989
|
+
if (o) {
|
|
990
|
+
const i = o.filter(
|
|
991
|
+
(r) => r.range[0] <= a && a <= r.range[1]
|
|
992
|
+
);
|
|
993
|
+
if (i.length > 0)
|
|
994
|
+
return i[0].status;
|
|
995
|
+
}
|
|
996
|
+
return null;
|
|
997
|
+
}
|
|
998
|
+
getTabularDataArray() {
|
|
999
|
+
const t = this.getDisplayData(), e = this.getOptions(), { groupMapsTo: s } = e.data, a = this.getStatus(), o = u(e, "meter", "proportional");
|
|
1000
|
+
let i = [], r;
|
|
1001
|
+
if (o === null) {
|
|
1002
|
+
r = 100;
|
|
1003
|
+
const n = t[0];
|
|
1004
|
+
i = [
|
|
1005
|
+
["Group", "Value", ...a ? ["Status"] : []],
|
|
1006
|
+
[n[s], n.value, ...a ? [a] : []]
|
|
1007
|
+
];
|
|
1008
|
+
} else {
|
|
1009
|
+
const n = u(o, "total");
|
|
1010
|
+
r = n || this.getMaximumDomain(t), i = [
|
|
1011
|
+
["Group", "Value", "Percentage of total"],
|
|
1012
|
+
...t.map((l) => [
|
|
1013
|
+
l[s],
|
|
1014
|
+
l.value,
|
|
1015
|
+
(l.value / r * 100).toFixed(2) + " %"
|
|
1016
|
+
])
|
|
1017
|
+
];
|
|
1018
|
+
}
|
|
1019
|
+
return i;
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
class St extends T {
|
|
1023
|
+
constructor(t) {
|
|
1024
|
+
super(t);
|
|
1025
|
+
}
|
|
1026
|
+
getTabularDataArray() {
|
|
1027
|
+
const t = this.getOptions(), e = this.getGroupedData(), { angle: s, value: a } = u(t, "radar", "axes"), o = u(e, "0", "data").map((r) => r[s]);
|
|
1028
|
+
return [
|
|
1029
|
+
["Group", ...o],
|
|
1030
|
+
...e.map((r) => [
|
|
1031
|
+
r.name,
|
|
1032
|
+
...o.map(
|
|
1033
|
+
(n, l) => u(r, "data", l, a) !== null ? u(r, "data", l, a).toLocaleString() : "–"
|
|
1034
|
+
)
|
|
1035
|
+
])
|
|
1036
|
+
];
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
class Ot extends m {
|
|
1040
|
+
constructor(t) {
|
|
1041
|
+
super(t);
|
|
1042
|
+
}
|
|
1043
|
+
getTabularDataArray() {
|
|
1044
|
+
const t = this.getDisplayData(), e = [["Child", "Parent"]];
|
|
1045
|
+
return t.forEach((s) => {
|
|
1046
|
+
this.getChildrenDatums(s, e), e.push([s.name, "–"]);
|
|
1047
|
+
}), e;
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* Determine the child parent relationship in nested data
|
|
1051
|
+
* @param datum: Object
|
|
1052
|
+
* @param result: Array<Object>
|
|
1053
|
+
*/
|
|
1054
|
+
getChildrenDatums(t, e = []) {
|
|
1055
|
+
t.children && t.children.length > 0 && t.children.forEach((s) => {
|
|
1056
|
+
this.getChildrenDatums(s, e), e.push([s.name, t.name]);
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
class Gt extends m {
|
|
1061
|
+
constructor(t) {
|
|
1062
|
+
super(t);
|
|
1063
|
+
}
|
|
1064
|
+
getTabularDataArray() {
|
|
1065
|
+
const t = this.getDisplayData(), e = [["Child", "Group", "Value"]];
|
|
1066
|
+
return t.forEach((s) => {
|
|
1067
|
+
Array.isArray(s.children) ? s.children.forEach((a) => {
|
|
1068
|
+
e.push([a.name, s.name, a.value]);
|
|
1069
|
+
}) : u(s.name) !== null && u(s.value) && e.push(["–", s.name, s.value]);
|
|
1070
|
+
}), e;
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
class At extends m {
|
|
1074
|
+
constructor(t) {
|
|
1075
|
+
super(t);
|
|
1076
|
+
}
|
|
1077
|
+
getTabularDataArray() {
|
|
1078
|
+
const t = this.getDisplayData(), e = this.getOptions(), { fontSizeMapsTo: s, wordMapsTo: a } = e.wordCloud, { groupMapsTo: o } = e.data;
|
|
1079
|
+
return [
|
|
1080
|
+
[e.tooltip.wordLabel, "Group", e.tooltip.valueLabel],
|
|
1081
|
+
...t.map((r) => [
|
|
1082
|
+
r[a],
|
|
1083
|
+
r[o],
|
|
1084
|
+
r[s]
|
|
1085
|
+
])
|
|
1086
|
+
];
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
export {
|
|
1090
|
+
dt as AlluvialChartModel,
|
|
1091
|
+
Dt as BoxplotChartModel,
|
|
1092
|
+
ft as BulletChartModel,
|
|
1093
|
+
m as ChartModel,
|
|
1094
|
+
Tt as ChartModelBinned,
|
|
1095
|
+
T as ChartModelCartesian,
|
|
1096
|
+
mt as ChoroplethModel,
|
|
1097
|
+
yt as CirclePackChartModel,
|
|
1098
|
+
xt as GaugeChartModel,
|
|
1099
|
+
Ct as HeatmapModel,
|
|
1100
|
+
bt as MeterChartModel,
|
|
1101
|
+
vt as PieChartModel,
|
|
1102
|
+
St as RadarChartModel,
|
|
1103
|
+
Ot as TreeChartModel,
|
|
1104
|
+
Gt as TreemapChartModel,
|
|
1105
|
+
At as WordCloudModel
|
|
1106
|
+
};
|
|
1107
|
+
//# sourceMappingURL=index.mjs.map
|