@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/es6/Radar.js
CHANGED
|
@@ -1,49 +1,51 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/isNativeReflectConstruct";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
7
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
7
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
9
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
9
10
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
10
11
|
import { sstyled as _sstyled } from "@semcore/core";
|
|
11
12
|
import { assignProps as _assignProps } from "@semcore/core";
|
|
12
|
-
|
|
13
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
14
|
import { Component, sstyled, Root } from '@semcore/core';
|
|
14
|
-
import
|
|
15
|
+
import canUseDOM from '@semcore/core/lib/utils/canUseDOM';
|
|
15
16
|
import getOriginChildren from '@semcore/core/lib/utils/getOriginChildren';
|
|
16
17
|
import trottle from '@semcore/core/lib/utils/rafTrottle';
|
|
17
|
-
import
|
|
18
|
+
import uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';
|
|
18
19
|
import { polygonContains } from 'd3-polygon';
|
|
19
20
|
import { line, lineRadial, curveLinearClosed, arc } from 'd3-shape';
|
|
21
|
+
import React, { cloneElement } from 'react';
|
|
20
22
|
import createElement from './createElement';
|
|
21
|
-
import { eventToPoint, getChartDefaultColorName, measureText } from './utils';
|
|
22
|
-
import Tooltip from './Tooltip';
|
|
23
23
|
import { PatternFill, PatternSymbol, getPatternSymbolSize } from './Pattern';
|
|
24
24
|
/*!__reshadow-styles__:"./style/radar.shadow.css"*/
|
|
25
|
-
var style = (
|
|
25
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___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))}", /*__inner_css_end__*/"1isib_gg_"),
|
|
26
26
|
/*__reshadow_css_end__*/
|
|
27
27
|
{
|
|
28
|
-
"__SAxis": "
|
|
29
|
-
"__SAxisLine": "
|
|
30
|
-
"__SAxisTick": "
|
|
31
|
-
"_active": "
|
|
32
|
-
"__SAxisLabel": "
|
|
33
|
-
"_xDirection": "
|
|
34
|
-
"--xDirection": "--
|
|
35
|
-
"_yDirection": "
|
|
36
|
-
"--yDirection": "--
|
|
37
|
-
"__SPolygon": "
|
|
38
|
-
"_color": "
|
|
39
|
-
"--color": "--
|
|
40
|
-
"_pattern": "
|
|
41
|
-
"--pattern": "--
|
|
42
|
-
"__SPolygonDot": "
|
|
43
|
-
"_transparent": "
|
|
44
|
-
"__SPolygonLine": "
|
|
45
|
-
"__SPieRect": "
|
|
28
|
+
"__SAxis": "___SAxis_1isib_gg_",
|
|
29
|
+
"__SAxisLine": "___SAxisLine_1isib_gg_",
|
|
30
|
+
"__SAxisTick": "___SAxisTick_1isib_gg_",
|
|
31
|
+
"_active": "__active_1isib_gg_",
|
|
32
|
+
"__SAxisLabel": "___SAxisLabel_1isib_gg_",
|
|
33
|
+
"_xDirection": "__xDirection_1isib_gg_",
|
|
34
|
+
"--xDirection": "--xDirection_1isib",
|
|
35
|
+
"_yDirection": "__yDirection_1isib_gg_",
|
|
36
|
+
"--yDirection": "--yDirection_1isib",
|
|
37
|
+
"__SPolygon": "___SPolygon_1isib_gg_",
|
|
38
|
+
"_color": "__color_1isib_gg_",
|
|
39
|
+
"--color": "--color_1isib",
|
|
40
|
+
"_pattern": "__pattern_1isib_gg_",
|
|
41
|
+
"--pattern": "--pattern_1isib",
|
|
42
|
+
"__SPolygonDot": "___SPolygonDot_1isib_gg_",
|
|
43
|
+
"_transparent": "__transparent_1isib_gg_",
|
|
44
|
+
"__SPolygonLine": "___SPolygonLine_1isib_gg_",
|
|
45
|
+
"__SPieRect": "___SPieRect_1isib_gg_"
|
|
46
46
|
});
|
|
47
|
+
import Tooltip from './Tooltip';
|
|
48
|
+
import { eventToPoint, getChartDefaultColorName, measureText } from './utils';
|
|
47
49
|
var clampAngle = function clampAngle(angle) {
|
|
48
50
|
angle = angle % (2 * Math.PI);
|
|
49
51
|
if (angle < 0) angle += 2 * Math.PI;
|
|
@@ -79,7 +81,7 @@ function computeTextWidth(texts, textSize) {
|
|
|
79
81
|
if (typeof text === 'string') {
|
|
80
82
|
return measureText(text, textSize);
|
|
81
83
|
}
|
|
82
|
-
if (
|
|
84
|
+
if (/*#__PURE__*/React.isValidElement(text)) {
|
|
83
85
|
var _text$props, _text$props2;
|
|
84
86
|
// @ts-ignore
|
|
85
87
|
return Math.max(((_text$props = text.props) === null || _text$props === void 0 ? void 0 : _text$props.width) || defaultWidth, ((_text$props2 = text.props) === null || _text$props2 === void 0 ? void 0 : _text$props2.height) || defaultHeight);
|
|
@@ -93,19 +95,19 @@ function getTicks(tickSize, radius) {
|
|
|
93
95
|
while (Math.trunc(radius / (tickSize / 2)) > ticks) {
|
|
94
96
|
ticks += 1;
|
|
95
97
|
}
|
|
96
|
-
return _toConsumableArray(Array(ticks).keys()).reduce(function (ticks,
|
|
98
|
+
return _toConsumableArray(Array(ticks).keys()).reduce(function (ticks, _t, i, total) {
|
|
97
99
|
if (i) ticks.push(i / total.length);
|
|
98
100
|
return ticks;
|
|
99
101
|
}, []);
|
|
100
102
|
}
|
|
101
|
-
function pieContains(
|
|
102
|
-
var
|
|
103
|
-
startAngle =
|
|
104
|
-
endAngle =
|
|
105
|
-
radius =
|
|
106
|
-
var
|
|
107
|
-
x =
|
|
108
|
-
y =
|
|
103
|
+
function pieContains(_ref11, _ref12) {
|
|
104
|
+
var _ref13 = _slicedToArray(_ref11, 3),
|
|
105
|
+
startAngle = _ref13[0],
|
|
106
|
+
endAngle = _ref13[1],
|
|
107
|
+
radius = _ref13[2];
|
|
108
|
+
var _ref14 = _slicedToArray(_ref12, 2),
|
|
109
|
+
x = _ref14[0],
|
|
110
|
+
y = _ref14[1];
|
|
109
111
|
var distance = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
|
|
110
112
|
if (distance > radius) return false;
|
|
111
113
|
startAngle = clampAngle(startAngle);
|
|
@@ -140,20 +142,19 @@ export function getLabelOffsetPosition(xDirection, yDirection, width, height) {
|
|
|
140
142
|
}
|
|
141
143
|
var MINIMUM_OFFSET = 5;
|
|
142
144
|
var RadarRoot = /*#__PURE__*/function (_Component) {
|
|
143
|
-
_inherits(RadarRoot, _Component);
|
|
144
|
-
var _super = _createSuper(RadarRoot);
|
|
145
145
|
function RadarRoot() {
|
|
146
146
|
var _this;
|
|
147
147
|
_classCallCheck(this, RadarRoot);
|
|
148
148
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
149
149
|
args[_key] = arguments[_key];
|
|
150
150
|
}
|
|
151
|
-
_this =
|
|
152
|
-
_defineProperty(
|
|
153
|
-
_defineProperty(
|
|
151
|
+
_this = _callSuper(this, RadarRoot, [].concat(args));
|
|
152
|
+
_defineProperty(_this, "computeOffset", 0);
|
|
153
|
+
_defineProperty(_this, "categoriesKey", null);
|
|
154
154
|
return _this;
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
_inherits(RadarRoot, _Component);
|
|
157
|
+
return _createClass(RadarRoot, [{
|
|
157
158
|
key: "id",
|
|
158
159
|
get: function get() {
|
|
159
160
|
var _this$asProps = this.asProps,
|
|
@@ -185,8 +186,8 @@ var RadarRoot = /*#__PURE__*/function (_Component) {
|
|
|
185
186
|
}
|
|
186
187
|
}, {
|
|
187
188
|
key: "getPolygonProps",
|
|
188
|
-
value: function getPolygonProps(
|
|
189
|
-
var dataKey =
|
|
189
|
+
value: function getPolygonProps(_ref15, index) {
|
|
190
|
+
var dataKey = _ref15.dataKey;
|
|
190
191
|
var _this$asProps2 = this.asProps,
|
|
191
192
|
data = _this$asProps2.data,
|
|
192
193
|
scale = _this$asProps2.scale,
|
|
@@ -230,7 +231,7 @@ var RadarRoot = /*#__PURE__*/function (_Component) {
|
|
|
230
231
|
this.asProps.dataHintsHandler.establishDataType('indexed-groups');
|
|
231
232
|
var dataKey;
|
|
232
233
|
React.Children.toArray(getOriginChildren(Children)).forEach(function (child) {
|
|
233
|
-
if (
|
|
234
|
+
if (/*#__PURE__*/React.isValidElement(child) && child.type === Radar.Axis) {
|
|
234
235
|
dataKey = child.props.dataKey;
|
|
235
236
|
}
|
|
236
237
|
});
|
|
@@ -250,7 +251,6 @@ var RadarRoot = /*#__PURE__*/function (_Component) {
|
|
|
250
251
|
}));
|
|
251
252
|
}
|
|
252
253
|
}]);
|
|
253
|
-
return RadarRoot;
|
|
254
254
|
}(Component);
|
|
255
255
|
_defineProperty(RadarRoot, "displayName", 'Line');
|
|
256
256
|
_defineProperty(RadarRoot, "style", style);
|
|
@@ -260,13 +260,12 @@ _defineProperty(RadarRoot, "defaultProps", {
|
|
|
260
260
|
angleOffset: 0
|
|
261
261
|
});
|
|
262
262
|
var PolygonRoot = /*#__PURE__*/function (_Component2) {
|
|
263
|
-
_inherits(PolygonRoot, _Component2);
|
|
264
|
-
var _super2 = _createSuper(PolygonRoot);
|
|
265
263
|
function PolygonRoot() {
|
|
266
264
|
_classCallCheck(this, PolygonRoot);
|
|
267
|
-
return
|
|
265
|
+
return _callSuper(this, PolygonRoot, arguments);
|
|
268
266
|
}
|
|
269
|
-
|
|
267
|
+
_inherits(PolygonRoot, _Component2);
|
|
268
|
+
return _createClass(PolygonRoot, [{
|
|
270
269
|
key: "getDotsProps",
|
|
271
270
|
value: function getDotsProps() {
|
|
272
271
|
var _this$asProps4 = this.asProps,
|
|
@@ -335,22 +334,21 @@ var PolygonRoot = /*#__PURE__*/function (_Component2) {
|
|
|
335
334
|
})));
|
|
336
335
|
}
|
|
337
336
|
}]);
|
|
338
|
-
return PolygonRoot;
|
|
339
337
|
}(Component);
|
|
340
338
|
_defineProperty(PolygonRoot, "displayName", 'Polygon');
|
|
341
339
|
_defineProperty(PolygonRoot, "style", style);
|
|
342
|
-
_defineProperty(PolygonRoot, "defaultProps", function (
|
|
343
|
-
var scale =
|
|
344
|
-
|
|
345
|
-
curve =
|
|
346
|
-
size =
|
|
347
|
-
offset =
|
|
348
|
-
angleOffset =
|
|
340
|
+
_defineProperty(PolygonRoot, "defaultProps", function (_ref20) {
|
|
341
|
+
var scale = _ref20.scale,
|
|
342
|
+
_ref20$curve = _ref20.curve,
|
|
343
|
+
curve = _ref20$curve === void 0 ? curveLinearClosed : _ref20$curve,
|
|
344
|
+
size = _ref20.size,
|
|
345
|
+
offset = _ref20.offset,
|
|
346
|
+
angleOffset = _ref20.angleOffset;
|
|
349
347
|
scale.range([0, Math.min(size[0], size[1]) / 2 - offset]);
|
|
350
348
|
return {
|
|
351
349
|
d3: lineRadial().curve(curve).radius(function (d) {
|
|
352
350
|
return scale(d || 0);
|
|
353
|
-
}).angle(function (
|
|
351
|
+
}).angle(function (_d, i, data) {
|
|
354
352
|
return i / data.length * 2 * Math.PI - angleOffset;
|
|
355
353
|
})
|
|
356
354
|
};
|
|
@@ -423,41 +421,40 @@ function PolygonDots(props) {
|
|
|
423
421
|
});
|
|
424
422
|
}
|
|
425
423
|
var AxisRoot = /*#__PURE__*/function (_Component3) {
|
|
426
|
-
_inherits(AxisRoot, _Component3);
|
|
427
|
-
var _super3 = _createSuper(AxisRoot);
|
|
428
424
|
function AxisRoot() {
|
|
429
425
|
var _this2;
|
|
430
426
|
_classCallCheck(this, AxisRoot);
|
|
431
427
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
432
428
|
args[_key2] = arguments[_key2];
|
|
433
429
|
}
|
|
434
|
-
_this2 =
|
|
435
|
-
_defineProperty(
|
|
436
|
-
_defineProperty(
|
|
430
|
+
_this2 = _callSuper(this, AxisRoot, [].concat(args));
|
|
431
|
+
_defineProperty(_this2, "unsubscribeTooltipVisible", null);
|
|
432
|
+
_defineProperty(_this2, "state", {
|
|
437
433
|
activeLineIndex: null
|
|
438
434
|
});
|
|
439
|
-
_defineProperty(
|
|
440
|
-
var index =
|
|
435
|
+
_defineProperty(_this2, "handleTooltipRenderingProps", function (_anchorProps, _ref16) {
|
|
436
|
+
var index = _ref16.index;
|
|
441
437
|
_this2.setState({
|
|
442
438
|
activeLineIndex: index
|
|
443
439
|
});
|
|
444
440
|
});
|
|
445
441
|
return _this2;
|
|
446
442
|
}
|
|
447
|
-
|
|
443
|
+
_inherits(AxisRoot, _Component3);
|
|
444
|
+
return _createClass(AxisRoot, [{
|
|
448
445
|
key: "createLineRadial",
|
|
449
446
|
value: function createLineRadial(radius, total) {
|
|
450
447
|
return lineRadial().curve(curveLinearClosed).radius(function () {
|
|
451
448
|
return radius;
|
|
452
|
-
}).angle(function (
|
|
449
|
+
}).angle(function (_d, i) {
|
|
453
450
|
return i / total * 2 * Math.PI;
|
|
454
451
|
});
|
|
455
452
|
}
|
|
456
453
|
}, {
|
|
457
454
|
key: "getTicksProps",
|
|
458
|
-
value: function getTicksProps(
|
|
459
|
-
var
|
|
460
|
-
tickSize =
|
|
455
|
+
value: function getTicksProps(_ref17) {
|
|
456
|
+
var _ref17$tickSize = _ref17.tickSize,
|
|
457
|
+
tickSize = _ref17$tickSize === void 0 ? 100 : _ref17$tickSize;
|
|
461
458
|
var _this$asProps7 = this.asProps,
|
|
462
459
|
data = _this$asProps7.data,
|
|
463
460
|
offset = _this$asProps7.offset,
|
|
@@ -476,9 +473,9 @@ var AxisRoot = /*#__PURE__*/function (_Component3) {
|
|
|
476
473
|
}
|
|
477
474
|
}, {
|
|
478
475
|
key: "getLabelsProps",
|
|
479
|
-
value: function getLabelsProps(
|
|
480
|
-
var
|
|
481
|
-
labelOffset =
|
|
476
|
+
value: function getLabelsProps(_ref18) {
|
|
477
|
+
var _ref18$labelOffset = _ref18.labelOffset,
|
|
478
|
+
labelOffset = _ref18$labelOffset === void 0 ? 10 : _ref18$labelOffset;
|
|
482
479
|
var _this$asProps8 = this.asProps,
|
|
483
480
|
offset = _this$asProps8.offset,
|
|
484
481
|
categories = _this$asProps8.categories,
|
|
@@ -501,7 +498,7 @@ var AxisRoot = /*#__PURE__*/function (_Component3) {
|
|
|
501
498
|
key: "componentWillUnmount",
|
|
502
499
|
value: function componentWillUnmount() {
|
|
503
500
|
var _this$unsubscribeTool;
|
|
504
|
-
(_this$unsubscribeTool = this.unsubscribeTooltipVisible) === null || _this$unsubscribeTool === void 0
|
|
501
|
+
(_this$unsubscribeTool = this.unsubscribeTooltipVisible) === null || _this$unsubscribeTool === void 0 || _this$unsubscribeTool.call(this);
|
|
505
502
|
}
|
|
506
503
|
}, {
|
|
507
504
|
key: "render",
|
|
@@ -526,7 +523,7 @@ var AxisRoot = /*#__PURE__*/function (_Component3) {
|
|
|
526
523
|
})) : /*#__PURE__*/React.createElement(SAxis, _ref7.cn("SAxis", {
|
|
527
524
|
"render": 'path',
|
|
528
525
|
"d": this.createLineRadial(radius, total)(categories)
|
|
529
|
-
})), categories.map(function (
|
|
526
|
+
})), categories.map(function (_category, i) {
|
|
530
527
|
var _getRadianPosition3 = getRadianPosition(i, radius, total, angleOffset),
|
|
531
528
|
_getRadianPosition4 = _slicedToArray(_getRadianPosition3, 2),
|
|
532
529
|
x = _getRadianPosition4[0],
|
|
@@ -546,13 +543,12 @@ var AxisRoot = /*#__PURE__*/function (_Component3) {
|
|
|
546
543
|
}));
|
|
547
544
|
}
|
|
548
545
|
}]);
|
|
549
|
-
return AxisRoot;
|
|
550
546
|
}(Component);
|
|
551
547
|
_defineProperty(AxisRoot, "displayName", 'Polygon');
|
|
552
548
|
_defineProperty(AxisRoot, "style", style);
|
|
553
|
-
_defineProperty(AxisRoot, "defaultProps", function (
|
|
554
|
-
var data =
|
|
555
|
-
dataKey =
|
|
549
|
+
_defineProperty(AxisRoot, "defaultProps", function (_ref21) {
|
|
550
|
+
var data = _ref21.data,
|
|
551
|
+
dataKey = _ref21.dataKey;
|
|
556
552
|
var categories = data[dataKey];
|
|
557
553
|
return {
|
|
558
554
|
categories: categories
|
|
@@ -624,13 +620,13 @@ function AxisLabels(props) {
|
|
|
624
620
|
}, lineText);
|
|
625
621
|
}));
|
|
626
622
|
}
|
|
627
|
-
if (
|
|
623
|
+
if (/*#__PURE__*/React.isValidElement(category)) {
|
|
628
624
|
var _category$props;
|
|
629
|
-
var
|
|
630
|
-
|
|
631
|
-
width =
|
|
632
|
-
|
|
633
|
-
height =
|
|
625
|
+
var _ref19 = (_category$props = category === null || category === void 0 ? void 0 : category.props) !== null && _category$props !== void 0 ? _category$props : {},
|
|
626
|
+
_ref19$width = _ref19.width,
|
|
627
|
+
width = _ref19$width === void 0 ? 0 : _ref19$width,
|
|
628
|
+
_ref19$height = _ref19.height,
|
|
629
|
+
height = _ref19$height === void 0 ? 0 : _ref19$height;
|
|
634
630
|
var _getLabelOffsetPositi = getLabelOffsetPosition(xDirection, yDirection, width, height),
|
|
635
631
|
_getLabelOffsetPositi2 = _slicedToArray(_getLabelOffsetPositi, 2),
|
|
636
632
|
xOffset = _getLabelOffsetPositi2[0],
|
|
@@ -644,22 +640,20 @@ function AxisLabels(props) {
|
|
|
644
640
|
});
|
|
645
641
|
}
|
|
646
642
|
var Hover = /*#__PURE__*/function (_Component4) {
|
|
647
|
-
_inherits(Hover, _Component4);
|
|
648
|
-
var _super4 = _createSuper(Hover);
|
|
649
643
|
function Hover() {
|
|
650
644
|
var _this3;
|
|
651
645
|
_classCallCheck(this, Hover);
|
|
652
646
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
653
647
|
args[_key3] = arguments[_key3];
|
|
654
648
|
}
|
|
655
|
-
_this3 =
|
|
656
|
-
_defineProperty(
|
|
649
|
+
_this3 = _callSuper(this, Hover, [].concat(args));
|
|
650
|
+
_defineProperty(_this3, "state", {
|
|
657
651
|
index: null
|
|
658
652
|
});
|
|
659
|
-
_defineProperty(
|
|
660
|
-
_defineProperty(
|
|
661
|
-
_defineProperty(
|
|
662
|
-
_defineProperty(
|
|
653
|
+
_defineProperty(_this3, "virtualElement", canUseDOM() ? document.createElement('div') : {});
|
|
654
|
+
_defineProperty(_this3, "unsubscribeMouseMoveRoot", null);
|
|
655
|
+
_defineProperty(_this3, "unsubscribeMouseLeaveRoot", null);
|
|
656
|
+
_defineProperty(_this3, "handlerMouseMoveRoot", trottle(function (e) {
|
|
663
657
|
var _this3$asProps = _this3.asProps,
|
|
664
658
|
eventEmitter = _this3$asProps.eventEmitter,
|
|
665
659
|
size = _this3$asProps.size,
|
|
@@ -683,7 +677,7 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
683
677
|
eventEmitter.emit('setTooltipVisible', index !== null);
|
|
684
678
|
});
|
|
685
679
|
}));
|
|
686
|
-
_defineProperty(
|
|
680
|
+
_defineProperty(_this3, "handlerMouseLeaveRoot", trottle(function () {
|
|
687
681
|
_this3.setState({
|
|
688
682
|
index: null
|
|
689
683
|
}, function () {
|
|
@@ -692,7 +686,8 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
692
686
|
}));
|
|
693
687
|
return _this3;
|
|
694
688
|
}
|
|
695
|
-
|
|
689
|
+
_inherits(Hover, _Component4);
|
|
690
|
+
return _createClass(Hover, [{
|
|
696
691
|
key: "generateGetBoundingClientRect",
|
|
697
692
|
value: function generateGetBoundingClientRect() {
|
|
698
693
|
var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
@@ -711,11 +706,11 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
711
706
|
}, {
|
|
712
707
|
key: "getPolygon",
|
|
713
708
|
value: function getPolygon(index) {
|
|
714
|
-
var _this$
|
|
715
|
-
categories = _this$
|
|
716
|
-
size = _this$
|
|
717
|
-
offset = _this$
|
|
718
|
-
angleOffset = _this$
|
|
709
|
+
var _this$asProps0 = this.asProps,
|
|
710
|
+
categories = _this$asProps0.categories,
|
|
711
|
+
size = _this$asProps0.size,
|
|
712
|
+
offset = _this$asProps0.offset,
|
|
713
|
+
angleOffset = _this$asProps0.angleOffset;
|
|
719
714
|
var total = categories.length;
|
|
720
715
|
var diam = Math.min(size[0], size[1]);
|
|
721
716
|
var radius = diam / 2 - offset;
|
|
@@ -726,23 +721,23 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
726
721
|
prevX1 = _getRadianPosition8[0],
|
|
727
722
|
prevY1 = _getRadianPosition8[1];
|
|
728
723
|
var _getRadianPosition9 = getRadianPosition(index, radius, total, angleOffset),
|
|
729
|
-
|
|
730
|
-
x =
|
|
731
|
-
y =
|
|
732
|
-
var
|
|
733
|
-
|
|
734
|
-
nextX1 =
|
|
735
|
-
nextY1 =
|
|
724
|
+
_getRadianPosition0 = _slicedToArray(_getRadianPosition9, 2),
|
|
725
|
+
x = _getRadianPosition0[0],
|
|
726
|
+
y = _getRadianPosition0[1];
|
|
727
|
+
var _getRadianPosition1 = getRadianPosition(nextIndex, radius, total, angleOffset),
|
|
728
|
+
_getRadianPosition10 = _slicedToArray(_getRadianPosition1, 2),
|
|
729
|
+
nextX1 = _getRadianPosition10[0],
|
|
730
|
+
nextY1 = _getRadianPosition10[1];
|
|
736
731
|
return [[0, 0], [(prevX1 + x) / 2, (prevY1 + y) / 2], [x, y], [(nextX1 + x) / 2, (nextY1 + y) / 2]];
|
|
737
732
|
}
|
|
738
733
|
}, {
|
|
739
734
|
key: "getPie",
|
|
740
735
|
value: function getPie(index) {
|
|
741
|
-
var _this$
|
|
742
|
-
categories = _this$
|
|
743
|
-
size = _this$
|
|
744
|
-
offset = _this$
|
|
745
|
-
angleOffset = _this$
|
|
736
|
+
var _this$asProps1 = this.asProps,
|
|
737
|
+
categories = _this$asProps1.categories,
|
|
738
|
+
size = _this$asProps1.size,
|
|
739
|
+
offset = _this$asProps1.offset,
|
|
740
|
+
angleOffset = _this$asProps1.angleOffset;
|
|
746
741
|
var angle = Math.PI * 2 / categories.length;
|
|
747
742
|
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
748
743
|
return [index * angle - angle / 2 - angleOffset, (index + 1) * angle - angle / 2 - angleOffset, radius];
|
|
@@ -751,16 +746,16 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
751
746
|
key: "getIndex",
|
|
752
747
|
value: function getIndex(point) {
|
|
753
748
|
var _this4 = this;
|
|
754
|
-
var _this$
|
|
755
|
-
categories = _this$
|
|
756
|
-
type = _this$
|
|
749
|
+
var _this$asProps10 = this.asProps,
|
|
750
|
+
categories = _this$asProps10.categories,
|
|
751
|
+
type = _this$asProps10.type;
|
|
757
752
|
var index;
|
|
758
753
|
if (type === 'circle') {
|
|
759
|
-
index = categories.findIndex(function (
|
|
754
|
+
index = categories.findIndex(function (_c, i) {
|
|
760
755
|
return pieContains(_this4.getPie(i), point);
|
|
761
756
|
});
|
|
762
757
|
} else {
|
|
763
|
-
index = categories.findIndex(function (
|
|
758
|
+
index = categories.findIndex(function (_c, i) {
|
|
764
759
|
return polygonContains(_this4.getPolygon(i), point);
|
|
765
760
|
});
|
|
766
761
|
}
|
|
@@ -790,27 +785,27 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
790
785
|
}, {
|
|
791
786
|
key: "render",
|
|
792
787
|
value: function render() {
|
|
793
|
-
var _this$
|
|
794
|
-
styles = _this$
|
|
795
|
-
type = _this$
|
|
788
|
+
var _this$asProps11 = this.asProps,
|
|
789
|
+
styles = _this$asProps11.styles,
|
|
790
|
+
type = _this$asProps11.type;
|
|
796
791
|
var index = this.state.index;
|
|
797
792
|
var SPieRect = this.Element;
|
|
798
793
|
if (index !== null) {
|
|
799
794
|
if (type === 'circle') {
|
|
800
|
-
var
|
|
795
|
+
var _ref0;
|
|
801
796
|
var _this$getPie = this.getPie(index),
|
|
802
797
|
_this$getPie2 = _slicedToArray(_this$getPie, 3),
|
|
803
798
|
startAngle = _this$getPie2[0],
|
|
804
799
|
endAngle = _this$getPie2[1],
|
|
805
800
|
radius = _this$getPie2[2];
|
|
806
801
|
var circle = arc().innerRadius(0).outerRadius(radius).startAngle(startAngle).endAngle(endAngle);
|
|
807
|
-
return
|
|
802
|
+
return _ref0 = sstyled(styles), /*#__PURE__*/React.createElement(SPieRect, _ref0.cn("SPieRect", {
|
|
808
803
|
"render": 'path',
|
|
809
804
|
"d": circle()
|
|
810
805
|
}));
|
|
811
806
|
} else {
|
|
812
|
-
var
|
|
813
|
-
return
|
|
807
|
+
var _ref1;
|
|
808
|
+
return _ref1 = sstyled(styles), /*#__PURE__*/React.createElement(SPieRect, _ref1.cn("SPieRect", {
|
|
814
809
|
"render": 'path',
|
|
815
810
|
"d": line()(this.getPolygon(index))
|
|
816
811
|
}));
|
|
@@ -819,7 +814,6 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
819
814
|
return null;
|
|
820
815
|
}
|
|
821
816
|
}]);
|
|
822
|
-
return Hover;
|
|
823
817
|
}(Component);
|
|
824
818
|
var Axis = createElement(AxisRoot, {
|
|
825
819
|
Ticks: AxisTicks,
|
|
@@ -831,9 +825,9 @@ var Polygon = createElement(PolygonRoot, {
|
|
|
831
825
|
});
|
|
832
826
|
var RadarTooltip = function RadarTooltip(props) {
|
|
833
827
|
var _ref = arguments[0],
|
|
834
|
-
|
|
828
|
+
_ref10;
|
|
835
829
|
var SRadarTooltip = Tooltip;
|
|
836
|
-
return
|
|
830
|
+
return _ref10 = sstyled(props.styles), /*#__PURE__*/React.createElement(SRadarTooltip, _ref10.cn("SRadarTooltip", _objectSpread({}, _assignProps({
|
|
837
831
|
"tag": Radar.Hover,
|
|
838
832
|
"excludeAnchorProps": true
|
|
839
833
|
}, _ref))));
|