@semcore/d3-chart 3.60.2-prerelease.0 → 3.61.0-prerelease.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/lib/cjs/AnimatedClipPath.js +11 -15
- package/lib/cjs/AnimatedClipPath.js.map +1 -1
- package/lib/cjs/Area.js +71 -48
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +170 -108
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +29 -34
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +211 -137
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +92 -82
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +154 -139
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +55 -38
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +15 -18
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +29 -34
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +52 -45
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +63 -41
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Pattern.js +16 -12
- package/lib/cjs/Pattern.js.map +1 -1
- package/lib/cjs/Plot.js +29 -36
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +281 -261
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +169 -154
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/Reference.js +45 -51
- package/lib/cjs/Reference.js.map +1 -1
- package/lib/cjs/ResponsiveContainer.js +20 -25
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +71 -61
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/StackBar.js +20 -31
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +12 -16
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +73 -73
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +77 -52
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/DataAccessibilityTable.js +2 -3
- package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +43 -86
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +44 -19
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/a11y/bezier.js +1 -2
- package/lib/cjs/a11y/bezier.js.map +1 -1
- package/lib/cjs/a11y/focus.js +5 -6
- package/lib/cjs/a11y/focus.js.map +1 -1
- package/lib/cjs/a11y/hints.js +6 -9
- package/lib/cjs/a11y/hints.js.map +1 -1
- package/lib/cjs/a11y/insights.js +63 -64
- package/lib/cjs/a11y/insights.js.map +1 -1
- package/lib/cjs/a11y/intl.js +1 -2
- package/lib/cjs/a11y/intl.js.map +1 -1
- package/lib/cjs/a11y/locale.js +5 -5
- package/lib/cjs/a11y/locale.js.map +1 -1
- package/lib/cjs/a11y/serialize.js +15 -17
- package/lib/cjs/a11y/serialize.js.map +1 -1
- package/lib/cjs/a11y/summarize.js +1 -2
- package/lib/cjs/a11y/summarize.js.map +1 -1
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/a11y/translations/module/de.json +2 -2
- package/lib/cjs/a11y/translations/module/en.json +2 -2
- package/lib/cjs/a11y/translations/module/es.json +2 -2
- package/lib/cjs/a11y/translations/module/fr.json +2 -2
- package/lib/cjs/a11y/translations/module/it.json +2 -2
- package/lib/cjs/a11y/translations/module/ja.json +2 -2
- package/lib/cjs/a11y/translations/module/ko.json +2 -2
- package/lib/cjs/a11y/translations/module/nl.json +2 -2
- package/lib/cjs/a11y/translations/module/pl.json +2 -2
- package/lib/cjs/a11y/translations/module/pt.json +2 -2
- package/lib/cjs/a11y/translations/module/sv.json +2 -2
- package/lib/cjs/a11y/translations/module/tr.json +2 -2
- package/lib/cjs/a11y/translations/module/vi.json +2 -2
- package/lib/cjs/a11y/translations/module/zh.json +2 -2
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/color.js +2 -3
- package/lib/cjs/color.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.js +157 -83
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.js +24 -51
- package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.js +85 -69
- package/lib/cjs/component/Chart/BarChart.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.js +31 -27
- package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.js +340 -147
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +11 -15
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.js +16 -22
- package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.js +16 -44
- package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.js +22 -48
- package/lib/cjs/component/Chart/LineChart.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.js +15 -19
- package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.js +16 -21
- package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.js +16 -19
- package/lib/cjs/component/Chart/VennChart.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/index.js +7 -8
- package/lib/cjs/component/Chart/index.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +45 -23
- package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +19 -24
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +108 -83
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -2
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/legend-item.shadow.css +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +18 -23
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/index.js +1 -2
- package/lib/cjs/component/ChartLegend/index.js.map +1 -1
- package/lib/cjs/component/Cigarette/Cigarette.js +16 -20
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js +19 -24
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
- package/lib/cjs/component/SvgElement.js +21 -0
- package/lib/cjs/component/SvgElement.js.map +1 -0
- package/lib/cjs/createElement.d.js.map +1 -1
- package/lib/cjs/createElement.js +10 -12
- package/lib/cjs/createElement.js.map +1 -1
- package/lib/cjs/index.js +9 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/abstract-chart.shadow.css +12 -0
- package/lib/cjs/style/area.shadow.css +3 -3
- package/lib/cjs/style/axis.shadow.css +43 -5
- package/lib/cjs/style/bar.shadow.css +6 -6
- package/lib/cjs/style/bubble.shadow.css +12 -4
- package/lib/cjs/style/donut.shadow.css +3 -3
- package/lib/cjs/style/dot.shadow.css +2 -2
- package/lib/cjs/style/hover.shadow.css +4 -4
- package/lib/cjs/style/line.shadow.css +3 -3
- package/lib/cjs/style/plot.shadow.css +8 -6
- package/lib/cjs/style/plotA11yModule.shadow.css +10 -11
- package/lib/cjs/style/plotA11yView.shadow.css +16 -29
- package/lib/cjs/style/radar.shadow.css +8 -8
- package/lib/cjs/style/radial-tree.shadow.css +3 -3
- package/lib/cjs/style/reference.shadow.css +4 -4
- package/lib/cjs/style/scatterplot.shadow.css +2 -2
- package/lib/cjs/style/tooltip.shadow.css +5 -5
- package/lib/cjs/style/venn.shadow.css +3 -3
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/translations/de.json +1 -0
- package/lib/cjs/translations/es.json +1 -0
- package/lib/cjs/translations/fr.json +1 -0
- package/lib/cjs/translations/it.json +1 -0
- package/lib/cjs/translations/ja.json +1 -0
- package/lib/cjs/translations/ko.json +1 -0
- package/lib/cjs/translations/nl.json +1 -0
- package/lib/cjs/translations/pl.json +1 -0
- package/lib/cjs/translations/pt.json +1 -0
- package/lib/cjs/translations/sv.json +1 -0
- package/lib/cjs/translations/tr.json +2 -1
- package/lib/cjs/translations/vi.json +1 -0
- package/lib/cjs/translations/zh.json +1 -0
- package/lib/cjs/types/Area.d.js.map +1 -1
- package/lib/cjs/types/Axis.d.js.map +1 -1
- package/lib/cjs/types/Bar.d.js.map +1 -1
- package/lib/cjs/types/Bubble.d.js.map +1 -1
- package/lib/cjs/types/ClipPath.d.js.map +1 -1
- package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Donut.d.js.map +1 -1
- package/lib/cjs/types/GroupBar.d.js.map +1 -1
- package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Hover.d.js.map +1 -1
- package/lib/cjs/types/Line.d.js.map +1 -1
- package/lib/cjs/types/Plot.d.js.map +1 -1
- package/lib/cjs/types/Radar.d.js.map +1 -1
- package/lib/cjs/types/Reference.d.js.map +1 -1
- package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/cjs/types/ScatterPlot.d.js.map +1 -1
- package/lib/cjs/types/StackBar.d.js.map +1 -1
- package/lib/cjs/types/StackedArea.d.js.map +1 -1
- package/lib/cjs/types/Tooltip.d.js.map +1 -1
- package/lib/cjs/types/Venn.d.js.map +1 -1
- package/lib/cjs/types/context.d.js.map +1 -1
- package/lib/cjs/types/index.d.js +14 -2
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js +36 -55
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/AnimatedClipPath.js +9 -11
- package/lib/es6/AnimatedClipPath.js.map +1 -1
- package/lib/es6/Area.js +70 -45
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +168 -104
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +27 -29
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +211 -135
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +89 -77
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +154 -137
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +55 -36
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +13 -15
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +27 -29
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +51 -41
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +61 -37
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Pattern.js +7 -3
- package/lib/es6/Pattern.js.map +1 -1
- package/lib/es6/Plot.js +28 -32
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +279 -257
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +168 -151
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/Reference.js +43 -45
- package/lib/es6/Reference.js.map +1 -1
- package/lib/es6/ResponsiveContainer.js +16 -19
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +71 -59
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/StackBar.js +17 -27
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +10 -13
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +68 -65
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +75 -48
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +43 -86
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +43 -16
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/a11y/bezier.js.map +1 -1
- package/lib/es6/a11y/focus.js +4 -4
- package/lib/es6/a11y/focus.js.map +1 -1
- package/lib/es6/a11y/hints.js +2 -2
- package/lib/es6/a11y/hints.js.map +1 -1
- package/lib/es6/a11y/insights.js +61 -61
- package/lib/es6/a11y/insights.js.map +1 -1
- package/lib/es6/a11y/intl.js.map +1 -1
- package/lib/es6/a11y/locale.js +3 -2
- package/lib/es6/a11y/locale.js.map +1 -1
- package/lib/es6/a11y/serialize.js +14 -13
- package/lib/es6/a11y/serialize.js.map +1 -1
- package/lib/es6/a11y/summarize.js.map +1 -1
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/a11y/translations/module/de.json +2 -2
- package/lib/es6/a11y/translations/module/en.json +2 -2
- package/lib/es6/a11y/translations/module/es.json +2 -2
- package/lib/es6/a11y/translations/module/fr.json +2 -2
- package/lib/es6/a11y/translations/module/it.json +2 -2
- package/lib/es6/a11y/translations/module/ja.json +2 -2
- package/lib/es6/a11y/translations/module/ko.json +2 -2
- package/lib/es6/a11y/translations/module/nl.json +2 -2
- package/lib/es6/a11y/translations/module/pl.json +2 -2
- package/lib/es6/a11y/translations/module/pt.json +2 -2
- package/lib/es6/a11y/translations/module/sv.json +2 -2
- package/lib/es6/a11y/translations/module/tr.json +2 -2
- package/lib/es6/a11y/translations/module/vi.json +2 -2
- package/lib/es6/a11y/translations/module/zh.json +2 -2
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/color.js +1 -1
- package/lib/es6/color.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.js +159 -80
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.js +23 -48
- package/lib/es6/component/Chart/AreaChart.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.js +84 -67
- package/lib/es6/component/Chart/BarChart.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.js +30 -24
- package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.js +341 -144
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js +9 -12
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.js +14 -18
- package/lib/es6/component/Chart/DonutChart.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.js +15 -41
- package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.js +20 -45
- package/lib/es6/component/Chart/LineChart.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.js +13 -16
- package/lib/es6/component/Chart/RadarChart.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.js +15 -18
- package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.js +14 -16
- package/lib/es6/component/Chart/VennChart.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
- package/lib/es6/component/Chart/index.js +6 -6
- package/lib/es6/component/Chart/index.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +43 -20
- package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +17 -19
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +102 -74
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/legend-item.shadow.css +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +15 -17
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/index.js.map +1 -1
- package/lib/es6/component/Cigarette/Cigarette.js +14 -17
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.js +17 -21
- package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
- package/lib/es6/component/SvgElement.js +14 -0
- package/lib/es6/component/SvgElement.js.map +1 -0
- package/lib/es6/createElement.d.js.map +1 -1
- package/lib/es6/createElement.js +7 -7
- package/lib/es6/createElement.js.map +1 -1
- package/lib/es6/index.js +1 -0
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/abstract-chart.shadow.css +12 -0
- package/lib/es6/style/area.shadow.css +3 -3
- package/lib/es6/style/axis.shadow.css +43 -5
- package/lib/es6/style/bar.shadow.css +6 -6
- package/lib/es6/style/bubble.shadow.css +12 -4
- package/lib/es6/style/donut.shadow.css +3 -3
- package/lib/es6/style/dot.shadow.css +2 -2
- package/lib/es6/style/hover.shadow.css +4 -4
- package/lib/es6/style/line.shadow.css +3 -3
- package/lib/es6/style/plot.shadow.css +8 -6
- package/lib/es6/style/plotA11yModule.shadow.css +10 -11
- package/lib/es6/style/plotA11yView.shadow.css +16 -29
- package/lib/es6/style/radar.shadow.css +8 -8
- package/lib/es6/style/radial-tree.shadow.css +3 -3
- package/lib/es6/style/reference.shadow.css +4 -4
- package/lib/es6/style/scatterplot.shadow.css +2 -2
- package/lib/es6/style/tooltip.shadow.css +5 -5
- package/lib/es6/style/venn.shadow.css +3 -3
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/translations/de.json +1 -0
- package/lib/es6/translations/es.json +1 -0
- package/lib/es6/translations/fr.json +1 -0
- package/lib/es6/translations/it.json +1 -0
- package/lib/es6/translations/ja.json +1 -0
- package/lib/es6/translations/ko.json +1 -0
- package/lib/es6/translations/nl.json +1 -0
- package/lib/es6/translations/pl.json +1 -0
- package/lib/es6/translations/pt.json +1 -0
- package/lib/es6/translations/sv.json +1 -0
- package/lib/es6/translations/tr.json +2 -1
- package/lib/es6/translations/vi.json +1 -0
- package/lib/es6/translations/zh.json +1 -0
- package/lib/es6/types/Area.d.js.map +1 -1
- package/lib/es6/types/Axis.d.js.map +1 -1
- package/lib/es6/types/Bar.d.js.map +1 -1
- package/lib/es6/types/Bubble.d.js.map +1 -1
- package/lib/es6/types/ClipPath.d.js.map +1 -1
- package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Donut.d.js.map +1 -1
- package/lib/es6/types/GroupBar.d.js.map +1 -1
- package/lib/es6/types/HorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Hover.d.js.map +1 -1
- package/lib/es6/types/Line.d.js.map +1 -1
- package/lib/es6/types/Plot.d.js.map +1 -1
- package/lib/es6/types/Radar.d.js.map +1 -1
- package/lib/es6/types/Reference.d.js.map +1 -1
- package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/es6/types/ScatterPlot.d.js.map +1 -1
- package/lib/es6/types/StackBar.d.js.map +1 -1
- package/lib/es6/types/StackedArea.d.js.map +1 -1
- package/lib/es6/types/Tooltip.d.js.map +1 -1
- package/lib/es6/types/Venn.d.js.map +1 -1
- package/lib/es6/types/context.d.js.map +1 -1
- package/lib/es6/types/index.d.js +2 -0
- package/lib/es6/types/index.d.js.map +1 -1
- package/lib/es6/utils.js +16 -16
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/AnimatedClipPath.mjs +9 -16
- package/lib/esm/Area.mjs +51 -36
- package/lib/esm/Axis.mjs +143 -86
- package/lib/esm/Bar.mjs +31 -34
- package/lib/esm/Bubble.mjs +154 -106
- package/lib/esm/CompactHorizontalBar.mjs +88 -80
- package/lib/esm/Donut.mjs +87 -75
- package/lib/esm/Dots.mjs +50 -34
- package/lib/esm/GroupBar.mjs +12 -14
- package/lib/esm/HorizontalBar.mjs +31 -34
- package/lib/esm/Hover.mjs +53 -50
- package/lib/esm/Line.mjs +45 -31
- package/lib/esm/Pattern.mjs +4 -2
- package/lib/esm/Plot.mjs +30 -35
- package/lib/esm/Radar.mjs +188 -175
- package/lib/esm/RadialTree.mjs +105 -111
- package/lib/esm/Reference.mjs +37 -40
- package/lib/esm/ResponsiveContainer.mjs +18 -21
- package/lib/esm/ScatterPlot.mjs +49 -40
- package/lib/esm/StackBar.mjs +18 -28
- package/lib/esm/StackedArea.mjs +13 -16
- package/lib/esm/Tooltip.mjs +56 -59
- package/lib/esm/Venn.mjs +67 -47
- package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -2
- package/lib/esm/a11y/PlotA11yModule.mjs +35 -74
- package/lib/esm/a11y/PlotA11yView.mjs +41 -17
- package/lib/esm/a11y/focus.mjs +4 -4
- package/lib/esm/a11y/hints.mjs +2 -2
- package/lib/esm/a11y/insights.mjs +76 -76
- package/lib/esm/a11y/locale.mjs +2 -2
- package/lib/esm/a11y/serialize.mjs +12 -12
- package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/a11y/translations/module/de.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/en.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/es.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/fr.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/it.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/ja.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/ko.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/nl.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/pl.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/pt.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/sv.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/tr.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/vi.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/zh.json.mjs +2 -4
- package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/component/Chart/AbstractChart.mjs +141 -65
- package/lib/esm/component/Chart/AreaChart.mjs +27 -51
- package/lib/esm/component/Chart/BarChart.mjs +64 -51
- package/lib/esm/component/Chart/BubbleChart.mjs +30 -25
- package/lib/esm/component/Chart/CigaretteChart.mjs +298 -119
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +13 -15
- package/lib/esm/component/Chart/DonutChart.mjs +16 -19
- package/lib/esm/component/Chart/HistogramChart.mjs +22 -46
- package/lib/esm/component/Chart/LineChart.mjs +23 -46
- package/lib/esm/component/Chart/RadarChart.mjs +16 -18
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +18 -21
- package/lib/esm/component/Chart/VennChart.mjs +16 -19
- package/lib/esm/component/Chart/index.mjs +6 -6
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +45 -22
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +19 -22
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +88 -75
- package/lib/esm/component/ChartLegend/LegendItem/legend-item.shadow.css +1 -1
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +22 -25
- package/lib/esm/component/ChartLegend/index.mjs +2 -0
- package/lib/esm/component/Cigarette/Cigarette.mjs +16 -19
- package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +18 -22
- package/lib/esm/component/SvgElement.mjs +14 -0
- package/lib/esm/createElement.mjs +8 -10
- package/lib/esm/index.mjs +3 -0
- package/lib/esm/style/abstract-chart.shadow.css +12 -0
- package/lib/esm/style/area.shadow.css +3 -3
- package/lib/esm/style/axis.shadow.css +43 -5
- package/lib/esm/style/bar.shadow.css +6 -6
- package/lib/esm/style/bubble.shadow.css +12 -4
- package/lib/esm/style/donut.shadow.css +3 -3
- package/lib/esm/style/dot.shadow.css +2 -2
- package/lib/esm/style/hover.shadow.css +4 -4
- package/lib/esm/style/line.shadow.css +3 -3
- package/lib/esm/style/plot.shadow.css +8 -6
- package/lib/esm/style/plotA11yModule.shadow.css +10 -11
- package/lib/esm/style/plotA11yView.shadow.css +16 -29
- package/lib/esm/style/radar.shadow.css +8 -8
- package/lib/esm/style/radial-tree.shadow.css +3 -3
- package/lib/esm/style/reference.shadow.css +4 -4
- package/lib/esm/style/scatterplot.shadow.css +2 -2
- package/lib/esm/style/tooltip.shadow.css +5 -5
- package/lib/esm/style/venn.shadow.css +3 -3
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/translations/es.json.mjs +1 -0
- package/lib/esm/translations/fr.json.mjs +1 -0
- package/lib/esm/translations/it.json.mjs +1 -0
- package/lib/esm/translations/ja.json.mjs +1 -0
- package/lib/esm/translations/ko.json.mjs +1 -0
- package/lib/esm/translations/nl.json.mjs +1 -0
- package/lib/esm/translations/pl.json.mjs +1 -0
- package/lib/esm/translations/pt.json.mjs +1 -0
- package/lib/esm/translations/sv.json.mjs +1 -0
- package/lib/esm/translations/tr.json.mjs +2 -1
- package/lib/esm/translations/vi.json.mjs +1 -0
- package/lib/esm/translations/zh.json.mjs +1 -0
- package/lib/esm/utils.mjs +11 -11
- package/lib/types/Area.d.ts +9 -6
- package/lib/types/Axis.d.ts +10 -3
- package/lib/types/Bar.d.ts +7 -6
- package/lib/types/Bubble.d.ts +21 -5
- package/lib/types/ClipPath.d.ts +4 -3
- package/lib/types/CompactHorizontalBar.d.ts +7 -8
- package/lib/types/Donut.d.ts +8 -5
- package/lib/types/GroupBar.d.ts +6 -6
- package/lib/types/HorizontalBar.d.ts +7 -6
- package/lib/types/Hover.d.ts +8 -8
- package/lib/types/Line.d.ts +9 -6
- package/lib/types/Pattern.d.ts +51 -51
- package/lib/types/Plot.d.ts +11 -9
- package/lib/types/Radar.d.ts +10 -7
- package/lib/types/RadialTree.d.ts +10 -54
- package/lib/types/Reference.d.ts +6 -5
- package/lib/types/ResponsiveContainer.d.ts +5 -4
- package/lib/types/ScatterPlot.d.ts +8 -5
- package/lib/types/StackBar.d.ts +7 -6
- package/lib/types/StackedArea.d.ts +6 -5
- package/lib/types/Tooltip.d.ts +12 -12
- package/lib/types/Venn.d.ts +7 -6
- package/lib/types/a11y/DataAccessibilityTable.d.ts +2 -2
- package/lib/types/a11y/PlotA11yModule.d.ts +4 -11
- package/lib/types/a11y/PlotA11yView.d.ts +13 -2
- package/lib/types/a11y/hints.d.ts +5 -5
- package/lib/types/a11y/insights.d.ts +1 -1
- package/lib/types/a11y/intl.d.ts +1 -1
- package/lib/types/a11y/serialize.d.ts +7 -7
- package/lib/types/a11y/summarize.d.ts +2 -2
- package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
- package/lib/types/component/Chart/AbstractChart.d.ts +20 -13
- package/lib/types/component/Chart/AbstractChart.type.d.ts +39 -25
- package/lib/types/component/Chart/AreaChart.d.ts +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +17 -7
- package/lib/types/component/Chart/BarChart.d.ts +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +14 -9
- package/lib/types/component/Chart/BubbleChart.d.ts +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +10 -5
- package/lib/types/component/Chart/CigaretteChart.d.ts +1 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +18 -8
- package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +10 -6
- package/lib/types/component/Chart/DonutChart.d.ts +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +16 -7
- package/lib/types/component/Chart/HistogramChart.d.ts +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +7 -4
- package/lib/types/component/Chart/LineChart.d.ts +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +16 -7
- package/lib/types/component/Chart/RadarChart.d.ts +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +7 -5
- package/lib/types/component/Chart/ScatterPlotChart.d.ts +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +12 -6
- package/lib/types/component/Chart/VennChart.d.ts +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +12 -6
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +8 -6
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +4 -5
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +4 -5
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +17 -10
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +5 -5
- package/lib/types/component/StackGroupBar/StackGroupBar.d.ts +1 -1
- package/lib/types/component/StackGroupBar/StackGroupBar.type.d.ts +3 -4
- package/lib/types/component/SvgElement.d.ts +10 -0
- package/lib/types/index.d.ts +3 -1
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +12 -0
- package/lib/types/utils.d.ts +17 -17
- package/package.json +10 -10
package/lib/esm/Radar.mjs
CHANGED
|
@@ -1,53 +1,51 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import
|
|
4
|
+
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
5
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
7
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
9
8
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
10
|
-
import { sstyled } from "@semcore/
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import trottle from "@semcore/utils/lib/rafTrottle";
|
|
16
|
-
import canUseDOM from "@semcore/utils/lib/canUseDOM";
|
|
9
|
+
import { sstyled, Component, assignProps } from "@semcore/core";
|
|
10
|
+
import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
|
|
11
|
+
import getOriginChildren from "@semcore/core/lib/utils/getOriginChildren";
|
|
12
|
+
import trottle from "@semcore/core/lib/utils/rafTrottle";
|
|
13
|
+
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
17
14
|
import { polygonContains } from "d3-polygon";
|
|
18
|
-
import {
|
|
15
|
+
import { curveLinearClosed, lineRadial, arc, line } from "d3-shape";
|
|
16
|
+
import React, { cloneElement } from "react";
|
|
19
17
|
import createElement from "./createElement.mjs";
|
|
20
|
-
import { getChartDefaultColorName, eventToPoint, measureText } from "./utils.mjs";
|
|
21
|
-
import Tooltip from "./Tooltip.mjs";
|
|
22
18
|
import { PatternFill, getPatternSymbolSize, PatternSymbol } from "./Pattern.mjs";
|
|
19
|
+
import Tooltip from "./Tooltip.mjs";
|
|
20
|
+
import { measureText, getChartDefaultColorName, eventToPoint } from "./utils.mjs";
|
|
23
21
|
/*!__reshadow-styles__:"./style/radar.shadow.css"*/
|
|
24
22
|
var style = (
|
|
25
23
|
/*__reshadow_css_start__*/
|
|
26
24
|
(sstyled.insert(
|
|
27
25
|
/*__inner_css_start__*/
|
|
28
|
-
".
|
|
26
|
+
".___SAxisLine_49jzl_gg_,.___SAxisTick_49jzl_gg_,.___SAxis_49jzl_gg_{stroke:var(--intergalactic-chart-grid-line, rgb(237, 239, 238));stroke-width:1;fill:transparent}.___SAxisLine_49jzl_gg_,.___SAxisTick_49jzl_gg_{stroke-dasharray:2}.___SAxisLine_49jzl_gg_.__active_49jzl_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line, rgb(214, 216, 215))}.___SAxisLabel_49jzl_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_49jzl_gg_.__xDirection_49jzl_gg_{text-anchor:var(--xDirection_49jzl)}.___SAxisLabel_49jzl_gg_.__yDirection_49jzl_gg_{dominant-baseline:var(--yDirection_49jzl)}.___SPolygonDot_49jzl_gg_,.___SPolygon_49jzl_gg_{fill:var(--intergalactic-chart-palette-order-1, rgb(104, 109, 210))}.___SPolygon_49jzl_gg_{opacity:.2}.___SPolygon_49jzl_gg_.__color_49jzl_gg_{fill:var(--color_49jzl)}.___SPolygon_49jzl_gg_.__pattern_49jzl_gg_.__color_49jzl_gg_{fill:var(--pattern_49jzl);stroke:var(--color_49jzl);stroke-width:1px}.___SPolygonDot_49jzl_gg_{stroke-width:2px;stroke:var(--intergalactic-chart-grid-border, #fff);r:6px}.___SPolygonDot_49jzl_gg_.__transparent_49jzl_gg_{opacity:.3}.___SPolygonDot_49jzl_gg_.__color_49jzl_gg_{fill:var(--color_49jzl)}.___SPolygonLine_49jzl_gg_{stroke:var(--intergalactic-chart-palette-order-1, rgb(104, 109, 210));stroke-width:3;fill:transparent}.___SPolygonLine_49jzl_gg_.__transparent_49jzl_gg_{opacity:.3}.___SPolygonLine_49jzl_gg_.__color_49jzl_gg_{stroke:var(--color_49jzl)}.___SPieRect_49jzl_gg_{outline:0;fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(0, 22, 16, 0.028))}",
|
|
29
27
|
/*__inner_css_end__*/
|
|
30
|
-
"
|
|
28
|
+
"49jzl_gg_"
|
|
31
29
|
), /*__reshadow_css_end__*/
|
|
32
30
|
{
|
|
33
|
-
"__SAxis": "
|
|
34
|
-
"__SAxisLine": "
|
|
35
|
-
"__SAxisTick": "
|
|
36
|
-
"_active": "
|
|
37
|
-
"__SAxisLabel": "
|
|
38
|
-
"_xDirection": "
|
|
39
|
-
"--xDirection": "--
|
|
40
|
-
"_yDirection": "
|
|
41
|
-
"--yDirection": "--
|
|
42
|
-
"__SPolygon": "
|
|
43
|
-
"_color": "
|
|
44
|
-
"--color": "--
|
|
45
|
-
"_pattern": "
|
|
46
|
-
"--pattern": "--
|
|
47
|
-
"__SPolygonDot": "
|
|
48
|
-
"_transparent": "
|
|
49
|
-
"__SPolygonLine": "
|
|
50
|
-
"__SPieRect": "
|
|
31
|
+
"__SAxis": "___SAxis_49jzl_gg_",
|
|
32
|
+
"__SAxisLine": "___SAxisLine_49jzl_gg_",
|
|
33
|
+
"__SAxisTick": "___SAxisTick_49jzl_gg_",
|
|
34
|
+
"_active": "__active_49jzl_gg_",
|
|
35
|
+
"__SAxisLabel": "___SAxisLabel_49jzl_gg_",
|
|
36
|
+
"_xDirection": "__xDirection_49jzl_gg_",
|
|
37
|
+
"--xDirection": "--xDirection_49jzl",
|
|
38
|
+
"_yDirection": "__yDirection_49jzl_gg_",
|
|
39
|
+
"--yDirection": "--yDirection_49jzl",
|
|
40
|
+
"__SPolygon": "___SPolygon_49jzl_gg_",
|
|
41
|
+
"_color": "__color_49jzl_gg_",
|
|
42
|
+
"--color": "--color_49jzl",
|
|
43
|
+
"_pattern": "__pattern_49jzl_gg_",
|
|
44
|
+
"--pattern": "--pattern_49jzl",
|
|
45
|
+
"__SPolygonDot": "___SPolygonDot_49jzl_gg_",
|
|
46
|
+
"_transparent": "__transparent_49jzl_gg_",
|
|
47
|
+
"__SPolygonLine": "___SPolygonLine_49jzl_gg_",
|
|
48
|
+
"__SPieRect": "___SPieRect_49jzl_gg_"
|
|
51
49
|
})
|
|
52
50
|
);
|
|
53
51
|
var clampAngle = function clampAngle2(angle) {
|
|
@@ -98,14 +96,14 @@ function getTicks(tickSize, radius) {
|
|
|
98
96
|
while (Math.trunc(radius / (tickSize / 2)) > ticks) {
|
|
99
97
|
ticks += 1;
|
|
100
98
|
}
|
|
101
|
-
return _toConsumableArray(Array(ticks).keys()).reduce(function(ticks2,
|
|
99
|
+
return _toConsumableArray(Array(ticks).keys()).reduce(function(ticks2, _t, i, total) {
|
|
102
100
|
if (i) ticks2.push(i / total.length);
|
|
103
101
|
return ticks2;
|
|
104
102
|
}, []);
|
|
105
103
|
}
|
|
106
|
-
function pieContains(
|
|
107
|
-
var
|
|
108
|
-
var
|
|
104
|
+
function pieContains(_ref11, _ref12) {
|
|
105
|
+
var _ref13 = _slicedToArray(_ref11, 3), startAngle = _ref13[0], endAngle = _ref13[1], radius = _ref13[2];
|
|
106
|
+
var _ref14 = _slicedToArray(_ref12, 2), x = _ref14[0], y = _ref14[1];
|
|
109
107
|
var distance = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
|
|
110
108
|
if (distance > radius) return false;
|
|
111
109
|
startAngle = clampAngle(startAngle);
|
|
@@ -139,21 +137,20 @@ function getLabelOffsetPosition(xDirection, yDirection, width, height) {
|
|
|
139
137
|
return [xOffset + width / 2, yOffset + height / 2];
|
|
140
138
|
}
|
|
141
139
|
var MINIMUM_OFFSET = 5;
|
|
142
|
-
var RadarRoot = /* @__PURE__ */ function(_Component) {
|
|
143
|
-
_inherits(RadarRoot2, _Component);
|
|
144
|
-
var _super = _createSuper(RadarRoot2);
|
|
140
|
+
var RadarRoot = /* @__PURE__ */ (function(_Component) {
|
|
145
141
|
function RadarRoot2() {
|
|
146
142
|
var _this;
|
|
147
143
|
_classCallCheck(this, RadarRoot2);
|
|
148
144
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
149
145
|
args[_key] = arguments[_key];
|
|
150
146
|
}
|
|
151
|
-
_this =
|
|
152
|
-
_defineProperty(
|
|
153
|
-
_defineProperty(
|
|
147
|
+
_this = _callSuper(this, RadarRoot2, [].concat(args));
|
|
148
|
+
_defineProperty(_this, "computeOffset", 0);
|
|
149
|
+
_defineProperty(_this, "categoriesKey", null);
|
|
154
150
|
return _this;
|
|
155
151
|
}
|
|
156
|
-
|
|
152
|
+
_inherits(RadarRoot2, _Component);
|
|
153
|
+
return _createClass(RadarRoot2, [{
|
|
157
154
|
key: "id",
|
|
158
155
|
get: function get() {
|
|
159
156
|
var _this$asProps = this.asProps, id = _this$asProps.id, uid = _this$asProps.uid;
|
|
@@ -183,8 +180,8 @@ var RadarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
183
180
|
}
|
|
184
181
|
}, {
|
|
185
182
|
key: "getPolygonProps",
|
|
186
|
-
value: function getPolygonProps(
|
|
187
|
-
var dataKey =
|
|
183
|
+
value: function getPolygonProps(_ref15, index) {
|
|
184
|
+
var dataKey = _ref15.dataKey;
|
|
188
185
|
var _this$asProps2 = this.asProps, data = _this$asProps2.data, scale = _this$asProps2.scale, angleOffset = _this$asProps2.angleOffset, uid = _this$asProps2.uid, patterns = _this$asProps2.patterns;
|
|
189
186
|
return {
|
|
190
187
|
offset: this.offset,
|
|
@@ -203,15 +200,76 @@ var RadarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
203
200
|
type: this.asProps.type,
|
|
204
201
|
offset: this.offset,
|
|
205
202
|
categories: this.asProps.data[this.categoriesKey],
|
|
206
|
-
angleOffset: this.asProps.angleOffset
|
|
203
|
+
angleOffset: this.asProps.angleOffset,
|
|
204
|
+
getIndex: this.getIndex.bind(this),
|
|
205
|
+
getPolygon: this.getPolygon.bind(this),
|
|
206
|
+
getPie: this.getPie.bind(this)
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
+
}, {
|
|
210
|
+
key: "getIndex",
|
|
211
|
+
value: function getIndex(point) {
|
|
212
|
+
var _this2 = this;
|
|
213
|
+
var _this$asProps3 = this.asProps, data = _this$asProps3.data, type = _this$asProps3.type;
|
|
214
|
+
var categories = data[this.categoriesKey];
|
|
215
|
+
var index;
|
|
216
|
+
if (type === "circle") {
|
|
217
|
+
index = categories.findIndex(function(_c, i) {
|
|
218
|
+
return pieContains(_this2.getPie(i), point);
|
|
219
|
+
});
|
|
220
|
+
} else {
|
|
221
|
+
index = categories.findIndex(function(_c, i) {
|
|
222
|
+
return polygonContains(_this2.getPolygon(i), point);
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
return index === -1 ? null : index;
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
key: "getPolygon",
|
|
229
|
+
value: function getPolygon(index) {
|
|
230
|
+
var _this$asProps4 = this.asProps, data = _this$asProps4.data, size = _this$asProps4.size, angleOffset = _this$asProps4.angleOffset;
|
|
231
|
+
var offset = this.offset;
|
|
232
|
+
var categories = data[this.categoriesKey];
|
|
233
|
+
var total = categories.length;
|
|
234
|
+
var diam = Math.min(size[0], size[1]);
|
|
235
|
+
var radius = diam / 2 - offset;
|
|
236
|
+
var prevIndex = (index - 1 + total) % total;
|
|
237
|
+
var nextIndex = (index + 1 + total) % total;
|
|
238
|
+
var _getRadianPosition = getRadianPosition(prevIndex, radius, total, angleOffset), _getRadianPosition2 = _slicedToArray(_getRadianPosition, 2), prevX1 = _getRadianPosition2[0], prevY1 = _getRadianPosition2[1];
|
|
239
|
+
var _getRadianPosition3 = getRadianPosition(index, radius, total, angleOffset), _getRadianPosition4 = _slicedToArray(_getRadianPosition3, 2), x = _getRadianPosition4[0], y = _getRadianPosition4[1];
|
|
240
|
+
var _getRadianPosition5 = getRadianPosition(nextIndex, radius, total, angleOffset), _getRadianPosition6 = _slicedToArray(_getRadianPosition5, 2), nextX1 = _getRadianPosition6[0], nextY1 = _getRadianPosition6[1];
|
|
241
|
+
return [[0, 0], [(prevX1 + x) / 2, (prevY1 + y) / 2], [x, y], [(nextX1 + x) / 2, (nextY1 + y) / 2]];
|
|
242
|
+
}
|
|
243
|
+
}, {
|
|
244
|
+
key: "getPie",
|
|
245
|
+
value: function getPie(index) {
|
|
246
|
+
var _this$asProps5 = this.asProps, data = _this$asProps5.data, size = _this$asProps5.size, angleOffset = _this$asProps5.angleOffset;
|
|
247
|
+
var categories = data[this.categoriesKey];
|
|
248
|
+
var offset = this.offset;
|
|
249
|
+
var angle = Math.PI * 2 / categories.length;
|
|
250
|
+
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
251
|
+
return [index * angle - angle / 2 - angleOffset, (index + 1) * angle - angle / 2 - angleOffset, radius];
|
|
252
|
+
}
|
|
253
|
+
}, {
|
|
254
|
+
key: "handlerOnClick",
|
|
255
|
+
value: function handlerOnClick(e) {
|
|
256
|
+
e.stopPropagation();
|
|
257
|
+
var _this$asProps6 = this.asProps, rootRef = _this$asProps6.rootRef, size = _this$asProps6.size, onClick = _this$asProps6.onClick;
|
|
258
|
+
if (!onClick) return;
|
|
259
|
+
var _eventToPoint = eventToPoint(e, rootRef.current), _eventToPoint2 = _slicedToArray(_eventToPoint, 2), pointX = _eventToPoint2[0], pointY = _eventToPoint2[1];
|
|
260
|
+
var r = Math.min(size[0], size[1]) / 2;
|
|
261
|
+
var centerX = pointX - r;
|
|
262
|
+
var centerY = pointY - r;
|
|
263
|
+
var index = this.getIndex([centerX, centerY]);
|
|
264
|
+
if (index === null) return;
|
|
265
|
+
onClick(index, e);
|
|
266
|
+
}
|
|
209
267
|
}, {
|
|
210
268
|
key: "render",
|
|
211
269
|
value: function render() {
|
|
212
270
|
var _ref2;
|
|
213
271
|
var SRadar = this.Element;
|
|
214
|
-
var _this$
|
|
272
|
+
var _this$asProps7 = this.asProps, Children = _this$asProps7.Children, styles = _this$asProps7.styles, size = _this$asProps7.size, data = _this$asProps7.data, offset = _this$asProps7.offset;
|
|
215
273
|
var _size = _slicedToArray(size, 2), width = _size[0], height = _size[1];
|
|
216
274
|
this.asProps.dataHintsHandler.establishDataType("indexed-groups");
|
|
217
275
|
var dataKey;
|
|
@@ -226,17 +284,17 @@ var RadarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
226
284
|
}
|
|
227
285
|
this.categoriesKey = dataKey;
|
|
228
286
|
}
|
|
229
|
-
return _ref2 = sstyled
|
|
287
|
+
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SRadar, _ref2.cn("SRadar", {
|
|
230
288
|
"aria-hidden": true,
|
|
231
289
|
"id": this.id,
|
|
232
290
|
"render": "g",
|
|
233
291
|
"childrenPosition": "inside",
|
|
234
|
-
"transform": "translate(".concat(width / 2, ",").concat(height / 2, ")")
|
|
292
|
+
"transform": "translate(".concat(width / 2, ",").concat(height / 2, ")"),
|
|
293
|
+
"onClickCapture": this.handlerOnClick.bind(this)
|
|
235
294
|
}));
|
|
236
295
|
}
|
|
237
296
|
}]);
|
|
238
|
-
|
|
239
|
-
}(Component);
|
|
297
|
+
})(Component);
|
|
240
298
|
_defineProperty(RadarRoot, "displayName", "Line");
|
|
241
299
|
_defineProperty(RadarRoot, "style", style);
|
|
242
300
|
_defineProperty(RadarRoot, "enhance", [uniqueIDEnhancement()]);
|
|
@@ -244,17 +302,16 @@ _defineProperty(RadarRoot, "defaultProps", {
|
|
|
244
302
|
type: "polygon",
|
|
245
303
|
angleOffset: 0
|
|
246
304
|
});
|
|
247
|
-
var PolygonRoot = /* @__PURE__ */ function(_Component2) {
|
|
248
|
-
_inherits(PolygonRoot2, _Component2);
|
|
249
|
-
var _super2 = _createSuper(PolygonRoot2);
|
|
305
|
+
var PolygonRoot = /* @__PURE__ */ (function(_Component2) {
|
|
250
306
|
function PolygonRoot2() {
|
|
251
307
|
_classCallCheck(this, PolygonRoot2);
|
|
252
|
-
return
|
|
308
|
+
return _callSuper(this, PolygonRoot2, arguments);
|
|
253
309
|
}
|
|
254
|
-
|
|
310
|
+
_inherits(PolygonRoot2, _Component2);
|
|
311
|
+
return _createClass(PolygonRoot2, [{
|
|
255
312
|
key: "getDotsProps",
|
|
256
313
|
value: function getDotsProps() {
|
|
257
|
-
var _this$
|
|
314
|
+
var _this$asProps8 = this.asProps, data = _this$asProps8.data, scale = _this$asProps8.scale, color = _this$asProps8.color, resolveColor = _this$asProps8.resolveColor, transparent = _this$asProps8.transparent, dataKey = _this$asProps8.dataKey, dataHintsHandler = _this$asProps8.dataHintsHandler, angleOffset = _this$asProps8.angleOffset, patterns = _this$asProps8.patterns;
|
|
258
315
|
return {
|
|
259
316
|
data,
|
|
260
317
|
scale,
|
|
@@ -270,7 +327,7 @@ var PolygonRoot = /* @__PURE__ */ function(_Component2) {
|
|
|
270
327
|
}, {
|
|
271
328
|
key: "getLineProps",
|
|
272
329
|
value: function getLineProps() {
|
|
273
|
-
var _this$
|
|
330
|
+
var _this$asProps9 = this.asProps, d3 = _this$asProps9.d3, data = _this$asProps9.data, color = _this$asProps9.color, resolveColor = _this$asProps9.resolveColor, transparent = _this$asProps9.transparent;
|
|
274
331
|
return {
|
|
275
332
|
data,
|
|
276
333
|
color,
|
|
@@ -283,8 +340,8 @@ var PolygonRoot = /* @__PURE__ */ function(_Component2) {
|
|
|
283
340
|
key: "render",
|
|
284
341
|
value: function render() {
|
|
285
342
|
var _ref3;
|
|
286
|
-
var _this$
|
|
287
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, (_ref3 = sstyled
|
|
343
|
+
var _this$asProps0 = this.asProps, SPolygon = _this$asProps0.Element, styles = _this$asProps0.styles, d3 = _this$asProps0.d3, data = _this$asProps0.data, color = _this$asProps0.color, resolveColor = _this$asProps0.resolveColor, fill = _this$asProps0.fill, uid = _this$asProps0.uid, patterns = _this$asProps0.patterns;
|
|
344
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, (_ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SPolygon, _ref3.cn("SPolygon", {
|
|
288
345
|
"render": "path",
|
|
289
346
|
"d": d3(data),
|
|
290
347
|
"color": resolveColor(fill || color),
|
|
@@ -297,17 +354,16 @@ var PolygonRoot = /* @__PURE__ */ function(_Component2) {
|
|
|
297
354
|
})));
|
|
298
355
|
}
|
|
299
356
|
}]);
|
|
300
|
-
|
|
301
|
-
}(Component);
|
|
357
|
+
})(Component);
|
|
302
358
|
_defineProperty(PolygonRoot, "displayName", "Polygon");
|
|
303
359
|
_defineProperty(PolygonRoot, "style", style);
|
|
304
|
-
_defineProperty(PolygonRoot, "defaultProps", function(
|
|
305
|
-
var scale =
|
|
360
|
+
_defineProperty(PolygonRoot, "defaultProps", function(_ref20) {
|
|
361
|
+
var scale = _ref20.scale, _ref20$curve = _ref20.curve, curve = _ref20$curve === void 0 ? curveLinearClosed : _ref20$curve, size = _ref20.size, offset = _ref20.offset, angleOffset = _ref20.angleOffset;
|
|
306
362
|
scale.range([0, Math.min(size[0], size[1]) / 2 - offset]);
|
|
307
363
|
return {
|
|
308
364
|
d3: lineRadial().curve(curve).radius(function(d) {
|
|
309
365
|
return scale(d || 0);
|
|
310
|
-
}).angle(function(
|
|
366
|
+
}).angle(function(_d, i, data) {
|
|
311
367
|
return i / data.length * 2 * Math.PI - angleOffset;
|
|
312
368
|
})
|
|
313
369
|
};
|
|
@@ -315,7 +371,7 @@ _defineProperty(PolygonRoot, "defaultProps", function(_ref22) {
|
|
|
315
371
|
function PolygonLine(props) {
|
|
316
372
|
var _ref4;
|
|
317
373
|
var SPolygonLine = props.Element, styles = props.styles, d3 = props.d3, color = props.color, resolveColor = props.resolveColor, data = props.data, transparent = props.transparent;
|
|
318
|
-
return _ref4 = sstyled
|
|
374
|
+
return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SPolygonLine, _ref4.cn("SPolygonLine", {
|
|
319
375
|
"render": "path",
|
|
320
376
|
"d": d3(data),
|
|
321
377
|
"color": resolveColor(color),
|
|
@@ -329,10 +385,10 @@ function PolygonDots(props) {
|
|
|
329
385
|
if (value === null || value === void 0) return;
|
|
330
386
|
var radius = scale(value);
|
|
331
387
|
props.dataHintsHandler.describeGroupedValues(categoryKey, "".concat(categoryKey, ".").concat(i));
|
|
332
|
-
var
|
|
388
|
+
var _getRadianPosition7 = getRadianPosition(i, radius, data.length, angleOffset), _getRadianPosition8 = _slicedToArray(_getRadianPosition7, 2), cx = _getRadianPosition8[0], cy = _getRadianPosition8[1];
|
|
333
389
|
if (!patterns) {
|
|
334
390
|
var _ref5;
|
|
335
|
-
return _ref5 = sstyled
|
|
391
|
+
return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SPolygonDot, _ref5.cn("SPolygonDot", {
|
|
336
392
|
"render": "circle",
|
|
337
393
|
"color": resolveColor(color),
|
|
338
394
|
"transparent": transparent,
|
|
@@ -347,7 +403,7 @@ function PolygonDots(props) {
|
|
|
347
403
|
patternKey,
|
|
348
404
|
patterns
|
|
349
405
|
}), _getPatternSymbolSize2 = _slicedToArray(_getPatternSymbolSize, 2), width = _getPatternSymbolSize2[0], height = _getPatternSymbolSize2[1];
|
|
350
|
-
return _ref6 = sstyled
|
|
406
|
+
return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SPolygonDot, _ref6.cn("SPolygonDot", {
|
|
351
407
|
"render": PatternSymbol,
|
|
352
408
|
"color": resolveColor(color),
|
|
353
409
|
"transparent": transparent,
|
|
@@ -358,42 +414,41 @@ function PolygonDots(props) {
|
|
|
358
414
|
}));
|
|
359
415
|
});
|
|
360
416
|
}
|
|
361
|
-
var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
362
|
-
_inherits(AxisRoot2, _Component3);
|
|
363
|
-
var _super3 = _createSuper(AxisRoot2);
|
|
417
|
+
var AxisRoot = /* @__PURE__ */ (function(_Component3) {
|
|
364
418
|
function AxisRoot2() {
|
|
365
|
-
var
|
|
419
|
+
var _this3;
|
|
366
420
|
_classCallCheck(this, AxisRoot2);
|
|
367
421
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
368
422
|
args[_key2] = arguments[_key2];
|
|
369
423
|
}
|
|
370
|
-
|
|
371
|
-
_defineProperty(
|
|
372
|
-
_defineProperty(
|
|
424
|
+
_this3 = _callSuper(this, AxisRoot2, [].concat(args));
|
|
425
|
+
_defineProperty(_this3, "unsubscribeTooltipVisible", null);
|
|
426
|
+
_defineProperty(_this3, "state", {
|
|
373
427
|
activeLineIndex: null
|
|
374
428
|
});
|
|
375
|
-
_defineProperty(
|
|
376
|
-
var index =
|
|
377
|
-
|
|
429
|
+
_defineProperty(_this3, "handleTooltipRenderingProps", function(_anchorProps, _ref16) {
|
|
430
|
+
var index = _ref16.index;
|
|
431
|
+
_this3.setState({
|
|
378
432
|
activeLineIndex: index
|
|
379
433
|
});
|
|
380
434
|
});
|
|
381
|
-
return
|
|
435
|
+
return _this3;
|
|
382
436
|
}
|
|
383
|
-
|
|
437
|
+
_inherits(AxisRoot2, _Component3);
|
|
438
|
+
return _createClass(AxisRoot2, [{
|
|
384
439
|
key: "createLineRadial",
|
|
385
440
|
value: function createLineRadial(radius, total) {
|
|
386
441
|
return lineRadial().curve(curveLinearClosed).radius(function() {
|
|
387
442
|
return radius;
|
|
388
|
-
}).angle(function(
|
|
443
|
+
}).angle(function(_d, i) {
|
|
389
444
|
return i / total * 2 * Math.PI;
|
|
390
445
|
});
|
|
391
446
|
}
|
|
392
447
|
}, {
|
|
393
448
|
key: "getTicksProps",
|
|
394
|
-
value: function getTicksProps(
|
|
395
|
-
var
|
|
396
|
-
var _this$
|
|
449
|
+
value: function getTicksProps(_ref17) {
|
|
450
|
+
var _ref17$tickSize = _ref17.tickSize, tickSize = _ref17$tickSize === void 0 ? 100 : _ref17$tickSize;
|
|
451
|
+
var _this$asProps1 = this.asProps, data = _this$asProps1.data, offset = _this$asProps1.offset, categories = _this$asProps1.categories, size = _this$asProps1.size, type = _this$asProps1.type;
|
|
397
452
|
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
398
453
|
return {
|
|
399
454
|
type,
|
|
@@ -406,9 +461,9 @@ var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
|
406
461
|
}
|
|
407
462
|
}, {
|
|
408
463
|
key: "getLabelsProps",
|
|
409
|
-
value: function getLabelsProps(
|
|
410
|
-
var
|
|
411
|
-
var _this$
|
|
464
|
+
value: function getLabelsProps(_ref18) {
|
|
465
|
+
var _ref18$labelOffset = _ref18.labelOffset, labelOffset = _ref18$labelOffset === void 0 ? 10 : _ref18$labelOffset;
|
|
466
|
+
var _this$asProps10 = this.asProps, offset = _this$asProps10.offset, categories = _this$asProps10.categories, textSize = _this$asProps10.textSize, angleOffset = _this$asProps10.angleOffset;
|
|
412
467
|
return {
|
|
413
468
|
categories,
|
|
414
469
|
textSize,
|
|
@@ -426,17 +481,17 @@ var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
|
426
481
|
key: "componentWillUnmount",
|
|
427
482
|
value: function componentWillUnmount() {
|
|
428
483
|
var _this$unsubscribeTool;
|
|
429
|
-
(_this$unsubscribeTool = this.unsubscribeTooltipVisible) === null || _this$unsubscribeTool === void 0
|
|
484
|
+
(_this$unsubscribeTool = this.unsubscribeTooltipVisible) === null || _this$unsubscribeTool === void 0 || _this$unsubscribeTool.call(this);
|
|
430
485
|
}
|
|
431
486
|
}, {
|
|
432
487
|
key: "render",
|
|
433
488
|
value: function render() {
|
|
434
489
|
var _ref7;
|
|
435
|
-
var _this$
|
|
490
|
+
var _this$asProps11 = this.asProps, SAxis = _this$asProps11.Element, styles = _this$asProps11.styles, categories = _this$asProps11.categories, size = _this$asProps11.size, offset = _this$asProps11.offset, type = _this$asProps11.type, angleOffset = _this$asProps11.angleOffset;
|
|
436
491
|
var activeLineIndex = this.state.activeLineIndex;
|
|
437
492
|
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
438
493
|
var total = categories.length;
|
|
439
|
-
return _ref7 = sstyled
|
|
494
|
+
return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(React.Fragment, null, type === "circle" ? /* @__PURE__ */ React.createElement(SAxis, _ref7.cn("SAxis", {
|
|
440
495
|
"render": "circle",
|
|
441
496
|
"cx": 0,
|
|
442
497
|
"cy": 0,
|
|
@@ -444,9 +499,9 @@ var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
|
444
499
|
})) : /* @__PURE__ */ React.createElement(SAxis, _ref7.cn("SAxis", {
|
|
445
500
|
"render": "path",
|
|
446
501
|
"d": this.createLineRadial(radius, total)(categories)
|
|
447
|
-
})), categories.map(function(
|
|
448
|
-
var
|
|
449
|
-
var _sstyled$cn = sstyled
|
|
502
|
+
})), categories.map(function(_category, i) {
|
|
503
|
+
var _getRadianPosition9 = getRadianPosition(i, radius, total, angleOffset), _getRadianPosition0 = _slicedToArray(_getRadianPosition9, 2), x = _getRadianPosition0[0], y = _getRadianPosition0[1];
|
|
504
|
+
var _sstyled$cn = sstyled(styles).cn("SAxisLine", {
|
|
450
505
|
active: activeLineIndex === i
|
|
451
506
|
}), className = _sstyled$cn.className;
|
|
452
507
|
return /* @__PURE__ */ React.createElement("line", {
|
|
@@ -460,12 +515,11 @@ var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
|
460
515
|
}));
|
|
461
516
|
}
|
|
462
517
|
}]);
|
|
463
|
-
|
|
464
|
-
}(Component);
|
|
518
|
+
})(Component);
|
|
465
519
|
_defineProperty(AxisRoot, "displayName", "Polygon");
|
|
466
520
|
_defineProperty(AxisRoot, "style", style);
|
|
467
|
-
_defineProperty(AxisRoot, "defaultProps", function(
|
|
468
|
-
var data =
|
|
521
|
+
_defineProperty(AxisRoot, "defaultProps", function(_ref21) {
|
|
522
|
+
var data = _ref21.data, dataKey = _ref21.dataKey;
|
|
469
523
|
var categories = data[dataKey];
|
|
470
524
|
return {
|
|
471
525
|
categories
|
|
@@ -479,7 +533,7 @@ function AxisTicks(props) {
|
|
|
479
533
|
d3.radius(function() {
|
|
480
534
|
return radius * tick;
|
|
481
535
|
});
|
|
482
|
-
return _ref8 = sstyled
|
|
536
|
+
return _ref8 = sstyled(styles), type === "circle" ? /* @__PURE__ */ React.createElement(SAxisTick, _ref8.cn("SAxisTick", {
|
|
483
537
|
"key": i,
|
|
484
538
|
"render": "circle",
|
|
485
539
|
"cx": 0,
|
|
@@ -496,13 +550,13 @@ function AxisLabels(props) {
|
|
|
496
550
|
var SAxisLabel = props.Element, styles = props.styles, textSize = props.textSize, size = props.size, offset = props.offset, categories = props.categories, angleOffset = props.angleOffset;
|
|
497
551
|
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
498
552
|
return categories.map(function(category, i) {
|
|
499
|
-
var
|
|
553
|
+
var _getRadianPosition1 = getRadianPosition(i, radius, categories.length, angleOffset), _getRadianPosition10 = _slicedToArray(_getRadianPosition1, 2), x = _getRadianPosition10[0], y = _getRadianPosition10[1];
|
|
500
554
|
var _getLabelPlacement = getLabelPlacement(i, categories.length, angleOffset), _getLabelPlacement2 = _slicedToArray(_getLabelPlacement, 2), xDirection = _getLabelPlacement2[0], yDirection = _getLabelPlacement2[1];
|
|
501
555
|
if (typeof category === "string") {
|
|
502
556
|
var _ref9;
|
|
503
557
|
props.dataHintsHandler.labelKey("value", i, category);
|
|
504
558
|
var lines = category.split("\n");
|
|
505
|
-
return _ref9 = sstyled
|
|
559
|
+
return _ref9 = sstyled(styles), /* @__PURE__ */ React.createElement(SAxisLabel, _ref9.cn("SAxisLabel", {
|
|
506
560
|
"key": i,
|
|
507
561
|
"render": "text",
|
|
508
562
|
"childrenPosition": "inside",
|
|
@@ -520,7 +574,7 @@ function AxisLabels(props) {
|
|
|
520
574
|
}
|
|
521
575
|
if (/* @__PURE__ */ React.isValidElement(category)) {
|
|
522
576
|
var _category$props;
|
|
523
|
-
var
|
|
577
|
+
var _ref19 = (_category$props = category === null || category === void 0 ? void 0 : category.props) !== null && _category$props !== void 0 ? _category$props : {}, _ref19$width = _ref19.width, width = _ref19$width === void 0 ? 0 : _ref19$width, _ref19$height = _ref19.height, height = _ref19$height === void 0 ? 0 : _ref19$height;
|
|
524
578
|
var _getLabelOffsetPositi = getLabelOffsetPosition(xDirection, yDirection, width, height), _getLabelOffsetPositi2 = _slicedToArray(_getLabelOffsetPositi, 2), xOffset = _getLabelOffsetPositi2[0], yOffset = _getLabelOffsetPositi2[1];
|
|
525
579
|
return /* @__PURE__ */ cloneElement(category, {
|
|
526
580
|
key: i,
|
|
@@ -530,51 +584,50 @@ function AxisLabels(props) {
|
|
|
530
584
|
}
|
|
531
585
|
});
|
|
532
586
|
}
|
|
533
|
-
var Hover = /* @__PURE__ */ function(_Component4) {
|
|
534
|
-
_inherits(Hover2, _Component4);
|
|
535
|
-
var _super4 = _createSuper(Hover2);
|
|
587
|
+
var Hover = /* @__PURE__ */ (function(_Component4) {
|
|
536
588
|
function Hover2() {
|
|
537
|
-
var
|
|
589
|
+
var _this4;
|
|
538
590
|
_classCallCheck(this, Hover2);
|
|
539
591
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
540
592
|
args[_key3] = arguments[_key3];
|
|
541
593
|
}
|
|
542
|
-
|
|
543
|
-
_defineProperty(
|
|
594
|
+
_this4 = _callSuper(this, Hover2, [].concat(args));
|
|
595
|
+
_defineProperty(_this4, "state", {
|
|
544
596
|
index: null
|
|
545
597
|
});
|
|
546
|
-
_defineProperty(
|
|
547
|
-
_defineProperty(
|
|
548
|
-
_defineProperty(
|
|
549
|
-
_defineProperty(
|
|
550
|
-
var
|
|
598
|
+
_defineProperty(_this4, "virtualElement", canUseDOM() ? document.createElement("div") : {});
|
|
599
|
+
_defineProperty(_this4, "unsubscribeMouseMoveRoot", null);
|
|
600
|
+
_defineProperty(_this4, "unsubscribeMouseLeaveRoot", null);
|
|
601
|
+
_defineProperty(_this4, "handlerMouseMoveRoot", trottle(function(e) {
|
|
602
|
+
var _this4$asProps = _this4.asProps, eventEmitter = _this4$asProps.eventEmitter, size = _this4$asProps.size, rootRef = _this4$asProps.rootRef, patterns = _this4$asProps.patterns, getIndex = _this4$asProps.getIndex, plotId = _this4$asProps.plotId;
|
|
551
603
|
var point = eventToPoint(e, rootRef.current);
|
|
552
604
|
var diam = Math.min(size[0], size[1]);
|
|
553
605
|
var centerX = point[0] - diam / 2;
|
|
554
606
|
var centerY = point[1] - diam / 2;
|
|
555
607
|
var clientX = e.clientX, clientY = e.clientY;
|
|
556
|
-
var index =
|
|
557
|
-
|
|
608
|
+
var index = getIndex([centerX, centerY]);
|
|
609
|
+
_this4.setState({
|
|
558
610
|
index
|
|
559
611
|
}, function() {
|
|
560
|
-
eventEmitter.emit("
|
|
561
|
-
eventEmitter.emit("
|
|
612
|
+
eventEmitter.emit("setTooltipPosition_".concat(plotId), clientX, clientY);
|
|
613
|
+
eventEmitter.emit("setTooltipRenderingProps_".concat(plotId), {}, {
|
|
562
614
|
index,
|
|
563
615
|
patterns
|
|
564
616
|
});
|
|
565
|
-
eventEmitter.emit("
|
|
617
|
+
eventEmitter.emit("setTooltipVisible_".concat(plotId), index !== null);
|
|
566
618
|
});
|
|
567
619
|
}));
|
|
568
|
-
_defineProperty(
|
|
569
|
-
|
|
620
|
+
_defineProperty(_this4, "handlerMouseLeaveRoot", trottle(function() {
|
|
621
|
+
_this4.setState({
|
|
570
622
|
index: null
|
|
571
623
|
}, function() {
|
|
572
|
-
|
|
624
|
+
_this4.asProps.eventEmitter.emit("setTooltipVisible_".concat(_this4.asProps.plotId), false);
|
|
573
625
|
});
|
|
574
626
|
}));
|
|
575
|
-
return
|
|
627
|
+
return _this4;
|
|
576
628
|
}
|
|
577
|
-
|
|
629
|
+
_inherits(Hover2, _Component4);
|
|
630
|
+
return _createClass(Hover2, [{
|
|
578
631
|
key: "generateGetBoundingClientRect",
|
|
579
632
|
value: function generateGetBoundingClientRect() {
|
|
580
633
|
var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
@@ -590,45 +643,6 @@ var Hover = /* @__PURE__ */ function(_Component4) {
|
|
|
590
643
|
};
|
|
591
644
|
};
|
|
592
645
|
}
|
|
593
|
-
}, {
|
|
594
|
-
key: "getPolygon",
|
|
595
|
-
value: function getPolygon(index) {
|
|
596
|
-
var _this$asProps10 = this.asProps, categories = _this$asProps10.categories, size = _this$asProps10.size, offset = _this$asProps10.offset, angleOffset = _this$asProps10.angleOffset;
|
|
597
|
-
var total = categories.length;
|
|
598
|
-
var diam = Math.min(size[0], size[1]);
|
|
599
|
-
var radius = diam / 2 - offset;
|
|
600
|
-
var prevIndex = (index - 1 + total) % total;
|
|
601
|
-
var nextIndex = (index + 1 + total) % total;
|
|
602
|
-
var _getRadianPosition7 = getRadianPosition(prevIndex, radius, total, angleOffset), _getRadianPosition8 = _slicedToArray(_getRadianPosition7, 2), prevX1 = _getRadianPosition8[0], prevY1 = _getRadianPosition8[1];
|
|
603
|
-
var _getRadianPosition9 = getRadianPosition(index, radius, total, angleOffset), _getRadianPosition10 = _slicedToArray(_getRadianPosition9, 2), x = _getRadianPosition10[0], y = _getRadianPosition10[1];
|
|
604
|
-
var _getRadianPosition11 = getRadianPosition(nextIndex, radius, total, angleOffset), _getRadianPosition12 = _slicedToArray(_getRadianPosition11, 2), nextX1 = _getRadianPosition12[0], nextY1 = _getRadianPosition12[1];
|
|
605
|
-
return [[0, 0], [(prevX1 + x) / 2, (prevY1 + y) / 2], [x, y], [(nextX1 + x) / 2, (nextY1 + y) / 2]];
|
|
606
|
-
}
|
|
607
|
-
}, {
|
|
608
|
-
key: "getPie",
|
|
609
|
-
value: function getPie(index) {
|
|
610
|
-
var _this$asProps11 = this.asProps, categories = _this$asProps11.categories, size = _this$asProps11.size, offset = _this$asProps11.offset, angleOffset = _this$asProps11.angleOffset;
|
|
611
|
-
var angle = Math.PI * 2 / categories.length;
|
|
612
|
-
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
613
|
-
return [index * angle - angle / 2 - angleOffset, (index + 1) * angle - angle / 2 - angleOffset, radius];
|
|
614
|
-
}
|
|
615
|
-
}, {
|
|
616
|
-
key: "getIndex",
|
|
617
|
-
value: function getIndex(point) {
|
|
618
|
-
var _this4 = this;
|
|
619
|
-
var _this$asProps12 = this.asProps, categories = _this$asProps12.categories, type = _this$asProps12.type;
|
|
620
|
-
var index;
|
|
621
|
-
if (type === "circle") {
|
|
622
|
-
index = categories.findIndex(function(c, i) {
|
|
623
|
-
return pieContains(_this4.getPie(i), point);
|
|
624
|
-
});
|
|
625
|
-
} else {
|
|
626
|
-
index = categories.findIndex(function(c, i) {
|
|
627
|
-
return polygonContains(_this4.getPolygon(i), point);
|
|
628
|
-
});
|
|
629
|
-
}
|
|
630
|
-
return index === -1 ? null : index;
|
|
631
|
-
}
|
|
632
646
|
}, {
|
|
633
647
|
key: "componentDidMount",
|
|
634
648
|
value: function componentDidMount() {
|
|
@@ -653,31 +667,30 @@ var Hover = /* @__PURE__ */ function(_Component4) {
|
|
|
653
667
|
}, {
|
|
654
668
|
key: "render",
|
|
655
669
|
value: function render() {
|
|
656
|
-
var _this$
|
|
670
|
+
var _this$asProps12 = this.asProps, styles = _this$asProps12.styles, type = _this$asProps12.type, getPie = _this$asProps12.getPie, getPolygon = _this$asProps12.getPolygon;
|
|
657
671
|
var index = this.state.index;
|
|
658
672
|
var SPieRect = this.Element;
|
|
659
673
|
if (index !== null) {
|
|
660
674
|
if (type === "circle") {
|
|
661
|
-
var
|
|
662
|
-
var
|
|
675
|
+
var _ref0;
|
|
676
|
+
var _getPie = getPie(index), _getPie2 = _slicedToArray(_getPie, 3), startAngle = _getPie2[0], endAngle = _getPie2[1], radius = _getPie2[2];
|
|
663
677
|
var circle = arc().innerRadius(0).outerRadius(radius).startAngle(startAngle).endAngle(endAngle);
|
|
664
|
-
return
|
|
678
|
+
return _ref0 = sstyled(styles), /* @__PURE__ */ React.createElement(SPieRect, _ref0.cn("SPieRect", {
|
|
665
679
|
"render": "path",
|
|
666
680
|
"d": circle()
|
|
667
681
|
}));
|
|
668
682
|
} else {
|
|
669
|
-
var
|
|
670
|
-
return
|
|
683
|
+
var _ref1;
|
|
684
|
+
return _ref1 = sstyled(styles), /* @__PURE__ */ React.createElement(SPieRect, _ref1.cn("SPieRect", {
|
|
671
685
|
"render": "path",
|
|
672
|
-
"d": line()(
|
|
686
|
+
"d": line()(getPolygon(index))
|
|
673
687
|
}));
|
|
674
688
|
}
|
|
675
689
|
}
|
|
676
690
|
return null;
|
|
677
691
|
}
|
|
678
692
|
}]);
|
|
679
|
-
|
|
680
|
-
}(Component);
|
|
693
|
+
})(Component);
|
|
681
694
|
var Axis = createElement(AxisRoot, {
|
|
682
695
|
Ticks: AxisTicks,
|
|
683
696
|
Labels: AxisLabels
|
|
@@ -686,14 +699,14 @@ var Polygon = createElement(PolygonRoot, {
|
|
|
686
699
|
Line: PolygonLine,
|
|
687
700
|
Dots: PolygonDots
|
|
688
701
|
});
|
|
689
|
-
|
|
690
|
-
var _ref = arguments[0],
|
|
702
|
+
function RadarTooltip(props) {
|
|
703
|
+
var _ref = arguments[0], _ref10;
|
|
691
704
|
var SRadarTooltip = Tooltip;
|
|
692
|
-
return
|
|
705
|
+
return _ref10 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SRadarTooltip, _ref10.cn("SRadarTooltip", _objectSpread({}, assignProps({
|
|
693
706
|
"tag": Radar.Hover,
|
|
694
707
|
"excludeAnchorProps": true
|
|
695
708
|
}, _ref))));
|
|
696
|
-
}
|
|
709
|
+
}
|
|
697
710
|
var Radar = createElement(RadarRoot, {
|
|
698
711
|
Axis,
|
|
699
712
|
Polygon,
|