@semcore/d3-chart 16.0.2-prerelease.4 → 16.0.3-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 +8 -0
- package/README.md +1 -50
- package/lib/cjs/AnimatedClipPath.js +13 -13
- package/lib/cjs/AnimatedClipPath.js.map +1 -1
- package/lib/cjs/Area.js +29 -27
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +97 -101
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +31 -32
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +26 -27
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +65 -68
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +94 -95
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +36 -34
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +16 -16
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +30 -31
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +27 -33
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +23 -23
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Pattern.js +13 -11
- package/lib/cjs/Pattern.js.map +1 -1
- package/lib/cjs/Plot.js +26 -27
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +125 -132
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +164 -145
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/Reference.js +47 -49
- package/lib/cjs/Reference.js.map +1 -1
- package/lib/cjs/ResponsiveContainer.js +19 -20
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +24 -25
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/StackBar.js +20 -23
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +14 -15
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +34 -35
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +28 -29
- 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 +11 -12
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +10 -11
- 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 +4 -5
- package/lib/cjs/a11y/focus.js.map +1 -1
- package/lib/cjs/a11y/hints.js +5 -8
- 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 +4 -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/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 +43 -46
- 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 +17 -20
- 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 +17 -21
- 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 +18 -19
- 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 +19 -23
- 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 +13 -14
- 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 +13 -14
- 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 +15 -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 +17 -18
- 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 +14 -17
- 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 +14 -15
- 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 +12 -13
- 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 +42 -20
- 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 +20 -20
- 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 +79 -67
- 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/LegendTable/LegendTable.js +18 -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 +1 -2
- package/lib/cjs/component/ChartLegend/index.js.map +1 -1
- package/lib/cjs/component/Cigarette/Cigarette.js +18 -19
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js +22 -26
- 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 +7 -8
- 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/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -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 -2
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js +31 -52
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/AnimatedClipPath.js +11 -10
- package/lib/es6/AnimatedClipPath.js.map +1 -1
- package/lib/es6/Area.js +27 -24
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +96 -98
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +28 -27
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +24 -24
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +63 -65
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +92 -92
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +36 -33
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +14 -13
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +27 -26
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +24 -28
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +20 -19
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Pattern.js +4 -2
- package/lib/es6/Pattern.js.map +1 -1
- package/lib/es6/Plot.js +25 -25
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +122 -128
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +162 -142
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/Reference.js +44 -43
- package/lib/es6/Reference.js.map +1 -1
- package/lib/es6/ResponsiveContainer.js +17 -17
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +22 -22
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/StackBar.js +17 -19
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +12 -12
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +33 -33
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +26 -26
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +11 -11
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +9 -9
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/a11y/bezier.js.map +1 -1
- package/lib/es6/a11y/focus.js +3 -3
- package/lib/es6/a11y/focus.js.map +1 -1
- package/lib/es6/a11y/hints.js +1 -1
- 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 -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/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 +40 -41
- 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 +16 -16
- 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 +15 -17
- 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 +17 -15
- 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 +17 -17
- 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 +11 -10
- 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 +12 -10
- 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 +14 -12
- 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 +15 -14
- 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 +12 -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 +13 -11
- 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 +10 -9
- 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 +40 -17
- 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 +18 -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 +77 -64
- 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 +16 -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 +16 -16
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.js +20 -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 +5 -5
- 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/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -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 +1 -0
- package/lib/es6/types/index.d.js.map +1 -1
- package/lib/es6/utils.js +11 -13
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/AnimatedClipPath.mjs +10 -7
- package/lib/esm/Area.mjs +30 -25
- package/lib/esm/Axis.mjs +67 -67
- package/lib/esm/Bar.mjs +31 -28
- package/lib/esm/Bubble.mjs +28 -26
- package/lib/esm/CompactHorizontalBar.mjs +61 -60
- package/lib/esm/Donut.mjs +50 -49
- package/lib/esm/Dots.mjs +32 -27
- package/lib/esm/GroupBar.mjs +14 -11
- package/lib/esm/HorizontalBar.mjs +30 -27
- package/lib/esm/Hover.mjs +28 -30
- package/lib/esm/Line.mjs +23 -20
- package/lib/esm/Pattern.mjs +1 -1
- package/lib/esm/Plot.mjs +27 -25
- package/lib/esm/Radar.mjs +90 -94
- package/lib/esm/RadialTree.mjs +86 -86
- package/lib/esm/Reference.mjs +34 -31
- package/lib/esm/ResponsiveContainer.mjs +19 -17
- package/lib/esm/ScatterPlot.mjs +26 -24
- package/lib/esm/StackBar.mjs +17 -17
- package/lib/esm/StackedArea.mjs +13 -11
- package/lib/esm/Tooltip.mjs +35 -33
- package/lib/esm/Venn.mjs +29 -27
- package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -2
- package/lib/esm/a11y/PlotA11yModule.mjs +8 -8
- package/lib/esm/a11y/PlotA11yView.mjs +9 -9
- package/lib/esm/a11y/focus.mjs +3 -3
- package/lib/esm/a11y/hints.mjs +1 -1
- package/lib/esm/a11y/insights.mjs +77 -78
- package/lib/esm/a11y/intl.mjs +1 -1
- 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/view/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/component/Chart/AbstractChart.mjs +38 -37
- package/lib/esm/component/Chart/AreaChart.mjs +19 -15
- package/lib/esm/component/Chart/BarChart.mjs +20 -17
- package/lib/esm/component/Chart/BubbleChart.mjs +16 -13
- package/lib/esm/component/Chart/CigaretteChart.mjs +24 -17
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +18 -10
- package/lib/esm/component/Chart/DonutChart.mjs +13 -10
- package/lib/esm/component/Chart/HistogramChart.mjs +18 -12
- package/lib/esm/component/Chart/LineChart.mjs +18 -12
- package/lib/esm/component/Chart/RadarChart.mjs +19 -12
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +14 -11
- package/lib/esm/component/Chart/VennChart.mjs +12 -9
- package/lib/esm/component/Chart/index.mjs +6 -6
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +42 -17
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +21 -18
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +67 -56
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +23 -20
- package/lib/esm/component/Cigarette/Cigarette.mjs +18 -16
- package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +20 -19
- package/lib/esm/component/SvgElement.mjs +14 -0
- package/lib/esm/createElement.mjs +5 -5
- package/lib/esm/index.mjs +2 -0
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/utils.mjs +8 -8
- package/lib/types/Area.d.ts +7 -6
- package/lib/types/Axis.d.ts +4 -3
- package/lib/types/Bar.d.ts +7 -6
- package/lib/types/Bubble.d.ts +6 -5
- package/lib/types/ClipPath.d.ts +4 -3
- package/lib/types/CompactHorizontalBar.d.ts +7 -8
- package/lib/types/Donut.d.ts +6 -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 +7 -6
- package/lib/types/Pattern.d.ts +51 -51
- package/lib/types/Plot.d.ts +10 -9
- package/lib/types/Radar.d.ts +8 -7
- package/lib/types/RadialTree.d.ts +9 -54
- package/lib/types/Reference.d.ts +5 -4
- package/lib/types/ResponsiveContainer.d.ts +5 -4
- package/lib/types/ScatterPlot.d.ts +6 -5
- package/lib/types/StackBar.d.ts +7 -6
- package/lib/types/StackedArea.d.ts +6 -5
- package/lib/types/Tooltip.d.ts +14 -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 +1 -1
- 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/component/Chart/AbstractChart.d.ts +6 -6
- package/lib/types/component/Chart/AbstractChart.type.d.ts +27 -27
- package/lib/types/component/Chart/AreaChart.d.ts +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +6 -6
- package/lib/types/component/Chart/BarChart.d.ts +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +6 -6
- package/lib/types/component/Chart/BubbleChart.d.ts +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +4 -4
- package/lib/types/component/Chart/CigaretteChart.d.ts +1 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +4 -4
- package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +5 -5
- package/lib/types/component/Chart/DonutChart.d.ts +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +5 -5
- package/lib/types/component/Chart/HistogramChart.d.ts +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +4 -4
- package/lib/types/component/Chart/LineChart.d.ts +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +7 -7
- package/lib/types/component/Chart/RadarChart.d.ts +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +4 -4
- package/lib/types/component/Chart/ScatterPlotChart.d.ts +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +5 -5
- package/lib/types/component/Chart/VennChart.d.ts +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +4 -4
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +6 -4
- 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 +2 -1
- package/lib/types/utils.d.ts +6 -6
- package/package.json +22 -23
package/lib/esm/Radar.mjs
CHANGED
|
@@ -1,52 +1,56 @@
|
|
|
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 _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
7
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
7
8
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
9
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
9
10
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
10
|
-
import { sstyled,
|
|
11
|
-
import
|
|
12
|
-
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
11
|
+
import { sstyled, assignProps, Component } from "@semcore/core";
|
|
12
|
+
import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
|
|
13
13
|
import getOriginChildren from "@semcore/core/lib/utils/getOriginChildren";
|
|
14
14
|
import trottle from "@semcore/core/lib/utils/rafTrottle";
|
|
15
|
-
import
|
|
15
|
+
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
16
16
|
import { polygonContains } from "d3-polygon";
|
|
17
|
-
import {
|
|
17
|
+
import { arc, line, lineRadial, curveLinearClosed } from "d3-shape";
|
|
18
|
+
import React, { cloneElement } from "react";
|
|
18
19
|
import createElement from "./createElement.mjs";
|
|
19
|
-
import { getChartDefaultColorName, eventToPoint, measureText } from "./utils.mjs";
|
|
20
|
-
import Tooltip from "./Tooltip.mjs";
|
|
21
20
|
import { PatternFill, getPatternSymbolSize, PatternSymbol } from "./Pattern.mjs";
|
|
21
|
+
import Tooltip from "./Tooltip.mjs";
|
|
22
|
+
import { getChartDefaultColorName, measureText, eventToPoint } from "./utils.mjs";
|
|
23
|
+
function _callSuper(t, o, e) {
|
|
24
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
25
|
+
}
|
|
22
26
|
/*!__reshadow-styles__:"./style/radar.shadow.css"*/
|
|
23
27
|
var style = (
|
|
24
28
|
/*__reshadow_css_start__*/
|
|
25
29
|
(sstyled.insert(
|
|
26
30
|
/*__inner_css_start__*/
|
|
27
|
-
".
|
|
31
|
+
".___SAxisLine_1isib_gg_,.___SAxisTick_1isib_gg_,.___SAxis_1isib_gg_{stroke:var(--intergalactic-chart-grid-line, #e0e1e9);stroke-width:1;fill:transparent}.___SAxisLine_1isib_gg_,.___SAxisTick_1isib_gg_{stroke-dasharray:2}.___SAxisLine_1isib_gg_.__active_1isib_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line, #a9abb6)}.___SAxisLabel_1isib_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_1isib_gg_.__xDirection_1isib_gg_{text-anchor:var(--xDirection_1isib)}.___SAxisLabel_1isib_gg_.__yDirection_1isib_gg_{dominant-baseline:var(--yDirection_1isib)}.___SPolygonDot_1isib_gg_,.___SPolygon_1isib_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SPolygon_1isib_gg_{opacity:.2}.___SPolygon_1isib_gg_.__color_1isib_gg_{fill:var(--color_1isib)}.___SPolygon_1isib_gg_.__pattern_1isib_gg_.__color_1isib_gg_{fill:var(--pattern_1isib);stroke:var(--color_1isib);stroke-width:1px}.___SPolygonDot_1isib_gg_{stroke-width:2px;stroke:var(--intergalactic-chart-grid-border, #ffffff);r:6px}.___SPolygonDot_1isib_gg_.__transparent_1isib_gg_{opacity:.3}.___SPolygonDot_1isib_gg_.__color_1isib_gg_{fill:var(--color_1isib)}.___SPolygonLine_1isib_gg_{stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke-width:3;fill:transparent}.___SPolygonLine_1isib_gg_.__transparent_1isib_gg_{opacity:.3}.___SPolygonLine_1isib_gg_.__color_1isib_gg_{stroke:var(--color_1isib)}.___SPieRect_1isib_gg_{outline:0;fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}",
|
|
28
32
|
/*__inner_css_end__*/
|
|
29
|
-
"
|
|
33
|
+
"1isib_gg_"
|
|
30
34
|
), /*__reshadow_css_end__*/
|
|
31
35
|
{
|
|
32
|
-
"__SAxis": "
|
|
33
|
-
"__SAxisLine": "
|
|
34
|
-
"__SAxisTick": "
|
|
35
|
-
"_active": "
|
|
36
|
-
"__SAxisLabel": "
|
|
37
|
-
"_xDirection": "
|
|
38
|
-
"--xDirection": "--
|
|
39
|
-
"_yDirection": "
|
|
40
|
-
"--yDirection": "--
|
|
41
|
-
"__SPolygon": "
|
|
42
|
-
"_color": "
|
|
43
|
-
"--color": "--
|
|
44
|
-
"_pattern": "
|
|
45
|
-
"--pattern": "--
|
|
46
|
-
"__SPolygonDot": "
|
|
47
|
-
"_transparent": "
|
|
48
|
-
"__SPolygonLine": "
|
|
49
|
-
"__SPieRect": "
|
|
36
|
+
"__SAxis": "___SAxis_1isib_gg_",
|
|
37
|
+
"__SAxisLine": "___SAxisLine_1isib_gg_",
|
|
38
|
+
"__SAxisTick": "___SAxisTick_1isib_gg_",
|
|
39
|
+
"_active": "__active_1isib_gg_",
|
|
40
|
+
"__SAxisLabel": "___SAxisLabel_1isib_gg_",
|
|
41
|
+
"_xDirection": "__xDirection_1isib_gg_",
|
|
42
|
+
"--xDirection": "--xDirection_1isib",
|
|
43
|
+
"_yDirection": "__yDirection_1isib_gg_",
|
|
44
|
+
"--yDirection": "--yDirection_1isib",
|
|
45
|
+
"__SPolygon": "___SPolygon_1isib_gg_",
|
|
46
|
+
"_color": "__color_1isib_gg_",
|
|
47
|
+
"--color": "--color_1isib",
|
|
48
|
+
"_pattern": "__pattern_1isib_gg_",
|
|
49
|
+
"--pattern": "--pattern_1isib",
|
|
50
|
+
"__SPolygonDot": "___SPolygonDot_1isib_gg_",
|
|
51
|
+
"_transparent": "__transparent_1isib_gg_",
|
|
52
|
+
"__SPolygonLine": "___SPolygonLine_1isib_gg_",
|
|
53
|
+
"__SPieRect": "___SPieRect_1isib_gg_"
|
|
50
54
|
})
|
|
51
55
|
);
|
|
52
56
|
var clampAngle = function clampAngle2(angle) {
|
|
@@ -97,14 +101,14 @@ function getTicks(tickSize, radius) {
|
|
|
97
101
|
while (Math.trunc(radius / (tickSize / 2)) > ticks) {
|
|
98
102
|
ticks += 1;
|
|
99
103
|
}
|
|
100
|
-
return _toConsumableArray(Array(ticks).keys()).reduce(function(ticks2,
|
|
104
|
+
return _toConsumableArray(Array(ticks).keys()).reduce(function(ticks2, _t, i, total) {
|
|
101
105
|
if (i) ticks2.push(i / total.length);
|
|
102
106
|
return ticks2;
|
|
103
107
|
}, []);
|
|
104
108
|
}
|
|
105
|
-
function pieContains(
|
|
106
|
-
var
|
|
107
|
-
var
|
|
109
|
+
function pieContains(_ref11, _ref12) {
|
|
110
|
+
var _ref13 = _slicedToArray(_ref11, 3), startAngle = _ref13[0], endAngle = _ref13[1], radius = _ref13[2];
|
|
111
|
+
var _ref14 = _slicedToArray(_ref12, 2), x = _ref14[0], y = _ref14[1];
|
|
108
112
|
var distance = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
|
|
109
113
|
if (distance > radius) return false;
|
|
110
114
|
startAngle = clampAngle(startAngle);
|
|
@@ -139,20 +143,19 @@ function getLabelOffsetPosition(xDirection, yDirection, width, height) {
|
|
|
139
143
|
}
|
|
140
144
|
var MINIMUM_OFFSET = 5;
|
|
141
145
|
var RadarRoot = /* @__PURE__ */ function(_Component) {
|
|
142
|
-
_inherits(RadarRoot2, _Component);
|
|
143
|
-
var _super = _createSuper(RadarRoot2);
|
|
144
146
|
function RadarRoot2() {
|
|
145
147
|
var _this;
|
|
146
148
|
_classCallCheck(this, RadarRoot2);
|
|
147
149
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
148
150
|
args[_key] = arguments[_key];
|
|
149
151
|
}
|
|
150
|
-
_this =
|
|
151
|
-
_defineProperty(
|
|
152
|
-
_defineProperty(
|
|
152
|
+
_this = _callSuper(this, RadarRoot2, [].concat(args));
|
|
153
|
+
_defineProperty(_this, "computeOffset", 0);
|
|
154
|
+
_defineProperty(_this, "categoriesKey", null);
|
|
153
155
|
return _this;
|
|
154
156
|
}
|
|
155
|
-
|
|
157
|
+
_inherits(RadarRoot2, _Component);
|
|
158
|
+
return _createClass(RadarRoot2, [{
|
|
156
159
|
key: "id",
|
|
157
160
|
get: function get() {
|
|
158
161
|
var _this$asProps = this.asProps, id = _this$asProps.id, uid = _this$asProps.uid;
|
|
@@ -182,8 +185,8 @@ var RadarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
182
185
|
}
|
|
183
186
|
}, {
|
|
184
187
|
key: "getPolygonProps",
|
|
185
|
-
value: function getPolygonProps(
|
|
186
|
-
var dataKey =
|
|
188
|
+
value: function getPolygonProps(_ref15, index) {
|
|
189
|
+
var dataKey = _ref15.dataKey;
|
|
187
190
|
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;
|
|
188
191
|
return {
|
|
189
192
|
offset: this.offset,
|
|
@@ -234,7 +237,6 @@ var RadarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
234
237
|
}));
|
|
235
238
|
}
|
|
236
239
|
}]);
|
|
237
|
-
return RadarRoot2;
|
|
238
240
|
}(Component);
|
|
239
241
|
_defineProperty(RadarRoot, "displayName", "Line");
|
|
240
242
|
_defineProperty(RadarRoot, "style", style);
|
|
@@ -244,13 +246,12 @@ _defineProperty(RadarRoot, "defaultProps", {
|
|
|
244
246
|
angleOffset: 0
|
|
245
247
|
});
|
|
246
248
|
var PolygonRoot = /* @__PURE__ */ function(_Component2) {
|
|
247
|
-
_inherits(PolygonRoot2, _Component2);
|
|
248
|
-
var _super2 = _createSuper(PolygonRoot2);
|
|
249
249
|
function PolygonRoot2() {
|
|
250
250
|
_classCallCheck(this, PolygonRoot2);
|
|
251
|
-
return
|
|
251
|
+
return _callSuper(this, PolygonRoot2, arguments);
|
|
252
252
|
}
|
|
253
|
-
|
|
253
|
+
_inherits(PolygonRoot2, _Component2);
|
|
254
|
+
return _createClass(PolygonRoot2, [{
|
|
254
255
|
key: "getDotsProps",
|
|
255
256
|
value: function getDotsProps() {
|
|
256
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;
|
|
@@ -296,17 +297,16 @@ var PolygonRoot = /* @__PURE__ */ function(_Component2) {
|
|
|
296
297
|
})));
|
|
297
298
|
}
|
|
298
299
|
}]);
|
|
299
|
-
return PolygonRoot2;
|
|
300
300
|
}(Component);
|
|
301
301
|
_defineProperty(PolygonRoot, "displayName", "Polygon");
|
|
302
302
|
_defineProperty(PolygonRoot, "style", style);
|
|
303
|
-
_defineProperty(PolygonRoot, "defaultProps", function(
|
|
304
|
-
var scale =
|
|
303
|
+
_defineProperty(PolygonRoot, "defaultProps", function(_ref20) {
|
|
304
|
+
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;
|
|
305
305
|
scale.range([0, Math.min(size[0], size[1]) / 2 - offset]);
|
|
306
306
|
return {
|
|
307
307
|
d3: lineRadial().curve(curve).radius(function(d) {
|
|
308
308
|
return scale(d || 0);
|
|
309
|
-
}).angle(function(
|
|
309
|
+
}).angle(function(_d, i, data) {
|
|
310
310
|
return i / data.length * 2 * Math.PI - angleOffset;
|
|
311
311
|
})
|
|
312
312
|
};
|
|
@@ -358,40 +358,39 @@ function PolygonDots(props) {
|
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
360
|
var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
361
|
-
_inherits(AxisRoot2, _Component3);
|
|
362
|
-
var _super3 = _createSuper(AxisRoot2);
|
|
363
361
|
function AxisRoot2() {
|
|
364
362
|
var _this2;
|
|
365
363
|
_classCallCheck(this, AxisRoot2);
|
|
366
364
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
367
365
|
args[_key2] = arguments[_key2];
|
|
368
366
|
}
|
|
369
|
-
_this2 =
|
|
370
|
-
_defineProperty(
|
|
371
|
-
_defineProperty(
|
|
367
|
+
_this2 = _callSuper(this, AxisRoot2, [].concat(args));
|
|
368
|
+
_defineProperty(_this2, "unsubscribeTooltipVisible", null);
|
|
369
|
+
_defineProperty(_this2, "state", {
|
|
372
370
|
activeLineIndex: null
|
|
373
371
|
});
|
|
374
|
-
_defineProperty(
|
|
375
|
-
var index =
|
|
372
|
+
_defineProperty(_this2, "handleTooltipRenderingProps", function(_anchorProps, _ref16) {
|
|
373
|
+
var index = _ref16.index;
|
|
376
374
|
_this2.setState({
|
|
377
375
|
activeLineIndex: index
|
|
378
376
|
});
|
|
379
377
|
});
|
|
380
378
|
return _this2;
|
|
381
379
|
}
|
|
382
|
-
|
|
380
|
+
_inherits(AxisRoot2, _Component3);
|
|
381
|
+
return _createClass(AxisRoot2, [{
|
|
383
382
|
key: "createLineRadial",
|
|
384
383
|
value: function createLineRadial(radius, total) {
|
|
385
384
|
return lineRadial().curve(curveLinearClosed).radius(function() {
|
|
386
385
|
return radius;
|
|
387
|
-
}).angle(function(
|
|
386
|
+
}).angle(function(_d, i) {
|
|
388
387
|
return i / total * 2 * Math.PI;
|
|
389
388
|
});
|
|
390
389
|
}
|
|
391
390
|
}, {
|
|
392
391
|
key: "getTicksProps",
|
|
393
|
-
value: function getTicksProps(
|
|
394
|
-
var
|
|
392
|
+
value: function getTicksProps(_ref17) {
|
|
393
|
+
var _ref17$tickSize = _ref17.tickSize, tickSize = _ref17$tickSize === void 0 ? 100 : _ref17$tickSize;
|
|
395
394
|
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;
|
|
396
395
|
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
397
396
|
return {
|
|
@@ -405,8 +404,8 @@ var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
|
405
404
|
}
|
|
406
405
|
}, {
|
|
407
406
|
key: "getLabelsProps",
|
|
408
|
-
value: function getLabelsProps(
|
|
409
|
-
var
|
|
407
|
+
value: function getLabelsProps(_ref18) {
|
|
408
|
+
var _ref18$labelOffset = _ref18.labelOffset, labelOffset = _ref18$labelOffset === void 0 ? 10 : _ref18$labelOffset;
|
|
410
409
|
var _this$asProps8 = this.asProps, offset = _this$asProps8.offset, categories = _this$asProps8.categories, textSize = _this$asProps8.textSize, angleOffset = _this$asProps8.angleOffset;
|
|
411
410
|
return {
|
|
412
411
|
categories,
|
|
@@ -425,7 +424,7 @@ var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
|
425
424
|
key: "componentWillUnmount",
|
|
426
425
|
value: function componentWillUnmount() {
|
|
427
426
|
var _this$unsubscribeTool;
|
|
428
|
-
(_this$unsubscribeTool = this.unsubscribeTooltipVisible) === null || _this$unsubscribeTool === void 0
|
|
427
|
+
(_this$unsubscribeTool = this.unsubscribeTooltipVisible) === null || _this$unsubscribeTool === void 0 || _this$unsubscribeTool.call(this);
|
|
429
428
|
}
|
|
430
429
|
}, {
|
|
431
430
|
key: "render",
|
|
@@ -443,7 +442,7 @@ var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
|
443
442
|
})) : /* @__PURE__ */ React.createElement(SAxis, _ref7.cn("SAxis", {
|
|
444
443
|
"render": "path",
|
|
445
444
|
"d": this.createLineRadial(radius, total)(categories)
|
|
446
|
-
})), categories.map(function(
|
|
445
|
+
})), categories.map(function(_category, i) {
|
|
447
446
|
var _getRadianPosition3 = getRadianPosition(i, radius, total, angleOffset), _getRadianPosition4 = _slicedToArray(_getRadianPosition3, 2), x = _getRadianPosition4[0], y = _getRadianPosition4[1];
|
|
448
447
|
var _sstyled$cn = sstyled(styles).cn("SAxisLine", {
|
|
449
448
|
active: activeLineIndex === i
|
|
@@ -459,12 +458,11 @@ var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
|
459
458
|
}));
|
|
460
459
|
}
|
|
461
460
|
}]);
|
|
462
|
-
return AxisRoot2;
|
|
463
461
|
}(Component);
|
|
464
462
|
_defineProperty(AxisRoot, "displayName", "Polygon");
|
|
465
463
|
_defineProperty(AxisRoot, "style", style);
|
|
466
|
-
_defineProperty(AxisRoot, "defaultProps", function(
|
|
467
|
-
var data =
|
|
464
|
+
_defineProperty(AxisRoot, "defaultProps", function(_ref21) {
|
|
465
|
+
var data = _ref21.data, dataKey = _ref21.dataKey;
|
|
468
466
|
var categories = data[dataKey];
|
|
469
467
|
return {
|
|
470
468
|
categories
|
|
@@ -519,7 +517,7 @@ function AxisLabels(props) {
|
|
|
519
517
|
}
|
|
520
518
|
if (/* @__PURE__ */ React.isValidElement(category)) {
|
|
521
519
|
var _category$props;
|
|
522
|
-
var
|
|
520
|
+
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;
|
|
523
521
|
var _getLabelOffsetPositi = getLabelOffsetPosition(xDirection, yDirection, width, height), _getLabelOffsetPositi2 = _slicedToArray(_getLabelOffsetPositi, 2), xOffset = _getLabelOffsetPositi2[0], yOffset = _getLabelOffsetPositi2[1];
|
|
524
522
|
return /* @__PURE__ */ cloneElement(category, {
|
|
525
523
|
key: i,
|
|
@@ -530,22 +528,20 @@ function AxisLabels(props) {
|
|
|
530
528
|
});
|
|
531
529
|
}
|
|
532
530
|
var Hover = /* @__PURE__ */ function(_Component4) {
|
|
533
|
-
_inherits(Hover2, _Component4);
|
|
534
|
-
var _super4 = _createSuper(Hover2);
|
|
535
531
|
function Hover2() {
|
|
536
532
|
var _this3;
|
|
537
533
|
_classCallCheck(this, Hover2);
|
|
538
534
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
539
535
|
args[_key3] = arguments[_key3];
|
|
540
536
|
}
|
|
541
|
-
_this3 =
|
|
542
|
-
_defineProperty(
|
|
537
|
+
_this3 = _callSuper(this, Hover2, [].concat(args));
|
|
538
|
+
_defineProperty(_this3, "state", {
|
|
543
539
|
index: null
|
|
544
540
|
});
|
|
545
|
-
_defineProperty(
|
|
546
|
-
_defineProperty(
|
|
547
|
-
_defineProperty(
|
|
548
|
-
_defineProperty(
|
|
541
|
+
_defineProperty(_this3, "virtualElement", canUseDOM() ? document.createElement("div") : {});
|
|
542
|
+
_defineProperty(_this3, "unsubscribeMouseMoveRoot", null);
|
|
543
|
+
_defineProperty(_this3, "unsubscribeMouseLeaveRoot", null);
|
|
544
|
+
_defineProperty(_this3, "handlerMouseMoveRoot", trottle(function(e) {
|
|
549
545
|
var _this3$asProps = _this3.asProps, eventEmitter = _this3$asProps.eventEmitter, size = _this3$asProps.size, rootRef = _this3$asProps.rootRef, patterns = _this3$asProps.patterns;
|
|
550
546
|
var point = eventToPoint(e, rootRef.current);
|
|
551
547
|
var diam = Math.min(size[0], size[1]);
|
|
@@ -564,7 +560,7 @@ var Hover = /* @__PURE__ */ function(_Component4) {
|
|
|
564
560
|
eventEmitter.emit("setTooltipVisible", index !== null);
|
|
565
561
|
});
|
|
566
562
|
}));
|
|
567
|
-
_defineProperty(
|
|
563
|
+
_defineProperty(_this3, "handlerMouseLeaveRoot", trottle(function() {
|
|
568
564
|
_this3.setState({
|
|
569
565
|
index: null
|
|
570
566
|
}, function() {
|
|
@@ -573,7 +569,8 @@ var Hover = /* @__PURE__ */ function(_Component4) {
|
|
|
573
569
|
}));
|
|
574
570
|
return _this3;
|
|
575
571
|
}
|
|
576
|
-
|
|
572
|
+
_inherits(Hover2, _Component4);
|
|
573
|
+
return _createClass(Hover2, [{
|
|
577
574
|
key: "generateGetBoundingClientRect",
|
|
578
575
|
value: function generateGetBoundingClientRect() {
|
|
579
576
|
var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
@@ -592,21 +589,21 @@ var Hover = /* @__PURE__ */ function(_Component4) {
|
|
|
592
589
|
}, {
|
|
593
590
|
key: "getPolygon",
|
|
594
591
|
value: function getPolygon(index) {
|
|
595
|
-
var _this$
|
|
592
|
+
var _this$asProps0 = this.asProps, categories = _this$asProps0.categories, size = _this$asProps0.size, offset = _this$asProps0.offset, angleOffset = _this$asProps0.angleOffset;
|
|
596
593
|
var total = categories.length;
|
|
597
594
|
var diam = Math.min(size[0], size[1]);
|
|
598
595
|
var radius = diam / 2 - offset;
|
|
599
596
|
var prevIndex = (index - 1 + total) % total;
|
|
600
597
|
var nextIndex = (index + 1 + total) % total;
|
|
601
598
|
var _getRadianPosition7 = getRadianPosition(prevIndex, radius, total, angleOffset), _getRadianPosition8 = _slicedToArray(_getRadianPosition7, 2), prevX1 = _getRadianPosition8[0], prevY1 = _getRadianPosition8[1];
|
|
602
|
-
var _getRadianPosition9 = getRadianPosition(index, radius, total, angleOffset),
|
|
603
|
-
var
|
|
599
|
+
var _getRadianPosition9 = getRadianPosition(index, radius, total, angleOffset), _getRadianPosition0 = _slicedToArray(_getRadianPosition9, 2), x = _getRadianPosition0[0], y = _getRadianPosition0[1];
|
|
600
|
+
var _getRadianPosition1 = getRadianPosition(nextIndex, radius, total, angleOffset), _getRadianPosition10 = _slicedToArray(_getRadianPosition1, 2), nextX1 = _getRadianPosition10[0], nextY1 = _getRadianPosition10[1];
|
|
604
601
|
return [[0, 0], [(prevX1 + x) / 2, (prevY1 + y) / 2], [x, y], [(nextX1 + x) / 2, (nextY1 + y) / 2]];
|
|
605
602
|
}
|
|
606
603
|
}, {
|
|
607
604
|
key: "getPie",
|
|
608
605
|
value: function getPie(index) {
|
|
609
|
-
var _this$
|
|
606
|
+
var _this$asProps1 = this.asProps, categories = _this$asProps1.categories, size = _this$asProps1.size, offset = _this$asProps1.offset, angleOffset = _this$asProps1.angleOffset;
|
|
610
607
|
var angle = Math.PI * 2 / categories.length;
|
|
611
608
|
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
612
609
|
return [index * angle - angle / 2 - angleOffset, (index + 1) * angle - angle / 2 - angleOffset, radius];
|
|
@@ -615,14 +612,14 @@ var Hover = /* @__PURE__ */ function(_Component4) {
|
|
|
615
612
|
key: "getIndex",
|
|
616
613
|
value: function getIndex(point) {
|
|
617
614
|
var _this4 = this;
|
|
618
|
-
var _this$
|
|
615
|
+
var _this$asProps10 = this.asProps, categories = _this$asProps10.categories, type = _this$asProps10.type;
|
|
619
616
|
var index;
|
|
620
617
|
if (type === "circle") {
|
|
621
|
-
index = categories.findIndex(function(
|
|
618
|
+
index = categories.findIndex(function(_c, i) {
|
|
622
619
|
return pieContains(_this4.getPie(i), point);
|
|
623
620
|
});
|
|
624
621
|
} else {
|
|
625
|
-
index = categories.findIndex(function(
|
|
622
|
+
index = categories.findIndex(function(_c, i) {
|
|
626
623
|
return polygonContains(_this4.getPolygon(i), point);
|
|
627
624
|
});
|
|
628
625
|
}
|
|
@@ -652,21 +649,21 @@ var Hover = /* @__PURE__ */ function(_Component4) {
|
|
|
652
649
|
}, {
|
|
653
650
|
key: "render",
|
|
654
651
|
value: function render() {
|
|
655
|
-
var _this$
|
|
652
|
+
var _this$asProps11 = this.asProps, styles = _this$asProps11.styles, type = _this$asProps11.type;
|
|
656
653
|
var index = this.state.index;
|
|
657
654
|
var SPieRect = this.Element;
|
|
658
655
|
if (index !== null) {
|
|
659
656
|
if (type === "circle") {
|
|
660
|
-
var
|
|
657
|
+
var _ref0;
|
|
661
658
|
var _this$getPie = this.getPie(index), _this$getPie2 = _slicedToArray(_this$getPie, 3), startAngle = _this$getPie2[0], endAngle = _this$getPie2[1], radius = _this$getPie2[2];
|
|
662
659
|
var circle = arc().innerRadius(0).outerRadius(radius).startAngle(startAngle).endAngle(endAngle);
|
|
663
|
-
return
|
|
660
|
+
return _ref0 = sstyled(styles), /* @__PURE__ */ React.createElement(SPieRect, _ref0.cn("SPieRect", {
|
|
664
661
|
"render": "path",
|
|
665
662
|
"d": circle()
|
|
666
663
|
}));
|
|
667
664
|
} else {
|
|
668
|
-
var
|
|
669
|
-
return
|
|
665
|
+
var _ref1;
|
|
666
|
+
return _ref1 = sstyled(styles), /* @__PURE__ */ React.createElement(SPieRect, _ref1.cn("SPieRect", {
|
|
670
667
|
"render": "path",
|
|
671
668
|
"d": line()(this.getPolygon(index))
|
|
672
669
|
}));
|
|
@@ -675,7 +672,6 @@ var Hover = /* @__PURE__ */ function(_Component4) {
|
|
|
675
672
|
return null;
|
|
676
673
|
}
|
|
677
674
|
}]);
|
|
678
|
-
return Hover2;
|
|
679
675
|
}(Component);
|
|
680
676
|
var Axis = createElement(AxisRoot, {
|
|
681
677
|
Ticks: AxisTicks,
|
|
@@ -686,9 +682,9 @@ var Polygon = createElement(PolygonRoot, {
|
|
|
686
682
|
Dots: PolygonDots
|
|
687
683
|
});
|
|
688
684
|
var RadarTooltip = function RadarTooltip2(props) {
|
|
689
|
-
var _ref = arguments[0],
|
|
685
|
+
var _ref = arguments[0], _ref10;
|
|
690
686
|
var SRadarTooltip = Tooltip;
|
|
691
|
-
return
|
|
687
|
+
return _ref10 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SRadarTooltip, _ref10.cn("SRadarTooltip", _objectSpread({}, assignProps({
|
|
692
688
|
"tag": Radar.Hover,
|
|
693
689
|
"excludeAnchorProps": true
|
|
694
690
|
}, _ref))));
|