@carbon/charts 0.59.0-beta.0 → 1.0.3
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 +244 -360
- package/LICENSE.md +201 -0
- package/README.md +5 -1
- package/{dist/axis-chart.d.ts → axis-chart.d.ts} +0 -0
- package/{dist/axis-chart.js → axis-chart.js} +0 -0
- package/{dist/axis-chart.js.map → axis-chart.js.map} +0 -0
- package/build/demo/create-codesandbox.d.ts +123 -0
- package/{dist → build}/demo/data/CHART_TYPES.d.ts +0 -0
- package/{dist → build}/demo/data/alluvial.d.ts +0 -0
- package/{dist → build}/demo/data/area.d.ts +0 -0
- package/{dist → build}/demo/data/bar.d.ts +0 -0
- package/{dist → build}/demo/data/boxplot.d.ts +0 -0
- package/{dist → build}/demo/data/bubble.d.ts +0 -0
- package/{dist → build}/demo/data/bullet.d.ts +0 -0
- package/{dist → build}/demo/data/circle-pack.d.ts +0 -0
- package/{dist → build}/demo/data/combo.d.ts +0 -0
- package/{dist → build}/demo/data/donut.d.ts +0 -0
- package/{dist → build}/demo/data/gauge.d.ts +0 -0
- package/{dist → build}/demo/data/heatmap.d.ts +0 -0
- package/{dist → build}/demo/data/high-scale.d.ts +0 -0
- package/{dist → build}/demo/data/hightlight.d.ts +0 -0
- package/{dist → build}/demo/data/histogram.d.ts +0 -0
- package/{dist → build}/demo/data/index.d.ts +0 -0
- package/{dist → build}/demo/data/line.d.ts +0 -0
- package/{dist → build}/demo/data/lollipop.d.ts +0 -0
- package/{dist → build}/demo/data/meter.d.ts +0 -0
- package/{dist → build}/demo/data/pie.d.ts +0 -0
- package/{dist → build}/demo/data/radar.d.ts +0 -0
- package/{dist → build}/demo/data/scatter.d.ts +0 -0
- package/{dist → build}/demo/data/step.d.ts +0 -0
- package/{dist → build}/demo/data/time-series-axis.d.ts +0 -0
- package/{dist → build}/demo/data/toolbar.d.ts +0 -0
- package/{dist → build}/demo/data/tree.d.ts +0 -0
- package/{dist → build}/demo/data/treemap.d.ts +0 -0
- package/{dist → build}/demo/data/wordcloud.d.ts +0 -0
- package/{dist → build}/demo/data/zoom-bar.d.ts +0 -0
- package/build/demo/utils.d.ts +40 -0
- package/build/src/axis-chart.d.ts +10 -0
- package/build/src/chart.d.ts +14 -0
- package/build/src/charts/alluvial.d.ts +8 -0
- package/build/src/charts/area-stacked.d.ts +6 -0
- package/build/src/charts/area.d.ts +6 -0
- package/build/src/charts/bar-grouped.d.ts +6 -0
- package/build/src/charts/bar-simple.d.ts +6 -0
- package/build/src/charts/bar-stacked.d.ts +6 -0
- package/build/src/charts/boxplot.d.ts +8 -0
- package/build/src/charts/bubble.d.ts +6 -0
- package/build/src/charts/bullet.d.ts +8 -0
- package/build/src/charts/circle-pack.d.ts +8 -0
- package/build/src/charts/combo.d.ts +7 -0
- package/build/src/charts/donut.d.ts +6 -0
- package/build/src/charts/gauge.d.ts +8 -0
- package/build/src/charts/heatmap.d.ts +10 -0
- package/build/src/charts/histogram.d.ts +8 -0
- package/{src/charts/index.ts → build/src/charts/index.d.ts} +0 -0
- package/build/src/charts/line.d.ts +6 -0
- package/build/src/charts/lollipop.d.ts +6 -0
- package/build/src/charts/meter.d.ts +8 -0
- package/build/src/charts/pie.d.ts +8 -0
- package/build/src/charts/radar.d.ts +8 -0
- package/build/src/charts/scatter.d.ts +6 -0
- package/build/src/charts/tree.d.ts +8 -0
- package/build/src/charts/treemap.d.ts +8 -0
- package/build/src/charts/wordcloud.d.ts +8 -0
- package/build/src/components/axes/axis.d.ts +24 -0
- package/build/src/components/axes/chart-clip.d.ts +13 -0
- package/build/src/components/axes/grid-brush.d.ts +10 -0
- package/build/src/components/axes/grid.d.ts +22 -0
- package/build/src/components/axes/hover-axis.d.ts +10 -0
- package/build/src/components/axes/ruler-binned.d.ts +7 -0
- package/build/src/components/axes/ruler-stacked.d.ts +4 -0
- package/build/src/components/axes/ruler.d.ts +27 -0
- package/build/src/components/axes/toolbar.d.ts +40 -0
- package/build/src/components/axes/two-dimensional-axes.d.ts +16 -0
- package/build/src/components/axes/zero-line.d.ts +7 -0
- package/build/src/components/axes/zoom-bar.d.ts +28 -0
- package/build/src/components/component.d.ts +28 -0
- package/build/src/components/diagrams/buildPaths.d.ts +39 -0
- package/build/src/components/diagrams/markerDefinitions.d.ts +37 -0
- package/build/src/components/essentials/canvas-chart-clip.d.ts +6 -0
- package/build/src/components/essentials/color-scale-legend.d.ts +17 -0
- package/build/src/components/essentials/highlights.d.ts +13 -0
- package/build/src/components/essentials/legend.d.ts +11 -0
- package/build/src/components/essentials/modal.d.ts +14 -0
- package/build/src/components/essentials/threshold.d.ts +20 -0
- package/build/src/components/essentials/title-meter.d.ts +30 -0
- package/build/src/components/essentials/title.d.ts +20 -0
- package/build/src/components/essentials/tooltip-axis.d.ts +4 -0
- package/build/src/components/essentials/tooltip.d.ts +22 -0
- package/build/src/components/graphs/alluvial.d.ts +14 -0
- package/build/src/components/graphs/area-stacked.d.ts +11 -0
- package/build/src/components/graphs/area.d.ts +12 -0
- package/build/src/components/graphs/bar-grouped.d.ts +20 -0
- package/build/src/components/graphs/bar-simple.d.ts +12 -0
- package/build/src/components/graphs/bar-stacked.d.ts +13 -0
- package/build/src/components/graphs/bar.d.ts +5 -0
- package/build/src/components/graphs/boxplot.d.ts +9 -0
- package/build/src/components/graphs/bubble.d.ts +13 -0
- package/build/src/components/graphs/bullet.d.ts +12 -0
- package/build/src/components/graphs/circle-pack.d.ts +19 -0
- package/build/src/components/graphs/donut.d.ts +9 -0
- package/build/src/components/graphs/gauge.d.ts +27 -0
- package/build/src/components/graphs/heatmap.d.ts +25 -0
- package/build/src/components/graphs/histogram.d.ts +12 -0
- package/build/src/components/graphs/line.d.ts +11 -0
- package/build/src/components/graphs/lollipop.d.ts +14 -0
- package/build/src/components/graphs/meter.d.ts +10 -0
- package/build/src/components/graphs/pie.d.ts +16 -0
- package/build/src/components/graphs/radar.d.ts +25 -0
- package/build/src/components/graphs/scatter-stacked.d.ts +8 -0
- package/build/src/components/graphs/scatter.d.ts +21 -0
- package/build/src/components/graphs/skeleton-lines.d.ts +11 -0
- package/build/src/components/graphs/skeleton.d.ts +22 -0
- package/build/src/components/graphs/tree.d.ts +9 -0
- package/build/src/components/graphs/treemap.d.ts +11 -0
- package/build/src/components/graphs/wordcloud.d.ts +12 -0
- package/build/src/components/index.d.ts +51 -0
- package/build/src/components/layout/layout.d.ts +17 -0
- package/build/src/components/layout/spacer.d.ts +5 -0
- package/build/src/configuration-non-customizable.d.ts +263 -0
- package/build/src/configuration.d.ts +44 -0
- package/build/src/interfaces/a11y.d.ts +12 -0
- package/build/src/interfaces/axis-scales.d.ts +190 -0
- package/build/src/interfaces/charts.d.ts +474 -0
- package/build/src/interfaces/components.d.ts +227 -0
- package/build/src/interfaces/enums.d.ts +249 -0
- package/build/src/interfaces/events.d.ts +230 -0
- package/{src/interfaces/index.ts → build/src/interfaces/index.d.ts} +0 -0
- package/build/src/interfaces/layout.d.ts +15 -0
- package/build/src/interfaces/model.d.ts +35 -0
- package/build/src/interfaces/truncation.d.ts +17 -0
- package/build/src/model/alluvial.d.ts +8 -0
- package/build/src/model/binned-charts.d.ts +7 -0
- package/build/src/model/boxplot.d.ts +14 -0
- package/build/src/model/bullet.d.ts +14 -0
- package/build/src/model/cartesian-charts.d.ts +24 -0
- package/build/src/model/circle-pack.d.ts +36 -0
- package/build/src/model/gauge.d.ts +9 -0
- package/build/src/model/heatmap.d.ts +57 -0
- package/build/src/model/meter.d.ts +19 -0
- package/build/src/model/model.d.ts +107 -0
- package/build/src/model/pie.d.ts +9 -0
- package/build/src/model/radar.d.ts +7 -0
- package/build/src/model/tree.d.ts +14 -0
- package/build/src/model/treemap.d.ts +8 -0
- package/build/src/model/wordcloud.d.ts +7 -0
- package/build/src/services/angle-utils.d.ts +205 -0
- package/build/src/services/canvas-zoom.d.ts +11 -0
- package/build/src/services/curves.d.ts +25 -0
- package/build/src/services/essentials/dom-utils.d.ts +38 -0
- package/build/src/services/essentials/events.d.ts +8 -0
- package/build/src/services/essentials/files.d.ts +6 -0
- package/build/src/services/essentials/gradient-utils.d.ts +6 -0
- package/build/src/services/essentials/transitions.d.ts +13 -0
- package/build/src/services/index.d.ts +9 -0
- package/build/src/services/scales-cartesian.d.ts +86 -0
- package/build/src/services/service.d.ts +10 -0
- package/build/src/services/time-series.d.ts +372 -0
- package/build/src/services/zoom.d.ts +21 -0
- package/build/src/tools.d.ts +158 -0
- package/build/stories/all.stories.d.ts +1 -0
- package/build/stories/tutorials/api.d.ts +4 -0
- package/build/stories/tutorials/color-palette.d.ts +4 -0
- package/build/stories/tutorials/combo-charts.d.ts +4 -0
- package/build/stories/tutorials/dual-axes.d.ts +4 -0
- package/build/stories/tutorials/event-listeners.d.ts +4 -0
- package/build/stories/tutorials/getting-started/angular.d.ts +5 -0
- package/build/stories/tutorials/getting-started/react.d.ts +5 -0
- package/build/stories/tutorials/getting-started/vanilla.d.ts +5 -0
- package/build/stories/tutorials/getting-started/vue.d.ts +5 -0
- package/build/stories/tutorials/index.d.ts +11 -0
- package/build/stories/tutorials/tabular-data-format.d.ts +4 -0
- package/build/stories/tutorials/themes.d.ts +4 -0
- package/build/stories/tutorials.stories.d.ts +1 -0
- package/{dist/bundle.js → bundle.js} +0 -0
- package/{dist/chart.d.ts → chart.d.ts} +0 -0
- package/{dist/chart.js → chart.js} +0 -0
- package/{dist/chart.js.map → chart.js.map} +0 -0
- package/{dist/charts → charts}/alluvial.d.ts +0 -0
- package/{dist/charts → charts}/alluvial.js +0 -0
- package/{dist/charts → charts}/alluvial.js.map +0 -0
- package/{dist/charts → charts}/area-stacked.d.ts +0 -0
- package/{dist/charts → charts}/area-stacked.js +0 -0
- package/{dist/charts → charts}/area-stacked.js.map +0 -0
- package/{dist/charts → charts}/area.d.ts +0 -0
- package/{dist/charts → charts}/area.js +0 -0
- package/{dist/charts → charts}/area.js.map +0 -0
- package/{dist/charts → charts}/bar-grouped.d.ts +0 -0
- package/{dist/charts → charts}/bar-grouped.js +0 -0
- package/{dist/charts → charts}/bar-grouped.js.map +0 -0
- package/{dist/charts → charts}/bar-simple.d.ts +0 -0
- package/{dist/charts → charts}/bar-simple.js +0 -0
- package/{dist/charts → charts}/bar-simple.js.map +0 -0
- package/{dist/charts → charts}/bar-stacked.d.ts +0 -0
- package/{dist/charts → charts}/bar-stacked.js +0 -0
- package/{dist/charts → charts}/bar-stacked.js.map +0 -0
- package/{dist/charts → charts}/boxplot.d.ts +0 -0
- package/{dist/charts → charts}/boxplot.js +0 -0
- package/{dist/charts → charts}/boxplot.js.map +0 -0
- package/{dist/charts → charts}/bubble.d.ts +0 -0
- package/{dist/charts → charts}/bubble.js +0 -0
- package/{dist/charts → charts}/bubble.js.map +0 -0
- package/{dist/charts → charts}/bullet.d.ts +0 -0
- package/{dist/charts → charts}/bullet.js +0 -0
- package/{dist/charts → charts}/bullet.js.map +0 -0
- package/{dist/charts → charts}/circle-pack.d.ts +0 -0
- package/{dist/charts → charts}/circle-pack.js +0 -0
- package/{dist/charts → charts}/circle-pack.js.map +0 -0
- package/{dist/charts → charts}/combo.d.ts +0 -0
- package/{dist/charts → charts}/combo.js +0 -0
- package/{dist/charts → charts}/combo.js.map +0 -0
- package/{dist/charts → charts}/donut.d.ts +0 -0
- package/{dist/charts → charts}/donut.js +0 -0
- package/{dist/charts → charts}/donut.js.map +0 -0
- package/{dist/charts → charts}/gauge.d.ts +0 -0
- package/{dist/charts → charts}/gauge.js +0 -0
- package/{dist/charts → charts}/gauge.js.map +0 -0
- package/{dist/charts → charts}/heatmap.d.ts +0 -0
- package/{dist/charts → charts}/heatmap.js +0 -0
- package/{dist/charts → charts}/heatmap.js.map +0 -0
- package/{dist/charts → charts}/histogram.d.ts +0 -0
- package/{dist/charts → charts}/histogram.js +0 -0
- package/{dist/charts → charts}/histogram.js.map +0 -0
- package/{dist/charts → charts}/index.d.ts +0 -0
- package/{dist/charts → charts}/index.js +0 -0
- package/{dist/charts → charts}/index.js.map +0 -0
- package/{dist/charts → charts}/line.d.ts +0 -0
- package/{dist/charts → charts}/line.js +0 -0
- package/{dist/charts → charts}/line.js.map +0 -0
- package/{dist/charts → charts}/lollipop.d.ts +0 -0
- package/{dist/charts → charts}/lollipop.js +0 -0
- package/{dist/charts → charts}/lollipop.js.map +0 -0
- package/{dist/charts → charts}/meter.d.ts +0 -0
- package/{dist/charts → charts}/meter.js +0 -0
- package/{dist/charts → charts}/meter.js.map +0 -0
- package/{dist/charts → charts}/pie.d.ts +0 -0
- package/{dist/charts → charts}/pie.js +0 -0
- package/{dist/charts → charts}/pie.js.map +0 -0
- package/{dist/charts → charts}/radar.d.ts +0 -0
- package/{dist/charts → charts}/radar.js +0 -0
- package/{dist/charts → charts}/radar.js.map +0 -0
- package/{dist/charts → charts}/scatter.d.ts +0 -0
- package/{dist/charts → charts}/scatter.js +0 -0
- package/{dist/charts → charts}/scatter.js.map +0 -0
- package/{dist/charts → charts}/tree.d.ts +0 -0
- package/{dist/charts → charts}/tree.js +0 -0
- package/{dist/charts → charts}/tree.js.map +0 -0
- package/{dist/charts → charts}/treemap.d.ts +0 -0
- package/{dist/charts → charts}/treemap.js +0 -0
- package/{dist/charts → charts}/treemap.js.map +0 -0
- package/{dist/charts → charts}/wordcloud.d.ts +0 -0
- package/{dist/charts → charts}/wordcloud.js +0 -0
- package/{dist/charts → charts}/wordcloud.js.map +0 -0
- package/{dist/components → components}/axes/axis.d.ts +0 -0
- package/{dist/components → components}/axes/axis.js +0 -0
- package/{dist/components → components}/axes/axis.js.map +0 -0
- package/{dist/components → components}/axes/chart-clip.d.ts +0 -0
- package/{dist/components → components}/axes/chart-clip.js +0 -0
- package/{dist/components → components}/axes/chart-clip.js.map +0 -0
- package/{dist/components → components}/axes/grid-brush.d.ts +0 -0
- package/{dist/components → components}/axes/grid-brush.js +0 -0
- package/{dist/components → components}/axes/grid-brush.js.map +0 -0
- package/{dist/components → components}/axes/grid.d.ts +0 -0
- package/{dist/components → components}/axes/grid.js +0 -0
- package/{dist/components → components}/axes/grid.js.map +0 -0
- package/{dist/components → components}/axes/hover-axis.d.ts +0 -0
- package/{dist/components → components}/axes/hover-axis.js +0 -0
- package/{dist/components → components}/axes/hover-axis.js.map +0 -0
- package/{dist/components → components}/axes/ruler-binned.d.ts +0 -0
- package/{dist/components → components}/axes/ruler-binned.js +0 -0
- package/{dist/components → components}/axes/ruler-binned.js.map +0 -0
- package/{dist/components → components}/axes/ruler-stacked.d.ts +0 -0
- package/{dist/components → components}/axes/ruler-stacked.js +0 -0
- package/{dist/components → components}/axes/ruler-stacked.js.map +0 -0
- package/{dist/components → components}/axes/ruler.d.ts +0 -0
- package/{dist/components → components}/axes/ruler.js +0 -0
- package/{dist/components → components}/axes/ruler.js.map +0 -0
- package/{dist/components → components}/axes/toolbar.d.ts +0 -0
- package/components/axes/toolbar.js +544 -0
- package/components/axes/toolbar.js.map +1 -0
- package/{dist/components → components}/axes/two-dimensional-axes.d.ts +0 -0
- package/{dist/components → components}/axes/two-dimensional-axes.js +0 -0
- package/{dist/components → components}/axes/two-dimensional-axes.js.map +0 -0
- package/{dist/components → components}/axes/zero-line.d.ts +0 -0
- package/{dist/components → components}/axes/zero-line.js +0 -0
- package/{dist/components → components}/axes/zero-line.js.map +0 -0
- package/{dist/components → components}/axes/zoom-bar.d.ts +0 -0
- package/{dist/components → components}/axes/zoom-bar.js +0 -0
- package/{dist/components → components}/axes/zoom-bar.js.map +0 -0
- package/{dist/components → components}/component.d.ts +0 -0
- package/components/component.js +102 -0
- package/components/component.js.map +1 -0
- package/{dist/components → components}/diagrams/buildPaths.d.ts +0 -0
- package/{dist/components → components}/diagrams/buildPaths.js +0 -0
- package/{dist/components → components}/diagrams/buildPaths.js.map +0 -0
- package/{dist/components → components}/diagrams/markerDefinitions.d.ts +0 -0
- package/{dist/components → components}/diagrams/markerDefinitions.js +0 -0
- package/{dist/components → components}/diagrams/markerDefinitions.js.map +0 -0
- package/{dist/components → components}/essentials/canvas-chart-clip.d.ts +0 -0
- package/{dist/components → components}/essentials/canvas-chart-clip.js +0 -0
- package/{dist/components → components}/essentials/canvas-chart-clip.js.map +0 -0
- package/{dist/components → components}/essentials/color-scale-legend.d.ts +0 -0
- package/{dist/components → components}/essentials/color-scale-legend.js +0 -0
- package/{dist/components → components}/essentials/color-scale-legend.js.map +0 -0
- package/{dist/components → components}/essentials/highlights.d.ts +0 -0
- package/{dist/components → components}/essentials/highlights.js +0 -0
- package/{dist/components → components}/essentials/highlights.js.map +0 -0
- package/{dist/components → components}/essentials/legend.d.ts +0 -0
- package/{dist/components → components}/essentials/legend.js +0 -0
- package/{dist/components → components}/essentials/legend.js.map +0 -0
- package/{dist/components → components}/essentials/modal.d.ts +0 -0
- package/components/essentials/modal.js +89 -0
- package/components/essentials/modal.js.map +1 -0
- package/{dist/components → components}/essentials/threshold.d.ts +0 -0
- package/components/essentials/threshold.js +304 -0
- package/components/essentials/threshold.js.map +1 -0
- package/{dist/components → components}/essentials/title-meter.d.ts +0 -0
- package/{dist/components → components}/essentials/title-meter.js +0 -0
- package/{dist/components → components}/essentials/title-meter.js.map +0 -0
- package/{dist/components → components}/essentials/title.d.ts +0 -0
- package/{dist/components → components}/essentials/title.js +0 -0
- package/{dist/components → components}/essentials/title.js.map +0 -0
- package/{dist/components → components}/essentials/tooltip-axis.d.ts +0 -0
- package/{dist/components → components}/essentials/tooltip-axis.js +0 -0
- package/{dist/components → components}/essentials/tooltip-axis.js.map +0 -0
- package/{dist/components → components}/essentials/tooltip.d.ts +0 -0
- package/components/essentials/tooltip.js +245 -0
- package/components/essentials/tooltip.js.map +1 -0
- package/{dist/components → components}/graphs/alluvial.d.ts +0 -0
- package/{dist/components → components}/graphs/alluvial.js +0 -0
- package/{dist/components → components}/graphs/alluvial.js.map +0 -0
- package/{dist/components → components}/graphs/area-stacked.d.ts +0 -0
- package/{dist/components → components}/graphs/area-stacked.js +0 -0
- package/{dist/components → components}/graphs/area-stacked.js.map +0 -0
- package/{dist/components → components}/graphs/area.d.ts +0 -0
- package/{dist/components → components}/graphs/area.js +0 -0
- package/{dist/components → components}/graphs/area.js.map +0 -0
- package/{dist/components → components}/graphs/bar-grouped.d.ts +0 -0
- package/{dist/components → components}/graphs/bar-grouped.js +0 -0
- package/{dist/components → components}/graphs/bar-grouped.js.map +0 -0
- package/{dist/components → components}/graphs/bar-simple.d.ts +0 -0
- package/{dist/components → components}/graphs/bar-simple.js +0 -0
- package/{dist/components → components}/graphs/bar-simple.js.map +0 -0
- package/{dist/components → components}/graphs/bar-stacked.d.ts +0 -0
- package/{dist/components → components}/graphs/bar-stacked.js +0 -0
- package/components/graphs/bar-stacked.js.map +1 -0
- package/{dist/components → components}/graphs/bar.d.ts +0 -0
- package/{dist/components → components}/graphs/bar.js +0 -0
- package/components/graphs/bar.js.map +1 -0
- package/{dist/components → components}/graphs/boxplot.d.ts +0 -0
- package/{dist/components → components}/graphs/boxplot.js +0 -0
- package/{dist/components → components}/graphs/boxplot.js.map +0 -0
- package/{dist/components → components}/graphs/bubble.d.ts +0 -0
- package/{dist/components → components}/graphs/bubble.js +0 -0
- package/{dist/components → components}/graphs/bubble.js.map +0 -0
- package/{dist/components → components}/graphs/bullet.d.ts +0 -0
- package/{dist/components → components}/graphs/bullet.js +0 -0
- package/{dist/components → components}/graphs/bullet.js.map +0 -0
- package/{dist/components → components}/graphs/circle-pack.d.ts +0 -0
- package/{dist/components → components}/graphs/circle-pack.js +0 -0
- package/{dist/components → components}/graphs/circle-pack.js.map +0 -0
- package/{dist/components → components}/graphs/donut.d.ts +0 -0
- package/{dist/components → components}/graphs/donut.js +0 -0
- package/{dist/components → components}/graphs/donut.js.map +0 -0
- package/{dist/components → components}/graphs/gauge.d.ts +0 -0
- package/{dist/components → components}/graphs/gauge.js +0 -0
- package/{dist/components → components}/graphs/gauge.js.map +0 -0
- package/{dist/components → components}/graphs/heatmap.d.ts +0 -0
- package/{dist/components → components}/graphs/heatmap.js +0 -0
- package/{dist/components → components}/graphs/heatmap.js.map +0 -0
- package/{dist/components → components}/graphs/histogram.d.ts +0 -0
- package/{dist/components → components}/graphs/histogram.js +0 -0
- package/{dist/components → components}/graphs/histogram.js.map +0 -0
- package/{dist/components → components}/graphs/line.d.ts +0 -0
- package/{dist/components → components}/graphs/line.js +0 -0
- package/{dist/components → components}/graphs/line.js.map +0 -0
- package/{dist/components → components}/graphs/lollipop.d.ts +0 -0
- package/{dist/components → components}/graphs/lollipop.js +0 -0
- package/{dist/components → components}/graphs/lollipop.js.map +0 -0
- package/{dist/components → components}/graphs/meter.d.ts +0 -0
- package/{dist/components → components}/graphs/meter.js +0 -0
- package/{dist/components → components}/graphs/meter.js.map +0 -0
- package/{dist/components → components}/graphs/pie.d.ts +0 -0
- package/{dist/components → components}/graphs/pie.js +0 -0
- package/{dist/components → components}/graphs/pie.js.map +0 -0
- package/{dist/components → components}/graphs/radar.d.ts +0 -0
- package/components/graphs/radar.js +737 -0
- package/components/graphs/radar.js.map +1 -0
- package/{dist/components → components}/graphs/scatter-stacked.d.ts +0 -0
- package/{dist/components → components}/graphs/scatter-stacked.js +0 -0
- package/{dist/components → components}/graphs/scatter-stacked.js.map +0 -0
- package/{dist/components → components}/graphs/scatter.d.ts +0 -0
- package/{dist/components → components}/graphs/scatter.js +0 -0
- package/{dist/components → components}/graphs/scatter.js.map +0 -0
- package/{dist/components → components}/graphs/skeleton-lines.d.ts +0 -0
- package/{dist/components → components}/graphs/skeleton-lines.js +0 -0
- package/{dist/components → components}/graphs/skeleton-lines.js.map +0 -0
- package/{dist/components → components}/graphs/skeleton.d.ts +0 -0
- package/{dist/components → components}/graphs/skeleton.js +0 -0
- package/{dist/components → components}/graphs/skeleton.js.map +0 -0
- package/{dist/components → components}/graphs/tree.d.ts +0 -0
- package/{dist/components → components}/graphs/tree.js +0 -0
- package/{dist/components → components}/graphs/tree.js.map +0 -0
- package/{dist/components → components}/graphs/treemap.d.ts +0 -0
- package/{dist/components → components}/graphs/treemap.js +0 -0
- package/{dist/components → components}/graphs/treemap.js.map +0 -0
- package/{dist/components → components}/graphs/wordcloud.d.ts +0 -0
- package/{dist/components → components}/graphs/wordcloud.js +0 -0
- package/{dist/components → components}/graphs/wordcloud.js.map +0 -0
- package/{dist/components → components}/index.d.ts +0 -0
- package/{dist/components → components}/index.js +0 -0
- package/{dist/components → components}/index.js.map +0 -0
- package/{dist/components → components}/layout/layout.d.ts +0 -0
- package/components/layout/layout.js +191 -0
- package/components/layout/layout.js.map +1 -0
- package/{dist/components → components}/layout/spacer.d.ts +0 -0
- package/{dist/components → components}/layout/spacer.js +0 -0
- package/{dist/components → components}/layout/spacer.js.map +0 -0
- package/{dist/configuration-non-customizable.d.ts → configuration-non-customizable.d.ts} +0 -0
- package/{dist/configuration-non-customizable.js → configuration-non-customizable.js} +0 -0
- package/configuration-non-customizable.js.map +1 -0
- package/{dist/configuration.d.ts → configuration.d.ts} +0 -0
- package/{dist/configuration.js → configuration.js} +0 -0
- package/{dist/configuration.js.map → configuration.js.map} +0 -0
- package/demo/create-codesandbox.d.ts +75 -0
- package/demo/create-codesandbox.js +171 -0
- package/demo/create-codesandbox.js.map +1 -0
- package/demo/data/CHART_TYPES.d.ts +123 -0
- package/{dist/demo → demo}/data/CHART_TYPES.js +0 -0
- package/{dist/demo → demo}/data/CHART_TYPES.js.map +0 -0
- package/demo/data/alluvial.d.ts +109 -0
- package/{dist/demo → demo}/data/alluvial.js +0 -0
- package/{dist/demo → demo}/data/alluvial.js.map +0 -0
- package/demo/data/area.d.ts +224 -0
- package/{dist/demo → demo}/data/area.js +0 -0
- package/{dist/demo → demo}/data/area.js.map +0 -0
- package/demo/data/bar.d.ts +617 -0
- package/{dist/demo → demo}/data/bar.js +0 -0
- package/{dist/demo → demo}/data/bar.js.map +0 -0
- package/demo/data/boxplot.d.ts +34 -0
- package/{dist/demo → demo}/data/boxplot.js +0 -0
- package/{dist/demo → demo}/data/boxplot.js.map +0 -0
- package/demo/data/bubble.d.ts +141 -0
- package/{dist/demo → demo}/data/bubble.js +0 -0
- package/{dist/demo → demo}/data/bubble.js.map +0 -0
- package/demo/data/bullet.d.ts +24 -0
- package/{dist/demo → demo}/data/bullet.js +0 -0
- package/{dist/demo → demo}/data/bullet.js.map +0 -0
- package/demo/data/bundle.js +1 -0
- package/demo/data/circle-pack.d.ts +91 -0
- package/{dist/demo → demo}/data/circle-pack.js +0 -0
- package/{dist/demo → demo}/data/circle-pack.js.map +0 -0
- package/demo/data/combo.d.ts +482 -0
- package/{dist/demo → demo}/data/combo.js +0 -0
- package/{dist/demo → demo}/data/combo.js.map +0 -0
- package/demo/data/donut.d.ts +64 -0
- package/{dist/demo → demo}/data/donut.js +0 -0
- package/{dist/demo → demo}/data/donut.js.map +0 -0
- package/demo/data/gauge.d.ts +40 -0
- package/{dist/demo → demo}/data/gauge.js +0 -0
- package/{dist/demo → demo}/data/gauge.js.map +0 -0
- package/demo/data/heatmap.d.ts +125 -0
- package/{dist/demo → demo}/data/heatmap.js +0 -0
- package/{dist/demo → demo}/data/heatmap.js.map +0 -0
- package/demo/data/high-scale.d.ts +1 -0
- package/{dist/demo → demo}/data/high-scale.js +0 -0
- package/{dist/demo → demo}/data/high-scale.js.map +0 -0
- package/demo/data/hightlight.d.ts +40 -0
- package/{dist/demo → demo}/data/hightlight.js +0 -0
- package/{dist/demo → demo}/data/hightlight.js.map +0 -0
- package/demo/data/histogram.d.ts +63 -0
- package/{dist/demo → demo}/data/histogram.js +0 -0
- package/{dist/demo → demo}/data/histogram.js.map +0 -0
- package/demo/data/index.d.ts +32 -0
- package/{dist/demo → demo}/data/index.js +0 -0
- package/{dist/demo → demo}/data/index.js.map +0 -0
- package/demo/data/line.d.ts +361 -0
- package/{dist/demo → demo}/data/line.js +0 -0
- package/{dist/demo → demo}/data/line.js.map +0 -0
- package/demo/data/lollipop.d.ts +39 -0
- package/{dist/demo → demo}/data/lollipop.js +0 -0
- package/{dist/demo → demo}/data/lollipop.js.map +0 -0
- package/demo/data/meter.d.ts +95 -0
- package/{dist/demo → demo}/data/meter.js +0 -0
- package/{dist/demo → demo}/data/meter.js.map +0 -0
- package/demo/data/pie.d.ts +46 -0
- package/{dist/demo → demo}/data/pie.js +0 -0
- package/{dist/demo → demo}/data/pie.js.map +0 -0
- package/demo/data/radar.d.ts +63 -0
- package/{dist/demo → demo}/data/radar.js +0 -0
- package/{dist/demo → demo}/data/radar.js.map +0 -0
- package/demo/data/scatter.d.ts +118 -0
- package/{dist/demo → demo}/data/scatter.js +0 -0
- package/{dist/demo → demo}/data/scatter.js.map +0 -0
- package/demo/data/step.d.ts +96 -0
- package/{dist/demo → demo}/data/step.js +0 -0
- package/{dist/demo → demo}/data/step.js.map +0 -0
- package/demo/data/time-series-axis.d.ts +368 -0
- package/{dist/demo → demo}/data/time-series-axis.js +0 -0
- package/{dist/demo → demo}/data/time-series-axis.js.map +0 -0
- package/demo/data/toolbar.d.ts +12 -0
- package/{dist/demo → demo}/data/toolbar.js +0 -0
- package/{dist/demo → demo}/data/toolbar.js.map +0 -0
- package/demo/data/tree.d.ts +30 -0
- package/{dist/demo → demo}/data/tree.js +0 -0
- package/{dist/demo → demo}/data/tree.js.map +0 -0
- package/demo/data/treemap.d.ts +15 -0
- package/{dist/demo → demo}/data/treemap.js +0 -0
- package/{dist/demo → demo}/data/treemap.js.map +0 -0
- package/demo/data/wordcloud.d.ts +14 -0
- package/{dist/demo → demo}/data/wordcloud.js +0 -0
- package/{dist/demo → demo}/data/wordcloud.js.map +0 -0
- package/demo/data/zoom-bar.d.ts +88 -0
- package/{dist/demo → demo}/data/zoom-bar.js +0 -0
- package/{dist/demo → demo}/data/zoom-bar.js.map +0 -0
- package/demo/styles.css +28262 -0
- package/demo/styles.css.map +1 -0
- package/demo/styles.min.css +1 -0
- package/demo/styles.min.css.map +1 -0
- package/demo/tsconfig.tsbuildinfo +2212 -0
- package/{dist/demo → demo}/utils.d.ts +0 -0
- package/{dist/demo → demo}/utils.js +0 -0
- package/demo/utils.js.map +1 -0
- package/{dist/index.d.ts → index.d.ts} +0 -0
- package/{dist/index.js → index.js} +0 -0
- package/{dist/index.js.map → index.js.map} +0 -0
- package/{dist/interfaces → interfaces}/a11y.d.ts +0 -0
- package/{dist/interfaces → interfaces}/a11y.js +0 -0
- package/{dist/interfaces → interfaces}/a11y.js.map +0 -0
- package/{dist/interfaces → interfaces}/axis-scales.d.ts +0 -0
- package/{dist/interfaces → interfaces}/axis-scales.js +0 -0
- package/{dist/interfaces → interfaces}/axis-scales.js.map +0 -0
- package/{dist/interfaces → interfaces}/charts.d.ts +0 -0
- package/{dist/interfaces → interfaces}/charts.js +0 -0
- package/{dist/interfaces → interfaces}/charts.js.map +0 -0
- package/{dist/interfaces → interfaces}/components.d.ts +0 -0
- package/{dist/interfaces → interfaces}/components.js +0 -0
- package/{dist/interfaces → interfaces}/components.js.map +0 -0
- package/{dist/interfaces → interfaces}/enums.d.ts +0 -0
- package/{dist/interfaces → interfaces}/enums.js +0 -0
- package/{dist/interfaces → interfaces}/enums.js.map +0 -0
- package/{dist/interfaces → interfaces}/events.d.ts +0 -0
- package/{dist/interfaces → interfaces}/events.js +0 -0
- package/{dist/interfaces → interfaces}/events.js.map +0 -0
- package/{dist/interfaces → interfaces}/index.d.ts +0 -0
- package/{dist/interfaces → interfaces}/index.js +0 -0
- package/{dist/interfaces → interfaces}/index.js.map +0 -0
- package/{dist/interfaces → interfaces}/layout.d.ts +0 -0
- package/{dist/interfaces → interfaces}/layout.js +0 -0
- package/{dist/interfaces → interfaces}/layout.js.map +0 -0
- package/{dist/interfaces → interfaces}/model.d.ts +0 -0
- package/{dist/interfaces → interfaces}/model.js +0 -0
- package/{dist/interfaces → interfaces}/model.js.map +0 -0
- package/{dist/interfaces → interfaces}/truncation.d.ts +0 -0
- package/{dist/interfaces → interfaces}/truncation.js +0 -0
- package/{dist/interfaces → interfaces}/truncation.js.map +0 -0
- package/{dist/model → model}/alluvial.d.ts +0 -0
- package/{dist/model → model}/alluvial.js +0 -0
- package/{dist/model → model}/alluvial.js.map +0 -0
- package/{dist/model → model}/binned-charts.d.ts +0 -0
- package/{dist/model → model}/binned-charts.js +0 -0
- package/{dist/model → model}/binned-charts.js.map +0 -0
- package/{dist/model → model}/boxplot.d.ts +0 -0
- package/{dist/model → model}/boxplot.js +0 -0
- package/{dist/model → model}/boxplot.js.map +0 -0
- package/{dist/model → model}/bullet.d.ts +0 -0
- package/{dist/model → model}/bullet.js +0 -0
- package/{dist/model → model}/bullet.js.map +0 -0
- package/{dist/model → model}/cartesian-charts.d.ts +0 -0
- package/{dist/model → model}/cartesian-charts.js +0 -0
- package/{dist/model → model}/cartesian-charts.js.map +0 -0
- package/{dist/model → model}/circle-pack.d.ts +0 -0
- package/{dist/model → model}/circle-pack.js +0 -0
- package/{dist/model → model}/circle-pack.js.map +0 -0
- package/{dist/model → model}/gauge.d.ts +0 -0
- package/{dist/model → model}/gauge.js +0 -0
- package/{dist/model → model}/gauge.js.map +0 -0
- package/{dist/model → model}/heatmap.d.ts +0 -0
- package/{dist/model → model}/heatmap.js +0 -0
- package/{dist/model → model}/heatmap.js.map +0 -0
- package/{dist/model → model}/meter.d.ts +0 -0
- package/{dist/model → model}/meter.js +0 -0
- package/{dist/model → model}/meter.js.map +0 -0
- package/{dist/model → model}/model.d.ts +0 -0
- package/{dist/model → model}/model.js +0 -0
- package/{dist/model → model}/model.js.map +0 -0
- package/{dist/model → model}/pie.d.ts +0 -0
- package/{dist/model → model}/pie.js +0 -0
- package/{dist/model → model}/pie.js.map +0 -0
- package/{dist/model → model}/radar.d.ts +0 -0
- package/{dist/model → model}/radar.js +0 -0
- package/{dist/model → model}/radar.js.map +0 -0
- package/{dist/model → model}/tree.d.ts +0 -0
- package/{dist/model → model}/tree.js +0 -0
- package/{dist/model → model}/tree.js.map +0 -0
- package/{dist/model → model}/treemap.d.ts +0 -0
- package/model/treemap.js +44 -0
- package/model/treemap.js.map +1 -0
- package/{dist/model → model}/wordcloud.d.ts +0 -0
- package/{dist/model → model}/wordcloud.js +0 -0
- package/{dist/model → model}/wordcloud.js.map +0 -0
- package/package.json +146 -146
- package/{demo/dist/src/polyfills.d.ts → polyfills.d.ts} +0 -0
- package/{dist/polyfills.js → polyfills.js} +0 -0
- package/{dist/polyfills.js.map → polyfills.js.map} +0 -0
- package/{dist/services → services}/angle-utils.d.ts +0 -0
- package/{dist/services → services}/angle-utils.js +0 -0
- package/{dist/services → services}/angle-utils.js.map +0 -0
- package/{dist/services → services}/canvas-zoom.d.ts +0 -0
- package/{dist/services → services}/canvas-zoom.js +0 -0
- package/{dist/services → services}/canvas-zoom.js.map +0 -0
- package/{dist/services → services}/curves.d.ts +0 -0
- package/{dist/services → services}/curves.js +0 -0
- package/{dist/services → services}/curves.js.map +0 -0
- package/{dist/services → services}/essentials/dom-utils.d.ts +0 -0
- package/services/essentials/dom-utils.js +405 -0
- package/services/essentials/dom-utils.js.map +1 -0
- package/{dist/services → services}/essentials/events.d.ts +0 -0
- package/{dist/services → services}/essentials/events.js +0 -0
- package/{dist/services → services}/essentials/events.js.map +0 -0
- package/{dist/services → services}/essentials/files.d.ts +0 -0
- package/{dist/services → services}/essentials/files.js +0 -0
- package/{dist/services → services}/essentials/files.js.map +0 -0
- package/{dist/services → services}/essentials/gradient-utils.d.ts +0 -0
- package/{dist/services → services}/essentials/gradient-utils.js +0 -0
- package/{dist/services → services}/essentials/gradient-utils.js.map +0 -0
- package/{dist/services → services}/essentials/transitions.d.ts +0 -0
- package/{dist/services → services}/essentials/transitions.js +0 -0
- package/{dist/services → services}/essentials/transitions.js.map +0 -0
- package/{dist/services → services}/index.d.ts +0 -0
- package/{dist/services → services}/index.js +0 -0
- package/{dist/services → services}/index.js.map +0 -0
- package/{dist/services → services}/scales-cartesian.d.ts +0 -0
- package/{dist/services → services}/scales-cartesian.js +0 -0
- package/{dist/services → services}/scales-cartesian.js.map +0 -0
- package/{dist/services → services}/service.d.ts +0 -0
- package/{dist/services → services}/service.js +0 -0
- package/{dist/services → services}/service.js.map +0 -0
- package/{dist/services → services}/time-series.d.ts +0 -0
- package/{dist/services → services}/time-series.js +0 -0
- package/{dist/services → services}/time-series.js.map +0 -0
- package/{dist/services → services}/zoom.d.ts +0 -0
- package/{dist/services → services}/zoom.js +0 -0
- package/{dist/services → services}/zoom.js.map +0 -0
- package/styles/_chart-holder.scss +50 -0
- package/{dist/styles → styles}/_type.scss +0 -0
- package/styles/color-palatte.scss +362 -0
- package/styles/colors.scss +140 -0
- package/styles/components/_axis.scss +52 -0
- package/{dist/styles → styles}/components/_callouts.scss +0 -0
- package/{dist/styles → styles}/components/_color-legend.scss +0 -0
- package/styles/components/_edge.scss +65 -0
- package/{dist/styles → styles}/components/_grid-brush.scss +0 -0
- package/{dist/styles → styles}/components/_grid.scss +0 -0
- package/{dist/styles → styles}/components/_highlights.scss +0 -0
- package/{dist/styles → styles}/components/_layout.scss +0 -0
- package/{dist/styles → styles}/components/_legend.scss +0 -0
- package/styles/components/_marker.scss +7 -0
- package/{dist/styles → styles}/components/_meter-title.scss +0 -0
- package/styles/components/_modal.scss +48 -0
- package/{dist/styles → styles}/components/_ruler.scss +0 -0
- package/styles/components/_skeleton-lines.scss +36 -0
- package/{dist/styles → styles}/components/_skeleton.scss +0 -0
- package/{dist/styles → styles}/components/_threshold.scss +0 -0
- package/{dist/styles → styles}/components/_title.scss +0 -0
- package/{dist/styles → styles}/components/_toolbar.scss +0 -0
- package/styles/components/_tooltip.scss +123 -0
- package/{dist/styles → styles}/components/_zero-line.scss +0 -0
- package/{dist/styles → styles}/components/_zoom-bar.scss +0 -0
- package/styles/components/diagrams/_card-node.scss +97 -0
- package/styles/components/diagrams/_edge.scss +66 -0
- package/{dist/styles → styles}/components/diagrams/_marker.scss +0 -0
- package/styles/components/diagrams/_shape-node.scss +89 -0
- package/styles/components/diagrams/index.scss +4 -0
- package/{dist/styles → styles}/components/index.scss +0 -0
- package/{dist/styles → styles}/graphs/_alluvial.scss +0 -0
- package/{dist/styles → styles}/graphs/_area.scss +0 -0
- package/{dist/styles → styles}/graphs/_bubble.scss +0 -0
- package/{dist/styles → styles}/graphs/_bullet.scss +0 -0
- package/{dist/styles → styles}/graphs/_circle-pack.scss +0 -0
- package/{dist/styles → styles}/graphs/_donut.scss +0 -0
- package/{dist/styles → styles}/graphs/_gauge.scss +0 -0
- package/{dist/styles → styles}/graphs/_heatmap.scss +0 -0
- package/{dist/styles → styles}/graphs/_line.scss +0 -0
- package/{dist/styles → styles}/graphs/_lollipop.scss +0 -0
- package/{dist/styles → styles}/graphs/_meter.scss +0 -0
- package/{dist/styles → styles}/graphs/_pie.scss +0 -0
- package/{dist/styles → styles}/graphs/_radar.scss +0 -0
- package/{dist/styles → styles}/graphs/_scatter-stacked.scss +0 -0
- package/{dist/styles → styles}/graphs/_scatter.scss +0 -0
- package/{dist/styles → styles}/graphs/_tree.scss +0 -0
- package/{dist/styles → styles}/graphs/_treemap.scss +0 -0
- package/{dist/styles → styles}/graphs/_wordcloud.scss +0 -0
- package/{dist/styles → styles}/graphs/index.scss +0 -0
- package/styles/styles.scss +35 -0
- package/styles/tokens.scss +416 -0
- package/styles.css +6258 -0
- package/styles.css.map +1 -0
- package/styles.min.css +1 -0
- package/styles.min.css.map +1 -0
- package/{dist/tools.d.ts → tools.d.ts} +0 -0
- package/{dist/tools.js → tools.js} +0 -0
- package/{dist/tools.js.map → tools.js.map} +0 -0
- package/tsconfig.tsbuildinfo +4699 -0
- package/.prettierignore +0 -3
- package/.storybook/addons.js +0 -2
- package/.storybook/assets/logo.svg +0 -1
- package/.storybook/assets/share.png +0 -0
- package/.storybook/assets/welcome.png +0 -0
- package/.storybook/config.js +0 -21
- package/.storybook/main.js +0 -30
- package/.storybook/manager-head.html +0 -42
- package/.storybook/preview-head.html +0 -10
- package/.storybook/theme.ARCHIVE +0 -46
- package/build.sh +0 -41
- package/carbon.yml +0 -534
- package/custom.d.ts +0 -5
- package/demo/bundle/favicon.ico +0 -0
- package/demo/bundle/index.html +0 -22
- package/demo/bundle/logo.svg +0 -1
- package/demo/bundle/main.df2f79564d91565e3cbd.bundle.js +0 -1
- package/demo/bundle/runtime~main.6b70b35614cf83eab770.bundle.js +0 -1
- package/demo/bundle/sb_dll/storybook_ui-manifest.json +0 -1
- package/demo/bundle/sb_dll/storybook_ui_dll.LICENCE +0 -113
- package/demo/bundle/sb_dll/storybook_ui_dll.js +0 -2
- package/demo/bundle/share.png +0 -0
- package/demo/bundle/vendors~main.fa56568adce9c209e146.bundle.js +0 -111
- package/demo/bundle/welcome.png +0 -0
- package/demo/create-codesandbox.ts +0 -421
- package/demo/data/CHART_TYPES.ts +0 -122
- package/demo/data/alluvial.ts +0 -334
- package/demo/data/area.ts +0 -345
- package/demo/data/bar.ts +0 -783
- package/demo/data/boxplot.ts +0 -49
- package/demo/data/bubble.ts +0 -191
- package/demo/data/bullet.ts +0 -55
- package/demo/data/circle-pack.ts +0 -232
- package/demo/data/combo.ts +0 -593
- package/demo/data/donut.ts +0 -66
- package/demo/data/gauge.ts +0 -44
- package/demo/data/heatmap.ts +0 -1151
- package/demo/data/high-scale.ts +0 -7
- package/demo/data/hightlight.ts +0 -48
- package/demo/data/histogram.ts +0 -316
- package/demo/data/index.ts +0 -1294
- package/demo/data/line.ts +0 -502
- package/demo/data/lollipop.ts +0 -39
- package/demo/data/meter.ts +0 -119
- package/demo/data/pie.ts +0 -61
- package/demo/data/radar.ts +0 -121
- package/demo/data/scatter.ts +0 -152
- package/demo/data/step.ts +0 -37
- package/demo/data/time-series-axis.ts +0 -468
- package/demo/data/toolbar.ts +0 -80
- package/demo/data/tree.ts +0 -210
- package/demo/data/treemap.ts +0 -93
- package/demo/data/wordcloud.ts +0 -105
- package/demo/data/zoom-bar.ts +0 -238
- package/demo/dist/demo/chart-types.d.ts +0 -5
- package/demo/dist/demo/demo-data/bar.d.ts +0 -106
- package/demo/dist/demo/demo-data/colors.d.ts +0 -1
- package/demo/dist/demo/demo-data/index.d.ts +0 -4
- package/demo/dist/demo/demo-data/line.d.ts +0 -105
- package/demo/dist/demo/demo-data/pie-donut.d.ts +0 -27
- package/demo/dist/demo/demo-options.d.ts +0 -2
- package/demo/dist/demo/index.d.ts +0 -1
- package/demo/dist/src/axis-chart.d.ts +0 -8
- package/demo/dist/src/chart.d.ts +0 -14
- package/demo/dist/src/charts/bar-grouped.d.ts +0 -6
- package/demo/dist/src/charts/bar-simple.d.ts +0 -8
- package/demo/dist/src/charts/bar-stacked.d.ts +0 -6
- package/demo/dist/src/charts/donut.d.ts +0 -6
- package/demo/dist/src/charts/index.d.ts +0 -7
- package/demo/dist/src/charts/line.d.ts +0 -6
- package/demo/dist/src/charts/pie.d.ts +0 -8
- package/demo/dist/src/charts/scatter.d.ts +0 -6
- package/demo/dist/src/components/axes/axis.d.ts +0 -17
- package/demo/dist/src/components/axes/grid.d.ts +0 -24
- package/demo/dist/src/components/axes/horizontal-zero-line.d.ts +0 -5
- package/demo/dist/src/components/axes/two-dimensional-axes.d.ts +0 -12
- package/demo/dist/src/components/component.d.ts +0 -17
- package/demo/dist/src/components/essentials/legend.d.ts +0 -11
- package/demo/dist/src/components/essentials/title.d.ts +0 -17
- package/demo/dist/src/components/essentials/tooltip-bar.d.ts +0 -27
- package/demo/dist/src/components/essentials/tooltip-scatter.d.ts +0 -5
- package/demo/dist/src/components/essentials/tooltip.d.ts +0 -22
- package/demo/dist/src/components/graphs/bar-grouped.d.ts +0 -16
- package/demo/dist/src/components/graphs/bar-simple.d.ts +0 -11
- package/demo/dist/src/components/graphs/bar-stacked.d.ts +0 -11
- package/demo/dist/src/components/graphs/bar.d.ts +0 -4
- package/demo/dist/src/components/graphs/donut.d.ts +0 -7
- package/demo/dist/src/components/graphs/line.d.ts +0 -7
- package/demo/dist/src/components/graphs/pie.d.ts +0 -15
- package/demo/dist/src/components/graphs/scatter.d.ts +0 -11
- package/demo/dist/src/components/index.d.ts +0 -18
- package/demo/dist/src/components/layout/layout.d.ts +0 -17
- package/demo/dist/src/configuration.d.ts +0 -61
- package/demo/dist/src/index.d.ts +0 -6
- package/demo/dist/src/interfaces/axis-scales.d.ts +0 -57
- package/demo/dist/src/interfaces/charts.d.ts +0 -143
- package/demo/dist/src/interfaces/components.d.ts +0 -127
- package/demo/dist/src/interfaces/enums.d.ts +0 -87
- package/demo/dist/src/interfaces/index.d.ts +0 -6
- package/demo/dist/src/interfaces/layout.d.ts +0 -7
- package/demo/dist/src/interfaces/model.d.ts +0 -34
- package/demo/dist/src/model-pie.d.ts +0 -12
- package/demo/dist/src/model-simple-bar.d.ts +0 -11
- package/demo/dist/src/model.d.ts +0 -51
- package/demo/dist/src/services/axes.d.ts +0 -9
- package/demo/dist/src/services/colorPalettes.d.ts +0 -6
- package/demo/dist/src/services/colors.d.ts +0 -10
- package/demo/dist/src/services/curves.d.ts +0 -25
- package/demo/dist/src/services/essentials/dom-utils.d.ts +0 -16
- package/demo/dist/src/services/essentials/events.d.ts +0 -8
- package/demo/dist/src/services/essentials/transitions.d.ts +0 -9
- package/demo/dist/src/services/index.d.ts +0 -5
- package/demo/dist/src/services/service.d.ts +0 -10
- package/demo/dist/src/tools.d.ts +0 -92
- package/demo/resource-card.scss +0 -125
- package/demo/styles.scss +0 -466
- package/demo/tsconfig.json +0 -19
- package/demo/utils.ts +0 -326
- package/dist/CHANGELOG.md +0 -2872
- package/dist/README.md +0 -52
- package/dist/components/axes/toolbar.js +0 -543
- package/dist/components/axes/toolbar.js.map +0 -1
- package/dist/components/component.js +0 -102
- package/dist/components/component.js.map +0 -1
- package/dist/components/essentials/modal.js +0 -89
- package/dist/components/essentials/modal.js.map +0 -1
- package/dist/components/essentials/threshold.js +0 -304
- package/dist/components/essentials/threshold.js.map +0 -1
- package/dist/components/essentials/tooltip.js +0 -245
- package/dist/components/essentials/tooltip.js.map +0 -1
- package/dist/components/graphs/bar-stacked.js.map +0 -1
- package/dist/components/graphs/bar.js.map +0 -1
- package/dist/components/graphs/radar.js +0 -730
- package/dist/components/graphs/radar.js.map +0 -1
- package/dist/components/layout/layout.js +0 -191
- package/dist/components/layout/layout.js.map +0 -1
- package/dist/configuration-non-customizable.js.map +0 -1
- package/dist/demo/create-codesandbox.d.ts +0 -71
- package/dist/demo/create-codesandbox.js +0 -165
- package/dist/demo/create-codesandbox.js.map +0 -1
- package/dist/demo/data/bundle.js +0 -1
- package/dist/demo/styles.css +0 -27818
- package/dist/demo/styles.css.map +0 -1
- package/dist/demo/styles.min.css +0 -1
- package/dist/demo/styles.min.css.map +0 -1
- package/dist/demo/tsconfig.tsbuildinfo +0 -3740
- package/dist/demo/utils.js.map +0 -1
- package/dist/model/treemap.js +0 -44
- package/dist/model/treemap.js.map +0 -1
- package/dist/package.json +0 -147
- package/dist/polyfills.d.ts +0 -0
- package/dist/services/essentials/dom-utils.js +0 -405
- package/dist/services/essentials/dom-utils.js.map +0 -1
- package/dist/styles/_chart-holder.scss +0 -52
- package/dist/styles/color-palatte.scss +0 -362
- package/dist/styles/colors.scss +0 -131
- package/dist/styles/components/_axis.scss +0 -52
- package/dist/styles/components/_card.scss +0 -101
- package/dist/styles/components/_circle.scss +0 -49
- package/dist/styles/components/_edge.scss +0 -67
- package/dist/styles/components/_marker.scss +0 -8
- package/dist/styles/components/_modal.scss +0 -48
- package/dist/styles/components/_skeleton-lines.scss +0 -36
- package/dist/styles/components/_tooltip.scss +0 -123
- package/dist/styles/components/diagrams/_card-node.scss +0 -97
- package/dist/styles/components/diagrams/_edge.scss +0 -66
- package/dist/styles/components/diagrams/_shape-node.scss +0 -89
- package/dist/styles/components/diagrams/index.scss +0 -4
- package/dist/styles/styles.scss +0 -35
- package/dist/styles/tokens.scss +0 -373
- package/dist/styles.css +0 -6202
- package/dist/styles.css.map +0 -1
- package/dist/styles.min.css +0 -1
- package/dist/styles.min.css.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -4699
- package/karma.conf.js +0 -99
- package/rollup.config.js +0 -55
- package/rollup.demo.js +0 -43
- package/src/axis-chart.ts +0 -237
- package/src/chart.ts +0 -292
- package/src/charts/alluvial.ts +0 -53
- package/src/charts/area-stacked.ts +0 -58
- package/src/charts/area.ts +0 -61
- package/src/charts/bar-grouped.ts +0 -55
- package/src/charts/bar-simple.ts +0 -55
- package/src/charts/bar-stacked.ts +0 -57
- package/src/charts/boxplot.ts +0 -65
- package/src/charts/bubble.ts +0 -58
- package/src/charts/bullet.ts +0 -58
- package/src/charts/circle-pack.ts +0 -49
- package/src/charts/combo.ts +0 -163
- package/src/charts/donut.ts +0 -46
- package/src/charts/gauge.ts +0 -37
- package/src/charts/heatmap.ts +0 -191
- package/src/charts/histogram.ts +0 -59
- package/src/charts/line.ts +0 -57
- package/src/charts/lollipop.ts +0 -60
- package/src/charts/meter.ts +0 -104
- package/src/charts/pie.ts +0 -60
- package/src/charts/radar.ts +0 -45
- package/src/charts/scatter.ts +0 -58
- package/src/charts/tree.ts +0 -51
- package/src/charts/treemap.ts +0 -47
- package/src/charts/wordcloud.ts +0 -53
- package/src/components/axes/axis.ts +0 -819
- package/src/components/axes/chart-clip.ts +0 -60
- package/src/components/axes/grid-brush.ts +0 -187
- package/src/components/axes/grid.ts +0 -309
- package/src/components/axes/hover-axis.ts +0 -266
- package/src/components/axes/ruler-binned.ts +0 -160
- package/src/components/axes/ruler-stacked.ts +0 -7
- package/src/components/axes/ruler.ts +0 -274
- package/src/components/axes/toolbar.ts +0 -668
- package/src/components/axes/two-dimensional-axes.ts +0 -143
- package/src/components/axes/zero-line.ts +0 -71
- package/src/components/axes/zoom-bar.ts +0 -741
- package/src/components/component.ts +0 -163
- package/src/components/diagrams/buildPaths.ts +0 -82
- package/src/components/diagrams/markerDefinitions.ts +0 -43
- package/src/components/essentials/canvas-chart-clip.ts +0 -38
- package/src/components/essentials/color-scale-legend.ts +0 -347
- package/src/components/essentials/highlights.ts +0 -215
- package/src/components/essentials/legend.spec.ts +0 -61
- package/src/components/essentials/legend.ts +0 -537
- package/src/components/essentials/modal.ts +0 -143
- package/src/components/essentials/threshold.ts +0 -386
- package/src/components/essentials/title-meter.ts +0 -395
- package/src/components/essentials/title.spec.ts +0 -48
- package/src/components/essentials/title.ts +0 -135
- package/src/components/essentials/tooltip-axis.ts +0 -136
- package/src/components/essentials/tooltip.ts +0 -373
- package/src/components/graphs/alluvial.ts +0 -724
- package/src/components/graphs/area-stacked.ts +0 -154
- package/src/components/graphs/area.ts +0 -326
- package/src/components/graphs/bar-grouped.ts +0 -369
- package/src/components/graphs/bar-simple.ts +0 -253
- package/src/components/graphs/bar-stacked.ts +0 -338
- package/src/components/graphs/bar.ts +0 -50
- package/src/components/graphs/boxplot.ts +0 -595
- package/src/components/graphs/bubble.ts +0 -128
- package/src/components/graphs/bullet.ts +0 -492
- package/src/components/graphs/circle-pack.ts +0 -489
- package/src/components/graphs/donut.ts +0 -124
- package/src/components/graphs/gauge.ts +0 -484
- package/src/components/graphs/heatmap.ts +0 -473
- package/src/components/graphs/histogram.ts +0 -263
- package/src/components/graphs/line.ts +0 -203
- package/src/components/graphs/lollipop.ts +0 -212
- package/src/components/graphs/meter.ts +0 -339
- package/src/components/graphs/pie.ts +0 -526
- package/src/components/graphs/radar.ts +0 -1027
- package/src/components/graphs/scatter-stacked.ts +0 -162
- package/src/components/graphs/scatter.ts +0 -513
- package/src/components/graphs/skeleton-lines.ts +0 -95
- package/src/components/graphs/skeleton.ts +0 -352
- package/src/components/graphs/tree.ts +0 -297
- package/src/components/graphs/treemap.ts +0 -413
- package/src/components/graphs/wordcloud.ts +0 -303
- package/src/components/index.ts +0 -61
- package/src/components/layout/layout.ts +0 -260
- package/src/components/layout/spacer.ts +0 -20
- package/src/configuration-non-customizable.ts +0 -295
- package/src/configuration.ts +0 -640
- package/src/index.ts +0 -7
- package/src/interfaces/a11y.ts +0 -12
- package/src/interfaces/axis-scales.ts +0 -198
- package/src/interfaces/charts.ts +0 -553
- package/src/interfaces/components.ts +0 -251
- package/src/interfaces/enums.ts +0 -279
- package/src/interfaces/events.ts +0 -256
- package/src/interfaces/layout.ts +0 -16
- package/src/interfaces/model.ts +0 -39
- package/src/interfaces/truncation.ts +0 -17
- package/src/model/alluvial.ts +0 -29
- package/src/model/binned-charts.ts +0 -33
- package/src/model/boxplot.ts +0 -194
- package/src/model/bullet.ts +0 -66
- package/src/model/cartesian-charts.ts +0 -236
- package/src/model/circle-pack.ts +0 -207
- package/src/model/gauge.ts +0 -33
- package/src/model/heatmap.ts +0 -337
- package/src/model/meter.ts +0 -124
- package/src/model/model.ts +0 -886
- package/src/model/pie.ts +0 -52
- package/src/model/radar.ts +0 -46
- package/src/model/tree.ts +0 -42
- package/src/model/treemap.ts +0 -33
- package/src/model/wordcloud.ts +0 -29
- package/src/polyfills.ts +0 -40
- package/src/selectedGroups.spec.ts +0 -56
- package/src/services/angle-utils.ts +0 -100
- package/src/services/canvas-zoom.ts +0 -69
- package/src/services/curves.ts +0 -92
- package/src/services/essentials/dom-utils.ts +0 -500
- package/src/services/essentials/events.ts +0 -40
- package/src/services/essentials/files.ts +0 -55
- package/src/services/essentials/gradient-utils.ts +0 -74
- package/src/services/essentials/transitions.ts +0 -44
- package/src/services/index.ts +0 -12
- package/src/services/scales-cartesian.ts +0 -904
- package/src/services/service.ts +0 -31
- package/src/services/time-series.spec.ts +0 -332
- package/src/services/time-series.ts +0 -175
- package/src/services/zoom.ts +0 -294
- package/src/styles/_chart-holder.scss +0 -50
- package/src/styles/_type.scss +0 -44
- package/src/styles/color-palatte.scss +0 -362
- package/src/styles/colors.scss +0 -131
- package/src/styles/components/_axis.scss +0 -52
- package/src/styles/components/_callouts.scss +0 -5
- package/src/styles/components/_card.scss +0 -101
- package/src/styles/components/_circle.scss +0 -49
- package/src/styles/components/_color-legend.scss +0 -11
- package/src/styles/components/_edge.scss +0 -67
- package/src/styles/components/_grid-brush.scss +0 -20
- package/src/styles/components/_grid.scss +0 -30
- package/src/styles/components/_highlights.scss +0 -7
- package/src/styles/components/_layout.scss +0 -35
- package/src/styles/components/_legend.scss +0 -97
- package/src/styles/components/_marker.scss +0 -8
- package/src/styles/components/_meter-title.scss +0 -37
- package/src/styles/components/_modal.scss +0 -48
- package/src/styles/components/_ruler.scss +0 -9
- package/src/styles/components/_skeleton-lines.scss +0 -36
- package/src/styles/components/_skeleton.scss +0 -50
- package/src/styles/components/_threshold.scss +0 -53
- package/src/styles/components/_title.scss +0 -22
- package/src/styles/components/_toolbar.scss +0 -60
- package/src/styles/components/_tooltip.scss +0 -123
- package/src/styles/components/_zero-line.scss +0 -5
- package/src/styles/components/_zoom-bar.scss +0 -53
- package/src/styles/components/diagrams/_card-node.scss +0 -97
- package/src/styles/components/diagrams/_edge.scss +0 -66
- package/src/styles/components/diagrams/_marker.scss +0 -7
- package/src/styles/components/diagrams/_shape-node.scss +0 -89
- package/src/styles/components/diagrams/index.scss +0 -4
- package/src/styles/components/index.scss +0 -20
- package/src/styles/graphs/_alluvial.scss +0 -17
- package/src/styles/graphs/_area.scss +0 -4
- package/src/styles/graphs/_bubble.scss +0 -18
- package/src/styles/graphs/_bullet.scss +0 -36
- package/src/styles/graphs/_circle-pack.scss +0 -36
- package/src/styles/graphs/_donut.scss +0 -3
- package/src/styles/graphs/_gauge.scss +0 -23
- package/src/styles/graphs/_heatmap.scss +0 -60
- package/src/styles/graphs/_line.scss +0 -28
- package/src/styles/graphs/_lollipop.scss +0 -9
- package/src/styles/graphs/_meter.scss +0 -34
- package/src/styles/graphs/_pie.scss +0 -3
- package/src/styles/graphs/_radar.scss +0 -18
- package/src/styles/graphs/_scatter-stacked.scss +0 -12
- package/src/styles/graphs/_scatter.scss +0 -23
- package/src/styles/graphs/_tree.scss +0 -47
- package/src/styles/graphs/_treemap.scss +0 -5
- package/src/styles/graphs/_wordcloud.scss +0 -9
- package/src/styles/graphs/index.scss +0 -18
- package/src/styles/styles.scss +0 -35
- package/src/styles/tokens.scss +0 -373
- package/src/tests/index.ts +0 -1
- package/src/tests/test-environment.ts +0 -43
- package/src/tests/tools.ts +0 -17
- package/src/tools.spec.ts +0 -98
- package/src/tools.ts +0 -488
- package/src/tsconfig.json +0 -8
- package/stories/all.stories.ts +0 -139
- package/stories/tutorials/api.ts +0 -72
- package/stories/tutorials/color-palette.ts +0 -80
- package/stories/tutorials/combo-charts.ts +0 -114
- package/stories/tutorials/dual-axes.ts +0 -54
- package/stories/tutorials/event-listeners.ts +0 -31
- package/stories/tutorials/getting-started/angular.ts +0 -142
- package/stories/tutorials/getting-started/react.ts +0 -10
- package/stories/tutorials/getting-started/vanilla.ts +0 -149
- package/stories/tutorials/getting-started/vue.ts +0 -121
- package/stories/tutorials/index.ts +0 -14
- package/stories/tutorials/tabular-data-format.ts +0 -134
- package/stories/tutorials/themes.ts +0 -10
- package/stories/tutorials.stories.ts +0 -42
- package/tsconfig.json +0 -28
- package/tslint.json +0 -100
- package/yarn-error.log +0 -21024
|
@@ -1,1027 +0,0 @@
|
|
|
1
|
-
// Internal Imports
|
|
2
|
-
import { Component } from '../component';
|
|
3
|
-
import { DOMUtils } from '../../services';
|
|
4
|
-
import {
|
|
5
|
-
Events,
|
|
6
|
-
Roles,
|
|
7
|
-
ColorClassNameTypes,
|
|
8
|
-
RenderTypes,
|
|
9
|
-
Alignments,
|
|
10
|
-
} from '../../interfaces';
|
|
11
|
-
import { Tools } from '../../tools';
|
|
12
|
-
import {
|
|
13
|
-
Point,
|
|
14
|
-
Angle,
|
|
15
|
-
radialLabelPlacement,
|
|
16
|
-
radToDeg,
|
|
17
|
-
polarToCartesianCoords,
|
|
18
|
-
distanceBetweenPointOnCircAndVerticalDiameter,
|
|
19
|
-
} from '../../services/angle-utils';
|
|
20
|
-
import * as Configuration from '../../configuration';
|
|
21
|
-
|
|
22
|
-
// D3 Imports
|
|
23
|
-
import { select } from 'd3-selection';
|
|
24
|
-
import { scaleBand, scaleLinear } from 'd3-scale';
|
|
25
|
-
import { max, min, extent } from 'd3-array';
|
|
26
|
-
import { lineRadial, curveLinearClosed } from 'd3-shape';
|
|
27
|
-
|
|
28
|
-
export class Radar extends Component {
|
|
29
|
-
type = 'radar';
|
|
30
|
-
renderType = RenderTypes.SVG;
|
|
31
|
-
|
|
32
|
-
svg: SVGElement;
|
|
33
|
-
groupMapsTo: string;
|
|
34
|
-
uniqueKeys: string[];
|
|
35
|
-
uniqueGroups: string[];
|
|
36
|
-
fullDataNormalized: any;
|
|
37
|
-
groupedDataNormalized: any;
|
|
38
|
-
|
|
39
|
-
init() {
|
|
40
|
-
const { events } = this.services;
|
|
41
|
-
// Highlight correct line legend item hovers
|
|
42
|
-
events.addEventListener(
|
|
43
|
-
Events.Legend.ITEM_HOVER,
|
|
44
|
-
this.handleLegendOnHover
|
|
45
|
-
);
|
|
46
|
-
// Un-highlight lines on legend item mouseouts
|
|
47
|
-
events.addEventListener(
|
|
48
|
-
Events.Legend.ITEM_MOUSEOUT,
|
|
49
|
-
this.handleLegendMouseOut
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
render(animate = true) {
|
|
54
|
-
const svg = this.getComponentContainer();
|
|
55
|
-
const { width, height } = DOMUtils.getSVGElementSize(svg, {
|
|
56
|
-
useAttrs: true,
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
const data = this.model.getData();
|
|
60
|
-
const groupedData = this.model.getGroupedData();
|
|
61
|
-
|
|
62
|
-
const options = this.getOptions();
|
|
63
|
-
|
|
64
|
-
const groupMapsTo = Tools.getProperty(options, 'data', 'groupMapsTo');
|
|
65
|
-
const valueMapsTo = Tools.getProperty(
|
|
66
|
-
options,
|
|
67
|
-
'radar',
|
|
68
|
-
'axes',
|
|
69
|
-
'value'
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
const { angle, value } = Tools.getProperty(options, 'radar', 'axes');
|
|
73
|
-
|
|
74
|
-
const {
|
|
75
|
-
xLabelPadding,
|
|
76
|
-
yLabelPadding,
|
|
77
|
-
yTicksNumber,
|
|
78
|
-
minRange,
|
|
79
|
-
xAxisRectHeight,
|
|
80
|
-
} = Configuration.radar;
|
|
81
|
-
|
|
82
|
-
this.uniqueKeys = Array.from(new Set(data.map((d) => d[angle])));
|
|
83
|
-
this.uniqueGroups = Array.from(
|
|
84
|
-
new Set(data.map((d) => d[groupMapsTo]))
|
|
85
|
-
);
|
|
86
|
-
this.fullDataNormalized = this.normalizeFlatData(data);
|
|
87
|
-
this.groupedDataNormalized = this.normalizeGroupedData(groupedData);
|
|
88
|
-
|
|
89
|
-
const labelHeight = this.getLabelDimensions(this.uniqueKeys[0]).height;
|
|
90
|
-
const margin = 2 * (labelHeight + yLabelPadding);
|
|
91
|
-
const size = Math.min(width, height);
|
|
92
|
-
const diameter = size - margin;
|
|
93
|
-
const radius = diameter / 2;
|
|
94
|
-
|
|
95
|
-
if (radius <= 0) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// given a key, return the corresponding angle in radiants
|
|
100
|
-
// rotated by -PI/2 because we want angle 0° at -y (12 o’clock)
|
|
101
|
-
const xScale = scaleBand<string>()
|
|
102
|
-
.domain(this.fullDataNormalized.map((d) => d[angle]))
|
|
103
|
-
.range(
|
|
104
|
-
[0, 2 * Math.PI].map((a) => a - Math.PI / 2) as [Angle, Angle]
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
const centerPointMinValue = min(
|
|
108
|
-
this.fullDataNormalized.map((d) => d[value]) as number[]
|
|
109
|
-
);
|
|
110
|
-
const yScale = scaleLinear()
|
|
111
|
-
.domain([
|
|
112
|
-
centerPointMinValue >= 0 ? 0 : centerPointMinValue,
|
|
113
|
-
max(this.fullDataNormalized.map((d) => d[value]) as number[]),
|
|
114
|
-
])
|
|
115
|
-
.range([minRange, radius])
|
|
116
|
-
.nice(yTicksNumber);
|
|
117
|
-
const yTicks = yScale.ticks(yTicksNumber);
|
|
118
|
-
|
|
119
|
-
const colorScale = (group: string): string =>
|
|
120
|
-
this.model.getFillColor(group);
|
|
121
|
-
|
|
122
|
-
// constructs a new radial line generator
|
|
123
|
-
// the angle accessor returns the angle in radians with 0° at -y (12 o’clock)
|
|
124
|
-
// so map back the angle
|
|
125
|
-
const radialLineGenerator = lineRadial<any>()
|
|
126
|
-
.angle((d) => xScale(d[angle]) + Math.PI / 2)
|
|
127
|
-
.radius((d) => yScale(d[value]))
|
|
128
|
-
.curve(curveLinearClosed);
|
|
129
|
-
|
|
130
|
-
// compute the space that each x label needs
|
|
131
|
-
const horizSpaceNeededByEachXLabel = this.uniqueKeys.map((key) => {
|
|
132
|
-
const tickWidth = this.getLabelDimensions(key).width;
|
|
133
|
-
// compute the distance between the point that the label rapresents and the vertical diameter
|
|
134
|
-
const distanceFromDiameter = distanceBetweenPointOnCircAndVerticalDiameter(
|
|
135
|
-
xScale(key),
|
|
136
|
-
radius
|
|
137
|
-
);
|
|
138
|
-
// the space each label occupies is the sum of these two values
|
|
139
|
-
return tickWidth + distanceFromDiameter;
|
|
140
|
-
});
|
|
141
|
-
const leftPadding = max(horizSpaceNeededByEachXLabel);
|
|
142
|
-
|
|
143
|
-
// center coordinates
|
|
144
|
-
const c: Point = {
|
|
145
|
-
x: leftPadding + xLabelPadding,
|
|
146
|
-
y: height / 2,
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
/////////////////////////////
|
|
150
|
-
// Drawing the radar
|
|
151
|
-
/////////////////////////////
|
|
152
|
-
|
|
153
|
-
// y axes
|
|
154
|
-
const yAxes = DOMUtils.appendOrSelect(svg, 'g.y-axes').attr(
|
|
155
|
-
'role',
|
|
156
|
-
Roles.GROUP
|
|
157
|
-
);
|
|
158
|
-
const yAxisUpdate = yAxes
|
|
159
|
-
.selectAll('path')
|
|
160
|
-
.data(yTicks, (tick) => tick);
|
|
161
|
-
// for each tick, create array of data corresponding to the points composing the shape
|
|
162
|
-
const shapeData = (tick: number) =>
|
|
163
|
-
this.uniqueKeys.map((key) => ({ [angle]: key, [value]: tick }));
|
|
164
|
-
yAxisUpdate.join(
|
|
165
|
-
(enter) =>
|
|
166
|
-
enter
|
|
167
|
-
.append('path')
|
|
168
|
-
.attr('opacity', 0)
|
|
169
|
-
.attr('transform', `translate(${c.x}, ${c.y})`)
|
|
170
|
-
.attr('fill', 'none')
|
|
171
|
-
.call((selection) =>
|
|
172
|
-
selection
|
|
173
|
-
.transition()
|
|
174
|
-
.call((t) =>
|
|
175
|
-
this.services.transitions.setupTransition({
|
|
176
|
-
transition: t,
|
|
177
|
-
name: 'radar_y_axes_enter',
|
|
178
|
-
animate,
|
|
179
|
-
})
|
|
180
|
-
)
|
|
181
|
-
.attr('opacity', 1)
|
|
182
|
-
.attr('d', (tick) =>
|
|
183
|
-
radialLineGenerator(shapeData(tick))
|
|
184
|
-
)
|
|
185
|
-
),
|
|
186
|
-
(update) =>
|
|
187
|
-
update.call((selection) =>
|
|
188
|
-
selection
|
|
189
|
-
.transition()
|
|
190
|
-
.call((t) =>
|
|
191
|
-
this.services.transitions.setupTransition({
|
|
192
|
-
transition: t,
|
|
193
|
-
name: 'radar_y_axes_update',
|
|
194
|
-
animate,
|
|
195
|
-
})
|
|
196
|
-
)
|
|
197
|
-
.attr('opacity', 1)
|
|
198
|
-
.attr('transform', `translate(${c.x}, ${c.y})`)
|
|
199
|
-
.attr('d', (tick) =>
|
|
200
|
-
radialLineGenerator(shapeData(tick))
|
|
201
|
-
)
|
|
202
|
-
),
|
|
203
|
-
(exit) =>
|
|
204
|
-
exit.call((selection) =>
|
|
205
|
-
selection
|
|
206
|
-
.transition()
|
|
207
|
-
.call((t) =>
|
|
208
|
-
this.services.transitions.setupTransition({
|
|
209
|
-
transition: t,
|
|
210
|
-
name: 'radar_y_axes_exit',
|
|
211
|
-
animate,
|
|
212
|
-
})
|
|
213
|
-
)
|
|
214
|
-
.attr('d', (tick) =>
|
|
215
|
-
radialLineGenerator(shapeData(tick))
|
|
216
|
-
)
|
|
217
|
-
.attr('opacity', 0)
|
|
218
|
-
.remove()
|
|
219
|
-
)
|
|
220
|
-
);
|
|
221
|
-
|
|
222
|
-
// x axes
|
|
223
|
-
const xAxes = DOMUtils.appendOrSelect(svg, 'g.x-axes').attr(
|
|
224
|
-
'role',
|
|
225
|
-
Roles.GROUP
|
|
226
|
-
);
|
|
227
|
-
const xAxisUpdate = xAxes
|
|
228
|
-
.selectAll('line')
|
|
229
|
-
.data(this.uniqueKeys, (key) => key);
|
|
230
|
-
xAxisUpdate.join(
|
|
231
|
-
(enter) =>
|
|
232
|
-
enter
|
|
233
|
-
.append('line')
|
|
234
|
-
.attr('opacity', 0)
|
|
235
|
-
.attr('class', (key) => `x-axis-${Tools.kebabCase(key)}`) // replace spaces with -
|
|
236
|
-
.attr('stroke-dasharray', '0')
|
|
237
|
-
.attr(
|
|
238
|
-
'x1',
|
|
239
|
-
(key) => polarToCartesianCoords(xScale(key), 0, c).x
|
|
240
|
-
)
|
|
241
|
-
.attr(
|
|
242
|
-
'y1',
|
|
243
|
-
(key) => polarToCartesianCoords(xScale(key), 0, c).y
|
|
244
|
-
)
|
|
245
|
-
.attr(
|
|
246
|
-
'x2',
|
|
247
|
-
(key) => polarToCartesianCoords(xScale(key), 0, c).x
|
|
248
|
-
)
|
|
249
|
-
.attr(
|
|
250
|
-
'y2',
|
|
251
|
-
(key) => polarToCartesianCoords(xScale(key), 0, c).y
|
|
252
|
-
)
|
|
253
|
-
.call((selection) =>
|
|
254
|
-
selection
|
|
255
|
-
.transition()
|
|
256
|
-
.call((t) =>
|
|
257
|
-
this.services.transitions.setupTransition({
|
|
258
|
-
transition: t,
|
|
259
|
-
name: 'radar_x_axes_enter',
|
|
260
|
-
animate,
|
|
261
|
-
})
|
|
262
|
-
)
|
|
263
|
-
.attr('opacity', 1)
|
|
264
|
-
.attr(
|
|
265
|
-
'x1',
|
|
266
|
-
(key) =>
|
|
267
|
-
polarToCartesianCoords(
|
|
268
|
-
xScale(key),
|
|
269
|
-
yScale.range()[0],
|
|
270
|
-
c
|
|
271
|
-
).x
|
|
272
|
-
)
|
|
273
|
-
.attr(
|
|
274
|
-
'y1',
|
|
275
|
-
(key) =>
|
|
276
|
-
polarToCartesianCoords(
|
|
277
|
-
xScale(key),
|
|
278
|
-
yScale.range()[0],
|
|
279
|
-
c
|
|
280
|
-
).y
|
|
281
|
-
)
|
|
282
|
-
.attr(
|
|
283
|
-
'x2',
|
|
284
|
-
(key) =>
|
|
285
|
-
polarToCartesianCoords(
|
|
286
|
-
xScale(key),
|
|
287
|
-
yScale.range()[1],
|
|
288
|
-
c
|
|
289
|
-
).x
|
|
290
|
-
)
|
|
291
|
-
.attr(
|
|
292
|
-
'y2',
|
|
293
|
-
(key) =>
|
|
294
|
-
polarToCartesianCoords(
|
|
295
|
-
xScale(key),
|
|
296
|
-
yScale.range()[1],
|
|
297
|
-
c
|
|
298
|
-
).y
|
|
299
|
-
)
|
|
300
|
-
),
|
|
301
|
-
(update) =>
|
|
302
|
-
update.call((selection) =>
|
|
303
|
-
selection
|
|
304
|
-
.transition()
|
|
305
|
-
.call((t) =>
|
|
306
|
-
this.services.transitions.setupTransition({
|
|
307
|
-
transition: t,
|
|
308
|
-
name: 'radar_x_axes_update',
|
|
309
|
-
animate,
|
|
310
|
-
})
|
|
311
|
-
)
|
|
312
|
-
.attr('opacity', 1)
|
|
313
|
-
.attr(
|
|
314
|
-
'x1',
|
|
315
|
-
(key) =>
|
|
316
|
-
polarToCartesianCoords(
|
|
317
|
-
xScale(key),
|
|
318
|
-
yScale.range()[0],
|
|
319
|
-
c
|
|
320
|
-
).x
|
|
321
|
-
)
|
|
322
|
-
.attr(
|
|
323
|
-
'y1',
|
|
324
|
-
(key) =>
|
|
325
|
-
polarToCartesianCoords(
|
|
326
|
-
xScale(key),
|
|
327
|
-
yScale.range()[0],
|
|
328
|
-
c
|
|
329
|
-
).y
|
|
330
|
-
)
|
|
331
|
-
.attr(
|
|
332
|
-
'x2',
|
|
333
|
-
(key) =>
|
|
334
|
-
polarToCartesianCoords(
|
|
335
|
-
xScale(key),
|
|
336
|
-
yScale.range()[1],
|
|
337
|
-
c
|
|
338
|
-
).x
|
|
339
|
-
)
|
|
340
|
-
.attr(
|
|
341
|
-
'y2',
|
|
342
|
-
(key) =>
|
|
343
|
-
polarToCartesianCoords(
|
|
344
|
-
xScale(key),
|
|
345
|
-
yScale.range()[1],
|
|
346
|
-
c
|
|
347
|
-
).y
|
|
348
|
-
)
|
|
349
|
-
),
|
|
350
|
-
(exit) =>
|
|
351
|
-
exit.call((selection) =>
|
|
352
|
-
selection
|
|
353
|
-
.transition()
|
|
354
|
-
.call((t) =>
|
|
355
|
-
this.services.transitions.setupTransition({
|
|
356
|
-
transition: t,
|
|
357
|
-
name: 'radar_x_axes_exit',
|
|
358
|
-
animate,
|
|
359
|
-
})
|
|
360
|
-
)
|
|
361
|
-
.attr('opacity', 0)
|
|
362
|
-
.remove()
|
|
363
|
-
)
|
|
364
|
-
);
|
|
365
|
-
|
|
366
|
-
// x labels
|
|
367
|
-
const xLabels = DOMUtils.appendOrSelect(svg, 'g.x-labels').attr(
|
|
368
|
-
'role',
|
|
369
|
-
Roles.GROUP
|
|
370
|
-
);
|
|
371
|
-
const xLabelUpdate = xLabels.selectAll('text').data(this.uniqueKeys);
|
|
372
|
-
xLabelUpdate.join(
|
|
373
|
-
(enter) =>
|
|
374
|
-
enter
|
|
375
|
-
.append('text')
|
|
376
|
-
.text((key) => key)
|
|
377
|
-
.attr('opacity', 0)
|
|
378
|
-
.attr(
|
|
379
|
-
'x',
|
|
380
|
-
(key) =>
|
|
381
|
-
polarToCartesianCoords(
|
|
382
|
-
xScale(key),
|
|
383
|
-
yScale.range()[1] + xLabelPadding,
|
|
384
|
-
c
|
|
385
|
-
).x
|
|
386
|
-
)
|
|
387
|
-
.attr(
|
|
388
|
-
'y',
|
|
389
|
-
(key) =>
|
|
390
|
-
polarToCartesianCoords(
|
|
391
|
-
xScale(key),
|
|
392
|
-
yScale.range()[1] + xLabelPadding,
|
|
393
|
-
c
|
|
394
|
-
).y
|
|
395
|
-
)
|
|
396
|
-
.style(
|
|
397
|
-
'text-anchor',
|
|
398
|
-
(key) => radialLabelPlacement(xScale(key)).textAnchor
|
|
399
|
-
)
|
|
400
|
-
.style(
|
|
401
|
-
'dominant-baseline',
|
|
402
|
-
(key) =>
|
|
403
|
-
radialLabelPlacement(xScale(key)).dominantBaseline
|
|
404
|
-
)
|
|
405
|
-
.call((selection) =>
|
|
406
|
-
selection
|
|
407
|
-
.transition()
|
|
408
|
-
.call((t) =>
|
|
409
|
-
this.services.transitions.setupTransition({
|
|
410
|
-
transition: t,
|
|
411
|
-
name: 'radar_x_labels_enter',
|
|
412
|
-
animate,
|
|
413
|
-
})
|
|
414
|
-
)
|
|
415
|
-
.attr('opacity', 1)
|
|
416
|
-
),
|
|
417
|
-
(update) =>
|
|
418
|
-
update.call((selection) =>
|
|
419
|
-
selection
|
|
420
|
-
.transition()
|
|
421
|
-
.call((t) =>
|
|
422
|
-
this.services.transitions.setupTransition({
|
|
423
|
-
transition: t,
|
|
424
|
-
name: 'radar_x_labels_update',
|
|
425
|
-
animate,
|
|
426
|
-
})
|
|
427
|
-
)
|
|
428
|
-
.attr('opacity', 1)
|
|
429
|
-
.attr(
|
|
430
|
-
'x',
|
|
431
|
-
(key) =>
|
|
432
|
-
polarToCartesianCoords(
|
|
433
|
-
xScale(key),
|
|
434
|
-
yScale.range()[1] + xLabelPadding,
|
|
435
|
-
c
|
|
436
|
-
).x
|
|
437
|
-
)
|
|
438
|
-
.attr(
|
|
439
|
-
'y',
|
|
440
|
-
(key) =>
|
|
441
|
-
polarToCartesianCoords(
|
|
442
|
-
xScale(key),
|
|
443
|
-
yScale.range()[1] + xLabelPadding,
|
|
444
|
-
c
|
|
445
|
-
).y
|
|
446
|
-
)
|
|
447
|
-
.end()
|
|
448
|
-
.finally(() => {
|
|
449
|
-
// Align chart horizontally after x-axies has finished rendering
|
|
450
|
-
const alignment = Tools.getProperty(
|
|
451
|
-
options,
|
|
452
|
-
'radar',
|
|
453
|
-
'alignment'
|
|
454
|
-
);
|
|
455
|
-
|
|
456
|
-
const alignmentXOffset = this.getAlignmentXOffset(
|
|
457
|
-
alignment,
|
|
458
|
-
svg,
|
|
459
|
-
this.getParent()
|
|
460
|
-
);
|
|
461
|
-
svg.attr('x', alignmentXOffset);
|
|
462
|
-
})
|
|
463
|
-
),
|
|
464
|
-
(exit) =>
|
|
465
|
-
exit.call((selection) =>
|
|
466
|
-
selection
|
|
467
|
-
.transition()
|
|
468
|
-
.call((t) =>
|
|
469
|
-
this.services.transitions.setupTransition({
|
|
470
|
-
transition: t,
|
|
471
|
-
name: 'radar_x_labels_exit',
|
|
472
|
-
animate,
|
|
473
|
-
})
|
|
474
|
-
)
|
|
475
|
-
.attr('opacity', 0)
|
|
476
|
-
.remove()
|
|
477
|
-
)
|
|
478
|
-
);
|
|
479
|
-
|
|
480
|
-
// blobs
|
|
481
|
-
const blobs = DOMUtils.appendOrSelect(svg, 'g.blobs').attr(
|
|
482
|
-
'role',
|
|
483
|
-
Roles.GROUP
|
|
484
|
-
);
|
|
485
|
-
const blobUpdate = blobs
|
|
486
|
-
.selectAll('path')
|
|
487
|
-
.data(this.groupedDataNormalized, (group) => group.name);
|
|
488
|
-
|
|
489
|
-
blobUpdate.join(
|
|
490
|
-
(enter) =>
|
|
491
|
-
enter
|
|
492
|
-
.append('path')
|
|
493
|
-
.attr('class', (group) =>
|
|
494
|
-
this.model.getColorClassName({
|
|
495
|
-
classNameTypes: [
|
|
496
|
-
ColorClassNameTypes.FILL,
|
|
497
|
-
ColorClassNameTypes.STROKE,
|
|
498
|
-
],
|
|
499
|
-
dataGroupName: group.name,
|
|
500
|
-
originalClassName: 'blob',
|
|
501
|
-
})
|
|
502
|
-
)
|
|
503
|
-
.attr('role', Roles.GRAPHICS_SYMBOL)
|
|
504
|
-
.attr('aria-label', (d) => d['name'])
|
|
505
|
-
.attr('opacity', 0)
|
|
506
|
-
.attr(
|
|
507
|
-
'transform',
|
|
508
|
-
animate
|
|
509
|
-
? () =>
|
|
510
|
-
`translate(${c.x}, ${c.y}) scale(${
|
|
511
|
-
1 + Math.random() * 0.35
|
|
512
|
-
})`
|
|
513
|
-
: `translate(${c.x}, ${c.y})`
|
|
514
|
-
)
|
|
515
|
-
.style('fill', (group) => colorScale(group.name))
|
|
516
|
-
.style('fill-opacity', Configuration.radar.opacity.selected)
|
|
517
|
-
.style('stroke', (group) => colorScale(group.name))
|
|
518
|
-
|
|
519
|
-
.call((selection) => {
|
|
520
|
-
const selectionUpdate = selection
|
|
521
|
-
.transition()
|
|
522
|
-
.call((t) =>
|
|
523
|
-
this.services.transitions.setupTransition({
|
|
524
|
-
transition: t,
|
|
525
|
-
name: 'radar_blobs_enter',
|
|
526
|
-
animate,
|
|
527
|
-
})
|
|
528
|
-
);
|
|
529
|
-
|
|
530
|
-
if (animate) {
|
|
531
|
-
selectionUpdate
|
|
532
|
-
.delay(() => Math.random() * 30)
|
|
533
|
-
.attr('transform', `translate(${c.x}, ${c.y})`);
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
selectionUpdate
|
|
537
|
-
.attr('opacity', 1)
|
|
538
|
-
.attr('d', (group) =>
|
|
539
|
-
radialLineGenerator(group.data)
|
|
540
|
-
);
|
|
541
|
-
}),
|
|
542
|
-
(update) => {
|
|
543
|
-
update
|
|
544
|
-
.attr('class', (group) =>
|
|
545
|
-
this.model.getColorClassName({
|
|
546
|
-
classNameTypes: [
|
|
547
|
-
ColorClassNameTypes.FILL,
|
|
548
|
-
ColorClassNameTypes.STROKE,
|
|
549
|
-
],
|
|
550
|
-
dataGroupName: group.name,
|
|
551
|
-
originalClassName: 'blob',
|
|
552
|
-
})
|
|
553
|
-
)
|
|
554
|
-
.style('fill', (group) => colorScale(group.name))
|
|
555
|
-
.style('stroke', (group) => colorScale(group.name));
|
|
556
|
-
update.call((selection) =>
|
|
557
|
-
selection
|
|
558
|
-
.transition()
|
|
559
|
-
.call((t) =>
|
|
560
|
-
this.services.transitions.setupTransition({
|
|
561
|
-
transition: t,
|
|
562
|
-
name: 'radar_blobs_update',
|
|
563
|
-
animate,
|
|
564
|
-
})
|
|
565
|
-
)
|
|
566
|
-
.attr('opacity', 1)
|
|
567
|
-
.attr('transform', `translate(${c.x}, ${c.y})`)
|
|
568
|
-
.attr('d', (group) => radialLineGenerator(group.data))
|
|
569
|
-
);
|
|
570
|
-
},
|
|
571
|
-
(exit) =>
|
|
572
|
-
exit.call((selection) => {
|
|
573
|
-
const selectionUpdate = selection.transition().call((t) =>
|
|
574
|
-
this.services.transitions.setupTransition({
|
|
575
|
-
transition: t,
|
|
576
|
-
name: 'radar_blobs_exit',
|
|
577
|
-
animate,
|
|
578
|
-
})
|
|
579
|
-
);
|
|
580
|
-
|
|
581
|
-
if (animate) {
|
|
582
|
-
selectionUpdate
|
|
583
|
-
.delay(() => Math.random() * 30)
|
|
584
|
-
.attr(
|
|
585
|
-
'transform',
|
|
586
|
-
() =>
|
|
587
|
-
`translate(${c.x}, ${c.y}) scale(${
|
|
588
|
-
1 + Math.random() * 0.35
|
|
589
|
-
})`
|
|
590
|
-
);
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
selectionUpdate.attr('opacity', 0).remove();
|
|
594
|
-
})
|
|
595
|
-
);
|
|
596
|
-
|
|
597
|
-
// data dots
|
|
598
|
-
const dots = DOMUtils.appendOrSelect(svg, 'g.dots').attr(
|
|
599
|
-
'role',
|
|
600
|
-
Roles.GROUP
|
|
601
|
-
);
|
|
602
|
-
|
|
603
|
-
const dotsUpdate = dots
|
|
604
|
-
.selectAll('circle')
|
|
605
|
-
// Filter out dots with no value so they are not rendered
|
|
606
|
-
.data(
|
|
607
|
-
this.fullDataNormalized.filter(
|
|
608
|
-
(d) => Tools.getProperty(d, value) !== null
|
|
609
|
-
)
|
|
610
|
-
);
|
|
611
|
-
|
|
612
|
-
dotsUpdate
|
|
613
|
-
.join(
|
|
614
|
-
(enter) =>
|
|
615
|
-
enter
|
|
616
|
-
.append('circle')
|
|
617
|
-
.attr('role', Roles.GRAPHICS_SYMBOL)
|
|
618
|
-
.attr('aria-label', (d) => d[valueMapsTo]),
|
|
619
|
-
(update) => update,
|
|
620
|
-
(exit) => exit.remove()
|
|
621
|
-
)
|
|
622
|
-
.attr('class', (d) =>
|
|
623
|
-
this.model.getColorClassName({
|
|
624
|
-
classNameTypes: [ColorClassNameTypes.FILL],
|
|
625
|
-
dataGroupName: d[groupMapsTo],
|
|
626
|
-
originalClassName: Tools.kebabCase(d[angle]),
|
|
627
|
-
})
|
|
628
|
-
)
|
|
629
|
-
.attr(
|
|
630
|
-
'cx',
|
|
631
|
-
(d) =>
|
|
632
|
-
polarToCartesianCoords(
|
|
633
|
-
xScale(d[angle]),
|
|
634
|
-
yScale(d[value]),
|
|
635
|
-
c
|
|
636
|
-
).x
|
|
637
|
-
)
|
|
638
|
-
.attr(
|
|
639
|
-
'cy',
|
|
640
|
-
(d) =>
|
|
641
|
-
polarToCartesianCoords(
|
|
642
|
-
xScale(d[angle]),
|
|
643
|
-
yScale(d[value]),
|
|
644
|
-
c
|
|
645
|
-
).y
|
|
646
|
-
)
|
|
647
|
-
.attr('r', 0)
|
|
648
|
-
.attr('opacity', 0)
|
|
649
|
-
.style('fill', (d) => colorScale(d[groupMapsTo]));
|
|
650
|
-
|
|
651
|
-
// rectangles
|
|
652
|
-
const xAxesRect = DOMUtils.appendOrSelect(svg, 'g.x-axes-rect').attr(
|
|
653
|
-
'role',
|
|
654
|
-
Roles.GROUP
|
|
655
|
-
);
|
|
656
|
-
const xAxisRectUpdate = xAxesRect
|
|
657
|
-
.selectAll('rect')
|
|
658
|
-
.data(this.uniqueKeys);
|
|
659
|
-
xAxisRectUpdate
|
|
660
|
-
.join(
|
|
661
|
-
(enter) => enter.append('rect'),
|
|
662
|
-
(update) => update,
|
|
663
|
-
(exit) => exit.remove()
|
|
664
|
-
)
|
|
665
|
-
.attr('x', c.x)
|
|
666
|
-
.attr('y', c.y - xAxisRectHeight / 2)
|
|
667
|
-
.attr('width', yScale.range()[1])
|
|
668
|
-
.attr('height', xAxisRectHeight)
|
|
669
|
-
.style('fill', 'red')
|
|
670
|
-
.style('fill-opacity', 0)
|
|
671
|
-
.attr(
|
|
672
|
-
'transform',
|
|
673
|
-
(key) => `rotate(${radToDeg(xScale(key))}, ${c.x}, ${c.y})`
|
|
674
|
-
);
|
|
675
|
-
|
|
676
|
-
// y labels (show only the min and the max labels)
|
|
677
|
-
const yLabels = DOMUtils.appendOrSelect(svg, 'g.y-labels').attr(
|
|
678
|
-
'role',
|
|
679
|
-
Roles.GROUP
|
|
680
|
-
);
|
|
681
|
-
const yLabelUpdate = yLabels.selectAll('text').data(extent(yTicks));
|
|
682
|
-
yLabelUpdate.join(
|
|
683
|
-
(enter) =>
|
|
684
|
-
enter
|
|
685
|
-
.append('text')
|
|
686
|
-
.attr('opacity', 0)
|
|
687
|
-
.text((tick) => tick)
|
|
688
|
-
.attr(
|
|
689
|
-
'x',
|
|
690
|
-
(tick) =>
|
|
691
|
-
polarToCartesianCoords(
|
|
692
|
-
-Math.PI / 2,
|
|
693
|
-
yScale(tick),
|
|
694
|
-
c
|
|
695
|
-
).x + yLabelPadding
|
|
696
|
-
)
|
|
697
|
-
.attr(
|
|
698
|
-
'y',
|
|
699
|
-
(tick) =>
|
|
700
|
-
polarToCartesianCoords(
|
|
701
|
-
-Math.PI / 2,
|
|
702
|
-
yScale(tick),
|
|
703
|
-
c
|
|
704
|
-
).y
|
|
705
|
-
)
|
|
706
|
-
.style('text-anchor', 'start')
|
|
707
|
-
.style('dominant-baseline', 'middle')
|
|
708
|
-
.call((selection) =>
|
|
709
|
-
selection
|
|
710
|
-
.transition()
|
|
711
|
-
.call((t) =>
|
|
712
|
-
this.services.transitions.setupTransition({
|
|
713
|
-
transition: t,
|
|
714
|
-
name: 'radar_y_labels_enter',
|
|
715
|
-
animate,
|
|
716
|
-
})
|
|
717
|
-
)
|
|
718
|
-
.attr('opacity', 1)
|
|
719
|
-
),
|
|
720
|
-
(update) =>
|
|
721
|
-
update.call((selection) =>
|
|
722
|
-
selection
|
|
723
|
-
.transition()
|
|
724
|
-
.call((t) =>
|
|
725
|
-
this.services.transitions.setupTransition({
|
|
726
|
-
transition: t,
|
|
727
|
-
name: 'radar_y_labels_update',
|
|
728
|
-
animate,
|
|
729
|
-
})
|
|
730
|
-
)
|
|
731
|
-
.text((tick) => tick)
|
|
732
|
-
.attr('opacity', 1)
|
|
733
|
-
.attr(
|
|
734
|
-
'x',
|
|
735
|
-
(tick) =>
|
|
736
|
-
polarToCartesianCoords(
|
|
737
|
-
-Math.PI / 2,
|
|
738
|
-
yScale(tick),
|
|
739
|
-
c
|
|
740
|
-
).x + yLabelPadding
|
|
741
|
-
)
|
|
742
|
-
.attr(
|
|
743
|
-
'y',
|
|
744
|
-
(tick) =>
|
|
745
|
-
polarToCartesianCoords(
|
|
746
|
-
-Math.PI / 2,
|
|
747
|
-
yScale(tick),
|
|
748
|
-
c
|
|
749
|
-
).y
|
|
750
|
-
)
|
|
751
|
-
),
|
|
752
|
-
(exit) =>
|
|
753
|
-
exit.call((selection) =>
|
|
754
|
-
selection
|
|
755
|
-
.transition()
|
|
756
|
-
.call((t) =>
|
|
757
|
-
this.services.transitions.setupTransition({
|
|
758
|
-
transition: t,
|
|
759
|
-
name: 'radar_y_labels_exit',
|
|
760
|
-
animate,
|
|
761
|
-
})
|
|
762
|
-
)
|
|
763
|
-
.attr('opacity', 0)
|
|
764
|
-
.remove()
|
|
765
|
-
)
|
|
766
|
-
);
|
|
767
|
-
|
|
768
|
-
// Add event listeners
|
|
769
|
-
this.addEventListeners();
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
getAlignmentXOffset(alignment, svg, parent) {
|
|
773
|
-
const svgDimensions = DOMUtils.getSVGElementSize(svg, {
|
|
774
|
-
useBBox: true,
|
|
775
|
-
});
|
|
776
|
-
const { width } = DOMUtils.getSVGElementSize(parent, {
|
|
777
|
-
useAttrs: true,
|
|
778
|
-
});
|
|
779
|
-
|
|
780
|
-
let alignmentOffset = 0;
|
|
781
|
-
if (alignment === Alignments.CENTER) {
|
|
782
|
-
alignmentOffset = Math.floor((width - svgDimensions.width) / 2);
|
|
783
|
-
} else if (alignment === Alignments.RIGHT) {
|
|
784
|
-
alignmentOffset = width - svgDimensions.width;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
return alignmentOffset;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
// append temporarily the label to get the exact space that it occupies
|
|
791
|
-
getLabelDimensions = (label: string) => {
|
|
792
|
-
const tmpTick = DOMUtils.appendOrSelect(
|
|
793
|
-
this.getComponentContainer(),
|
|
794
|
-
`g.tmp-tick`
|
|
795
|
-
);
|
|
796
|
-
const tmpTickText = DOMUtils.appendOrSelect(tmpTick, `text`).text(
|
|
797
|
-
label
|
|
798
|
-
);
|
|
799
|
-
const { width, height } = DOMUtils.getSVGElementSize(
|
|
800
|
-
tmpTickText.node(),
|
|
801
|
-
{ useBBox: true }
|
|
802
|
-
);
|
|
803
|
-
tmpTick.remove();
|
|
804
|
-
return { width, height };
|
|
805
|
-
};
|
|
806
|
-
|
|
807
|
-
// Given a flat array of objects, if there are missing data on key,
|
|
808
|
-
// creates corresponding data with value = null
|
|
809
|
-
normalizeFlatData = (dataset: any) => {
|
|
810
|
-
const options = this.getOptions();
|
|
811
|
-
const { angle, value } = Tools.getProperty(options, 'radar', 'axes');
|
|
812
|
-
const groupMapsTo = Tools.getProperty(options, 'data', 'groupMapsTo');
|
|
813
|
-
const completeBlankData = Tools.flatMapDeep(
|
|
814
|
-
this.uniqueKeys.map((key) => {
|
|
815
|
-
return this.uniqueGroups.map((group) => ({
|
|
816
|
-
[angle]: key,
|
|
817
|
-
[groupMapsTo]: group,
|
|
818
|
-
[value]: null,
|
|
819
|
-
}));
|
|
820
|
-
})
|
|
821
|
-
);
|
|
822
|
-
return Tools.merge(completeBlankData, dataset);
|
|
823
|
-
};
|
|
824
|
-
|
|
825
|
-
// Given a a grouped array of objects, if there are missing data on key,
|
|
826
|
-
// creates corresponding data with value = null
|
|
827
|
-
normalizeGroupedData = (dataset: any) => {
|
|
828
|
-
const options = this.getOptions();
|
|
829
|
-
const { angle, value } = Tools.getProperty(options, 'radar', 'axes');
|
|
830
|
-
const groupMapsTo = Tools.getProperty(options, 'data', 'groupMapsTo');
|
|
831
|
-
return dataset.map(({ name, data }) => {
|
|
832
|
-
const completeBlankData = this.uniqueKeys.map((k) => ({
|
|
833
|
-
[groupMapsTo]: name,
|
|
834
|
-
[angle]: k,
|
|
835
|
-
[value]: null,
|
|
836
|
-
}));
|
|
837
|
-
return { name, data: Tools.merge(completeBlankData, data) };
|
|
838
|
-
});
|
|
839
|
-
};
|
|
840
|
-
|
|
841
|
-
handleLegendOnHover = (event: CustomEvent) => {
|
|
842
|
-
const { hoveredElement } = event.detail;
|
|
843
|
-
this.parent
|
|
844
|
-
.selectAll('g.blobs path')
|
|
845
|
-
.transition('legend-hover-blob')
|
|
846
|
-
.call((t) =>
|
|
847
|
-
this.services.transitions.setupTransition({
|
|
848
|
-
transition: t,
|
|
849
|
-
name: 'legend-hover-blob',
|
|
850
|
-
})
|
|
851
|
-
)
|
|
852
|
-
.style('fill-opacity', (group) => {
|
|
853
|
-
if (group.name !== hoveredElement.datum().name) {
|
|
854
|
-
return Configuration.radar.opacity.unselected;
|
|
855
|
-
}
|
|
856
|
-
return Configuration.radar.opacity.selected;
|
|
857
|
-
})
|
|
858
|
-
.style('stroke-opacity', (group) => {
|
|
859
|
-
if (group.name !== hoveredElement.datum().name) {
|
|
860
|
-
return Configuration.radar.opacity.unselected;
|
|
861
|
-
}
|
|
862
|
-
return 1;
|
|
863
|
-
});
|
|
864
|
-
};
|
|
865
|
-
|
|
866
|
-
handleLegendMouseOut = (event: CustomEvent) => {
|
|
867
|
-
this.parent
|
|
868
|
-
.selectAll('g.blobs path')
|
|
869
|
-
.transition('legend-mouseout-blob')
|
|
870
|
-
.call((t) =>
|
|
871
|
-
this.services.transitions.setupTransition({
|
|
872
|
-
transition: t,
|
|
873
|
-
name: 'legend-mouseout-blob',
|
|
874
|
-
})
|
|
875
|
-
)
|
|
876
|
-
.style('fill-opacity', Configuration.radar.opacity.selected)
|
|
877
|
-
.style('stroke-opacity', 1);
|
|
878
|
-
};
|
|
879
|
-
|
|
880
|
-
destroy() {
|
|
881
|
-
// Remove event listeners
|
|
882
|
-
this.parent
|
|
883
|
-
.selectAll('.x-axes-rect > rect')
|
|
884
|
-
.on('mouseover', null)
|
|
885
|
-
.on('mousemove', null)
|
|
886
|
-
.on('mouseout', null);
|
|
887
|
-
// Remove legend listeners
|
|
888
|
-
const eventsFragment = this.services.events;
|
|
889
|
-
eventsFragment.removeEventListener(
|
|
890
|
-
Events.Legend.ITEM_HOVER,
|
|
891
|
-
this.handleLegendOnHover
|
|
892
|
-
);
|
|
893
|
-
eventsFragment.removeEventListener(
|
|
894
|
-
Events.Legend.ITEM_MOUSEOUT,
|
|
895
|
-
this.handleLegendMouseOut
|
|
896
|
-
);
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
addEventListeners() {
|
|
900
|
-
const self = this;
|
|
901
|
-
const {
|
|
902
|
-
axes: { angle },
|
|
903
|
-
} = Tools.getProperty(this.getOptions(), 'radar');
|
|
904
|
-
|
|
905
|
-
// events on x axes rects
|
|
906
|
-
this.parent
|
|
907
|
-
.selectAll('.x-axes-rect > rect')
|
|
908
|
-
.on('mouseover', function (event, datum) {
|
|
909
|
-
const hoveredElement = select(this);
|
|
910
|
-
|
|
911
|
-
// Dispatch mouse event
|
|
912
|
-
self.services.events.dispatchEvent(
|
|
913
|
-
Events.Radar.X_AXIS_MOUSEOVER,
|
|
914
|
-
{
|
|
915
|
-
event,
|
|
916
|
-
element: hoveredElement,
|
|
917
|
-
datum,
|
|
918
|
-
}
|
|
919
|
-
);
|
|
920
|
-
|
|
921
|
-
const axisLine = self.parent.select(
|
|
922
|
-
`.x-axes .x-axis-${Tools.kebabCase(datum)}`
|
|
923
|
-
);
|
|
924
|
-
const dots = self.parent.selectAll(
|
|
925
|
-
`.dots circle.${Tools.kebabCase(datum)}`
|
|
926
|
-
);
|
|
927
|
-
|
|
928
|
-
const activeDataGroupNames = self.model.getActiveDataGroupNames();
|
|
929
|
-
|
|
930
|
-
const options = self.getOptions();
|
|
931
|
-
const { groupMapsTo } = options.data;
|
|
932
|
-
const valueMapsTo = Tools.getProperty(
|
|
933
|
-
options,
|
|
934
|
-
'radar',
|
|
935
|
-
'axes',
|
|
936
|
-
'value'
|
|
937
|
-
);
|
|
938
|
-
|
|
939
|
-
// Change style
|
|
940
|
-
axisLine
|
|
941
|
-
.classed('hovered', true)
|
|
942
|
-
.attr('stroke-dasharray', '4 4');
|
|
943
|
-
dots.classed('hovered', true)
|
|
944
|
-
.attr('opacity', d => activeDataGroupNames.indexOf(d[groupMapsTo]) !== -1 ? 1 : 0)
|
|
945
|
-
.attr('r', Configuration.radar.dotsRadius);
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
// get the items that should be highlighted
|
|
949
|
-
const itemsToHighlight = self.fullDataNormalized.filter(
|
|
950
|
-
(d) => d[angle] === datum && activeDataGroupNames.indexOf(d[groupMapsTo]) !== -1
|
|
951
|
-
);
|
|
952
|
-
|
|
953
|
-
// Show tooltip
|
|
954
|
-
self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
|
|
955
|
-
event,
|
|
956
|
-
hoveredElement,
|
|
957
|
-
items: itemsToHighlight
|
|
958
|
-
.filter(
|
|
959
|
-
(datum) => typeof datum[valueMapsTo] === 'number'
|
|
960
|
-
)
|
|
961
|
-
.map((datum) => ({
|
|
962
|
-
label: datum[groupMapsTo],
|
|
963
|
-
value: datum[valueMapsTo],
|
|
964
|
-
color: self.model.getFillColor(datum[groupMapsTo]),
|
|
965
|
-
class: self.model.getColorClassName({
|
|
966
|
-
classNameTypes: [ColorClassNameTypes.TOOLTIP],
|
|
967
|
-
dataGroupName: datum[groupMapsTo],
|
|
968
|
-
}),
|
|
969
|
-
})),
|
|
970
|
-
});
|
|
971
|
-
})
|
|
972
|
-
.on('mousemove', function (event, datum) {
|
|
973
|
-
const hoveredElement = select(this);
|
|
974
|
-
|
|
975
|
-
// Dispatch mouse event
|
|
976
|
-
self.services.events.dispatchEvent(
|
|
977
|
-
Events.Radar.X_AXIS_MOUSEMOVE,
|
|
978
|
-
{
|
|
979
|
-
event,
|
|
980
|
-
element: hoveredElement,
|
|
981
|
-
datum,
|
|
982
|
-
}
|
|
983
|
-
);
|
|
984
|
-
|
|
985
|
-
self.services.events.dispatchEvent(Events.Tooltip.MOVE, {
|
|
986
|
-
event,
|
|
987
|
-
});
|
|
988
|
-
})
|
|
989
|
-
.on('click', function (event, datum) {
|
|
990
|
-
// Dispatch mouse event
|
|
991
|
-
self.services.events.dispatchEvent(Events.Radar.X_AXIS_CLICK, {
|
|
992
|
-
event,
|
|
993
|
-
element: select(this),
|
|
994
|
-
datum,
|
|
995
|
-
});
|
|
996
|
-
})
|
|
997
|
-
.on('mouseout', function (event, datum) {
|
|
998
|
-
const hoveredElement = select(this);
|
|
999
|
-
const axisLine = self.parent.select(
|
|
1000
|
-
`.x-axes .x-axis-${Tools.kebabCase(datum)}`
|
|
1001
|
-
);
|
|
1002
|
-
const dots = self.parent.selectAll(
|
|
1003
|
-
`.dots circle.${Tools.kebabCase(datum)}`
|
|
1004
|
-
);
|
|
1005
|
-
|
|
1006
|
-
// Change style
|
|
1007
|
-
axisLine
|
|
1008
|
-
.classed('hovered', false)
|
|
1009
|
-
.attr('stroke-dasharray', '0');
|
|
1010
|
-
|
|
1011
|
-
dots.classed('hovered', false).attr('opacity', 0).attr('r', 0);
|
|
1012
|
-
|
|
1013
|
-
// Dispatch mouse event
|
|
1014
|
-
self.services.events.dispatchEvent(
|
|
1015
|
-
Events.Radar.X_AXIS_MOUSEOUT,
|
|
1016
|
-
{
|
|
1017
|
-
event,
|
|
1018
|
-
element: hoveredElement,
|
|
1019
|
-
datum,
|
|
1020
|
-
}
|
|
1021
|
-
);
|
|
1022
|
-
|
|
1023
|
-
// Hide tooltip
|
|
1024
|
-
self.services.events.dispatchEvent(Events.Tooltip.HIDE);
|
|
1025
|
-
});
|
|
1026
|
-
}
|
|
1027
|
-
}
|