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