@carbon/charts 1.8.0 → 1.9.0-rc.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 +84 -155
- package/README.md +11 -13
- 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/{build/src → dist}/components/axes/chart-clip.d.ts +3 -3
- package/{components → dist/components}/axes/grid-brush.d.ts +10 -10
- package/{components → dist/components}/axes/grid.d.ts +22 -22
- package/{build/src → dist}/components/axes/hover-axis.d.ts +1 -1
- package/dist/components/axes/index.d.ts +12 -0
- package/{components → dist/components}/axes/ruler-binned.d.ts +7 -7
- package/{components → dist/components}/axes/ruler.d.ts +27 -27
- package/{build/src → dist}/components/axes/toolbar.d.ts +7 -7
- package/{components → dist/components}/axes/two-dimensional-axes.d.ts +16 -16
- package/{components → dist/components}/axes/zero-line.d.ts +7 -7
- package/{components → dist/components}/axes/zoom-bar.d.ts +28 -28
- package/{build/src → dist}/components/component.d.ts +10 -8
- package/dist/components/diagrams/buildPaths.d.ts +40 -0
- package/dist/components/diagrams/index.d.ts +2 -0
- package/{components → dist/components}/essentials/canvas-chart-clip.d.ts +6 -6
- package/{build/src → dist}/components/essentials/color-scale-legend.d.ts +3 -3
- package/{build/src → dist}/components/essentials/geo-projection.d.ts +2 -2
- package/{build/src → dist}/components/essentials/highlights.d.ts +3 -3
- package/dist/components/essentials/index.d.ts +11 -0
- package/{build/src → dist}/components/essentials/legend.d.ts +3 -3
- package/{components → dist/components}/essentials/modal.d.ts +14 -14
- package/{build/src → dist}/components/essentials/threshold.d.ts +5 -5
- package/{components → dist/components}/essentials/title-meter.d.ts +30 -30
- package/{components → dist/components}/essentials/title.d.ts +20 -20
- package/{build/src → dist}/components/essentials/tooltip.d.ts +4 -4
- package/{components → dist/components}/graphs/alluvial.d.ts +14 -14
- package/{components → dist/components}/graphs/area-stacked.d.ts +11 -11
- package/dist/components/graphs/area.d.ts +12 -0
- package/{build/src → dist}/components/graphs/bar-grouped.d.ts +4 -4
- package/{build/src → dist}/components/graphs/bar-simple.d.ts +3 -3
- package/{build/src → dist}/components/graphs/bar-stacked.d.ts +4 -4
- package/{build/src → dist}/components/graphs/bar.d.ts +2 -2
- package/{components → dist/components}/graphs/boxplot.d.ts +9 -9
- package/{build/src → dist}/components/graphs/bubble.d.ts +2 -2
- package/dist/components/graphs/bullet.d.ts +12 -0
- package/{components → dist/components}/graphs/choropleth.d.ts +6 -6
- package/{build/src → dist}/components/graphs/circle-pack.d.ts +3 -3
- package/{build/src → dist}/components/graphs/donut.d.ts +1 -1
- package/{build/src → dist}/components/graphs/gauge.d.ts +2 -2
- package/{build/src → dist}/components/graphs/heatmap.d.ts +4 -4
- 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/{components → dist/components}/graphs/meter.d.ts +10 -10
- package/{build/src → dist}/components/graphs/pie.d.ts +4 -4
- package/{build/src → dist}/components/graphs/radar.d.ts +6 -6
- package/{build/src → dist}/components/graphs/scatter-stacked.d.ts +2 -2
- package/dist/components/graphs/scatter.d.ts +21 -0
- package/dist/components/graphs/skeleton-lines.d.ts +12 -0
- package/{build/src → dist}/components/graphs/skeleton.d.ts +6 -5
- package/{components → dist/components}/graphs/tree.d.ts +9 -9
- package/dist/components/graphs/treemap.d.ts +11 -0
- package/{build/src → dist}/components/graphs/wordcloud.d.ts +4 -4
- 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/{components → dist/components}/layout/layout.d.ts +18 -17
- package/dist/components/layout/spacer.d.ts +5 -0
- package/{build/src → dist}/configuration-non-customizable.d.ts +4 -4
- package/{configuration.d.ts → dist/configuration.d.ts} +48 -46
- package/dist/demo/charts/index.d.ts +62 -0
- package/{demo/data → dist/demo/charts}/time-series-axis.d.ts +60 -135
- package/{build/demo/data → dist/demo/charts}/zoom-bar.d.ts +12 -27
- 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 +51786 -0
- package/dist/demo/index.mjs.map +1 -0
- package/{demo → dist/demo}/styles.css +286 -1142
- 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 +11 -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/{build/src → dist}/interfaces/axis-scales.d.ts +11 -11
- package/{interfaces → dist/interfaces}/charts.d.ts +517 -512
- package/{build/src → dist}/interfaces/components.d.ts +11 -11
- package/dist/interfaces/index.d.ts +11 -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/{interfaces → dist/interfaces}/layout.d.ts +21 -15
- package/{build/src → dist}/interfaces/model.d.ts +2 -2
- package/dist/interfaces/services.d.ts +20 -0
- package/{build/src → dist}/interfaces/truncation.d.ts +2 -2
- package/{build/src → dist}/model/binned-charts.d.ts +1 -1
- package/{build/src → dist}/model/cartesian-charts.d.ts +2 -2
- package/{model → dist/model}/heatmap.d.ts +57 -52
- 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/{model → dist/model}/meter.d.ts +20 -19
- package/{model → dist/model}/model.d.ts +110 -107
- package/{services → dist/services}/angle-utils.d.ts +15 -16
- package/{services → dist/services}/color-scale-utils.d.ts +2 -2
- 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/{build/src → dist}/services/essentials/gradient-utils.d.ts +2 -2
- 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/{services → dist/services}/time-series.d.ts +13 -13
- package/{build/src → dist}/services/zoom.d.ts +2 -2
- package/{styles → dist/styles}/_chart-holder.scss +5 -5
- package/{styles → dist/styles}/color-palatte.scss +66 -66
- package/{styles → dist/styles}/colors.scss +15 -39
- package/{styles → dist/styles}/components/_color-legend.scss +2 -2
- package/{styles → dist/styles}/components/_edge.scss +4 -4
- package/{styles → dist/styles}/components/_grid.scss +2 -2
- package/dist/styles/components/_marker.scss +7 -0
- package/{styles → dist/styles}/components/_meter-title.scss +2 -2
- package/{styles → dist/styles}/components/_tooltip.scss +3 -3
- package/{styles → dist/styles}/components/diagrams/_card-node.scss +3 -3
- package/{styles → dist/styles}/components/diagrams/_edge.scss +5 -5
- package/{styles → dist/styles}/components/diagrams/_shape-node.scss +3 -3
- package/dist/styles/components/diagrams/index.scss +4 -0
- package/{styles → dist/styles}/graphs/_alluvial.scss +2 -2
- package/{styles → dist/styles}/graphs/_bullet.scss +3 -3
- package/{styles → dist/styles}/graphs/_circle-pack.scss +1 -1
- package/{styles → dist/styles}/graphs/_gauge.scss +1 -1
- package/{styles → dist/styles}/graphs/_heatmap.scss +2 -2
- package/{styles → dist/styles}/graphs/_meter.scss +1 -1
- package/{styles → dist/styles}/graphs/_radar.scss +1 -1
- package/{styles → dist/styles}/graphs/_scatter-stacked.scss +1 -1
- package/{styles → dist/styles}/graphs/_tree.scss +2 -3
- package/{styles → dist/styles}/styles.scss +8 -3
- package/{styles → dist/styles}/tokens.scss +97 -106
- package/dist/styles.css +28264 -0
- package/dist/styles.css.map +1 -0
- package/dist/styles.min.css +1 -0
- package/dist/styles.min.css.map +1 -0
- package/{tools.d.ts → dist/tools.d.ts} +144 -144
- package/package.json +136 -101
- package/LICENSE.md +0 -201
- 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/high-scale.d.ts +0 -1
- package/build/demo/data/index.d.ts +0 -33
- package/build/demo/data/time-series-axis.d.ts +0 -368
- 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/choropleth.d.ts +0 -10
- 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 -25
- 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/grid-brush.d.ts +0 -10
- package/build/src/components/axes/grid.d.ts +0 -22
- package/build/src/components/axes/ruler-binned.d.ts +0 -7
- package/build/src/components/axes/ruler.d.ts +0 -27
- 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/diagrams/buildPaths.d.ts +0 -63
- package/build/src/components/essentials/canvas-chart-clip.d.ts +0 -6
- package/build/src/components/essentials/modal.d.ts +0 -14
- 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/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/boxplot.d.ts +0 -9
- package/build/src/components/graphs/bullet.d.ts +0 -12
- package/build/src/components/graphs/choropleth.d.ts +0 -6
- 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/scatter.d.ts +0 -21
- package/build/src/components/graphs/skeleton-lines.d.ts +0 -11
- package/build/src/components/graphs/tree.d.ts +0 -9
- package/build/src/components/graphs/treemap.d.ts +0 -11
- package/build/src/components/index.d.ts +0 -53
- package/build/src/components/layout/layout.d.ts +0 -17
- package/build/src/components/layout/spacer.d.ts +0 -5
- package/build/src/configuration.d.ts +0 -46
- package/build/src/interfaces/charts.d.ts +0 -512
- package/build/src/interfaces/index.d.ts +0 -7
- package/build/src/interfaces/layout.d.ts +0 -15
- package/build/src/model/heatmap.d.ts +0 -52
- package/build/src/model/meter.d.ts +0 -19
- package/build/src/model/model.d.ts +0 -107
- package/build/src/services/angle-utils.d.ts +0 -205
- package/build/src/services/color-scale-utils.d.ts +0 -10
- 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/transitions.d.ts +0 -13
- package/build/src/services/index.d.ts +0 -10
- 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/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/choropleth.d.ts +0 -10
- package/charts/choropleth.js +0 -141
- package/charts/choropleth.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 -142
- 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 -25
- package/charts/index.js +0 -26
- 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.js +0 -170
- package/components/axes/grid-brush.js.map +0 -1
- package/components/axes/grid.js +0 -235
- package/components/axes/grid.js.map +0 -1
- package/components/axes/hover-axis.d.ts +0 -10
- package/components/axes/hover-axis.js +0 -243
- package/components/axes/hover-axis.js.map +0 -1
- package/components/axes/ruler-binned.js +0 -136
- package/components/axes/ruler-binned.js.map +0 -1
- package/components/axes/ruler-stacked.d.ts +0 -4
- package/components/axes/ruler-stacked.js +0 -26
- package/components/axes/ruler-stacked.js.map +0 -1
- 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.js +0 -134
- package/components/axes/two-dimensional-axes.js.map +0 -1
- package/components/axes/zero-line.js +0 -76
- package/components/axes/zero-line.js.map +0 -1
- 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.d.ts +0 -37
- package/components/diagrams/markerDefinitions.js +0 -38
- package/components/diagrams/markerDefinitions.js.map +0 -1
- 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 -20
- package/components/essentials/color-scale-legend.js +0 -237
- package/components/essentials/color-scale-legend.js.map +0 -1
- package/components/essentials/geo-projection.d.ts +0 -16
- package/components/essentials/geo-projection.js +0 -160
- package/components/essentials/geo-projection.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.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.js +0 -279
- package/components/essentials/title-meter.js.map +0 -1
- package/components/essentials/title.js +0 -138
- package/components/essentials/title.js.map +0 -1
- package/components/essentials/tooltip-axis.d.ts +0 -4
- 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.js +0 -535
- package/components/graphs/alluvial.js.map +0 -1
- 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.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/choropleth.js +0 -106
- package/components/graphs/choropleth.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.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.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 -53
- package/components/index.js +0 -59
- package/components/index.js.map +0 -1
- 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.js +0 -552
- package/configuration.js.map +0 -1
- package/demo/create-codesandbox.d.ts +0 -65
- package/demo/create-codesandbox.js +0 -173
- package/demo/create-codesandbox.js.map +0 -1
- package/demo/data/CHART_TYPES.d.ts +0 -128
- package/demo/data/CHART_TYPES.js +0 -128
- 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/choropleth.d.ts +0 -738
- package/demo/data/choropleth.js +0 -1684
- package/demo/data/choropleth.js.map +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 -33
- package/demo/data/index.js +0 -1305
- 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.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/topojson-110.d.ts +0 -360
- package/demo/data/topojson-110.js +0 -40724
- package/demo/data/topojson-110.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.map +0 -1
- package/demo/styles.min.css +0 -1
- package/demo/styles.min.css.map +0 -1
- package/demo/tsconfig.tsbuildinfo +0 -1451
- package/demo/utils.d.ts +0 -24
- package/demo/utils.js +0 -222
- 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.d.ts +0 -12
- 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.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 -261
- package/interfaces/enums.js +0 -296
- package/interfaces/enums.js.map +0 -1
- package/interfaces/events.d.ts +0 -239
- package/interfaces/events.js +0 -269
- 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.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.d.ts +0 -8
- 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.d.ts +0 -14
- package/model/boxplot.js +0 -174
- package/model/boxplot.js.map +0 -1
- package/model/bullet.d.ts +0 -14
- 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/choropleth.d.ts +0 -29
- package/model/choropleth.js +0 -105
- package/model/choropleth.js.map +0 -1
- package/model/circle-pack.d.ts +0 -36
- package/model/circle-pack.js +0 -189
- package/model/circle-pack.js.map +0 -1
- package/model/gauge.d.ts +0 -9
- package/model/gauge.js +0 -51
- package/model/gauge.js.map +0 -1
- package/model/heatmap.js +0 -220
- package/model/heatmap.js.map +0 -1
- package/model/meter.js +0 -118
- package/model/meter.js.map +0 -1
- package/model/model.js +0 -712
- package/model/model.js.map +0 -1
- package/model/pie.d.ts +0 -9
- package/model/pie.js +0 -66
- package/model/pie.js.map +0 -1
- package/model/radar.d.ts +0 -7
- package/model/radar.js +0 -52
- package/model/radar.js.map +0 -1
- package/model/tree.d.ts +0 -14
- package/model/tree.js +0 -56
- package/model/tree.js.map +0 -1
- package/model/treemap.d.ts +0 -8
- package/model/treemap.js +0 -44
- package/model/treemap.js.map +0 -1
- package/model/wordcloud.d.ts +0 -7
- 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.js +0 -82
- package/services/angle-utils.js.map +0 -1
- package/services/canvas-zoom.d.ts +0 -11
- package/services/canvas-zoom.js +0 -72
- package/services/canvas-zoom.js.map +0 -1
- package/services/color-scale-utils.js +0 -64
- package/services/color-scale-utils.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 -10
- package/services/index.js +0 -13
- 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/components/_marker.scss +0 -7
- package/styles/components/diagrams/index.scss +0 -4
- package/styles.css +0 -6325
- package/styles.css.map +0 -1
- package/styles.min.css +0 -1
- package/styles.min.css.map +0 -1
- package/tools.js +0 -348
- package/tools.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -3816
- /package/{build/src → dist}/components/axes/ruler-stacked.d.ts +0 -0
- /package/{build/src → dist}/components/diagrams/markerDefinitions.d.ts +0 -0
- /package/{build/src → dist}/components/essentials/tooltip-axis.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/alluvial.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/area.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/bar.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/boxplot.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/bubble.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/bullet.d.ts +0 -0
- /package/{build/demo/data/CHART_TYPES.d.ts → dist/demo/charts/chart-types.d.ts} +0 -0
- /package/{build/demo/data → dist/demo/charts}/choropleth.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/circle-pack.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/combo.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/donut.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/gauge.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/heatmap.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/hightlight.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/histogram.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/line.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/lollipop.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/meter.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/pie.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/radar.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/scatter.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/step.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/toolbar.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/topojson-110.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/tree.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/treemap.d.ts +0 -0
- /package/{build/demo/data → dist/demo/charts}/wordcloud.d.ts +0 -0
- /package/{build/src → dist}/interfaces/a11y.d.ts +0 -0
- /package/{build/src → dist}/interfaces/enums.d.ts +0 -0
- /package/{build/src → dist}/interfaces/events.d.ts +0 -0
- /package/{build/src → dist}/model/alluvial.d.ts +0 -0
- /package/{build/src → dist}/model/boxplot.d.ts +0 -0
- /package/{build/src → dist}/model/bullet.d.ts +0 -0
- /package/{build/src → dist}/model/choropleth.d.ts +0 -0
- /package/{build/src → dist}/model/circle-pack.d.ts +0 -0
- /package/{build/src → dist}/model/gauge.d.ts +0 -0
- /package/{build/src → dist}/model/pie.d.ts +0 -0
- /package/{build/src → dist}/model/radar.d.ts +0 -0
- /package/{build/src → dist}/model/tree.d.ts +0 -0
- /package/{build/src → dist}/model/treemap.d.ts +0 -0
- /package/{build/src → dist}/model/wordcloud.d.ts +0 -0
- /package/{build/src → dist}/services/canvas-zoom.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/_choropleth.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
- /package/{styles → dist/styles}/graphs/index.scss +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color-scale-legend.js","sourceRoot":"","sources":["color-scale-legend.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;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,CAAC;aACnC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;aACZ,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC;aAC1D,IAAI,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC;aACpD,IAAI,CAAC,OAAO,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC,EAAD,CAAC,CAAC;aACvB,IAAI,CAAC,MAAM,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC,EAAD,CAAC,CAAC,CAAC;QAEzB,OAAO,CAAC,CAAC,mBAAmB,IAAI,WAAW,CAAC,KAAK,MAAM;YACtD,CAAC,CAAC,cAAc,CAAC,SAAS,EAAE,GAAG,CAAC;YAChC,CAAC,CAAC,CAAC,CAAC;IACN,CAAC;IAED,kCAAO,GAAP;QACC,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;YACjC,0BAA0B;YAC1B,IAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC5C,cAAc,CAAC,mBAAmB,CACjC,MAAM,CAAC,IAAI,CAAC,eAAe,EAC3B,IAAI,CAAC,uBAAuB,CAC5B,CAAC;SACF;IACF,CAAC;IACF,uBAAC;AAAD,CAAC,AA5VD,CAAsC,MAAM,GA4V3C","sourcesContent":["// Internal Imports\nimport * as Tools from '../../tools';\nimport { ColorLegendType, Events, RenderTypes } from '../../interfaces';\nimport * as Configuration from '../../configuration';\nimport { Legend } from './legend';\nimport { DOMUtils, getDomain } from '../../services';\nimport { ChartModel } from '../../model/model';\n\n// D3 imports\nimport { axisBottom } from 'd3-axis';\nimport { scaleBand, scaleLinear } from 'd3-scale';\nimport { interpolateNumber, quantize } from 'd3-interpolate';\n\nexport class ColorScaleLegend extends Legend {\n\ttype = 'color-legend';\n\trenderType = RenderTypes.SVG;\n\n\tprivate gradient_id =\n\t\t'gradient-id-' + Math.floor(Math.random() * 99999999999);\n\tprivate chartType: string;\n\n\tconstructor(model: ChartModel, services: any, configs?: any) {\n\t\tsuper(model, services, configs);\n\t\tthis.chartType = configs.chartType;\n\t}\n\n\tinit() {\n\t\t// Highlight correct circle on legend item hovers\n\t\tif (this.chartType === 'heatmap') {\n\t\t\tconst eventsFragment = this.services.events;\n\t\t\teventsFragment.addEventListener(\n\t\t\t\tEvents.Axis.RENDER_COMPLETE,\n\t\t\t\tthis.handleAxisCompleteEvent\n\t\t\t);\n\t\t}\n\t}\n\n\t// Position legend after axis have rendered\n\thandleAxisCompleteEvent = (event: CustomEvent) => {\n\t\tconst svg = this.getComponentContainer();\n\n\t\tconst { width } = DOMUtils.getSVGElementSize(svg, {\n\t\t\tuseAttrs: true,\n\t\t});\n\n\t\tconst isDataLoading = Tools.getProperty(\n\t\t\tthis.getOptions(),\n\t\t\t'data',\n\t\t\t'loading'\n\t\t);\n\n\t\tif (width > Configuration.legend.color.barWidth && !isDataLoading) {\n\t\t\tconst title = Tools.getProperty(\n\t\t\t\tthis.getOptions(),\n\t\t\t\t'heatmap',\n\t\t\t\t'colorLegend',\n\t\t\t\t'title'\n\t\t\t);\n\n\t\t\tconst { cartesianScales } = this.services;\n\n\t\t\t// Get axis width & start/end positions\n\t\t\tconst mainXScale = cartesianScales.getMainXScale();\n\t\t\tconst xDimensions = mainXScale.range();\n\n\t\t\t// Align legend with the axis\n\t\t\tif (xDimensions[0] > 1) {\n\t\t\t\tsvg.select('g.legend').attr(\n\t\t\t\t\t'transform',\n\t\t\t\t\t`translate(${xDimensions[0]}, 0)`\n\t\t\t\t);\n\n\t\t\t\tif (title) {\n\t\t\t\t\tconst {\n\t\t\t\t\t\twidth: textWidth,\n\t\t\t\t\t} = DOMUtils.getSVGElementSize(\n\t\t\t\t\t\tsvg.select('g.legend-title').select('text'),\n\t\t\t\t\t\t{ useBBox: true }\n\t\t\t\t\t);\n\n\t\t\t\t\t// D3 moves the LEFT y-axis labels by 9\n\t\t\t\t\tconst availableSpace = xDimensions[0] - textWidth - 9;\n\n\t\t\t\t\t// If space is available, align the label with the axis labels\n\t\t\t\t\tif (availableSpace > 1) {\n\t\t\t\t\t\tsvg.select('g.legend-title').attr(\n\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t`translate(${availableSpace}, 0)`\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Move the legend down by 16 pixels to display legend text on top\n\t\t\t\t\t\tsvg.select('g.legend').attr(\n\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t`translate(${xDimensions[0]}, 16)`\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Align legend title with start of axis\n\t\t\t\t\t\tsvg.select('g.legend-title').attr(\n\t\t\t\t\t\t\t'transform',\n\t\t\t\t\t\t\t`translate(${xDimensions[0]}, 0)`\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} else {\n\t\t\t// Default state\n\t\t\tsvg.select('g.legend-title').attr('transform', `translate(0, 0)`);\n\t\t}\n\t};\n\n\trender(animate = false) {\n\t\tconst options = this.getOptions();\n\t\tconst svg = this.getComponentContainer();\n\t\tconst { width } = DOMUtils.getSVGElementSize(svg, {\n\t\t\tuseAttrs: true,\n\t\t});\n\n\t\tconst customColors = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'color',\n\t\t\t'gradient',\n\t\t\t'colors'\n\t\t);\n\n\t\tconst colorScaleType = Tools.getProperty(\n\t\t\toptions,\n\t\t\tthis.chartType,\n\t\t\t'colorLegend',\n\t\t\t'type'\n\t\t);\n\n\t\tlet colorPairingOption = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'color',\n\t\t\t'pairing',\n\t\t\t'option'\n\t\t);\n\n\t\tconst title = Tools.getProperty(\n\t\t\toptions,\n\t\t\t'heatmap',\n\t\t\t'colorLegend',\n\t\t\t'title'\n\t\t);\n\n\t\t// Clear DOM if loading\n\t\tconst isDataLoading = Tools.getProperty(\n\t\t\tthis.getOptions(),\n\t\t\t'data',\n\t\t\t'loading'\n\t\t);\n\n\t\tif (isDataLoading) {\n\t\t\tsvg.html('');\n\t\t\treturn;\n\t\t}\n\n\t\tconst customColorsEnabled = !Tools.isEmpty(customColors);\n\t\tconst domain = getDomain(this.model.getDisplayData());\n\n\t\tconst useDefaultBarWidth = !(\n\t\t\twidth <= Configuration.legend.color.barWidth\n\t\t);\n\t\tconst barWidth = useDefaultBarWidth\n\t\t\t? Configuration.legend.color.barWidth\n\t\t\t: width;\n\n\t\tconst legendGroupElement = DOMUtils.appendOrSelect(svg, 'g.legend');\n\t\tconst axisElement = DOMUtils.appendOrSelect(\n\t\t\tlegendGroupElement,\n\t\t\t'g.legend-axis'\n\t\t);\n\n\t\t// Render title if it exists\n\t\tif (title) {\n\t\t\tconst legendTitleGroup = DOMUtils.appendOrSelect(\n\t\t\t\tsvg,\n\t\t\t\t'g.legend-title'\n\t\t\t);\n\t\t\tconst legendTitle = DOMUtils.appendOrSelect(\n\t\t\t\tlegendTitleGroup,\n\t\t\t\t'text'\n\t\t\t);\n\t\t\tlegendTitle.text(title).attr('dy', '0.7em');\n\n\t\t\t// Move the legend down by 16 pixels to display legend text on top\n\t\t\tlegendGroupElement.attr('transform', `translate(0, 16)`);\n\t\t}\n\n\t\t// If domain consists of negative and positive values, use diverging palettes\n\t\tconst colorScheme = domain[0] < 0 && domain[1] > 0 ? 'diverge' : 'mono';\n\n\t\t// Use default color pairing options if not in defined range\n\t\tif (\n\t\t\tcolorPairingOption < 1 &&\n\t\t\tcolorPairingOption > 4 &&\n\t\t\tcolorScheme === 'mono'\n\t\t) {\n\t\t\tcolorPairingOption = 1;\n\t\t} else if (\n\t\t\tcolorPairingOption < 1 &&\n\t\t\tcolorPairingOption > 2 &&\n\t\t\tcolorScheme === 'diverge'\n\t\t) {\n\t\t\tcolorPairingOption = 1;\n\t\t}\n\n\t\tlet colorPairing = [];\n\t\t// Carbon charts has 11 colors for a single monochromatic palette & 17 for a divergent palette\n\t\tlet colorGroupingLength = colorScheme === 'diverge' ? 17 : 11;\n\n\t\tif (!customColorsEnabled) {\n\t\t\t// Add class names to list and the amount based on the color scheme\n\t\t\tfor (let i = 1; i < colorGroupingLength + 1; i++) {\n\t\t\t\tcolorPairing.push(\n\t\t\t\t\tcolorScaleType === ColorLegendType.LINEAR\n\t\t\t\t\t\t? `stop-color-${colorScheme}-${colorPairingOption}-${i}`\n\t\t\t\t\t\t: `fill-${colorScheme}-${colorPairingOption}-${i}`\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\t// Use custom colors\n\t\t\tcolorPairing = customColors;\n\t\t}\n\n\t\t// Generate equal chunks between range to act as ticks\n\t\tconst interpolator = interpolateNumber(domain[0], domain[1]);\n\t\tconst quant = quantize(interpolator, 3);\n\n\t\t// Create scale & ticks\n\t\tconst linearScale = scaleLinear().domain(domain).range([0, barWidth]);\n\n\t\tconst legendAxis = axisBottom(linearScale)\n\t\t\t.tickSize(0)\n\t\t\t.tickValues(quant);\n\n\t\tswitch (colorScaleType) {\n\t\t\tcase ColorLegendType.LINEAR:\n\t\t\t\tthis.drawLinear(colorPairing, legendGroupElement, barWidth);\n\t\t\t\tbreak;\n\t\t\tcase ColorLegendType.QUANTIZE:\n\t\t\t\tconst rangeStart = this.drawQuantize(\n\t\t\t\t\tcolorPairing,\n\t\t\t\t\tcolorScheme,\n\t\t\t\t\tcustomColorsEnabled,\n\t\t\t\t\tlegendGroupElement,\n\t\t\t\t\tbarWidth\n\t\t\t\t);\n\t\t\t\t// Using range provided by drawQuantize for alignment purposes\n\t\t\t\tlinearScale.range([rangeStart, barWidth]);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow Error('Entered color legend type is not supported.');\n\t\t}\n\n\t\t// Align axes at the bottom of the rectangle and delete the domain line\n\t\taxisElement\n\t\t\t.attr(\n\t\t\t\t'transform',\n\t\t\t\t`translate(0,${Configuration.legend.color.axisYTranslation})`\n\t\t\t)\n\t\t\t.call(legendAxis);\n\n\t\t// Remove auto generated axis bottom line\n\t\taxisElement.select('.domain').remove();\n\n\t\t// Translate first/last axis tick if barWidth equals chart width\n\t\t// Ensures text is not clipped when default bar width (300px) is not used\n\t\taxisElement\n\t\t\t.select('g.tick:last-of-type text')\n\t\t\t.style('text-anchor', useDefaultBarWidth ? 'middle' : 'end');\n\t\taxisElement\n\t\t\t.select('g.tick:first-of-type text')\n\t\t\t.style(\n\t\t\t\t'text-anchor',\n\t\t\t\tuseDefaultBarWidth && this.chartType !== 'choropleth'\n\t\t\t\t\t? 'middle'\n\t\t\t\t\t: 'start'\n\t\t\t);\n\t}\n\n\t// Renders gradient legend\n\tdrawLinear(colorPairing, legendGroupElement, barWidth) {\n\t\tconst stopLengthPercentage = 100 / (colorPairing.length - 1);\n\n\t\t// Generate the gradient\n\t\tconst linearGradient = DOMUtils.appendOrSelect(\n\t\t\tlegendGroupElement,\n\t\t\t'linearGradient'\n\t\t);\n\t\t// Rendering gradient\n\t\tlinearGradient\n\t\t\t.attr('id', `${this.gradient_id}-legend`)\n\t\t\t.selectAll('stop')\n\t\t\t.data(colorPairing)\n\t\t\t.enter()\n\t\t\t.append('stop')\n\t\t\t.attr('offset', (_, i) => `${i * stopLengthPercentage}%`)\n\t\t\t.attr('class', (_, i) => colorPairing[i])\n\t\t\t.attr('stop-color', (d) => d);\n\n\t\t// Create the legend container\n\t\tconst rectangle = DOMUtils.appendOrSelect(legendGroupElement, 'rect');\n\t\trectangle\n\t\t\t.attr('width', barWidth)\n\t\t\t.attr('height', Configuration.legend.color.barHeight)\n\t\t\t.style('fill', `url(#${this.gradient_id}-legend)`);\n\t}\n\n\t/**\n\t * Renders quantized legend\n\t * @returns number (range start)\n\t */\n\tdrawQuantize(\n\t\tcolorPairing,\n\t\tcolorScheme,\n\t\tcustomColorsEnabled,\n\t\tlegendGroupElement,\n\t\tbarWidth\n\t) {\n\t\t// If divergent && non-custom color, remove 0/white from being displayed\n\t\tif (!customColorsEnabled && colorScheme === 'diverge') {\n\t\t\tcolorPairing.splice(colorPairing.length / 2, 1);\n\t\t}\n\n\t\tconst colorScaleBand = scaleBand()\n\t\t\t.domain(colorPairing)\n\t\t\t.range([0, barWidth]);\n\n\t\t// Render the quantized rectangles\n\t\tconst rectangle = DOMUtils.appendOrSelect(\n\t\t\tlegendGroupElement,\n\t\t\t'g.quantized-rect'\n\t\t);\n\n\t\trectangle\n\t\t\t.selectAll('rect')\n\t\t\t.data(colorScaleBand.domain())\n\t\t\t.join('rect')\n\t\t\t.attr('x', (d) => colorScaleBand(d))\n\t\t\t.attr('y', 0)\n\t\t\t.attr('width', Math.max(0, colorScaleBand.bandwidth() - 1))\n\t\t\t.attr('height', Configuration.legend.color.barHeight)\n\t\t\t.attr('class', (d) => d)\n\t\t\t.attr('fill', (d) => d);\n\n\t\treturn (!customColorsEnabled && colorScheme) === 'mono'\n\t\t\t? colorScaleBand.bandwidth() - 1\n\t\t\t: 0;\n\t}\n\n\tdestroy() {\n\t\tif (this.chartType === 'heatmap') {\n\t\t\t// Remove legend listeners\n\t\t\tconst eventsFragment = this.services.events;\n\t\t\teventsFragment.removeEventListener(\n\t\t\t\tEvents.Axis.RENDER_COMPLETE,\n\t\t\t\tthis.handleAxisCompleteEvent\n\t\t\t);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component } from '../component';
|
|
2
|
-
import { RenderTypes } from '../../interfaces';
|
|
3
|
-
export declare class GeoProjection extends Component {
|
|
4
|
-
type: string;
|
|
5
|
-
renderType: RenderTypes;
|
|
6
|
-
render(): void;
|
|
7
|
-
/**
|
|
8
|
-
* @info
|
|
9
|
-
* Depending on projection, we may need to provide additional configuration
|
|
10
|
-
* e.g. sizing
|
|
11
|
-
*
|
|
12
|
-
* In such case, function can be refactored so that
|
|
13
|
-
* projection should return an object with the configuraiton & function
|
|
14
|
-
*/
|
|
15
|
-
getProjection(): any;
|
|
16
|
-
}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
// Internal Imports
|
|
15
|
-
import { Component } from '../component';
|
|
16
|
-
import { DOMUtils } from '../../services';
|
|
17
|
-
import * as Tools from '../../tools';
|
|
18
|
-
import { RenderTypes, Projection } from '../../interfaces';
|
|
19
|
-
// D3 imports
|
|
20
|
-
import { geoPath, line } from 'd3';
|
|
21
|
-
import { feature, merge } from 'topojson-client';
|
|
22
|
-
import {
|
|
23
|
-
// Azimuthal Projections - project the sphere directly on to the plane
|
|
24
|
-
geoEqualEarth,
|
|
25
|
-
// Conic projections - project the sphere onto a cone & unroll into the plane
|
|
26
|
-
geoAlbers, geoConicEqualArea, geoConicEquidistant,
|
|
27
|
-
// Cylindrical projections - project the sphere onto a containing cylinder & unroll onto the plane
|
|
28
|
-
geoEquirectangular, geoMercator, geoNaturalEarth1, } from 'd3-geo';
|
|
29
|
-
var GeoProjection = /** @class */ (function (_super) {
|
|
30
|
-
__extends(GeoProjection, _super);
|
|
31
|
-
function GeoProjection() {
|
|
32
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
33
|
-
_this.type = 'geo';
|
|
34
|
-
_this.renderType = RenderTypes.SVG;
|
|
35
|
-
return _this;
|
|
36
|
-
}
|
|
37
|
-
GeoProjection.prototype.render = function () {
|
|
38
|
-
var svg = this.getComponentContainer({ withinChartClip: true });
|
|
39
|
-
var _a = DOMUtils.getSVGElementSize(svg, {
|
|
40
|
-
useAttrs: true,
|
|
41
|
-
}), width = _a.width, height = _a.height;
|
|
42
|
-
// Because of a Firefox bug with regards to sizing & d3 packs,
|
|
43
|
-
// rather than checking if height or width aren't 0,
|
|
44
|
-
// we have to make sure they're not smaller than 1
|
|
45
|
-
if (width < 1 || height < 1) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
// Get users projection
|
|
49
|
-
var projection = this.getProjection();
|
|
50
|
-
var geoData = Tools.getProperty(this.getOptions(), 'geoData');
|
|
51
|
-
var data = this.model.getCombinedData();
|
|
52
|
-
// Seperate countries that have data & countries with missing data
|
|
53
|
-
var withData = {};
|
|
54
|
-
var withoutData = {};
|
|
55
|
-
Object.keys(data).forEach(function (element) {
|
|
56
|
-
if (typeof data[element].value === 'number') {
|
|
57
|
-
withData[element] = data[element];
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
withoutData[element] = data[element];
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
// Merge all without data
|
|
64
|
-
var withoutDataMerge = merge(geoData, Object.values(withoutData));
|
|
65
|
-
/**
|
|
66
|
-
* @todo - Currently only topojson is supported
|
|
67
|
-
*
|
|
68
|
-
* Unlike geojson, topojson does not have a standard format
|
|
69
|
-
* So data must be nested in the following format:
|
|
70
|
-
* options : {
|
|
71
|
-
* geoData: {
|
|
72
|
-
* objects: {
|
|
73
|
-
* ...
|
|
74
|
-
* }
|
|
75
|
-
* }
|
|
76
|
-
* }
|
|
77
|
-
*/
|
|
78
|
-
// Convert from topojson to geojson
|
|
79
|
-
var json = feature(geoData, {
|
|
80
|
-
// We need to specify that we are converting geometry collections
|
|
81
|
-
type: 'GeometryCollection',
|
|
82
|
-
geometries: Object.values(withData),
|
|
83
|
-
});
|
|
84
|
-
// Depending on the projection selected, we will need to scale/translate accordingly
|
|
85
|
-
var projectionScale = projection.fitSize([width, height], json);
|
|
86
|
-
var geo = geoPath().projection(projectionScale);
|
|
87
|
-
var borders = DOMUtils.appendOrSelect(svg, 'g.geo');
|
|
88
|
-
borders
|
|
89
|
-
.selectAll('path')
|
|
90
|
-
.data(json.features)
|
|
91
|
-
.join('path')
|
|
92
|
-
.attr('d', geo);
|
|
93
|
-
var patternID = this.services.domUtils.generateElementIDString("geo-pattern-stripes");
|
|
94
|
-
// Create a striped pattern for missing data
|
|
95
|
-
var defs = DOMUtils.appendOrSelect(svg, 'defs');
|
|
96
|
-
DOMUtils.appendOrSelect(defs, 'pattern')
|
|
97
|
-
.attr('id', patternID)
|
|
98
|
-
.attr('width', 5)
|
|
99
|
-
.attr('height', 10)
|
|
100
|
-
.attr('patternUnits', 'userSpaceOnUse')
|
|
101
|
-
.attr('patternTransform', 'rotate(45)')
|
|
102
|
-
.append('path')
|
|
103
|
-
.classed('pattern-fill', true)
|
|
104
|
-
.attr('d', line()([
|
|
105
|
-
[0, 0],
|
|
106
|
-
[0, 10],
|
|
107
|
-
]));
|
|
108
|
-
var missingBorders = DOMUtils.appendOrSelect(svg, 'g.missing-data');
|
|
109
|
-
DOMUtils.appendOrSelect(missingBorders, 'path')
|
|
110
|
-
.datum(withoutDataMerge)
|
|
111
|
-
.attr('d', geo)
|
|
112
|
-
.style('fill', "url(#" + patternID + ")");
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* @info
|
|
116
|
-
* Depending on projection, we may need to provide additional configuration
|
|
117
|
-
* e.g. sizing
|
|
118
|
-
*
|
|
119
|
-
* In such case, function can be refactored so that
|
|
120
|
-
* projection should return an object with the configuraiton & function
|
|
121
|
-
*/
|
|
122
|
-
GeoProjection.prototype.getProjection = function () {
|
|
123
|
-
var projection = null;
|
|
124
|
-
var projectionSelected = Tools.getProperty(this.getOptions(), 'thematic', 'projection');
|
|
125
|
-
switch (projectionSelected) {
|
|
126
|
-
// Azimuthal Projections
|
|
127
|
-
case Projection.geoEqualEarth:
|
|
128
|
-
projection = geoEqualEarth();
|
|
129
|
-
break;
|
|
130
|
-
// Conic Projections
|
|
131
|
-
case Projection.geoAlbers:
|
|
132
|
-
projection = geoAlbers();
|
|
133
|
-
break;
|
|
134
|
-
case Projection.geoConicEqualArea:
|
|
135
|
-
projection = geoConicEqualArea();
|
|
136
|
-
break;
|
|
137
|
-
case Projection.geoConicEquidistant:
|
|
138
|
-
projection = geoConicEquidistant();
|
|
139
|
-
break;
|
|
140
|
-
// Cyndrical projections
|
|
141
|
-
case Projection.geoEquirectangular:
|
|
142
|
-
projection = geoEquirectangular();
|
|
143
|
-
break;
|
|
144
|
-
case Projection.geoMercator:
|
|
145
|
-
projection = geoMercator();
|
|
146
|
-
break;
|
|
147
|
-
case Projection.geoNaturalEarth1:
|
|
148
|
-
projection = geoNaturalEarth1();
|
|
149
|
-
break;
|
|
150
|
-
default:
|
|
151
|
-
// Projection is missing or an unsupported projection value is passed
|
|
152
|
-
throw new Error('Projection is not supported.');
|
|
153
|
-
break;
|
|
154
|
-
}
|
|
155
|
-
return projection;
|
|
156
|
-
};
|
|
157
|
-
return GeoProjection;
|
|
158
|
-
}(Component));
|
|
159
|
-
export { GeoProjection };
|
|
160
|
-
//# sourceMappingURL=../../../src/components/essentials/geo-projection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"geo-projection.js","sourceRoot":"","sources":["geo-projection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE3D,aAAa;AACb,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,KAAK,E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,EAAE,CAAC;gBAC3B,MAAM;YACP,KAAK,UAAU,CAAC,gBAAgB;gBAC/B,UAAU,GAAG,gBAAgB,EAAE,CAAC;gBAChC,MAAM;YACP;gBACC,qEAAqE;gBACrE,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;gBAChD,MAAM;SACP;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;IACF,oBAAC;AAAD,CAAC,AAnJD,CAAmC,SAAS,GAmJ3C","sourcesContent":["// Internal Imports\nimport { Component } from '../component';\nimport { DOMUtils } from '../../services';\nimport * as Tools from '../../tools';\nimport { RenderTypes, Projection } from '../../interfaces';\n\n// D3 imports\nimport { geoPath, line } from 'd3';\nimport { feature, merge } from 'topojson-client';\nimport {\n\t// Azimuthal Projections - project the sphere directly on to the plane\n\tgeoEqualEarth,\n\t// Conic projections - project the sphere onto a cone & unroll into the plane\n\tgeoAlbers,\n\tgeoConicEqualArea,\n\tgeoConicEquidistant,\n\t// Cylindrical projections - project the sphere onto a containing cylinder & unroll onto the plane\n\tgeoEquirectangular,\n\tgeoMercator,\n\tgeoNaturalEarth1,\n} from 'd3-geo';\n\nexport class GeoProjection extends Component {\n\ttype = 'geo';\n\trenderType = RenderTypes.SVG;\n\n\trender() {\n\t\tconst svg = this.getComponentContainer({ withinChartClip: true });\n\t\tconst { width, height } = DOMUtils.getSVGElementSize(svg, {\n\t\t\tuseAttrs: true,\n\t\t});\n\n\t\t// Because of a Firefox bug with regards to sizing & d3 packs,\n\t\t// rather than checking if height or width aren't 0,\n\t\t// we have to make sure they're not smaller than 1\n\t\tif (width < 1 || height < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get users projection\n\t\tconst projection = this.getProjection();\n\n\t\tconst geoData = Tools.getProperty(this.getOptions(), 'geoData');\n\n\t\tconst data = this.model.getCombinedData();\n\n\t\t// Seperate countries that have data & countries with missing data\n\t\tconst withData = {};\n\t\tconst withoutData = {};\n\t\tObject.keys(data).forEach((element) => {\n\t\t\tif (typeof data[element].value === 'number') {\n\t\t\t\twithData[element] = data[element];\n\t\t\t} else {\n\t\t\t\twithoutData[element] = data[element];\n\t\t\t}\n\t\t});\n\n\t\t// Merge all without data\n\t\tconst withoutDataMerge = merge(geoData, Object.values(withoutData));\n\n\t\t/**\n\t\t * @todo - Currently only topojson is supported\n\t\t *\n\t\t * Unlike geojson, topojson does not have a standard format\n\t\t * So data must be nested in the following format:\n\t\t * options : {\n\t\t * \tgeoData: {\n\t\t * \tobjects: {\n\t\t * \t\t\t...\n\t\t * \t\t}\n\t\t * }\n\t\t * }\n\t\t */\n\t\t// Convert from topojson to geojson\n\t\tconst json = feature(geoData, {\n\t\t\t// We need to specify that we are converting geometry collections\n\t\t\ttype: 'GeometryCollection',\n\t\t\tgeometries: Object.values(withData),\n\t\t});\n\n\t\t// Depending on the projection selected, we will need to scale/translate accordingly\n\t\tconst projectionScale = projection.fitSize([width, height], json);\n\t\tconst geo = geoPath().projection(projectionScale);\n\n\t\tconst borders = DOMUtils.appendOrSelect(svg, 'g.geo');\n\t\tborders\n\t\t\t.selectAll('path')\n\t\t\t.data(json.features)\n\t\t\t.join('path')\n\t\t\t.attr('d', geo);\n\n\t\tconst patternID = this.services.domUtils.generateElementIDString(\n\t\t\t`geo-pattern-stripes`\n\t\t);\n\n\t\t// Create a striped pattern for missing data\n\t\tconst defs = DOMUtils.appendOrSelect(svg, 'defs');\n\t\tDOMUtils.appendOrSelect(defs, 'pattern')\n\t\t\t.attr('id', patternID)\n\t\t\t.attr('width', 5)\n\t\t\t.attr('height', 10)\n\t\t\t.attr('patternUnits', 'userSpaceOnUse')\n\t\t\t.attr('patternTransform', 'rotate(45)')\n\t\t\t.append('path')\n\t\t\t.classed('pattern-fill', true)\n\t\t\t.attr(\n\t\t\t\t'd',\n\t\t\t\tline()([\n\t\t\t\t\t[0, 0],\n\t\t\t\t\t[0, 10],\n\t\t\t\t])\n\t\t\t);\n\n\t\tconst missingBorders = DOMUtils.appendOrSelect(svg, 'g.missing-data');\n\t\tDOMUtils.appendOrSelect(missingBorders, 'path')\n\t\t\t.datum(withoutDataMerge)\n\t\t\t.attr('d', geo)\n\t\t\t.style('fill', `url(#${patternID})`);\n\t}\n\n\t/**\n\t * @info\n\t * Depending on projection, we may need to provide additional configuration\n\t * e.g. sizing\n\t *\n\t * In such case, function can be refactored so that\n\t * projection should return an object with the configuraiton & function\n\t */\n\tgetProjection() {\n\t\tlet projection = null;\n\t\tconst projectionSelected = Tools.getProperty(\n\t\t\tthis.getOptions(),\n\t\t\t'thematic',\n\t\t\t'projection'\n\t\t);\n\n\t\tswitch (projectionSelected) {\n\t\t\t// Azimuthal Projections\n\t\t\tcase Projection.geoEqualEarth:\n\t\t\t\tprojection = geoEqualEarth();\n\t\t\t\tbreak;\n\t\t\t// Conic Projections\n\t\t\tcase Projection.geoAlbers:\n\t\t\t\tprojection = geoAlbers();\n\t\t\t\tbreak;\n\t\t\tcase Projection.geoConicEqualArea:\n\t\t\t\tprojection = geoConicEqualArea();\n\t\t\t\tbreak;\n\t\t\tcase Projection.geoConicEquidistant:\n\t\t\t\tprojection = geoConicEquidistant();\n\t\t\t\tbreak;\n\t\t\t// Cyndrical projections\n\t\t\tcase Projection.geoEquirectangular:\n\t\t\t\tprojection = geoEquirectangular();\n\t\t\t\tbreak;\n\t\t\tcase Projection.geoMercator:\n\t\t\t\tprojection = geoMercator();\n\t\t\t\tbreak;\n\t\t\tcase Projection.geoNaturalEarth1:\n\t\t\t\tprojection = geoNaturalEarth1();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Projection is missing or an unsupported projection value is passed\n\t\t\t\tthrow new Error('Projection is not supported.');\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn projection;\n\t}\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Component } from '../component';
|
|
2
|
-
import { ChartModel } from '../../model/model';
|
|
3
|
-
import { RenderTypes } from '../../interfaces';
|
|
4
|
-
import Position from '@carbon/utils-position';
|
|
5
|
-
export declare class Highlight extends Component {
|
|
6
|
-
type: string;
|
|
7
|
-
renderType: RenderTypes;
|
|
8
|
-
label: any;
|
|
9
|
-
positionService: Position;
|
|
10
|
-
highlightStrokeWidth: number;
|
|
11
|
-
constructor(model: ChartModel, services: any);
|
|
12
|
-
render(animate?: boolean): void;
|
|
13
|
-
}
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
15
|
-
var t = {};
|
|
16
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17
|
-
t[p] = s[p];
|
|
18
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
19
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
20
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
21
|
-
t[p[i]] = s[p[i]];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
import { Component } from '../component';
|
|
26
|
-
import * as Tools from '../../tools';
|
|
27
|
-
import { AxisPositions, RenderTypes } from '../../interfaces';
|
|
28
|
-
// D3 Imports
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
// ts-ignore is needed because `@types/d3`
|
|
31
|
-
// is missing the `pointer` function
|
|
32
|
-
import { select } from 'd3-selection';
|
|
33
|
-
// Carbon position service
|
|
34
|
-
import Position from '@carbon/utils-position';
|
|
35
|
-
var Highlight = /** @class */ (function (_super) {
|
|
36
|
-
__extends(Highlight, _super);
|
|
37
|
-
function Highlight(model, services) {
|
|
38
|
-
var _this = _super.call(this, model, services) || this;
|
|
39
|
-
_this.type = 'highlight';
|
|
40
|
-
_this.renderType = RenderTypes.SVG;
|
|
41
|
-
_this.positionService = new Position();
|
|
42
|
-
_this.highlightStrokeWidth = 1;
|
|
43
|
-
return _this;
|
|
44
|
-
}
|
|
45
|
-
Highlight.prototype.render = function (animate) {
|
|
46
|
-
if (animate === void 0) { animate = false; }
|
|
47
|
-
var axesOptions = Tools.getProperty(this.getOptions(), 'axes');
|
|
48
|
-
var highlightData = [];
|
|
49
|
-
Object.keys(axesOptions).forEach(function (axisPosition) {
|
|
50
|
-
if (Object.values(AxisPositions).includes(axisPosition)) {
|
|
51
|
-
var axisOptions = axesOptions[axisPosition];
|
|
52
|
-
if (axisOptions.highlights &&
|
|
53
|
-
axisOptions.highlights.data.length > 0) {
|
|
54
|
-
highlightData.push({
|
|
55
|
-
axisPosition: axisPosition,
|
|
56
|
-
highlightStartMapsTo: axisOptions.highlights.highlightStartMapsTo,
|
|
57
|
-
highlightEndMapsTo: axisOptions.highlights.highlightEndMapsTo,
|
|
58
|
-
labelMapsTo: axisOptions.highlights.labelMapsTo,
|
|
59
|
-
highlight: axisOptions.highlights.data,
|
|
60
|
-
color: axisOptions.highlights.color,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
// Grab container SVG
|
|
66
|
-
var svg = this.getComponentContainer({ withinChartClip: true });
|
|
67
|
-
// Update data on all axis highlight groups
|
|
68
|
-
var highlightAxisGroups = svg
|
|
69
|
-
.selectAll('g.axis-highlight')
|
|
70
|
-
.data(highlightData, function (highlightData) { return highlightData.axisPosition; });
|
|
71
|
-
// Remove axis highlight groups that are no longer needed
|
|
72
|
-
highlightAxisGroups.exit().attr('opacity', 0).remove();
|
|
73
|
-
// Add the axis highlight groups that need to be introduced
|
|
74
|
-
var highlightAxisGroupsEnter = highlightAxisGroups
|
|
75
|
-
.enter()
|
|
76
|
-
.append('g');
|
|
77
|
-
var highlightAxisGroupsMerge = highlightAxisGroupsEnter.merge(highlightAxisGroups);
|
|
78
|
-
highlightAxisGroupsMerge.attr('class', function (d) { return "axis-highlight " + d.axisPosition; });
|
|
79
|
-
var highlightGroups = highlightAxisGroupsMerge
|
|
80
|
-
.selectAll('g.highlight-group')
|
|
81
|
-
.data(function (d) {
|
|
82
|
-
return d.highlight.map(function (highlight) {
|
|
83
|
-
highlight.axisPosition = d.axisPosition;
|
|
84
|
-
highlight.highlightStartMapsTo = d.highlightStartMapsTo;
|
|
85
|
-
highlight.labelMapsTo = d.labelMapsTo;
|
|
86
|
-
highlight.color = d.color;
|
|
87
|
-
highlight.highlightEndMapsTo = d.highlightEndMapsTo;
|
|
88
|
-
return highlight;
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
// Remove highlight groups that are no longer needed
|
|
92
|
-
highlightGroups.exit().attr('opacity', 0).remove();
|
|
93
|
-
// Add the highlight groups that need to be introduced
|
|
94
|
-
var highlightGroupsEnter = highlightGroups.enter().append('g');
|
|
95
|
-
highlightGroupsEnter.append('rect').attr('class', 'highlight-bar');
|
|
96
|
-
highlightGroupsEnter.append('line').attr('class', 'highlight-line');
|
|
97
|
-
var highlightGroupsMerge = highlightGroupsEnter.merge(highlightGroups);
|
|
98
|
-
highlightGroupsMerge.attr('class', 'highlight-group');
|
|
99
|
-
var self = this;
|
|
100
|
-
highlightAxisGroupsMerge.each(function (_a) {
|
|
101
|
-
var axisPosition = _a.axisPosition;
|
|
102
|
-
var mainXScale = self.services.cartesianScales.getMainXScale();
|
|
103
|
-
var mainYScale = self.services.cartesianScales.getMainYScale();
|
|
104
|
-
var _b = mainXScale.range(), xScaleStart = _b[0], xScaleEnd = _b[1];
|
|
105
|
-
var _c = mainYScale.range(), yScaleEnd = _c[0], yScaleStart = _c[1];
|
|
106
|
-
var cartesianScales = self.services.cartesianScales;
|
|
107
|
-
var orientation = cartesianScales.getOrientation();
|
|
108
|
-
var getDomainValue = function (d) { return cartesianScales.getDomainValue(d); };
|
|
109
|
-
var getRangeValue = function (d) { return cartesianScales.getRangeValue(d); };
|
|
110
|
-
var _d = Tools.flipDomainAndRangeBasedOnOrientation(getDomainValue, getRangeValue, orientation), getXValue = _d[0], getYValue = _d[1];
|
|
111
|
-
var group = select(this);
|
|
112
|
-
if (axisPosition === AxisPositions.TOP ||
|
|
113
|
-
axisPosition === AxisPositions.BOTTOM) {
|
|
114
|
-
group
|
|
115
|
-
.selectAll('rect.highlight-bar')
|
|
116
|
-
.transition()
|
|
117
|
-
.call(function (t) {
|
|
118
|
-
return self.services.transitions.setupTransition({
|
|
119
|
-
transition: t,
|
|
120
|
-
name: 'highlight-bar-update',
|
|
121
|
-
animate: animate,
|
|
122
|
-
});
|
|
123
|
-
})
|
|
124
|
-
// Stroke width added to stop overflow of highlight
|
|
125
|
-
.attr('y', Math.max(yScaleStart + self.highlightStrokeWidth, 0))
|
|
126
|
-
// Stroke width subtracted to stop overflow of highlight
|
|
127
|
-
.attr('height', Math.max(yScaleEnd - 2 * self.highlightStrokeWidth, 0))
|
|
128
|
-
.attr('x', function (_a) {
|
|
129
|
-
var highlightStartMapsTo = _a.highlightStartMapsTo, d = __rest(_a, ["highlightStartMapsTo"]);
|
|
130
|
-
return getXValue(d[highlightStartMapsTo]);
|
|
131
|
-
})
|
|
132
|
-
.attr('width', function (_a) {
|
|
133
|
-
var highlightStartMapsTo = _a.highlightStartMapsTo, highlightEndMapsTo = _a.highlightEndMapsTo, d = __rest(_a, ["highlightStartMapsTo", "highlightEndMapsTo"]);
|
|
134
|
-
return Math.max(getXValue(d[highlightEndMapsTo]) -
|
|
135
|
-
getXValue(d[highlightStartMapsTo]), 0);
|
|
136
|
-
})
|
|
137
|
-
.style('stroke', function (_a) {
|
|
138
|
-
var color = _a.color, labelMapsTo = _a.labelMapsTo, data = __rest(_a, ["color", "labelMapsTo"]);
|
|
139
|
-
return color && color.scale[data[labelMapsTo]]
|
|
140
|
-
? color.scale[data[labelMapsTo]]
|
|
141
|
-
: null;
|
|
142
|
-
})
|
|
143
|
-
.style('stroke-dasharray', '2, 2')
|
|
144
|
-
.attr('stroke-width', self.highlightStrokeWidth + 'px')
|
|
145
|
-
.style('fill-opacity', 0.1)
|
|
146
|
-
.style('fill', function (_a) {
|
|
147
|
-
var color = _a.color, labelMapsTo = _a.labelMapsTo, data = __rest(_a, ["color", "labelMapsTo"]);
|
|
148
|
-
return color && color.scale[data[labelMapsTo]]
|
|
149
|
-
? color.scale[data[labelMapsTo]]
|
|
150
|
-
: null;
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
group
|
|
155
|
-
.selectAll('rect.highlight-bar')
|
|
156
|
-
.transition()
|
|
157
|
-
.call(function (t) {
|
|
158
|
-
return self.services.transitions.setupTransition({
|
|
159
|
-
transition: t,
|
|
160
|
-
name: 'highlight-bar-update',
|
|
161
|
-
animate: animate,
|
|
162
|
-
});
|
|
163
|
-
})
|
|
164
|
-
.attr('x', xScaleStart)
|
|
165
|
-
.attr('width', Math.max(xScaleEnd - xScaleStart, 0))
|
|
166
|
-
.attr('y', function (_a) {
|
|
167
|
-
var highlightEndMapsTo = _a.highlightEndMapsTo, d = __rest(_a, ["highlightEndMapsTo"]);
|
|
168
|
-
return getYValue(d[highlightEndMapsTo]);
|
|
169
|
-
})
|
|
170
|
-
.attr('height', function (_a) {
|
|
171
|
-
var highlightStartMapsTo = _a.highlightStartMapsTo, highlightEndMapsTo = _a.highlightEndMapsTo, d = __rest(_a, ["highlightStartMapsTo", "highlightEndMapsTo"]);
|
|
172
|
-
return Math.max(getYValue(d[highlightStartMapsTo]) -
|
|
173
|
-
getYValue(d[highlightEndMapsTo]), 0);
|
|
174
|
-
})
|
|
175
|
-
.style('stroke', function (_a) {
|
|
176
|
-
var color = _a.color, labelMapsTo = _a.labelMapsTo, data = __rest(_a, ["color", "labelMapsTo"]);
|
|
177
|
-
return color && color.scale[data[labelMapsTo]]
|
|
178
|
-
? color.scale[data[labelMapsTo]]
|
|
179
|
-
: null;
|
|
180
|
-
})
|
|
181
|
-
.style('stroke-dasharray', '2, 2')
|
|
182
|
-
.attr('stroke-width', self.highlightStrokeWidth + 'px')
|
|
183
|
-
.style('fill-opacity', 0.1)
|
|
184
|
-
.style('fill', function (_a) {
|
|
185
|
-
var color = _a.color, labelMapsTo = _a.labelMapsTo, data = __rest(_a, ["color", "labelMapsTo"]);
|
|
186
|
-
return color && color.scale[data[labelMapsTo]]
|
|
187
|
-
? color.scale[data[labelMapsTo]]
|
|
188
|
-
: null;
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
return Highlight;
|
|
194
|
-
}(Component));
|
|
195
|
-
export { Highlight };
|
|
196
|
-
//# sourceMappingURL=../../../src/components/essentials/highlights.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"highlights.js","sourceRoot":"","sources":["highlights.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAc,MAAM,kBAAkB,CAAC;AAE1E,aAAa;AACb,aAAa;AACb,0CAA0C;AAC1C,oCAAoC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,0BAA0B;AAC1B,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAE9C;IAA+B,6BAAS;IASvC,mBAAY,KAAiB,EAAE,QAAa;QAA5C,YACC,kBAAM,KAAK,EAAE,Q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D,CAAA;iBAAA,CACF;qBACA,KAAK,CAAC,QAAQ,EAAE,UAAC,EAA+B;oBAA7B,IAAA,gBAAK,EAAE,4BAAW,EAAE,2CAAO;oBAC9C,OAAO,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;wBAC7C,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;wBAChC,CAAC,CAAC,IAAI,CAAC;gBACT,CAAC,CAAC;qBACD,KAAK,CAAC,kBAAkB,EAAE,MAAM,CAAC;qBACjC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC;qBACtD,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC;qBAC1B,KAAK,CAAC,MAAM,EAAE,UAAC,EAA+B;oBAA7B,IAAA,gBAAK,EAAE,4BAAW,EAAE,2CAAO;oBAC5C,OAAO,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;wBAC7C,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;wBAChC,CAAC,CAAC,IAAI,CAAC;gBACT,CAAC,CAAC,CAAC;aACJ;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IACF,gBAAC;AAAD,CAAC,AAxMD,CAA+B,SAAS,GAwMvC","sourcesContent":["import { Component } from '../component';\nimport * as Tools from '../../tools';\nimport { ChartModel } from '../../model/model';\nimport { AxisPositions, RenderTypes, ScaleTypes } from '../../interfaces';\n\n// D3 Imports\n// @ts-ignore\n// ts-ignore is needed because `@types/d3`\n// is missing the `pointer` function\nimport { select } from 'd3-selection';\n\n// Carbon position service\nimport Position from '@carbon/utils-position';\n\nexport class Highlight extends Component {\n\ttype = 'highlight';\n\trenderType = RenderTypes.SVG;\n\n\tlabel: any;\n\n\tpositionService = new Position();\n\thighlightStrokeWidth = 1;\n\n\tconstructor(model: ChartModel, services: any) {\n\t\tsuper(model, services);\n\t}\n\n\trender(animate = false) {\n\t\tconst axesOptions = Tools.getProperty(this.getOptions(), 'axes');\n\t\tconst highlightData = [];\n\n\t\tObject.keys(axesOptions).forEach((axisPosition) => {\n\t\t\tif (Object.values(AxisPositions).includes(axisPosition as any)) {\n\t\t\t\tconst axisOptions = axesOptions[axisPosition];\n\t\t\t\tif (\n\t\t\t\t\taxisOptions.highlights &&\n\t\t\t\t\taxisOptions.highlights.data.length > 0\n\t\t\t\t) {\n\t\t\t\t\thighlightData.push({\n\t\t\t\t\t\taxisPosition,\n\t\t\t\t\t\thighlightStartMapsTo:\n\t\t\t\t\t\t\taxisOptions.highlights.highlightStartMapsTo,\n\t\t\t\t\t\thighlightEndMapsTo:\n\t\t\t\t\t\t\taxisOptions.highlights.highlightEndMapsTo,\n\t\t\t\t\t\tlabelMapsTo: axisOptions.highlights.labelMapsTo,\n\t\t\t\t\t\thighlight: axisOptions.highlights.data,\n\t\t\t\t\t\tcolor: axisOptions.highlights.color,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Grab container SVG\n\t\tconst svg = this.getComponentContainer({ withinChartClip: true });\n\n\t\t// Update data on all axis highlight groups\n\t\tconst highlightAxisGroups = svg\n\t\t\t.selectAll('g.axis-highlight')\n\t\t\t.data(highlightData, (highlightData) => highlightData.axisPosition);\n\n\t\t// Remove axis highlight groups that are no longer needed\n\t\thighlightAxisGroups.exit().attr('opacity', 0).remove();\n\n\t\t// Add the axis highlight groups that need to be introduced\n\t\tconst highlightAxisGroupsEnter = highlightAxisGroups\n\t\t\t.enter()\n\t\t\t.append('g');\n\n\t\tconst highlightAxisGroupsMerge = highlightAxisGroupsEnter.merge(\n\t\t\thighlightAxisGroups\n\t\t);\n\t\thighlightAxisGroupsMerge.attr(\n\t\t\t'class',\n\t\t\t(d) => `axis-highlight ${d.axisPosition}`\n\t\t);\n\n\t\tconst highlightGroups = highlightAxisGroupsMerge\n\t\t\t.selectAll('g.highlight-group')\n\t\t\t.data((d) =>\n\t\t\t\td.highlight.map((highlight) => {\n\t\t\t\t\thighlight.axisPosition = d.axisPosition;\n\t\t\t\t\thighlight.highlightStartMapsTo = d.highlightStartMapsTo;\n\t\t\t\t\thighlight.labelMapsTo = d.labelMapsTo;\n\t\t\t\t\thighlight.color = d.color;\n\t\t\t\t\thighlight.highlightEndMapsTo = d.highlightEndMapsTo;\n\t\t\t\t\treturn highlight;\n\t\t\t\t})\n\t\t\t);\n\n\t\t// Remove highlight groups that are no longer needed\n\t\thighlightGroups.exit().attr('opacity', 0).remove();\n\n\t\t// Add the highlight groups that need to be introduced\n\t\tconst highlightGroupsEnter = highlightGroups.enter().append('g');\n\n\t\thighlightGroupsEnter.append('rect').attr('class', 'highlight-bar');\n\t\thighlightGroupsEnter.append('line').attr('class', 'highlight-line');\n\n\t\tconst highlightGroupsMerge = highlightGroupsEnter.merge(\n\t\t\thighlightGroups\n\t\t);\n\t\thighlightGroupsMerge.attr('class', 'highlight-group');\n\n\t\tconst self = this;\n\t\thighlightAxisGroupsMerge.each(function ({ axisPosition }) {\n\t\t\tconst mainXScale = self.services.cartesianScales.getMainXScale();\n\t\t\tconst mainYScale = self.services.cartesianScales.getMainYScale();\n\t\t\tconst [xScaleStart, xScaleEnd] = mainXScale.range();\n\t\t\tconst [yScaleEnd, yScaleStart] = mainYScale.range();\n\n\t\t\tconst { cartesianScales } = self.services;\n\t\t\tconst orientation = cartesianScales.getOrientation();\n\t\t\tconst getDomainValue = (d) => cartesianScales.getDomainValue(d);\n\t\t\tconst getRangeValue = (d) => cartesianScales.getRangeValue(d);\n\t\t\tconst [\n\t\t\t\tgetXValue,\n\t\t\t\tgetYValue,\n\t\t\t] = Tools.flipDomainAndRangeBasedOnOrientation(\n\t\t\t\tgetDomainValue,\n\t\t\t\tgetRangeValue,\n\t\t\t\torientation\n\t\t\t);\n\n\t\t\tconst group = select(this);\n\t\t\tif (\n\t\t\t\taxisPosition === AxisPositions.TOP ||\n\t\t\t\taxisPosition === AxisPositions.BOTTOM\n\t\t\t) {\n\t\t\t\tgroup\n\t\t\t\t\t.selectAll('rect.highlight-bar')\n\t\t\t\t\t.transition()\n\t\t\t\t\t.call((t) =>\n\t\t\t\t\t\tself.services.transitions.setupTransition({\n\t\t\t\t\t\t\ttransition: t,\n\t\t\t\t\t\t\tname: 'highlight-bar-update',\n\t\t\t\t\t\t\tanimate,\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t\t// Stroke width added to stop overflow of highlight\n\t\t\t\t\t.attr(\n\t\t\t\t\t\t'y',\n\t\t\t\t\t\tMath.max(yScaleStart + self.highlightStrokeWidth, 0)\n\t\t\t\t\t)\n\t\t\t\t\t// Stroke width subtracted to stop overflow of highlight\n\t\t\t\t\t.attr(\n\t\t\t\t\t\t'height',\n\t\t\t\t\t\tMath.max(yScaleEnd - 2 * self.highlightStrokeWidth, 0)\n\t\t\t\t\t)\n\t\t\t\t\t.attr('x', ({ highlightStartMapsTo, ...d }) =>\n\t\t\t\t\t\tgetXValue(d[highlightStartMapsTo])\n\t\t\t\t\t)\n\t\t\t\t\t.attr(\n\t\t\t\t\t\t'width',\n\t\t\t\t\t\t({ highlightStartMapsTo, highlightEndMapsTo, ...d }) =>\n\t\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\t\tgetXValue(d[highlightEndMapsTo]) -\n\t\t\t\t\t\t\t\t\tgetXValue(d[highlightStartMapsTo]),\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t.style('stroke', ({ color, labelMapsTo, ...data }) => {\n\t\t\t\t\t\treturn color && color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t? color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t})\n\t\t\t\t\t.style('stroke-dasharray', '2, 2')\n\t\t\t\t\t.attr('stroke-width', self.highlightStrokeWidth + 'px')\n\t\t\t\t\t.style('fill-opacity', 0.1)\n\t\t\t\t\t.style('fill', ({ color, labelMapsTo, ...data }) => {\n\t\t\t\t\t\treturn color && color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t? color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tgroup\n\t\t\t\t\t.selectAll('rect.highlight-bar')\n\t\t\t\t\t.transition()\n\t\t\t\t\t.call((t) =>\n\t\t\t\t\t\tself.services.transitions.setupTransition({\n\t\t\t\t\t\t\ttransition: t,\n\t\t\t\t\t\t\tname: 'highlight-bar-update',\n\t\t\t\t\t\t\tanimate,\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t\t.attr('x', xScaleStart)\n\t\t\t\t\t.attr('width', Math.max(xScaleEnd - xScaleStart, 0))\n\t\t\t\t\t.attr('y', ({ highlightEndMapsTo, ...d }) =>\n\t\t\t\t\t\tgetYValue(d[highlightEndMapsTo])\n\t\t\t\t\t)\n\t\t\t\t\t.attr(\n\t\t\t\t\t\t'height',\n\t\t\t\t\t\t({ highlightStartMapsTo, highlightEndMapsTo, ...d }) =>\n\t\t\t\t\t\t\tMath.max(\n\t\t\t\t\t\t\t\tgetYValue(d[highlightStartMapsTo]) -\n\t\t\t\t\t\t\t\t\tgetYValue(d[highlightEndMapsTo]),\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t.style('stroke', ({ color, labelMapsTo, ...data }) => {\n\t\t\t\t\t\treturn color && color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t? color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t})\n\t\t\t\t\t.style('stroke-dasharray', '2, 2')\n\t\t\t\t\t.attr('stroke-width', self.highlightStrokeWidth + 'px')\n\t\t\t\t\t.style('fill-opacity', 0.1)\n\t\t\t\t\t.style('fill', ({ color, labelMapsTo, ...data }) => {\n\t\t\t\t\t\treturn color && color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t? color.scale[data[labelMapsTo]]\n\t\t\t\t\t\t\t: null;\n\t\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Component } from '../component';
|
|
2
|
-
import { RenderTypes } from '../../interfaces';
|
|
3
|
-
export declare class Legend extends Component {
|
|
4
|
-
type: string;
|
|
5
|
-
renderType: RenderTypes;
|
|
6
|
-
render(): void;
|
|
7
|
-
sortDataGroups(dataGroups: any, legendOrder: any): any;
|
|
8
|
-
addAdditionalItem(additionalItem: any, itemConfig: any, indexOfItem: any): void;
|
|
9
|
-
truncateLegendText(): void;
|
|
10
|
-
addEventListeners(): void;
|
|
11
|
-
}
|