@semcore/d3-chart 3.61.0-prerelease.4 → 3.61.0-prerelease.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/AnimatedClipPath.js +11 -15
- package/lib/cjs/AnimatedClipPath.js.map +1 -1
- package/lib/cjs/Area.js +71 -48
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +170 -108
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +29 -34
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +211 -137
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +92 -82
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +154 -139
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +55 -38
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +15 -18
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +29 -34
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +52 -45
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +63 -41
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Pattern.js +16 -12
- package/lib/cjs/Pattern.js.map +1 -1
- package/lib/cjs/Plot.js +29 -36
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +281 -261
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +169 -154
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/Reference.js +45 -51
- package/lib/cjs/Reference.js.map +1 -1
- package/lib/cjs/ResponsiveContainer.js +20 -25
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +71 -61
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/StackBar.js +20 -31
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +12 -16
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +73 -73
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +77 -52
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/DataAccessibilityTable.js +2 -3
- package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +43 -86
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +44 -19
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/a11y/bezier.js +1 -2
- package/lib/cjs/a11y/bezier.js.map +1 -1
- package/lib/cjs/a11y/focus.js +5 -6
- package/lib/cjs/a11y/focus.js.map +1 -1
- package/lib/cjs/a11y/hints.js +6 -9
- package/lib/cjs/a11y/hints.js.map +1 -1
- package/lib/cjs/a11y/insights.js +63 -64
- package/lib/cjs/a11y/insights.js.map +1 -1
- package/lib/cjs/a11y/intl.js +1 -2
- package/lib/cjs/a11y/intl.js.map +1 -1
- package/lib/cjs/a11y/locale.js +5 -5
- package/lib/cjs/a11y/locale.js.map +1 -1
- package/lib/cjs/a11y/serialize.js +15 -17
- package/lib/cjs/a11y/serialize.js.map +1 -1
- package/lib/cjs/a11y/summarize.js +1 -2
- package/lib/cjs/a11y/summarize.js.map +1 -1
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/a11y/translations/module/de.json +2 -2
- package/lib/cjs/a11y/translations/module/en.json +2 -2
- package/lib/cjs/a11y/translations/module/es.json +2 -2
- package/lib/cjs/a11y/translations/module/fr.json +2 -2
- package/lib/cjs/a11y/translations/module/it.json +2 -2
- package/lib/cjs/a11y/translations/module/ja.json +2 -2
- package/lib/cjs/a11y/translations/module/ko.json +2 -2
- package/lib/cjs/a11y/translations/module/nl.json +2 -2
- package/lib/cjs/a11y/translations/module/pl.json +2 -2
- package/lib/cjs/a11y/translations/module/pt.json +2 -2
- package/lib/cjs/a11y/translations/module/sv.json +2 -2
- package/lib/cjs/a11y/translations/module/tr.json +2 -2
- package/lib/cjs/a11y/translations/module/vi.json +2 -2
- package/lib/cjs/a11y/translations/module/zh.json +2 -2
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/color.js +2 -3
- package/lib/cjs/color.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.js +157 -83
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.js +24 -51
- package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.js +85 -69
- package/lib/cjs/component/Chart/BarChart.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.js +31 -27
- package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.js +340 -147
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +11 -15
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.js +16 -22
- package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.js +16 -44
- package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.js +22 -48
- package/lib/cjs/component/Chart/LineChart.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.js +15 -19
- package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.js +16 -21
- package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.js +16 -19
- package/lib/cjs/component/Chart/VennChart.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/index.js +7 -8
- package/lib/cjs/component/Chart/index.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +45 -23
- package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +19 -24
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +108 -83
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -2
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +18 -23
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/index.js +1 -2
- package/lib/cjs/component/ChartLegend/index.js.map +1 -1
- package/lib/cjs/component/Cigarette/Cigarette.js +16 -20
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js +19 -24
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
- package/lib/cjs/component/SvgElement.js +21 -0
- package/lib/cjs/component/SvgElement.js.map +1 -0
- package/lib/cjs/createElement.d.js.map +1 -1
- package/lib/cjs/createElement.js +10 -12
- package/lib/cjs/createElement.js.map +1 -1
- package/lib/cjs/index.js +9 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/abstract-chart.shadow.css +12 -0
- package/lib/cjs/style/axis.shadow.css +39 -1
- package/lib/cjs/style/bubble.shadow.css +8 -0
- package/lib/cjs/style/hover.shadow.css +2 -2
- package/lib/cjs/style/plot.shadow.css +8 -6
- package/lib/cjs/style/plotA11yModule.shadow.css +10 -11
- package/lib/cjs/style/plotA11yView.shadow.css +13 -26
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/translations/de.json +1 -0
- package/lib/cjs/translations/es.json +1 -0
- package/lib/cjs/translations/fr.json +1 -0
- package/lib/cjs/translations/it.json +1 -0
- package/lib/cjs/translations/ja.json +1 -0
- package/lib/cjs/translations/ko.json +1 -0
- package/lib/cjs/translations/nl.json +1 -0
- package/lib/cjs/translations/pl.json +1 -0
- package/lib/cjs/translations/pt.json +1 -0
- package/lib/cjs/translations/sv.json +1 -0
- package/lib/cjs/translations/tr.json +2 -1
- package/lib/cjs/translations/vi.json +1 -0
- package/lib/cjs/translations/zh.json +1 -0
- package/lib/cjs/types/Area.d.js.map +1 -1
- package/lib/cjs/types/Axis.d.js.map +1 -1
- package/lib/cjs/types/Bar.d.js.map +1 -1
- package/lib/cjs/types/Bubble.d.js.map +1 -1
- package/lib/cjs/types/ClipPath.d.js.map +1 -1
- package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Donut.d.js.map +1 -1
- package/lib/cjs/types/GroupBar.d.js.map +1 -1
- package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Hover.d.js.map +1 -1
- package/lib/cjs/types/Line.d.js.map +1 -1
- package/lib/cjs/types/Plot.d.js.map +1 -1
- package/lib/cjs/types/Radar.d.js.map +1 -1
- package/lib/cjs/types/Reference.d.js.map +1 -1
- package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/cjs/types/ScatterPlot.d.js.map +1 -1
- package/lib/cjs/types/StackBar.d.js.map +1 -1
- package/lib/cjs/types/StackedArea.d.js.map +1 -1
- package/lib/cjs/types/Tooltip.d.js.map +1 -1
- package/lib/cjs/types/Venn.d.js.map +1 -1
- package/lib/cjs/types/context.d.js.map +1 -1
- package/lib/cjs/types/index.d.js +14 -2
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js +36 -55
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/AnimatedClipPath.js +9 -11
- package/lib/es6/AnimatedClipPath.js.map +1 -1
- package/lib/es6/Area.js +70 -45
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +168 -104
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +27 -29
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +211 -135
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +89 -77
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +154 -137
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +55 -36
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +13 -15
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +27 -29
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +51 -41
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +61 -37
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Pattern.js +7 -3
- package/lib/es6/Pattern.js.map +1 -1
- package/lib/es6/Plot.js +28 -32
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +279 -257
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +168 -151
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/Reference.js +43 -45
- package/lib/es6/Reference.js.map +1 -1
- package/lib/es6/ResponsiveContainer.js +16 -19
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +71 -59
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/StackBar.js +17 -27
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +10 -13
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +68 -65
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +75 -48
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +43 -86
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +43 -16
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/a11y/bezier.js.map +1 -1
- package/lib/es6/a11y/focus.js +4 -4
- package/lib/es6/a11y/focus.js.map +1 -1
- package/lib/es6/a11y/hints.js +2 -2
- package/lib/es6/a11y/hints.js.map +1 -1
- package/lib/es6/a11y/insights.js +61 -61
- package/lib/es6/a11y/insights.js.map +1 -1
- package/lib/es6/a11y/intl.js.map +1 -1
- package/lib/es6/a11y/locale.js +3 -2
- package/lib/es6/a11y/locale.js.map +1 -1
- package/lib/es6/a11y/serialize.js +14 -13
- package/lib/es6/a11y/serialize.js.map +1 -1
- package/lib/es6/a11y/summarize.js.map +1 -1
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/a11y/translations/module/de.json +2 -2
- package/lib/es6/a11y/translations/module/en.json +2 -2
- package/lib/es6/a11y/translations/module/es.json +2 -2
- package/lib/es6/a11y/translations/module/fr.json +2 -2
- package/lib/es6/a11y/translations/module/it.json +2 -2
- package/lib/es6/a11y/translations/module/ja.json +2 -2
- package/lib/es6/a11y/translations/module/ko.json +2 -2
- package/lib/es6/a11y/translations/module/nl.json +2 -2
- package/lib/es6/a11y/translations/module/pl.json +2 -2
- package/lib/es6/a11y/translations/module/pt.json +2 -2
- package/lib/es6/a11y/translations/module/sv.json +2 -2
- package/lib/es6/a11y/translations/module/tr.json +2 -2
- package/lib/es6/a11y/translations/module/vi.json +2 -2
- package/lib/es6/a11y/translations/module/zh.json +2 -2
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/color.js +1 -1
- package/lib/es6/color.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.js +159 -80
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.js +23 -48
- package/lib/es6/component/Chart/AreaChart.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.js +84 -67
- package/lib/es6/component/Chart/BarChart.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.js +30 -24
- package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.js +341 -144
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js +9 -12
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.js +14 -18
- package/lib/es6/component/Chart/DonutChart.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.js +15 -41
- package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.js +20 -45
- package/lib/es6/component/Chart/LineChart.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.js +13 -16
- package/lib/es6/component/Chart/RadarChart.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.js +15 -18
- package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.js +14 -16
- package/lib/es6/component/Chart/VennChart.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
- package/lib/es6/component/Chart/index.js +6 -6
- package/lib/es6/component/Chart/index.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +43 -20
- package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +17 -19
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +102 -74
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +15 -17
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/index.js.map +1 -1
- package/lib/es6/component/Cigarette/Cigarette.js +14 -17
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.js +17 -21
- package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
- package/lib/es6/component/SvgElement.js +14 -0
- package/lib/es6/component/SvgElement.js.map +1 -0
- package/lib/es6/createElement.d.js.map +1 -1
- package/lib/es6/createElement.js +7 -7
- package/lib/es6/createElement.js.map +1 -1
- package/lib/es6/index.js +1 -0
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/abstract-chart.shadow.css +12 -0
- package/lib/es6/style/axis.shadow.css +39 -1
- package/lib/es6/style/bubble.shadow.css +8 -0
- package/lib/es6/style/hover.shadow.css +2 -2
- package/lib/es6/style/plot.shadow.css +8 -6
- package/lib/es6/style/plotA11yModule.shadow.css +10 -11
- package/lib/es6/style/plotA11yView.shadow.css +13 -26
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/translations/de.json +1 -0
- package/lib/es6/translations/es.json +1 -0
- package/lib/es6/translations/fr.json +1 -0
- package/lib/es6/translations/it.json +1 -0
- package/lib/es6/translations/ja.json +1 -0
- package/lib/es6/translations/ko.json +1 -0
- package/lib/es6/translations/nl.json +1 -0
- package/lib/es6/translations/pl.json +1 -0
- package/lib/es6/translations/pt.json +1 -0
- package/lib/es6/translations/sv.json +1 -0
- package/lib/es6/translations/tr.json +2 -1
- package/lib/es6/translations/vi.json +1 -0
- package/lib/es6/translations/zh.json +1 -0
- package/lib/es6/types/Area.d.js.map +1 -1
- package/lib/es6/types/Axis.d.js.map +1 -1
- package/lib/es6/types/Bar.d.js.map +1 -1
- package/lib/es6/types/Bubble.d.js.map +1 -1
- package/lib/es6/types/ClipPath.d.js.map +1 -1
- package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Donut.d.js.map +1 -1
- package/lib/es6/types/GroupBar.d.js.map +1 -1
- package/lib/es6/types/HorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Hover.d.js.map +1 -1
- package/lib/es6/types/Line.d.js.map +1 -1
- package/lib/es6/types/Plot.d.js.map +1 -1
- package/lib/es6/types/Radar.d.js.map +1 -1
- package/lib/es6/types/Reference.d.js.map +1 -1
- package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/es6/types/ScatterPlot.d.js.map +1 -1
- package/lib/es6/types/StackBar.d.js.map +1 -1
- package/lib/es6/types/StackedArea.d.js.map +1 -1
- package/lib/es6/types/Tooltip.d.js.map +1 -1
- package/lib/es6/types/Venn.d.js.map +1 -1
- package/lib/es6/types/context.d.js.map +1 -1
- package/lib/es6/types/index.d.js +2 -0
- package/lib/es6/types/index.d.js.map +1 -1
- package/lib/es6/utils.js +16 -16
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/AnimatedClipPath.mjs +9 -16
- package/lib/esm/Area.mjs +51 -36
- package/lib/esm/Axis.mjs +143 -86
- package/lib/esm/Bar.mjs +31 -34
- package/lib/esm/Bubble.mjs +154 -106
- package/lib/esm/CompactHorizontalBar.mjs +88 -80
- package/lib/esm/Donut.mjs +87 -75
- package/lib/esm/Dots.mjs +50 -34
- package/lib/esm/GroupBar.mjs +12 -14
- package/lib/esm/HorizontalBar.mjs +31 -34
- package/lib/esm/Hover.mjs +53 -50
- package/lib/esm/Line.mjs +45 -31
- package/lib/esm/Pattern.mjs +4 -2
- package/lib/esm/Plot.mjs +30 -35
- package/lib/esm/Radar.mjs +188 -175
- package/lib/esm/RadialTree.mjs +105 -111
- package/lib/esm/Reference.mjs +37 -40
- package/lib/esm/ResponsiveContainer.mjs +18 -21
- package/lib/esm/ScatterPlot.mjs +49 -40
- package/lib/esm/StackBar.mjs +18 -28
- package/lib/esm/StackedArea.mjs +13 -16
- package/lib/esm/Tooltip.mjs +56 -59
- package/lib/esm/Venn.mjs +67 -47
- package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -2
- package/lib/esm/a11y/PlotA11yModule.mjs +35 -74
- package/lib/esm/a11y/PlotA11yView.mjs +41 -17
- package/lib/esm/a11y/focus.mjs +4 -4
- package/lib/esm/a11y/hints.mjs +2 -2
- package/lib/esm/a11y/insights.mjs +76 -76
- package/lib/esm/a11y/locale.mjs +2 -2
- package/lib/esm/a11y/serialize.mjs +12 -12
- package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/a11y/translations/module/de.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/en.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/es.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/fr.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/it.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/ja.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/ko.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/nl.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/pl.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/pt.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/sv.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/tr.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/vi.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/zh.json.mjs +2 -4
- package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/component/Chart/AbstractChart.mjs +141 -65
- package/lib/esm/component/Chart/AreaChart.mjs +27 -51
- package/lib/esm/component/Chart/BarChart.mjs +64 -51
- package/lib/esm/component/Chart/BubbleChart.mjs +30 -25
- package/lib/esm/component/Chart/CigaretteChart.mjs +298 -119
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +13 -15
- package/lib/esm/component/Chart/DonutChart.mjs +16 -19
- package/lib/esm/component/Chart/HistogramChart.mjs +22 -46
- package/lib/esm/component/Chart/LineChart.mjs +23 -46
- package/lib/esm/component/Chart/RadarChart.mjs +16 -18
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +18 -21
- package/lib/esm/component/Chart/VennChart.mjs +16 -19
- package/lib/esm/component/Chart/index.mjs +6 -6
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +45 -22
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +19 -22
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +88 -75
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +22 -25
- package/lib/esm/component/ChartLegend/index.mjs +2 -0
- package/lib/esm/component/Cigarette/Cigarette.mjs +16 -19
- package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +18 -22
- package/lib/esm/component/SvgElement.mjs +14 -0
- package/lib/esm/createElement.mjs +8 -10
- package/lib/esm/index.mjs +3 -0
- package/lib/esm/style/abstract-chart.shadow.css +12 -0
- package/lib/esm/style/axis.shadow.css +39 -1
- package/lib/esm/style/bubble.shadow.css +8 -0
- package/lib/esm/style/hover.shadow.css +2 -2
- package/lib/esm/style/plot.shadow.css +8 -6
- package/lib/esm/style/plotA11yModule.shadow.css +10 -11
- package/lib/esm/style/plotA11yView.shadow.css +13 -26
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/translations/es.json.mjs +1 -0
- package/lib/esm/translations/fr.json.mjs +1 -0
- package/lib/esm/translations/it.json.mjs +1 -0
- package/lib/esm/translations/ja.json.mjs +1 -0
- package/lib/esm/translations/ko.json.mjs +1 -0
- package/lib/esm/translations/nl.json.mjs +1 -0
- package/lib/esm/translations/pl.json.mjs +1 -0
- package/lib/esm/translations/pt.json.mjs +1 -0
- package/lib/esm/translations/sv.json.mjs +1 -0
- package/lib/esm/translations/tr.json.mjs +2 -1
- package/lib/esm/translations/vi.json.mjs +1 -0
- package/lib/esm/translations/zh.json.mjs +1 -0
- package/lib/esm/utils.mjs +11 -11
- package/lib/types/Area.d.ts +9 -6
- package/lib/types/Axis.d.ts +10 -3
- package/lib/types/Bar.d.ts +7 -6
- package/lib/types/Bubble.d.ts +21 -5
- package/lib/types/ClipPath.d.ts +4 -3
- package/lib/types/CompactHorizontalBar.d.ts +7 -8
- package/lib/types/Donut.d.ts +8 -5
- package/lib/types/GroupBar.d.ts +6 -6
- package/lib/types/HorizontalBar.d.ts +7 -6
- package/lib/types/Hover.d.ts +8 -8
- package/lib/types/Line.d.ts +9 -6
- package/lib/types/Pattern.d.ts +51 -51
- package/lib/types/Plot.d.ts +11 -9
- package/lib/types/Radar.d.ts +10 -7
- package/lib/types/RadialTree.d.ts +10 -54
- package/lib/types/Reference.d.ts +6 -5
- package/lib/types/ResponsiveContainer.d.ts +5 -4
- package/lib/types/ScatterPlot.d.ts +8 -5
- package/lib/types/StackBar.d.ts +7 -6
- package/lib/types/StackedArea.d.ts +6 -5
- package/lib/types/Tooltip.d.ts +12 -12
- package/lib/types/Venn.d.ts +7 -6
- package/lib/types/a11y/DataAccessibilityTable.d.ts +2 -2
- package/lib/types/a11y/PlotA11yModule.d.ts +4 -11
- package/lib/types/a11y/PlotA11yView.d.ts +13 -2
- package/lib/types/a11y/hints.d.ts +5 -5
- package/lib/types/a11y/insights.d.ts +1 -1
- package/lib/types/a11y/intl.d.ts +1 -1
- package/lib/types/a11y/serialize.d.ts +7 -7
- package/lib/types/a11y/summarize.d.ts +2 -2
- package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
- package/lib/types/component/Chart/AbstractChart.d.ts +20 -13
- package/lib/types/component/Chart/AbstractChart.type.d.ts +39 -25
- package/lib/types/component/Chart/AreaChart.d.ts +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +17 -7
- package/lib/types/component/Chart/BarChart.d.ts +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +14 -9
- package/lib/types/component/Chart/BubbleChart.d.ts +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +10 -5
- package/lib/types/component/Chart/CigaretteChart.d.ts +1 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +18 -8
- package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +10 -6
- package/lib/types/component/Chart/DonutChart.d.ts +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +16 -7
- package/lib/types/component/Chart/HistogramChart.d.ts +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +7 -4
- package/lib/types/component/Chart/LineChart.d.ts +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +16 -7
- package/lib/types/component/Chart/RadarChart.d.ts +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +7 -5
- package/lib/types/component/Chart/ScatterPlotChart.d.ts +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +12 -6
- package/lib/types/component/Chart/VennChart.d.ts +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +12 -6
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +8 -6
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +4 -5
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +4 -5
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +17 -10
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +5 -5
- package/lib/types/component/StackGroupBar/StackGroupBar.d.ts +1 -1
- package/lib/types/component/StackGroupBar/StackGroupBar.type.d.ts +3 -4
- package/lib/types/component/SvgElement.d.ts +10 -0
- package/lib/types/index.d.ts +3 -1
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +12 -0
- package/lib/types/utils.d.ts +17 -17
- package/package.json +10 -10
package/lib/esm/Donut.mjs
CHANGED
|
@@ -2,46 +2,45 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
-
import
|
|
5
|
+
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
6
6
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
8
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
10
|
-
import { sstyled } from "@semcore/
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
9
|
+
import { sstyled, Component, assignProps } from "@semcore/core";
|
|
10
|
+
import { callAllEventHandlers } from "@semcore/core/lib/utils/assignProps";
|
|
11
|
+
import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
|
|
12
|
+
import getOriginChildren from "@semcore/core/lib/utils/getOriginChildren";
|
|
13
|
+
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
14
14
|
import { interpolate } from "d3-interpolate";
|
|
15
|
+
import { arc, pie } from "d3-shape";
|
|
15
16
|
import { transition } from "d3-transition";
|
|
16
|
-
import
|
|
17
|
-
import getOriginChildren from "@semcore/utils/lib/getOriginChildren";
|
|
18
|
-
import uniqueIDEnhancement from "@semcore/utils/lib/uniqueID";
|
|
17
|
+
import React from "react";
|
|
19
18
|
import createElement from "./createElement.mjs";
|
|
20
|
-
import { getChartDefaultColorName } from "./utils.mjs";
|
|
21
|
-
import Tooltip from "./Tooltip.mjs";
|
|
22
19
|
import { PatternFill } from "./Pattern.mjs";
|
|
23
|
-
|
|
20
|
+
import Tooltip from "./Tooltip.mjs";
|
|
21
|
+
import { getChartDefaultColorName } from "./utils.mjs";
|
|
22
|
+
var _excluded = ["Element", "styles", "d3Arc", "data", "color", "$animationActivePie", "active", "d3ArcOut", "name", "dataKey", "dataHintsHandler", "transparent", "innerRadius", "outerRadius", "resolveColor", "halfsize", "uid", "patterns", "onClick", "onClickPieRoot"];
|
|
24
23
|
/*!__reshadow-styles__:"./style/donut.shadow.css"*/
|
|
25
24
|
var style = (
|
|
26
25
|
/*__reshadow_css_start__*/
|
|
27
26
|
(sstyled.insert(
|
|
28
27
|
/*__inner_css_start__*/
|
|
29
|
-
".
|
|
28
|
+
".___SPie_tg3q1_gg_{stroke:var(--intergalactic-chart-grid-border, #fff);fill:var(--intergalactic-chart-palette-order-1, rgb(102, 107, 219))}.___SPie_tg3q1_gg_.__color_tg3q1_gg_{fill:var(--color_tg3q1)}.___SPie_tg3q1_gg_.__pattern_tg3q1_gg_.__color_tg3q1_gg_{fill:var(--pattern_tg3q1);stroke:var(--color_tg3q1);stroke-width:1px}.___SPie_tg3q1_gg_.__transparent_tg3q1_gg_{opacity:.3}.___SEmptyData_tg3q1_gg_{fill:var(--intergalactic-chart-palette-order-null, rgb(221, 222, 222))}.___SEmptyData_tg3q1_gg_.__color_tg3q1_gg_{fill:var(--color_tg3q1)}.___SLabel_tg3q1_gg_{text-anchor:middle;vertical-anchor:middle;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}",
|
|
30
29
|
/*__inner_css_end__*/
|
|
31
|
-
"
|
|
30
|
+
"tg3q1_gg_"
|
|
32
31
|
), /*__reshadow_css_end__*/
|
|
33
32
|
{
|
|
34
|
-
"__SPie": "
|
|
35
|
-
"_color": "
|
|
36
|
-
"--color": "--
|
|
37
|
-
"_pattern": "
|
|
38
|
-
"--pattern": "--
|
|
39
|
-
"_transparent": "
|
|
40
|
-
"__SEmptyData": "
|
|
41
|
-
"__SLabel": "
|
|
33
|
+
"__SPie": "___SPie_tg3q1_gg_",
|
|
34
|
+
"_color": "__color_tg3q1_gg_",
|
|
35
|
+
"--color": "--color_tg3q1",
|
|
36
|
+
"_pattern": "__pattern_tg3q1_gg_",
|
|
37
|
+
"--pattern": "--pattern_tg3q1",
|
|
38
|
+
"_transparent": "__transparent_tg3q1_gg_",
|
|
39
|
+
"__SEmptyData": "___SEmptyData_tg3q1_gg_",
|
|
40
|
+
"__SLabel": "___SLabel_tg3q1_gg_"
|
|
42
41
|
})
|
|
43
42
|
);
|
|
44
|
-
var DEFAULT_INSTANCE = Symbol("DEFAULT_INSTANCE");
|
|
43
|
+
var DEFAULT_INSTANCE = /* @__PURE__ */ Symbol("DEFAULT_INSTANCE");
|
|
45
44
|
function transitionAnglePie(_ref6) {
|
|
46
45
|
var selector = _ref6.selector, duration = _ref6.duration, halfsize = _ref6.halfsize, d3Arc = _ref6.d3Arc, d3ArcOut = _ref6.d3ArcOut, arcs = _ref6.arcs, activeIndexPie = _ref6.activeIndexPie;
|
|
47
46
|
return transition().selection().selectAll(selector).interrupt().transition().duration(duration).attrTween("d", function(_, ind) {
|
|
@@ -87,31 +86,29 @@ function getOuterRadius(_ref8) {
|
|
|
87
86
|
var minORmax = halfsize ? Math.max : Math.min;
|
|
88
87
|
return minORmax(width - increaseFactor * 2, height - increaseFactor * 2) / 2;
|
|
89
88
|
}
|
|
90
|
-
var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
91
|
-
_inherits(DonutRoot2, _Component);
|
|
92
|
-
var _super = _createSuper(DonutRoot2);
|
|
89
|
+
var DonutRoot = /* @__PURE__ */ (function(_Component) {
|
|
93
90
|
function DonutRoot2() {
|
|
94
91
|
var _this;
|
|
95
92
|
_classCallCheck(this, DonutRoot2);
|
|
96
93
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
97
94
|
args[_key] = arguments[_key];
|
|
98
95
|
}
|
|
99
|
-
_this =
|
|
100
|
-
_defineProperty(
|
|
101
|
-
_defineProperty(
|
|
102
|
-
_defineProperty(
|
|
103
|
-
_defineProperty(
|
|
96
|
+
_this = _callSuper(this, DonutRoot2, [].concat(args));
|
|
97
|
+
_defineProperty(_this, "virtualElement", canUseDOM() ? document.createElement("div") : {});
|
|
98
|
+
_defineProperty(_this, "activeIndexPie", void 0);
|
|
99
|
+
_defineProperty(_this, "canAnimatedHover", false);
|
|
100
|
+
_defineProperty(_this, "bindHandlerTooltip", function(visible, props, tooltipProps) {
|
|
104
101
|
return function(_ref9) {
|
|
105
102
|
var clientX = _ref9.clientX, clientY = _ref9.clientY;
|
|
106
|
-
var eventEmitter = _this.asProps.
|
|
107
|
-
eventEmitter.emit("
|
|
108
|
-
eventEmitter.emit("
|
|
109
|
-
eventEmitter.emit("
|
|
103
|
+
var _this$asProps = _this.asProps, eventEmitter = _this$asProps.eventEmitter, plotId = _this$asProps.plotId;
|
|
104
|
+
eventEmitter.emit("setTooltipPosition_".concat(plotId), clientX, clientY);
|
|
105
|
+
eventEmitter.emit("setTooltipRenderingProps_".concat(plotId), props, tooltipProps);
|
|
106
|
+
eventEmitter.emit("setTooltipVisible_".concat(plotId), visible);
|
|
110
107
|
};
|
|
111
108
|
});
|
|
112
|
-
_defineProperty(
|
|
113
|
-
var data =
|
|
114
|
-
var _this$
|
|
109
|
+
_defineProperty(_this, "animationActivePie", function(_ref0) {
|
|
110
|
+
var data = _ref0.data, active = _ref0.active, selector = _ref0.selector, element = _ref0.element;
|
|
111
|
+
var _this$asProps2 = _this.asProps, duration = _this$asProps2.duration, innerRadius = _this$asProps2.innerRadius, d3Arc = _this$asProps2.d3Arc, paddingAngle = _this$asProps2.paddingAngle;
|
|
115
112
|
var outerRadius = d3Arc.outerRadius()();
|
|
116
113
|
var outerRadiusStartEnd = active ? [+element.dataset["currentRadius"] || outerRadius, outerRadius + increaseFactor] : [+element.dataset["currentRadius"] || outerRadius, outerRadius];
|
|
117
114
|
if (_this.canAnimatedHover && duration > 0) {
|
|
@@ -126,11 +123,11 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
|
126
123
|
});
|
|
127
124
|
}
|
|
128
125
|
});
|
|
129
|
-
_defineProperty(
|
|
130
|
-
_defineProperty(
|
|
126
|
+
_defineProperty(_this, "animationTimeout", null);
|
|
127
|
+
_defineProperty(_this, "animationUpdatePie", function() {
|
|
131
128
|
clearTimeout(_this.animationTimeout);
|
|
132
129
|
_this.animationTimeout = setTimeout(function() {
|
|
133
|
-
var _this$
|
|
130
|
+
var _this$asProps3 = _this.asProps, duration = _this$asProps3.duration, d3Arc = _this$asProps3.d3Arc, halfsize = _this$asProps3.halfsize, d3ArcOut = _this$asProps3.d3ArcOut;
|
|
134
131
|
_this.canAnimatedHover = false;
|
|
135
132
|
if (duration > 0) {
|
|
136
133
|
transitionAnglePie({
|
|
@@ -151,10 +148,11 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
|
151
148
|
});
|
|
152
149
|
return _this;
|
|
153
150
|
}
|
|
154
|
-
|
|
151
|
+
_inherits(DonutRoot2, _Component);
|
|
152
|
+
return _createClass(DonutRoot2, [{
|
|
155
153
|
key: "id",
|
|
156
154
|
get: function get() {
|
|
157
|
-
var _this$
|
|
155
|
+
var _this$asProps4 = this.asProps, uid = _this$asProps4.uid, id = _this$asProps4.id;
|
|
158
156
|
return id || uid;
|
|
159
157
|
}
|
|
160
158
|
}, {
|
|
@@ -176,7 +174,7 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
|
176
174
|
}, {
|
|
177
175
|
key: "getArcs",
|
|
178
176
|
value: function getArcs() {
|
|
179
|
-
var _this$
|
|
177
|
+
var _this$asProps5 = this.asProps, Children = _this$asProps5.Children, data = _this$asProps5.data, d3Pie = _this$asProps5.d3Pie;
|
|
180
178
|
var pieData = Object.entries(data);
|
|
181
179
|
if (d3Pie[DEFAULT_INSTANCE]) {
|
|
182
180
|
var keys = React.Children.toArray(getOriginChildren(Children)).reduce(function(acc, child) {
|
|
@@ -185,12 +183,12 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
|
185
183
|
}
|
|
186
184
|
return acc;
|
|
187
185
|
}, []);
|
|
188
|
-
pieData = Object.entries(data).filter(function(
|
|
189
|
-
var
|
|
186
|
+
pieData = Object.entries(data).filter(function(_ref1) {
|
|
187
|
+
var _ref10 = _slicedToArray(_ref1, 2), key = _ref10[0], value = _ref10[1];
|
|
190
188
|
return keys.includes(key) && value > 0;
|
|
191
|
-
}).sort(function(
|
|
192
|
-
var
|
|
193
|
-
var
|
|
189
|
+
}).sort(function(_ref11, _ref12) {
|
|
190
|
+
var _ref13 = _slicedToArray(_ref11, 1), a = _ref13[0];
|
|
191
|
+
var _ref14 = _slicedToArray(_ref12, 1), b = _ref14[0];
|
|
194
192
|
return keys.indexOf(a) > keys.indexOf(b) ? 1 : -1;
|
|
195
193
|
});
|
|
196
194
|
}
|
|
@@ -204,11 +202,22 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
|
204
202
|
});
|
|
205
203
|
return d3Pie(pieData);
|
|
206
204
|
}
|
|
205
|
+
}, {
|
|
206
|
+
key: "handlerOnClick",
|
|
207
|
+
value: function handlerOnClick(key) {
|
|
208
|
+
var _this2 = this;
|
|
209
|
+
return function(e) {
|
|
210
|
+
e.stopPropagation();
|
|
211
|
+
var onClick = _this2.asProps.onClick;
|
|
212
|
+
if (!onClick) return;
|
|
213
|
+
onClick(key, e);
|
|
214
|
+
};
|
|
215
|
+
}
|
|
207
216
|
}, {
|
|
208
217
|
key: "getPieProps",
|
|
209
218
|
value: function getPieProps(props, index) {
|
|
210
|
-
var
|
|
211
|
-
var _this$
|
|
219
|
+
var _this3 = this;
|
|
220
|
+
var _this$asProps6 = this.asProps, d3Arc = _this$asProps6.d3Arc, d3ArcOut = _this$asProps6.d3ArcOut, innerRadius = _this$asProps6.innerRadius, outerRadius = _this$asProps6.outerRadius, halfsize = _this$asProps6.halfsize, resolveColor = _this$asProps6.resolveColor, uid = _this$asProps6.uid, patterns = _this$asProps6.patterns;
|
|
212
221
|
var active = props.active;
|
|
213
222
|
var data = this.arcs.find(function(arc2) {
|
|
214
223
|
return arc2.data[0] === props.dataKey;
|
|
@@ -241,7 +250,7 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
|
241
250
|
onMouseLeave: this.bindHandlerTooltip(false, props, tooltipProps),
|
|
242
251
|
onMouseOver: function onMouseOver(e) {
|
|
243
252
|
if (!active) {
|
|
244
|
-
|
|
253
|
+
_this3.animationActivePie({
|
|
245
254
|
active: true,
|
|
246
255
|
data,
|
|
247
256
|
selector: '[d="'.concat(e.target.getAttribute("d"), '"]'),
|
|
@@ -251,14 +260,15 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
|
251
260
|
},
|
|
252
261
|
onMouseOut: function onMouseOut(e) {
|
|
253
262
|
if (!active) {
|
|
254
|
-
|
|
263
|
+
_this3.animationActivePie({
|
|
255
264
|
active: false,
|
|
256
265
|
data,
|
|
257
266
|
selector: '[d="'.concat(e.target.getAttribute("d"), '"]'),
|
|
258
267
|
element: e.target
|
|
259
268
|
});
|
|
260
269
|
}
|
|
261
|
-
}
|
|
270
|
+
},
|
|
271
|
+
onClickPieRoot: this.handlerOnClick(props.dataKey)
|
|
262
272
|
};
|
|
263
273
|
}
|
|
264
274
|
}, {
|
|
@@ -285,7 +295,7 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
|
285
295
|
}, {
|
|
286
296
|
key: "render",
|
|
287
297
|
value: function render() {
|
|
288
|
-
var _this$
|
|
298
|
+
var _this$asProps7 = this.asProps, halfsize = _this$asProps7.halfsize, size = _this$asProps7.size;
|
|
289
299
|
this.asProps.dataHintsHandler.establishDataType("values-set");
|
|
290
300
|
var _size2 = _slicedToArray(size, 2), width = _size2[0], height = _size2[1];
|
|
291
301
|
var Element = this.Element;
|
|
@@ -300,13 +310,12 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
|
|
|
300
310
|
});
|
|
301
311
|
}
|
|
302
312
|
}]);
|
|
303
|
-
|
|
304
|
-
}(Component);
|
|
313
|
+
})(Component);
|
|
305
314
|
_defineProperty(DonutRoot, "displayName", "Donut");
|
|
306
315
|
_defineProperty(DonutRoot, "style", style);
|
|
307
316
|
_defineProperty(DonutRoot, "enhance", [uniqueIDEnhancement()]);
|
|
308
|
-
_defineProperty(DonutRoot, "defaultProps", function(
|
|
309
|
-
var
|
|
317
|
+
_defineProperty(DonutRoot, "defaultProps", function(_ref18) {
|
|
318
|
+
var _ref18$innerRadius = _ref18.innerRadius, innerRadius = _ref18$innerRadius === void 0 ? 0 : _ref18$innerRadius, _ref18$paddingAngle = _ref18.paddingAngle, paddingAngle = _ref18$paddingAngle === void 0 ? 0 : _ref18$paddingAngle, outerRadius = _ref18.outerRadius, _ref18$halfsize = _ref18.halfsize, halfsize = _ref18$halfsize === void 0 ? false : _ref18$halfsize, size = _ref18.$rootProps.size;
|
|
310
319
|
var d3Arc = arc().outerRadius(outerRadius || getOuterRadius({
|
|
311
320
|
size,
|
|
312
321
|
halfsize,
|
|
@@ -316,8 +325,8 @@ _defineProperty(DonutRoot, "defaultProps", function(_ref20) {
|
|
|
316
325
|
size,
|
|
317
326
|
halfsize
|
|
318
327
|
})) + increaseFactor).innerRadius(innerRadius).padAngle(paddingAngle);
|
|
319
|
-
var d3Pie = pie().sort(null).value(function(
|
|
320
|
-
var
|
|
328
|
+
var d3Pie = pie().sort(null).value(function(_ref19) {
|
|
329
|
+
var _ref20 = _slicedToArray(_ref19, 2), value = _ref20[1];
|
|
321
330
|
return value;
|
|
322
331
|
});
|
|
323
332
|
d3Pie[DEFAULT_INSTANCE] = true;
|
|
@@ -329,12 +338,13 @@ _defineProperty(DonutRoot, "defaultProps", function(_ref20) {
|
|
|
329
338
|
d3Arc,
|
|
330
339
|
d3ArcOut,
|
|
331
340
|
duration: 500,
|
|
332
|
-
paddingAngle
|
|
341
|
+
paddingAngle,
|
|
342
|
+
innerRadius
|
|
333
343
|
};
|
|
334
344
|
});
|
|
335
|
-
function Pie(
|
|
345
|
+
function Pie(_ref15) {
|
|
336
346
|
var _ref2;
|
|
337
|
-
var SPie =
|
|
347
|
+
var SPie = _ref15.Element, styles = _ref15.styles, d3Arc = _ref15.d3Arc, data = _ref15.data, color = _ref15.color, $animationActivePie = _ref15.$animationActivePie, active = _ref15.active, d3ArcOut = _ref15.d3ArcOut, name = _ref15.name, dataKey = _ref15.dataKey, dataHintsHandler = _ref15.dataHintsHandler, transparent = _ref15.transparent, innerRadius = _ref15.innerRadius, outerRadius = _ref15.outerRadius, resolveColor = _ref15.resolveColor, halfsize = _ref15.halfsize, uid = _ref15.uid, patterns = _ref15.patterns, onClick = _ref15.onClick, onClickPieRoot = _ref15.onClickPieRoot, other = _objectWithoutProperties(_ref15, _excluded);
|
|
338
348
|
var _React$useState = React.useState(false), _React$useState2 = _slicedToArray(_React$useState, 2), isMount = _React$useState2[0], setIsMount = _React$useState2[1];
|
|
339
349
|
var pieRef = React.useRef(null);
|
|
340
350
|
React.useEffect(function() {
|
|
@@ -360,13 +370,14 @@ function Pie(_ref17) {
|
|
|
360
370
|
if (!data) return null;
|
|
361
371
|
dataHintsHandler.establishDataType("values-set");
|
|
362
372
|
dataHintsHandler.describeValueEntity(dataKey, name);
|
|
363
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, (_ref2 = sstyled
|
|
373
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, (_ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SPie, _ref2.cn("SPie", {
|
|
364
374
|
"render": "path",
|
|
365
375
|
"ref": pieRef,
|
|
366
376
|
"color": resolveColor(color),
|
|
367
377
|
"pattern": patterns ? "url(#".concat(uid, "-pattern)") : void 0,
|
|
368
378
|
"d": active ? d3ArcOut(data) : d3Arc(data),
|
|
369
|
-
"transparent": transparent
|
|
379
|
+
"transparent": transparent,
|
|
380
|
+
"use:onClick": callAllEventHandlers(onClickPieRoot, onClick)
|
|
370
381
|
}))), patterns && /* @__PURE__ */ React.createElement(PatternFill, _ref2.cn("PatternFill", {
|
|
371
382
|
"id": "".concat(uid, "-pattern"),
|
|
372
383
|
"patternKey": color,
|
|
@@ -374,10 +385,10 @@ function Pie(_ref17) {
|
|
|
374
385
|
"patterns": patterns
|
|
375
386
|
})));
|
|
376
387
|
}
|
|
377
|
-
function EmptyData(
|
|
388
|
+
function EmptyData(_ref16) {
|
|
378
389
|
var _ref3;
|
|
379
|
-
var SEmptyData =
|
|
380
|
-
return _ref3 = sstyled
|
|
390
|
+
var SEmptyData = _ref16.Element, styles = _ref16.styles, d3Arc = _ref16.d3Arc, color = _ref16.color, resolveColor = _ref16.resolveColor;
|
|
391
|
+
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SEmptyData, _ref3.cn("SEmptyData", {
|
|
381
392
|
"render": "path",
|
|
382
393
|
"color": resolveColor(color),
|
|
383
394
|
"d": d3Arc({
|
|
@@ -386,24 +397,25 @@ function EmptyData(_ref18) {
|
|
|
386
397
|
})
|
|
387
398
|
}));
|
|
388
399
|
}
|
|
389
|
-
function Label(
|
|
400
|
+
function Label(_ref17) {
|
|
390
401
|
var _ref4;
|
|
391
|
-
var SLabel =
|
|
402
|
+
var SLabel = _ref17.Element, styles = _ref17.styles, Children = _ref17.Children, children = _ref17.children, label = _ref17.label, dataHintsHandler = _ref17.dataHintsHandler, _ref17$x = _ref17.x, x = _ref17$x === void 0 ? 0 : _ref17$x, _ref17$y = _ref17.y, y = _ref17$y === void 0 ? 0 : _ref17$y;
|
|
392
403
|
dataHintsHandler.setTitle("vertical", label || children);
|
|
393
|
-
return _ref4 = sstyled
|
|
404
|
+
return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SLabel, _ref4.cn("SLabel", {
|
|
394
405
|
"render": "text",
|
|
395
406
|
"x": x,
|
|
396
407
|
"y": y,
|
|
397
408
|
"aria-hidden": true
|
|
398
409
|
}), /* @__PURE__ */ React.createElement(Children, _ref4.cn("Children", {})));
|
|
399
410
|
}
|
|
400
|
-
|
|
411
|
+
function DonutTooltip(props) {
|
|
401
412
|
var _ref = arguments[0], _ref5;
|
|
402
413
|
var SDonutTooltip = Tooltip;
|
|
403
|
-
return _ref5 = sstyled
|
|
414
|
+
return _ref5 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SDonutTooltip, _ref5.cn("SDonutTooltip", _objectSpread({}, assignProps({
|
|
404
415
|
"excludeAnchorProps": true
|
|
405
416
|
}, _ref))));
|
|
406
|
-
}
|
|
417
|
+
}
|
|
418
|
+
;
|
|
407
419
|
var Donut = createElement(DonutRoot, {
|
|
408
420
|
Pie,
|
|
409
421
|
Label,
|
package/lib/esm/Dots.mjs
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import { sstyled } from "@semcore/
|
|
2
|
+
import { sstyled } from "@semcore/core";
|
|
3
|
+
import trottle from "@semcore/core/lib/utils/rafTrottle";
|
|
3
4
|
import { bisector } from "d3-array";
|
|
4
5
|
import React from "react";
|
|
5
|
-
import { sstyled as sstyled$1 } from "@semcore/core";
|
|
6
|
-
import trottle from "@semcore/utils/lib/rafTrottle";
|
|
7
6
|
import createElement from "./createElement.mjs";
|
|
8
|
-
import { interpolateValue, eventToPoint, invert, getChartDefaultColorName } from "./utils.mjs";
|
|
9
7
|
import { getPatternSymbolSize, PatternSymbol } from "./Pattern.mjs";
|
|
8
|
+
import { getChartDefaultColorName, interpolateValue, eventToPoint, invert } from "./utils.mjs";
|
|
10
9
|
/*!__reshadow-styles__:"./style/dot.shadow.css"*/
|
|
11
10
|
var style = (
|
|
12
11
|
/*__reshadow_css_start__*/
|
|
13
12
|
(sstyled.insert(
|
|
14
13
|
/*__inner_css_start__*/
|
|
15
|
-
".
|
|
14
|
+
".___SDots_1s5uq_gg_ .___SDot_1s5uq_gg_{transition-duration:var(--duration_1s5uq)}.___SDot_1s5uq_gg_{stroke-width:1px;stroke:var(--intergalactic-chart-grid-border, #fff);fill:var(--intergalactic-chart-palette-order-1, rgb(102, 107, 219));transition-property:cx,cy,x,y;transition-timing-function:ease-in-out}.___SDot_1s5uq_gg_.__hide_1s5uq_gg_{display:none}.___SDot_1s5uq_gg_.__color_1s5uq_gg_{fill:var(--color_1s5uq)}.___SDot_1s5uq_gg_.__transparent_1s5uq_gg_{opacity:.3}",
|
|
16
15
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
16
|
+
"1s5uq_gg_"
|
|
18
17
|
), /*__reshadow_css_end__*/
|
|
19
18
|
{
|
|
20
|
-
"__SDot": "
|
|
21
|
-
"_hide": "
|
|
22
|
-
"_color": "
|
|
23
|
-
"--color": "--
|
|
24
|
-
"_transparent": "
|
|
25
|
-
"__SDots": "
|
|
26
|
-
"--duration": "--
|
|
19
|
+
"__SDot": "___SDot_1s5uq_gg_",
|
|
20
|
+
"_hide": "__hide_1s5uq_gg_",
|
|
21
|
+
"_color": "__color_1s5uq_gg_",
|
|
22
|
+
"--color": "--color_1s5uq",
|
|
23
|
+
"_transparent": "__transparent_1s5uq_gg_",
|
|
24
|
+
"__SDots": "___SDots_1s5uq_gg_",
|
|
25
|
+
"--duration": "--duration_1s5uq"
|
|
27
26
|
})
|
|
28
27
|
);
|
|
29
28
|
function Dots(props) {
|
|
30
29
|
var _ref3;
|
|
31
|
-
var SDot = props.Element, styles = props.styles, color = props.color, d3 = props.d3, x = props.x, y = props.y, eventEmitter = props.eventEmitter, display = props.display, hide = props.hide, rootRef = props.rootRef, scale = props.scale, _props$duration = props.duration, duration = _props$duration === void 0 ? 500 : _props$duration, transparent = props.transparent, _props$radius = props.radius, radiusBase = _props$radius === void 0 ? 4 : _props$radius, resolveColor = props.resolveColor, patterns = props.patterns;
|
|
30
|
+
var SDot = props.Element, styles = props.styles, color = props.color, d3 = props.d3, x = props.x, y = props.y, eventEmitter = props.eventEmitter, display = props.display, hide = props.hide, rootRef = props.rootRef, scale = props.scale, _props$duration = props.duration, duration = _props$duration === void 0 ? 500 : _props$duration, transparent = props.transparent, _props$radius = props.radius, radiusBase = _props$radius === void 0 ? 4 : _props$radius, resolveColor = props.resolveColor, patterns = props.patterns, onClick = props.onClick;
|
|
32
31
|
var bisect = bisector(function(d) {
|
|
33
32
|
return d[x];
|
|
34
33
|
}).center;
|
|
35
34
|
var _React$useState = React.useState(null), _React$useState2 = _slicedToArray(_React$useState, 2), activeIndex = _React$useState2[0], setActiveIndex = _React$useState2[1];
|
|
35
|
+
var patternKey = color || getChartDefaultColorName(0);
|
|
36
|
+
var svgPatternId = "template_".concat(patternKey);
|
|
36
37
|
var data = React.useMemo(function() {
|
|
37
38
|
return props.data.filter(function(item) {
|
|
38
39
|
return item[y] !== interpolateValue;
|
|
@@ -47,6 +48,15 @@ function Dots(props) {
|
|
|
47
48
|
var handlerMouseLeaveRoot = React.useCallback(trottle(function() {
|
|
48
49
|
setActiveIndex(null);
|
|
49
50
|
}), []);
|
|
51
|
+
var handlerOnClick = React.useCallback(function(e) {
|
|
52
|
+
e.stopPropagation();
|
|
53
|
+
if (!onClick) return;
|
|
54
|
+
var _scale2 = _slicedToArray(scale, 1), xScale = _scale2[0];
|
|
55
|
+
var _eventToPoint3 = eventToPoint(e, rootRef.current), _eventToPoint4 = _slicedToArray(_eventToPoint3, 1), pX = _eventToPoint4[0];
|
|
56
|
+
var vX = invert(xScale, pX);
|
|
57
|
+
var index = bisect(data, vX);
|
|
58
|
+
onClick(index, e);
|
|
59
|
+
}, [scale, data, onClick]);
|
|
50
60
|
React.useEffect(function() {
|
|
51
61
|
var unsubscribeMouseMoveRoot = eventEmitter.subscribe("onMouseMoveChart", function(e) {
|
|
52
62
|
e.persist();
|
|
@@ -58,6 +68,10 @@ function Dots(props) {
|
|
|
58
68
|
unsubscribeMouseLeaveRoot();
|
|
59
69
|
};
|
|
60
70
|
}, [eventEmitter, scale, data, x, y]);
|
|
71
|
+
var _getPatternSymbolSize = getPatternSymbolSize({
|
|
72
|
+
patternKey,
|
|
73
|
+
patterns
|
|
74
|
+
}), _getPatternSymbolSize2 = _slicedToArray(_getPatternSymbolSize, 2), width = _getPatternSymbolSize2[0], height = _getPatternSymbolSize2[1];
|
|
61
75
|
var dots = data.reduce(function(acc, d, i) {
|
|
62
76
|
var isPrev = d3.defined()(data[i - 1] || {});
|
|
63
77
|
var isNext = d3.defined()(data[i + 1] || {});
|
|
@@ -66,14 +80,9 @@ function Dots(props) {
|
|
|
66
80
|
var radius = radiusBase * (active ? 5 / 4 : 1);
|
|
67
81
|
if (!d3.defined()(d)) return acc;
|
|
68
82
|
if (!visible) return acc;
|
|
69
|
-
var patternKey = color || getChartDefaultColorName(0);
|
|
70
|
-
var _getPatternSymbolSize = getPatternSymbolSize({
|
|
71
|
-
patternKey,
|
|
72
|
-
patterns
|
|
73
|
-
}), _getPatternSymbolSize2 = _slicedToArray(_getPatternSymbolSize, 2), width = _getPatternSymbolSize2[0], height = _getPatternSymbolSize2[1];
|
|
74
83
|
if (!patterns) {
|
|
75
84
|
var _ref;
|
|
76
|
-
acc.push((_ref = sstyled
|
|
85
|
+
acc.push((_ref = sstyled(styles), /* @__PURE__ */ React.createElement(SDot, _ref.cn("SDot", {
|
|
77
86
|
"render": "circle",
|
|
78
87
|
"color": resolveColor(color),
|
|
79
88
|
"patternKey": patternKey,
|
|
@@ -86,32 +95,39 @@ function Dots(props) {
|
|
|
86
95
|
"transparent": transparent,
|
|
87
96
|
"cx": d3.x()(d),
|
|
88
97
|
"cy": d3.y()(d),
|
|
89
|
-
"r": radius
|
|
98
|
+
"r": radius,
|
|
99
|
+
"__excludeProps": ["display", "data", "scale"]
|
|
90
100
|
}))));
|
|
91
101
|
} else {
|
|
92
102
|
var _ref2;
|
|
93
|
-
acc.push((_ref2 = sstyled
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
103
|
+
acc.push((_ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SDot, _ref2.cn("SDot", {
|
|
104
|
+
"key": i,
|
|
105
|
+
"render": "use",
|
|
106
|
+
"href": "#".concat(svgPatternId),
|
|
107
|
+
"x": width + (d3.x()(d) - width / 2),
|
|
108
|
+
"y": d3.y()(d) - height / 2,
|
|
99
109
|
"value": d,
|
|
110
|
+
"transparent": transparent,
|
|
111
|
+
"radius": radius,
|
|
100
112
|
"visible": visible,
|
|
101
113
|
"active": active,
|
|
102
114
|
"hide": hide,
|
|
103
|
-
"
|
|
104
|
-
"x": d3.x()(d) - width / 2,
|
|
105
|
-
"y": d3.y()(d) - height / 2,
|
|
106
|
-
"radius": radius
|
|
115
|
+
"__excludeProps": ["display", "data", "scale"]
|
|
107
116
|
}))));
|
|
108
117
|
}
|
|
109
118
|
return acc;
|
|
110
119
|
}, []);
|
|
111
120
|
var SDots = "g";
|
|
112
|
-
return _ref3 = sstyled
|
|
113
|
-
"duration": "".concat(duration, "ms")
|
|
114
|
-
|
|
121
|
+
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SDots, _ref3.cn("SDots", {
|
|
122
|
+
"duration": "".concat(duration, "ms"),
|
|
123
|
+
"onClickCapture": handlerOnClick
|
|
124
|
+
}), /* @__PURE__ */ React.createElement(PatternSymbol, _ref3.cn("PatternSymbol", {
|
|
125
|
+
"color": resolveColor(color),
|
|
126
|
+
"patternKey": color,
|
|
127
|
+
"id": svgPatternId,
|
|
128
|
+
"patterns": patterns,
|
|
129
|
+
"x": -1 * width
|
|
130
|
+
})), dots);
|
|
115
131
|
}
|
|
116
132
|
Dots.style = style;
|
|
117
133
|
const Dots$1 = createElement(Dots);
|
package/lib/esm/GroupBar.mjs
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
3
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
import React from "react";
|
|
7
6
|
import { Component } from "@semcore/core";
|
|
8
|
-
import getOriginChildren from "@semcore/
|
|
9
|
-
import
|
|
7
|
+
import getOriginChildren from "@semcore/core/lib/utils/getOriginChildren";
|
|
8
|
+
import { scaleBand } from "d3-scale";
|
|
9
|
+
import React from "react";
|
|
10
10
|
import Bar from "./Bar.mjs";
|
|
11
|
+
import createElement from "./createElement.mjs";
|
|
11
12
|
import HorizontalBar from "./HorizontalBar.mjs";
|
|
12
|
-
import { scaleBand } from "d3-scale";
|
|
13
13
|
import { scaleToBand, getChartDefaultColorName } from "./utils.mjs";
|
|
14
|
-
var GroupBarRoot = /* @__PURE__ */ function(_Component) {
|
|
15
|
-
_inherits(GroupBarRoot2, _Component);
|
|
16
|
-
var _super = _createSuper(GroupBarRoot2);
|
|
14
|
+
var GroupBarRoot = /* @__PURE__ */ (function(_Component) {
|
|
17
15
|
function GroupBarRoot2() {
|
|
18
16
|
_classCallCheck(this, GroupBarRoot2);
|
|
19
|
-
return
|
|
17
|
+
return _callSuper(this, GroupBarRoot2, arguments);
|
|
20
18
|
}
|
|
21
|
-
|
|
19
|
+
_inherits(GroupBarRoot2, _Component);
|
|
20
|
+
return _createClass(GroupBarRoot2, [{
|
|
22
21
|
key: "getScaleGroup",
|
|
23
22
|
value: function getScaleGroup() {
|
|
24
23
|
var _this$asProps = this.asProps, Children = _this$asProps.Children, scale = _this$asProps.scale, scaleGroup = _this$asProps.scaleGroup, x = _this$asProps.x;
|
|
@@ -39,7 +38,7 @@ var GroupBarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
39
38
|
key: "getBarProps",
|
|
40
39
|
value: function getBarProps(_ref, index) {
|
|
41
40
|
var y = _ref.y;
|
|
42
|
-
var _this$asProps2 = this.asProps, x = _this$asProps2.x, _this$asProps2$maxBar = _this$asProps2.maxBarSize, maxBarSize = _this$asProps2$maxBar === void 0 ?
|
|
41
|
+
var _this$asProps2 = this.asProps, x = _this$asProps2.x, _this$asProps2$maxBar = _this$asProps2.maxBarSize, maxBarSize = _this$asProps2$maxBar === void 0 ? Number.POSITIVE_INFINITY : _this$asProps2$maxBar, patterns = _this$asProps2.patterns;
|
|
43
42
|
var bandWidth = this.scaleGroup.bandwidth();
|
|
44
43
|
var width = Math.min(bandWidth, maxBarSize);
|
|
45
44
|
var offsetX = this.scaleGroup(y) + bandWidth / 2 - width / 2;
|
|
@@ -56,7 +55,7 @@ var GroupBarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
56
55
|
key: "getHorizontalBarProps",
|
|
57
56
|
value: function getHorizontalBarProps(_ref2, index) {
|
|
58
57
|
var x = _ref2.x;
|
|
59
|
-
var _this$asProps3 = this.asProps, y = _this$asProps3.y, _this$asProps3$maxBar = _this$asProps3.maxBarSize, maxBarSize = _this$asProps3$maxBar === void 0 ?
|
|
58
|
+
var _this$asProps3 = this.asProps, y = _this$asProps3.y, _this$asProps3$maxBar = _this$asProps3.maxBarSize, maxBarSize = _this$asProps3$maxBar === void 0 ? Number.POSITIVE_INFINITY : _this$asProps3$maxBar;
|
|
60
59
|
var bandWidth = this.scaleGroup.bandwidth();
|
|
61
60
|
var height = Math.min(bandWidth, maxBarSize);
|
|
62
61
|
var offsetY = this.scaleGroup(x) + bandWidth / 2 - height / 2;
|
|
@@ -82,8 +81,7 @@ var GroupBarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
82
81
|
});
|
|
83
82
|
}
|
|
84
83
|
}]);
|
|
85
|
-
|
|
86
|
-
}(Component);
|
|
84
|
+
})(Component);
|
|
87
85
|
_defineProperty(GroupBarRoot, "displayName", "GroupBar");
|
|
88
86
|
var GroupBar = createElement(GroupBarRoot, {
|
|
89
87
|
Bar,
|