@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/cjs/Radar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
@@ -10,46 +10,48 @@ exports.getLabelOffsetPosition = getLabelOffsetPosition;
|
|
|
10
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var
|
|
13
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
|
+
var _isNativeReflectConstruct2 = _interopRequireDefault(require("@babel/runtime/helpers/isNativeReflectConstruct"));
|
|
15
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
-
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
16
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
18
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
18
19
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
19
20
|
var _core = require("@semcore/core");
|
|
20
|
-
var
|
|
21
|
-
var _uniqueID = _interopRequireDefault(require("@semcore/core/lib/utils/uniqueID"));
|
|
21
|
+
var _canUseDOM = _interopRequireDefault(require("@semcore/core/lib/utils/canUseDOM"));
|
|
22
22
|
var _getOriginChildren = _interopRequireDefault(require("@semcore/core/lib/utils/getOriginChildren"));
|
|
23
23
|
var _rafTrottle = _interopRequireDefault(require("@semcore/core/lib/utils/rafTrottle"));
|
|
24
|
-
var
|
|
24
|
+
var _uniqueID = _interopRequireDefault(require("@semcore/core/lib/utils/uniqueID"));
|
|
25
25
|
var _d3Polygon = require("d3-polygon");
|
|
26
26
|
var _d3Shape = require("d3-shape");
|
|
27
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
27
28
|
var _createElement = _interopRequireDefault(require("./createElement"));
|
|
28
|
-
var _utils = require("./utils");
|
|
29
|
-
var _Tooltip = _interopRequireDefault(require("./Tooltip"));
|
|
30
29
|
var _Pattern = require("./Pattern");
|
|
30
|
+
var _Tooltip = _interopRequireDefault(require("./Tooltip"));
|
|
31
|
+
var _utils = require("./utils");
|
|
32
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
31
33
|
/*!__reshadow-styles__:"./style/radar.shadow.css"*/
|
|
32
|
-
var style = (
|
|
34
|
+
var style = (/*__reshadow_css_start__*/_core.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_"),
|
|
33
35
|
/*__reshadow_css_end__*/
|
|
34
36
|
{
|
|
35
|
-
"__SAxis": "
|
|
36
|
-
"__SAxisLine": "
|
|
37
|
-
"__SAxisTick": "
|
|
38
|
-
"_active": "
|
|
39
|
-
"__SAxisLabel": "
|
|
40
|
-
"_xDirection": "
|
|
41
|
-
"--xDirection": "--
|
|
42
|
-
"_yDirection": "
|
|
43
|
-
"--yDirection": "--
|
|
44
|
-
"__SPolygon": "
|
|
45
|
-
"_color": "
|
|
46
|
-
"--color": "--
|
|
47
|
-
"_pattern": "
|
|
48
|
-
"--pattern": "--
|
|
49
|
-
"__SPolygonDot": "
|
|
50
|
-
"_transparent": "
|
|
51
|
-
"__SPolygonLine": "
|
|
52
|
-
"__SPieRect": "
|
|
37
|
+
"__SAxis": "___SAxis_1isib_gg_",
|
|
38
|
+
"__SAxisLine": "___SAxisLine_1isib_gg_",
|
|
39
|
+
"__SAxisTick": "___SAxisTick_1isib_gg_",
|
|
40
|
+
"_active": "__active_1isib_gg_",
|
|
41
|
+
"__SAxisLabel": "___SAxisLabel_1isib_gg_",
|
|
42
|
+
"_xDirection": "__xDirection_1isib_gg_",
|
|
43
|
+
"--xDirection": "--xDirection_1isib",
|
|
44
|
+
"_yDirection": "__yDirection_1isib_gg_",
|
|
45
|
+
"--yDirection": "--yDirection_1isib",
|
|
46
|
+
"__SPolygon": "___SPolygon_1isib_gg_",
|
|
47
|
+
"_color": "__color_1isib_gg_",
|
|
48
|
+
"--color": "--color_1isib",
|
|
49
|
+
"_pattern": "__pattern_1isib_gg_",
|
|
50
|
+
"--pattern": "--pattern_1isib",
|
|
51
|
+
"__SPolygonDot": "___SPolygonDot_1isib_gg_",
|
|
52
|
+
"_transparent": "__transparent_1isib_gg_",
|
|
53
|
+
"__SPolygonLine": "___SPolygonLine_1isib_gg_",
|
|
54
|
+
"__SPieRect": "___SPieRect_1isib_gg_"
|
|
53
55
|
});
|
|
54
56
|
var clampAngle = function clampAngle(angle) {
|
|
55
57
|
angle = angle % (2 * Math.PI);
|
|
@@ -86,7 +88,7 @@ function computeTextWidth(texts, textSize) {
|
|
|
86
88
|
if (typeof text === 'string') {
|
|
87
89
|
return (0, _utils.measureText)(text, textSize);
|
|
88
90
|
}
|
|
89
|
-
if (
|
|
91
|
+
if (/*#__PURE__*/_react["default"].isValidElement(text)) {
|
|
90
92
|
var _text$props, _text$props2;
|
|
91
93
|
// @ts-ignore
|
|
92
94
|
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);
|
|
@@ -100,19 +102,19 @@ function getTicks(tickSize, radius) {
|
|
|
100
102
|
while (Math.trunc(radius / (tickSize / 2)) > ticks) {
|
|
101
103
|
ticks += 1;
|
|
102
104
|
}
|
|
103
|
-
return (0, _toConsumableArray2["default"])(Array(ticks).keys()).reduce(function (ticks,
|
|
105
|
+
return (0, _toConsumableArray2["default"])(Array(ticks).keys()).reduce(function (ticks, _t, i, total) {
|
|
104
106
|
if (i) ticks.push(i / total.length);
|
|
105
107
|
return ticks;
|
|
106
108
|
}, []);
|
|
107
109
|
}
|
|
108
|
-
function pieContains(
|
|
109
|
-
var
|
|
110
|
-
startAngle =
|
|
111
|
-
endAngle =
|
|
112
|
-
radius =
|
|
113
|
-
var
|
|
114
|
-
x =
|
|
115
|
-
y =
|
|
110
|
+
function pieContains(_ref11, _ref12) {
|
|
111
|
+
var _ref13 = (0, _slicedToArray2["default"])(_ref11, 3),
|
|
112
|
+
startAngle = _ref13[0],
|
|
113
|
+
endAngle = _ref13[1],
|
|
114
|
+
radius = _ref13[2];
|
|
115
|
+
var _ref14 = (0, _slicedToArray2["default"])(_ref12, 2),
|
|
116
|
+
x = _ref14[0],
|
|
117
|
+
y = _ref14[1];
|
|
116
118
|
var distance = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
|
|
117
119
|
if (distance > radius) return false;
|
|
118
120
|
startAngle = clampAngle(startAngle);
|
|
@@ -147,20 +149,19 @@ function getLabelOffsetPosition(xDirection, yDirection, width, height) {
|
|
|
147
149
|
}
|
|
148
150
|
var MINIMUM_OFFSET = 5;
|
|
149
151
|
var RadarRoot = /*#__PURE__*/function (_Component) {
|
|
150
|
-
(0, _inherits2["default"])(RadarRoot, _Component);
|
|
151
|
-
var _super = (0, _createSuper2["default"])(RadarRoot);
|
|
152
152
|
function RadarRoot() {
|
|
153
153
|
var _this;
|
|
154
154
|
(0, _classCallCheck2["default"])(this, RadarRoot);
|
|
155
155
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
156
156
|
args[_key] = arguments[_key];
|
|
157
157
|
}
|
|
158
|
-
_this =
|
|
159
|
-
(0, _defineProperty2["default"])(
|
|
160
|
-
(0, _defineProperty2["default"])(
|
|
158
|
+
_this = _callSuper(this, RadarRoot, [].concat(args));
|
|
159
|
+
(0, _defineProperty2["default"])(_this, "computeOffset", 0);
|
|
160
|
+
(0, _defineProperty2["default"])(_this, "categoriesKey", null);
|
|
161
161
|
return _this;
|
|
162
162
|
}
|
|
163
|
-
(0,
|
|
163
|
+
(0, _inherits2["default"])(RadarRoot, _Component);
|
|
164
|
+
return (0, _createClass2["default"])(RadarRoot, [{
|
|
164
165
|
key: "id",
|
|
165
166
|
get: function get() {
|
|
166
167
|
var _this$asProps = this.asProps,
|
|
@@ -192,8 +193,8 @@ var RadarRoot = /*#__PURE__*/function (_Component) {
|
|
|
192
193
|
}
|
|
193
194
|
}, {
|
|
194
195
|
key: "getPolygonProps",
|
|
195
|
-
value: function getPolygonProps(
|
|
196
|
-
var dataKey =
|
|
196
|
+
value: function getPolygonProps(_ref15, index) {
|
|
197
|
+
var dataKey = _ref15.dataKey;
|
|
197
198
|
var _this$asProps2 = this.asProps,
|
|
198
199
|
data = _this$asProps2.data,
|
|
199
200
|
scale = _this$asProps2.scale,
|
|
@@ -237,7 +238,7 @@ var RadarRoot = /*#__PURE__*/function (_Component) {
|
|
|
237
238
|
this.asProps.dataHintsHandler.establishDataType('indexed-groups');
|
|
238
239
|
var dataKey;
|
|
239
240
|
_react["default"].Children.toArray((0, _getOriginChildren["default"])(Children)).forEach(function (child) {
|
|
240
|
-
if (
|
|
241
|
+
if (/*#__PURE__*/_react["default"].isValidElement(child) && child.type === Radar.Axis) {
|
|
241
242
|
dataKey = child.props.dataKey;
|
|
242
243
|
}
|
|
243
244
|
});
|
|
@@ -257,7 +258,6 @@ var RadarRoot = /*#__PURE__*/function (_Component) {
|
|
|
257
258
|
}));
|
|
258
259
|
}
|
|
259
260
|
}]);
|
|
260
|
-
return RadarRoot;
|
|
261
261
|
}(_core.Component);
|
|
262
262
|
(0, _defineProperty2["default"])(RadarRoot, "displayName", 'Line');
|
|
263
263
|
(0, _defineProperty2["default"])(RadarRoot, "style", style);
|
|
@@ -267,13 +267,12 @@ var RadarRoot = /*#__PURE__*/function (_Component) {
|
|
|
267
267
|
angleOffset: 0
|
|
268
268
|
});
|
|
269
269
|
var PolygonRoot = /*#__PURE__*/function (_Component2) {
|
|
270
|
-
(0, _inherits2["default"])(PolygonRoot, _Component2);
|
|
271
|
-
var _super2 = (0, _createSuper2["default"])(PolygonRoot);
|
|
272
270
|
function PolygonRoot() {
|
|
273
271
|
(0, _classCallCheck2["default"])(this, PolygonRoot);
|
|
274
|
-
return
|
|
272
|
+
return _callSuper(this, PolygonRoot, arguments);
|
|
275
273
|
}
|
|
276
|
-
(0,
|
|
274
|
+
(0, _inherits2["default"])(PolygonRoot, _Component2);
|
|
275
|
+
return (0, _createClass2["default"])(PolygonRoot, [{
|
|
277
276
|
key: "getDotsProps",
|
|
278
277
|
value: function getDotsProps() {
|
|
279
278
|
var _this$asProps4 = this.asProps,
|
|
@@ -342,22 +341,21 @@ var PolygonRoot = /*#__PURE__*/function (_Component2) {
|
|
|
342
341
|
})));
|
|
343
342
|
}
|
|
344
343
|
}]);
|
|
345
|
-
return PolygonRoot;
|
|
346
344
|
}(_core.Component);
|
|
347
345
|
(0, _defineProperty2["default"])(PolygonRoot, "displayName", 'Polygon');
|
|
348
346
|
(0, _defineProperty2["default"])(PolygonRoot, "style", style);
|
|
349
|
-
(0, _defineProperty2["default"])(PolygonRoot, "defaultProps", function (
|
|
350
|
-
var scale =
|
|
351
|
-
|
|
352
|
-
curve =
|
|
353
|
-
size =
|
|
354
|
-
offset =
|
|
355
|
-
angleOffset =
|
|
347
|
+
(0, _defineProperty2["default"])(PolygonRoot, "defaultProps", function (_ref20) {
|
|
348
|
+
var scale = _ref20.scale,
|
|
349
|
+
_ref20$curve = _ref20.curve,
|
|
350
|
+
curve = _ref20$curve === void 0 ? _d3Shape.curveLinearClosed : _ref20$curve,
|
|
351
|
+
size = _ref20.size,
|
|
352
|
+
offset = _ref20.offset,
|
|
353
|
+
angleOffset = _ref20.angleOffset;
|
|
356
354
|
scale.range([0, Math.min(size[0], size[1]) / 2 - offset]);
|
|
357
355
|
return {
|
|
358
356
|
d3: (0, _d3Shape.lineRadial)().curve(curve).radius(function (d) {
|
|
359
357
|
return scale(d || 0);
|
|
360
|
-
}).angle(function (
|
|
358
|
+
}).angle(function (_d, i, data) {
|
|
361
359
|
return i / data.length * 2 * Math.PI - angleOffset;
|
|
362
360
|
})
|
|
363
361
|
};
|
|
@@ -430,41 +428,40 @@ function PolygonDots(props) {
|
|
|
430
428
|
});
|
|
431
429
|
}
|
|
432
430
|
var AxisRoot = /*#__PURE__*/function (_Component3) {
|
|
433
|
-
(0, _inherits2["default"])(AxisRoot, _Component3);
|
|
434
|
-
var _super3 = (0, _createSuper2["default"])(AxisRoot);
|
|
435
431
|
function AxisRoot() {
|
|
436
432
|
var _this2;
|
|
437
433
|
(0, _classCallCheck2["default"])(this, AxisRoot);
|
|
438
434
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
439
435
|
args[_key2] = arguments[_key2];
|
|
440
436
|
}
|
|
441
|
-
_this2 =
|
|
442
|
-
(0, _defineProperty2["default"])(
|
|
443
|
-
(0, _defineProperty2["default"])(
|
|
437
|
+
_this2 = _callSuper(this, AxisRoot, [].concat(args));
|
|
438
|
+
(0, _defineProperty2["default"])(_this2, "unsubscribeTooltipVisible", null);
|
|
439
|
+
(0, _defineProperty2["default"])(_this2, "state", {
|
|
444
440
|
activeLineIndex: null
|
|
445
441
|
});
|
|
446
|
-
(0, _defineProperty2["default"])(
|
|
447
|
-
var index =
|
|
442
|
+
(0, _defineProperty2["default"])(_this2, "handleTooltipRenderingProps", function (_anchorProps, _ref16) {
|
|
443
|
+
var index = _ref16.index;
|
|
448
444
|
_this2.setState({
|
|
449
445
|
activeLineIndex: index
|
|
450
446
|
});
|
|
451
447
|
});
|
|
452
448
|
return _this2;
|
|
453
449
|
}
|
|
454
|
-
(0,
|
|
450
|
+
(0, _inherits2["default"])(AxisRoot, _Component3);
|
|
451
|
+
return (0, _createClass2["default"])(AxisRoot, [{
|
|
455
452
|
key: "createLineRadial",
|
|
456
453
|
value: function createLineRadial(radius, total) {
|
|
457
454
|
return (0, _d3Shape.lineRadial)().curve(_d3Shape.curveLinearClosed).radius(function () {
|
|
458
455
|
return radius;
|
|
459
|
-
}).angle(function (
|
|
456
|
+
}).angle(function (_d, i) {
|
|
460
457
|
return i / total * 2 * Math.PI;
|
|
461
458
|
});
|
|
462
459
|
}
|
|
463
460
|
}, {
|
|
464
461
|
key: "getTicksProps",
|
|
465
|
-
value: function getTicksProps(
|
|
466
|
-
var
|
|
467
|
-
tickSize =
|
|
462
|
+
value: function getTicksProps(_ref17) {
|
|
463
|
+
var _ref17$tickSize = _ref17.tickSize,
|
|
464
|
+
tickSize = _ref17$tickSize === void 0 ? 100 : _ref17$tickSize;
|
|
468
465
|
var _this$asProps7 = this.asProps,
|
|
469
466
|
data = _this$asProps7.data,
|
|
470
467
|
offset = _this$asProps7.offset,
|
|
@@ -483,9 +480,9 @@ var AxisRoot = /*#__PURE__*/function (_Component3) {
|
|
|
483
480
|
}
|
|
484
481
|
}, {
|
|
485
482
|
key: "getLabelsProps",
|
|
486
|
-
value: function getLabelsProps(
|
|
487
|
-
var
|
|
488
|
-
labelOffset =
|
|
483
|
+
value: function getLabelsProps(_ref18) {
|
|
484
|
+
var _ref18$labelOffset = _ref18.labelOffset,
|
|
485
|
+
labelOffset = _ref18$labelOffset === void 0 ? 10 : _ref18$labelOffset;
|
|
489
486
|
var _this$asProps8 = this.asProps,
|
|
490
487
|
offset = _this$asProps8.offset,
|
|
491
488
|
categories = _this$asProps8.categories,
|
|
@@ -508,7 +505,7 @@ var AxisRoot = /*#__PURE__*/function (_Component3) {
|
|
|
508
505
|
key: "componentWillUnmount",
|
|
509
506
|
value: function componentWillUnmount() {
|
|
510
507
|
var _this$unsubscribeTool;
|
|
511
|
-
(_this$unsubscribeTool = this.unsubscribeTooltipVisible) === null || _this$unsubscribeTool === void 0
|
|
508
|
+
(_this$unsubscribeTool = this.unsubscribeTooltipVisible) === null || _this$unsubscribeTool === void 0 || _this$unsubscribeTool.call(this);
|
|
512
509
|
}
|
|
513
510
|
}, {
|
|
514
511
|
key: "render",
|
|
@@ -533,7 +530,7 @@ var AxisRoot = /*#__PURE__*/function (_Component3) {
|
|
|
533
530
|
})) : /*#__PURE__*/_react["default"].createElement(SAxis, _ref7.cn("SAxis", {
|
|
534
531
|
"render": 'path',
|
|
535
532
|
"d": this.createLineRadial(radius, total)(categories)
|
|
536
|
-
})), categories.map(function (
|
|
533
|
+
})), categories.map(function (_category, i) {
|
|
537
534
|
var _getRadianPosition3 = getRadianPosition(i, radius, total, angleOffset),
|
|
538
535
|
_getRadianPosition4 = (0, _slicedToArray2["default"])(_getRadianPosition3, 2),
|
|
539
536
|
x = _getRadianPosition4[0],
|
|
@@ -553,13 +550,12 @@ var AxisRoot = /*#__PURE__*/function (_Component3) {
|
|
|
553
550
|
}));
|
|
554
551
|
}
|
|
555
552
|
}]);
|
|
556
|
-
return AxisRoot;
|
|
557
553
|
}(_core.Component);
|
|
558
554
|
(0, _defineProperty2["default"])(AxisRoot, "displayName", 'Polygon');
|
|
559
555
|
(0, _defineProperty2["default"])(AxisRoot, "style", style);
|
|
560
|
-
(0, _defineProperty2["default"])(AxisRoot, "defaultProps", function (
|
|
561
|
-
var data =
|
|
562
|
-
dataKey =
|
|
556
|
+
(0, _defineProperty2["default"])(AxisRoot, "defaultProps", function (_ref21) {
|
|
557
|
+
var data = _ref21.data,
|
|
558
|
+
dataKey = _ref21.dataKey;
|
|
563
559
|
var categories = data[dataKey];
|
|
564
560
|
return {
|
|
565
561
|
categories: categories
|
|
@@ -631,13 +627,13 @@ function AxisLabels(props) {
|
|
|
631
627
|
}, lineText);
|
|
632
628
|
}));
|
|
633
629
|
}
|
|
634
|
-
if (
|
|
630
|
+
if (/*#__PURE__*/_react["default"].isValidElement(category)) {
|
|
635
631
|
var _category$props;
|
|
636
|
-
var
|
|
637
|
-
|
|
638
|
-
width =
|
|
639
|
-
|
|
640
|
-
height =
|
|
632
|
+
var _ref19 = (_category$props = category === null || category === void 0 ? void 0 : category.props) !== null && _category$props !== void 0 ? _category$props : {},
|
|
633
|
+
_ref19$width = _ref19.width,
|
|
634
|
+
width = _ref19$width === void 0 ? 0 : _ref19$width,
|
|
635
|
+
_ref19$height = _ref19.height,
|
|
636
|
+
height = _ref19$height === void 0 ? 0 : _ref19$height;
|
|
641
637
|
var _getLabelOffsetPositi = getLabelOffsetPosition(xDirection, yDirection, width, height),
|
|
642
638
|
_getLabelOffsetPositi2 = (0, _slicedToArray2["default"])(_getLabelOffsetPositi, 2),
|
|
643
639
|
xOffset = _getLabelOffsetPositi2[0],
|
|
@@ -651,22 +647,20 @@ function AxisLabels(props) {
|
|
|
651
647
|
});
|
|
652
648
|
}
|
|
653
649
|
var Hover = /*#__PURE__*/function (_Component4) {
|
|
654
|
-
(0, _inherits2["default"])(Hover, _Component4);
|
|
655
|
-
var _super4 = (0, _createSuper2["default"])(Hover);
|
|
656
650
|
function Hover() {
|
|
657
651
|
var _this3;
|
|
658
652
|
(0, _classCallCheck2["default"])(this, Hover);
|
|
659
653
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
660
654
|
args[_key3] = arguments[_key3];
|
|
661
655
|
}
|
|
662
|
-
_this3 =
|
|
663
|
-
(0, _defineProperty2["default"])(
|
|
656
|
+
_this3 = _callSuper(this, Hover, [].concat(args));
|
|
657
|
+
(0, _defineProperty2["default"])(_this3, "state", {
|
|
664
658
|
index: null
|
|
665
659
|
});
|
|
666
|
-
(0, _defineProperty2["default"])(
|
|
667
|
-
(0, _defineProperty2["default"])(
|
|
668
|
-
(0, _defineProperty2["default"])(
|
|
669
|
-
(0, _defineProperty2["default"])(
|
|
660
|
+
(0, _defineProperty2["default"])(_this3, "virtualElement", (0, _canUseDOM["default"])() ? document.createElement('div') : {});
|
|
661
|
+
(0, _defineProperty2["default"])(_this3, "unsubscribeMouseMoveRoot", null);
|
|
662
|
+
(0, _defineProperty2["default"])(_this3, "unsubscribeMouseLeaveRoot", null);
|
|
663
|
+
(0, _defineProperty2["default"])(_this3, "handlerMouseMoveRoot", (0, _rafTrottle["default"])(function (e) {
|
|
670
664
|
var _this3$asProps = _this3.asProps,
|
|
671
665
|
eventEmitter = _this3$asProps.eventEmitter,
|
|
672
666
|
size = _this3$asProps.size,
|
|
@@ -690,7 +684,7 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
690
684
|
eventEmitter.emit('setTooltipVisible', index !== null);
|
|
691
685
|
});
|
|
692
686
|
}));
|
|
693
|
-
(0, _defineProperty2["default"])(
|
|
687
|
+
(0, _defineProperty2["default"])(_this3, "handlerMouseLeaveRoot", (0, _rafTrottle["default"])(function () {
|
|
694
688
|
_this3.setState({
|
|
695
689
|
index: null
|
|
696
690
|
}, function () {
|
|
@@ -699,7 +693,8 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
699
693
|
}));
|
|
700
694
|
return _this3;
|
|
701
695
|
}
|
|
702
|
-
(0,
|
|
696
|
+
(0, _inherits2["default"])(Hover, _Component4);
|
|
697
|
+
return (0, _createClass2["default"])(Hover, [{
|
|
703
698
|
key: "generateGetBoundingClientRect",
|
|
704
699
|
value: function generateGetBoundingClientRect() {
|
|
705
700
|
var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
@@ -718,11 +713,11 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
718
713
|
}, {
|
|
719
714
|
key: "getPolygon",
|
|
720
715
|
value: function getPolygon(index) {
|
|
721
|
-
var _this$
|
|
722
|
-
categories = _this$
|
|
723
|
-
size = _this$
|
|
724
|
-
offset = _this$
|
|
725
|
-
angleOffset = _this$
|
|
716
|
+
var _this$asProps0 = this.asProps,
|
|
717
|
+
categories = _this$asProps0.categories,
|
|
718
|
+
size = _this$asProps0.size,
|
|
719
|
+
offset = _this$asProps0.offset,
|
|
720
|
+
angleOffset = _this$asProps0.angleOffset;
|
|
726
721
|
var total = categories.length;
|
|
727
722
|
var diam = Math.min(size[0], size[1]);
|
|
728
723
|
var radius = diam / 2 - offset;
|
|
@@ -733,23 +728,23 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
733
728
|
prevX1 = _getRadianPosition8[0],
|
|
734
729
|
prevY1 = _getRadianPosition8[1];
|
|
735
730
|
var _getRadianPosition9 = getRadianPosition(index, radius, total, angleOffset),
|
|
736
|
-
|
|
737
|
-
x =
|
|
738
|
-
y =
|
|
739
|
-
var
|
|
740
|
-
|
|
741
|
-
nextX1 =
|
|
742
|
-
nextY1 =
|
|
731
|
+
_getRadianPosition0 = (0, _slicedToArray2["default"])(_getRadianPosition9, 2),
|
|
732
|
+
x = _getRadianPosition0[0],
|
|
733
|
+
y = _getRadianPosition0[1];
|
|
734
|
+
var _getRadianPosition1 = getRadianPosition(nextIndex, radius, total, angleOffset),
|
|
735
|
+
_getRadianPosition10 = (0, _slicedToArray2["default"])(_getRadianPosition1, 2),
|
|
736
|
+
nextX1 = _getRadianPosition10[0],
|
|
737
|
+
nextY1 = _getRadianPosition10[1];
|
|
743
738
|
return [[0, 0], [(prevX1 + x) / 2, (prevY1 + y) / 2], [x, y], [(nextX1 + x) / 2, (nextY1 + y) / 2]];
|
|
744
739
|
}
|
|
745
740
|
}, {
|
|
746
741
|
key: "getPie",
|
|
747
742
|
value: function getPie(index) {
|
|
748
|
-
var _this$
|
|
749
|
-
categories = _this$
|
|
750
|
-
size = _this$
|
|
751
|
-
offset = _this$
|
|
752
|
-
angleOffset = _this$
|
|
743
|
+
var _this$asProps1 = this.asProps,
|
|
744
|
+
categories = _this$asProps1.categories,
|
|
745
|
+
size = _this$asProps1.size,
|
|
746
|
+
offset = _this$asProps1.offset,
|
|
747
|
+
angleOffset = _this$asProps1.angleOffset;
|
|
753
748
|
var angle = Math.PI * 2 / categories.length;
|
|
754
749
|
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
755
750
|
return [index * angle - angle / 2 - angleOffset, (index + 1) * angle - angle / 2 - angleOffset, radius];
|
|
@@ -758,16 +753,16 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
758
753
|
key: "getIndex",
|
|
759
754
|
value: function getIndex(point) {
|
|
760
755
|
var _this4 = this;
|
|
761
|
-
var _this$
|
|
762
|
-
categories = _this$
|
|
763
|
-
type = _this$
|
|
756
|
+
var _this$asProps10 = this.asProps,
|
|
757
|
+
categories = _this$asProps10.categories,
|
|
758
|
+
type = _this$asProps10.type;
|
|
764
759
|
var index;
|
|
765
760
|
if (type === 'circle') {
|
|
766
|
-
index = categories.findIndex(function (
|
|
761
|
+
index = categories.findIndex(function (_c, i) {
|
|
767
762
|
return pieContains(_this4.getPie(i), point);
|
|
768
763
|
});
|
|
769
764
|
} else {
|
|
770
|
-
index = categories.findIndex(function (
|
|
765
|
+
index = categories.findIndex(function (_c, i) {
|
|
771
766
|
return (0, _d3Polygon.polygonContains)(_this4.getPolygon(i), point);
|
|
772
767
|
});
|
|
773
768
|
}
|
|
@@ -797,27 +792,27 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
797
792
|
}, {
|
|
798
793
|
key: "render",
|
|
799
794
|
value: function render() {
|
|
800
|
-
var _this$
|
|
801
|
-
styles = _this$
|
|
802
|
-
type = _this$
|
|
795
|
+
var _this$asProps11 = this.asProps,
|
|
796
|
+
styles = _this$asProps11.styles,
|
|
797
|
+
type = _this$asProps11.type;
|
|
803
798
|
var index = this.state.index;
|
|
804
799
|
var SPieRect = this.Element;
|
|
805
800
|
if (index !== null) {
|
|
806
801
|
if (type === 'circle') {
|
|
807
|
-
var
|
|
802
|
+
var _ref0;
|
|
808
803
|
var _this$getPie = this.getPie(index),
|
|
809
804
|
_this$getPie2 = (0, _slicedToArray2["default"])(_this$getPie, 3),
|
|
810
805
|
startAngle = _this$getPie2[0],
|
|
811
806
|
endAngle = _this$getPie2[1],
|
|
812
807
|
radius = _this$getPie2[2];
|
|
813
808
|
var circle = (0, _d3Shape.arc)().innerRadius(0).outerRadius(radius).startAngle(startAngle).endAngle(endAngle);
|
|
814
|
-
return
|
|
809
|
+
return _ref0 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SPieRect, _ref0.cn("SPieRect", {
|
|
815
810
|
"render": 'path',
|
|
816
811
|
"d": circle()
|
|
817
812
|
}));
|
|
818
813
|
} else {
|
|
819
|
-
var
|
|
820
|
-
return
|
|
814
|
+
var _ref1;
|
|
815
|
+
return _ref1 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SPieRect, _ref1.cn("SPieRect", {
|
|
821
816
|
"render": 'path',
|
|
822
817
|
"d": (0, _d3Shape.line)()(this.getPolygon(index))
|
|
823
818
|
}));
|
|
@@ -826,7 +821,6 @@ var Hover = /*#__PURE__*/function (_Component4) {
|
|
|
826
821
|
return null;
|
|
827
822
|
}
|
|
828
823
|
}]);
|
|
829
|
-
return Hover;
|
|
830
824
|
}(_core.Component);
|
|
831
825
|
var Axis = (0, _createElement["default"])(AxisRoot, {
|
|
832
826
|
Ticks: AxisTicks,
|
|
@@ -838,9 +832,9 @@ var Polygon = (0, _createElement["default"])(PolygonRoot, {
|
|
|
838
832
|
});
|
|
839
833
|
var RadarTooltip = function RadarTooltip(props) {
|
|
840
834
|
var _ref = arguments[0],
|
|
841
|
-
|
|
835
|
+
_ref10;
|
|
842
836
|
var SRadarTooltip = _Tooltip["default"];
|
|
843
|
-
return
|
|
837
|
+
return _ref10 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SRadarTooltip, _ref10.cn("SRadarTooltip", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
844
838
|
"tag": Radar.Hover,
|
|
845
839
|
"excludeAnchorProps": true
|
|
846
840
|
}, _ref))));
|
|
@@ -851,6 +845,5 @@ var Radar = (0, _createElement["default"])(RadarRoot, {
|
|
|
851
845
|
Hover: Hover,
|
|
852
846
|
Tooltip: [RadarTooltip, _Tooltip["default"]._______childrenComponents]
|
|
853
847
|
});
|
|
854
|
-
var _default = Radar;
|
|
855
|
-
exports["default"] = _default;
|
|
848
|
+
var _default = exports["default"] = Radar;
|
|
856
849
|
//# sourceMappingURL=Radar.js.map
|