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