@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
|
@@ -1,45 +1,86 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
5
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
6
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
|
+
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
8
|
+
import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
|
|
8
9
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
9
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
10
10
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import { sstyled, assignProps, createComponent } from "@semcore/core";
|
|
12
|
+
import { Box, Flex } from "@semcore/base-components";
|
|
13
|
+
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
14
|
+
import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
|
|
15
|
+
import trottle from "@semcore/core/lib/utils/rafTrottle";
|
|
16
|
+
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
13
17
|
import Divider from "@semcore/divider";
|
|
14
|
-
import { Flex, Box } from "@semcore/flex-box";
|
|
15
18
|
import { Text } from "@semcore/typography";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { HoverRect } from "../../Hover.mjs";
|
|
21
|
-
import { interpolateValue, scaleToBand } from "../../utils.mjs";
|
|
19
|
+
import { scaleLinear, scaleThreshold } from "d3-scale";
|
|
20
|
+
import React from "react";
|
|
21
|
+
import "../../index.mjs";
|
|
22
|
+
import { NOT_A_VALUE, AbstractChart } from "./AbstractChart.mjs";
|
|
22
23
|
import AnimatedClipPath from "../../AnimatedClipPath.mjs";
|
|
23
|
-
import { AbstractChart } from "./AbstractChart.mjs";
|
|
24
|
-
import Cigarette from "../Cigarette/Cigarette.mjs";
|
|
25
24
|
import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
|
|
26
|
-
import
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
import { eventToPoint, interpolateValue } from "../../utils.mjs";
|
|
26
|
+
import Cigarette from "../Cigarette/Cigarette.mjs";
|
|
27
|
+
import { HoverRect } from "../../Hover.mjs";
|
|
28
|
+
import Plot from "../../Plot.mjs";
|
|
29
|
+
var DEFAULT_MINIMAL_BAR_WIDTH = 2;
|
|
30
|
+
var DEFAULT_GAP = 2;
|
|
31
|
+
var CigaretteChartComponent = /* @__PURE__ */ (function(_AbstractChart) {
|
|
32
|
+
function CigaretteChartComponent2(props) {
|
|
32
33
|
var _this;
|
|
33
34
|
_classCallCheck(this, CigaretteChartComponent2);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
_this
|
|
38
|
-
_defineProperty(
|
|
39
|
-
|
|
35
|
+
_this = _callSuper(this, CigaretteChartComponent2, [props]);
|
|
36
|
+
_defineProperty(_this, "plotRef", /* @__PURE__ */ React.createRef());
|
|
37
|
+
_defineProperty(_this, "plotPadding", 0);
|
|
38
|
+
_defineProperty(_this, "offset", 0);
|
|
39
|
+
_defineProperty(_this, "onPlotMouseMove", trottle(function(event) {
|
|
40
|
+
if (!_this.plotRef.current) return;
|
|
41
|
+
var _eventToPoint = eventToPoint(event, _this.plotRef.current), _eventToPoint2 = _slicedToArray(_eventToPoint, 2), pX = _eventToPoint2[0], pY = _eventToPoint2[1];
|
|
42
|
+
_this.setState(function(prevState) {
|
|
43
|
+
return {
|
|
44
|
+
pX,
|
|
45
|
+
pY
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
}));
|
|
49
|
+
_defineProperty(_this, "onPlotMouseLeave", trottle(function() {
|
|
50
|
+
_this.setState(function(prevState) {
|
|
51
|
+
return {
|
|
52
|
+
pX: null,
|
|
53
|
+
pY: null
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
}));
|
|
57
|
+
_this.state = _objectSpread(_objectSpread({}, _this.state), {}, {
|
|
58
|
+
pX: null,
|
|
59
|
+
pY: null
|
|
60
|
+
});
|
|
40
61
|
return _this;
|
|
41
62
|
}
|
|
42
|
-
|
|
63
|
+
_inherits(CigaretteChartComponent2, _AbstractChart);
|
|
64
|
+
return _createClass(CigaretteChartComponent2, [{
|
|
65
|
+
key: "activeDataDefinitions",
|
|
66
|
+
get: function get() {
|
|
67
|
+
var dataDefinitions = this.state.dataDefinitions;
|
|
68
|
+
return dataDefinitions.filter(function(_ref7) {
|
|
69
|
+
var checked = _ref7.checked;
|
|
70
|
+
return checked;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
key: "activePositiveDataDefinitions",
|
|
75
|
+
get: function get() {
|
|
76
|
+
var data = this.asProps.data;
|
|
77
|
+
return this.activeDataDefinitions.filter(function(_ref8) {
|
|
78
|
+
var id = _ref8.id;
|
|
79
|
+
var itemValue = data[id];
|
|
80
|
+
return typeof itemValue === "number" && itemValue > 0;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}, {
|
|
43
84
|
key: "resolveColor",
|
|
44
85
|
value: function resolveColor(id, index) {
|
|
45
86
|
var _this$props$colorMap$, _this$props$colorMap;
|
|
@@ -48,7 +89,7 @@ var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
|
|
|
48
89
|
}, {
|
|
49
90
|
key: "getDefaultDataDefinitions",
|
|
50
91
|
value: function getDefaultDataDefinitions() {
|
|
51
|
-
var dataDefinitions =
|
|
92
|
+
var dataDefinitions = _superPropGet(CigaretteChartComponent2, "getDefaultDataDefinitions", this, 3)([]);
|
|
52
93
|
return dataDefinitions.map(function(dataDef) {
|
|
53
94
|
dataDef.columns = dataDef.columns.slice(1);
|
|
54
95
|
return dataDef;
|
|
@@ -62,37 +103,122 @@ var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
|
|
|
62
103
|
w: "fit-content"
|
|
63
104
|
};
|
|
64
105
|
}
|
|
106
|
+
}, {
|
|
107
|
+
key: "totalValue",
|
|
108
|
+
value: function totalValue() {
|
|
109
|
+
var data = this.asProps.data;
|
|
110
|
+
return this.activeDataDefinitions.reduce(function(acc, _ref9) {
|
|
111
|
+
var id = _ref9.id;
|
|
112
|
+
var itemValue = data[id];
|
|
113
|
+
if (typeof itemValue === "number") {
|
|
114
|
+
acc += itemValue;
|
|
115
|
+
}
|
|
116
|
+
return acc;
|
|
117
|
+
}, 0);
|
|
118
|
+
}
|
|
119
|
+
}, {
|
|
120
|
+
key: "computeCigaretteItems",
|
|
121
|
+
value: function computeCigaretteItems() {
|
|
122
|
+
var _this$asProps = this.asProps, plotWidth = _this$asProps.plotWidth, plotHeight = _this$asProps.plotHeight, data = _this$asProps.data, invertAxis = _this$asProps.invertAxis, minimalBarWidth = _this$asProps.minimalBarWidth;
|
|
123
|
+
var dataDefinitions = invertAxis ? this.activeDataDefinitions : _toConsumableArray(this.activeDataDefinitions).reverse();
|
|
124
|
+
var count = this.activePositiveDataDefinitions.length;
|
|
125
|
+
var totalGapWidth = DEFAULT_GAP * Math.max(0, count - 1);
|
|
126
|
+
var availableSpace = Math.max(0, (invertAxis ? plotWidth : plotHeight) - totalGapWidth);
|
|
127
|
+
var totalValue = this.totalValue();
|
|
128
|
+
var dataDefinitionsItemSize = dataDefinitions.map(function(_ref0) {
|
|
129
|
+
var id = _ref0.id;
|
|
130
|
+
if (totalValue === 0) {
|
|
131
|
+
return 0;
|
|
132
|
+
}
|
|
133
|
+
var itemValue = data[id];
|
|
134
|
+
if (typeof itemValue !== "number") return 0;
|
|
135
|
+
return itemValue / totalValue * availableSpace;
|
|
136
|
+
});
|
|
137
|
+
var result = dataDefinitions.map(function(dd, index) {
|
|
138
|
+
return _objectSpread(_objectSpread({}, dd), {}, {
|
|
139
|
+
value: data[dd.id],
|
|
140
|
+
dataWidth: dataDefinitionsItemSize[index],
|
|
141
|
+
visualWidth: dataDefinitionsItemSize[index],
|
|
142
|
+
isMinVisible: false
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
var smallItems = result.filter(function(r) {
|
|
146
|
+
var value = r.value, dataWidth = r.dataWidth;
|
|
147
|
+
if (typeof value !== "number") return false;
|
|
148
|
+
return value > 0 && dataWidth < minimalBarWidth;
|
|
149
|
+
});
|
|
150
|
+
if (smallItems.length === 0) return result;
|
|
151
|
+
var extraNeeded = 0;
|
|
152
|
+
var _iterator = _createForOfIteratorHelper(smallItems), _step;
|
|
153
|
+
try {
|
|
154
|
+
for (_iterator.s(); !(_step = _iterator.n()).done; ) {
|
|
155
|
+
var smallItem = _step.value;
|
|
156
|
+
extraNeeded += minimalBarWidth - smallItem.dataWidth;
|
|
157
|
+
smallItem.visualWidth = minimalBarWidth;
|
|
158
|
+
smallItem.isMinVisible = true;
|
|
159
|
+
}
|
|
160
|
+
} catch (err) {
|
|
161
|
+
_iterator.e(err);
|
|
162
|
+
} finally {
|
|
163
|
+
_iterator.f();
|
|
164
|
+
}
|
|
165
|
+
var donors = result.filter(function(r) {
|
|
166
|
+
return !r.isMinVisible && r.dataWidth > minimalBarWidth;
|
|
167
|
+
});
|
|
168
|
+
var donorCapacity = donors.reduce(function(s, d) {
|
|
169
|
+
return s + (d.dataWidth - minimalBarWidth);
|
|
170
|
+
}, 0);
|
|
171
|
+
var _iterator2 = _createForOfIteratorHelper(donors), _step2;
|
|
172
|
+
try {
|
|
173
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {
|
|
174
|
+
var donor = _step2.value;
|
|
175
|
+
var available = donor.dataWidth - minimalBarWidth;
|
|
176
|
+
var share = available / donorCapacity;
|
|
177
|
+
var taken = share * extraNeeded;
|
|
178
|
+
donor.visualWidth = donor.dataWidth - taken;
|
|
179
|
+
}
|
|
180
|
+
} catch (err) {
|
|
181
|
+
_iterator2.e(err);
|
|
182
|
+
} finally {
|
|
183
|
+
_iterator2.f();
|
|
184
|
+
}
|
|
185
|
+
return result;
|
|
186
|
+
}
|
|
65
187
|
}, {
|
|
66
188
|
key: "xScale",
|
|
67
189
|
get: function get() {
|
|
68
|
-
var
|
|
69
|
-
return
|
|
190
|
+
var plotWidth = this.asProps.plotWidth;
|
|
191
|
+
return scaleLinear([0, plotWidth]);
|
|
70
192
|
}
|
|
71
193
|
}, {
|
|
72
194
|
key: "yScale",
|
|
73
195
|
get: function get() {
|
|
74
|
-
var
|
|
75
|
-
return
|
|
196
|
+
var plotHeight = this.asProps.plotHeight;
|
|
197
|
+
return scaleLinear([plotHeight, 0]);
|
|
76
198
|
}
|
|
77
199
|
}, {
|
|
78
200
|
key: "renderChart",
|
|
79
201
|
value: function renderChart() {
|
|
80
202
|
var _this2 = this;
|
|
81
|
-
var _this$
|
|
203
|
+
var _this$asProps2 = this.asProps, invertAxis = _this$asProps2.invertAxis, data = _this$asProps2.data, uid = _this$asProps2.uid, duration = _this$asProps2.duration, patterns = _this$asProps2.patterns, plotHeight = _this$asProps2.plotHeight, plotWidth = _this$asProps2.plotWidth, onClick = _this$asProps2.onClick;
|
|
82
204
|
var _this$state = this.state, dataDefinitions = _this$state.dataDefinitions, highlightedLine = _this$state.highlightedLine;
|
|
83
205
|
this.offset = 0;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
206
|
+
var items = this.computeCigaretteItems();
|
|
207
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, items.map(function(item, index) {
|
|
208
|
+
var visualWidth = item.visualWidth, id = item.id;
|
|
209
|
+
var value = data[id];
|
|
210
|
+
if (value === interpolateValue || value === null) {
|
|
87
211
|
return null;
|
|
88
212
|
}
|
|
89
|
-
var
|
|
90
|
-
var
|
|
91
|
-
var
|
|
92
|
-
var
|
|
93
|
-
var x = index === 0 ? 0 : _this2.offset;
|
|
213
|
+
var height = invertAxis ? plotHeight - DEFAULT_GAP * 2 : plotWidth - DEFAULT_GAP * 2;
|
|
214
|
+
var width = visualWidth;
|
|
215
|
+
var y = DEFAULT_GAP;
|
|
216
|
+
var x = _this2.offset;
|
|
94
217
|
var r = height < 28 ? 2 : 4;
|
|
95
|
-
_this2.offset
|
|
218
|
+
_this2.offset += visualWidth;
|
|
219
|
+
if (index < items.length - 1) {
|
|
220
|
+
_this2.offset += DEFAULT_GAP;
|
|
221
|
+
}
|
|
96
222
|
return /* @__PURE__ */ React.createElement(Cigarette, {
|
|
97
223
|
key: item.id,
|
|
98
224
|
dataKey: item.id,
|
|
@@ -124,9 +250,10 @@ var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
|
|
|
124
250
|
}, {
|
|
125
251
|
key: "renderTooltip",
|
|
126
252
|
value: function renderTooltip() {
|
|
127
|
-
var _this3 = this;
|
|
128
|
-
var _this$
|
|
129
|
-
var
|
|
253
|
+
var _ref = this.asProps, _this3 = this;
|
|
254
|
+
var _this$asProps3 = this.asProps, data = _this$asProps3.data, invertAxis = _this$asProps3.invertAxis, tooltipTitle = _this$asProps3.tooltipTitle, tooltipViewType = _this$asProps3.tooltipViewType, showPercentValueInTooltip = _this$asProps3.showPercentValueInTooltip, styles = _this$asProps3.styles, showTooltip = _this$asProps3.showTooltip;
|
|
255
|
+
var _this$state2 = this.state, dataDefinitions = _this$state2.dataDefinitions, pX = _this$state2.pX, pY = _this$state2.pY;
|
|
256
|
+
var STooltipChildrenWrapper = Box;
|
|
130
257
|
if (!showTooltip) {
|
|
131
258
|
return null;
|
|
132
259
|
}
|
|
@@ -134,54 +261,105 @@ var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
|
|
|
134
261
|
x: invertAxis ? "" : void 0,
|
|
135
262
|
y: invertAxis ? void 0 : "",
|
|
136
263
|
wMin: 100,
|
|
137
|
-
hideHoverLine: true
|
|
264
|
+
hideHoverLine: true,
|
|
265
|
+
xIndex: pX !== null ? this.visualScale(pX) : void 0,
|
|
266
|
+
yIndex: pY !== null ? this.visualScale(pY) : void 0
|
|
138
267
|
}, function(tooltipProps) {
|
|
268
|
+
var _ref4;
|
|
139
269
|
var dataKey = invertAxis ? tooltipProps.xIndex : tooltipProps.yIndex;
|
|
140
|
-
var
|
|
270
|
+
var showPercentColumn = showPercentValueInTooltip && _this3.totalValue() !== 0;
|
|
141
271
|
if (tooltipViewType === "single") {
|
|
272
|
+
var _ref3;
|
|
142
273
|
var item = dataDefinitions.find(function(dataDefItem) {
|
|
143
274
|
return dataDefItem.id === dataKey;
|
|
144
275
|
});
|
|
145
276
|
if (!item) {
|
|
146
|
-
return
|
|
277
|
+
return {
|
|
278
|
+
children: null
|
|
279
|
+
};
|
|
147
280
|
}
|
|
148
281
|
return {
|
|
149
|
-
children: /* @__PURE__ */ React.createElement(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}, /* @__PURE__ */ React.createElement(HoverRect.Tooltip.Dot, {
|
|
153
|
-
mr:
|
|
282
|
+
children: (_ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(STooltipChildrenWrapper, _ref3.cn("STooltipChildrenWrapper", _objectSpread({}, assignProps({
|
|
283
|
+
"columnsCount": showPercentColumn ? "3" : "2",
|
|
284
|
+
"__excludeProps": ["data"]
|
|
285
|
+
}, _ref))), /* @__PURE__ */ React.createElement(HoverRect.Tooltip.Dot, {
|
|
286
|
+
mr: 2,
|
|
154
287
|
color: item.color
|
|
155
|
-
}, item.label), /* @__PURE__ */ React.createElement(Text, {
|
|
156
|
-
|
|
157
|
-
|
|
288
|
+
}, item.label), showPercentColumn && /* @__PURE__ */ React.createElement(Text, _ref3.cn("Text", {
|
|
289
|
+
"textAlign": "end",
|
|
290
|
+
"color": "text-secondary"
|
|
291
|
+
}), _this3.percentValue(data, item.id)), /* @__PURE__ */ React.createElement(Text, _ref3.cn("Text", {
|
|
292
|
+
"textAlign": "end",
|
|
293
|
+
"bold": true
|
|
294
|
+
}), _this3.tooltipValueFormatter(data[item.id]))))
|
|
158
295
|
};
|
|
159
296
|
}
|
|
160
297
|
return {
|
|
161
|
-
children:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
298
|
+
children: (_ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(Flex, _ref4.cn("Flex", {
|
|
299
|
+
"direction": "column"
|
|
300
|
+
}), tooltipTitle && /* @__PURE__ */ React.createElement(HoverRect.Tooltip.Title, null, "Some tooltip title"), /* @__PURE__ */ React.createElement(STooltipChildrenWrapper, _ref4.cn("STooltipChildrenWrapper", _objectSpread({}, assignProps({
|
|
301
|
+
"columnsCount": showPercentColumn ? "3" : "2",
|
|
302
|
+
"__excludeProps": ["data"]
|
|
303
|
+
}, _ref))), dataDefinitions.map(function(item2) {
|
|
304
|
+
var style = {
|
|
305
|
+
opacity: item2.id === dataKey ? 1 : 0.3
|
|
306
|
+
};
|
|
307
|
+
return item2.checked && /* @__PURE__ */ React.createElement(React.Fragment, {
|
|
308
|
+
key: item2.id
|
|
168
309
|
}, /* @__PURE__ */ React.createElement(HoverRect.Tooltip.Dot, {
|
|
169
|
-
mr:
|
|
170
|
-
color: item2.color
|
|
171
|
-
|
|
172
|
-
|
|
310
|
+
mr: 2,
|
|
311
|
+
color: item2.color,
|
|
312
|
+
style
|
|
313
|
+
}, item2.label), showPercentColumn && /* @__PURE__ */ React.createElement(Text, {
|
|
314
|
+
textAlign: "end",
|
|
315
|
+
color: "text-secondary",
|
|
316
|
+
style
|
|
317
|
+
}, _this3.percentValue(data, item2.id)), /* @__PURE__ */ React.createElement(Text, {
|
|
318
|
+
textAlign: "end",
|
|
319
|
+
bold: true,
|
|
320
|
+
style
|
|
173
321
|
}, _this3.tooltipValueFormatter(data[item2.id])));
|
|
174
|
-
}),
|
|
175
|
-
mt: 2,
|
|
176
|
-
justifyContent: "space-between"
|
|
177
|
-
}, /* @__PURE__ */ React.createElement(Box, {
|
|
178
|
-
mr: 4
|
|
179
|
-
}, "Total"), /* @__PURE__ */ React.createElement(Text, {
|
|
180
|
-
bold: true
|
|
181
|
-
}, total)))
|
|
322
|
+
}), _this3.renderTooltipTotalLine(data))))
|
|
182
323
|
};
|
|
183
324
|
});
|
|
184
325
|
}
|
|
326
|
+
}, {
|
|
327
|
+
key: "percentValue",
|
|
328
|
+
value: function percentValue(data, key) {
|
|
329
|
+
var percentFormatter = this.asProps.percentFormatter;
|
|
330
|
+
var total = this.totalValue();
|
|
331
|
+
var value = data[key];
|
|
332
|
+
if (typeof value === "number" && total !== 0) {
|
|
333
|
+
var rawPercent = 100 * value / total;
|
|
334
|
+
var formattedPercent = percentFormatter ? percentFormatter(rawPercent) : Math.round(rawPercent);
|
|
335
|
+
return "".concat(formattedPercent, "%");
|
|
336
|
+
}
|
|
337
|
+
if (value === null) {
|
|
338
|
+
return "0%";
|
|
339
|
+
}
|
|
340
|
+
return NOT_A_VALUE;
|
|
341
|
+
}
|
|
342
|
+
}, {
|
|
343
|
+
key: "renderTooltipTotalLine",
|
|
344
|
+
value: function renderTooltipTotalLine(dataItem) {
|
|
345
|
+
var _this$asProps4 = this.asProps, showTotalInTooltip = _this$asProps4.showTotalInTooltip, showPercentValueInTooltip = _this$asProps4.showPercentValueInTooltip;
|
|
346
|
+
if (!showTotalInTooltip) {
|
|
347
|
+
return null;
|
|
348
|
+
}
|
|
349
|
+
var total = this.totalValue();
|
|
350
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Box, {
|
|
351
|
+
mt: 2,
|
|
352
|
+
mr: 2
|
|
353
|
+
}, "Total"), showPercentValueInTooltip && total !== 0 && /* @__PURE__ */ React.createElement(Text, {
|
|
354
|
+
mt: 2,
|
|
355
|
+
textAlign: "end",
|
|
356
|
+
color: "text-secondary"
|
|
357
|
+
}, Number.isNaN(total) ? NOT_A_VALUE : "100%"), /* @__PURE__ */ React.createElement(Text, {
|
|
358
|
+
mt: 2,
|
|
359
|
+
textAlign: "end",
|
|
360
|
+
bold: true
|
|
361
|
+
}, Number.isNaN(total) ? NOT_A_VALUE : total));
|
|
362
|
+
}
|
|
185
363
|
}, {
|
|
186
364
|
key: "renderHeader",
|
|
187
365
|
value: function renderHeader() {
|
|
@@ -191,43 +369,49 @@ var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
|
|
|
191
369
|
}, {
|
|
192
370
|
key: "render",
|
|
193
371
|
value: function render() {
|
|
194
|
-
var
|
|
372
|
+
var _ref2 = this.asProps, _ref6;
|
|
195
373
|
var SChart = Flex;
|
|
196
|
-
var _this$
|
|
374
|
+
var _this$asProps5 = this.asProps, styles = _this$asProps5.styles, plotWidth = _this$asProps5.plotWidth, plotHeight = _this$asProps5.plotHeight, data = _this$asProps5.data, patterns = _this$asProps5.patterns, invertAxis = _this$asProps5.invertAxis, a11yAltTextConfig = _this$asProps5.a11yAltTextConfig;
|
|
197
375
|
var header = this.renderHeader();
|
|
198
376
|
if (invertAxis) {
|
|
199
|
-
var
|
|
200
|
-
return
|
|
377
|
+
var _ref5;
|
|
378
|
+
return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SChart, _ref5.cn("SChart", _objectSpread({}, assignProps({
|
|
201
379
|
"gap": 6,
|
|
202
380
|
"direction": "column",
|
|
203
381
|
"__excludeProps": ["onClick", "data"]
|
|
204
|
-
},
|
|
382
|
+
}, _ref2))), /* @__PURE__ */ React.createElement(Flex, _ref5.cn("Flex", {
|
|
205
383
|
"direction": "column"
|
|
206
|
-
}), header, /* @__PURE__ */ React.createElement(Plot,
|
|
384
|
+
}), header, /* @__PURE__ */ React.createElement(Plot, _ref5.cn("Plot", {
|
|
385
|
+
"ref": this.plotRef,
|
|
207
386
|
"data": data,
|
|
208
387
|
"scale": [this.xScale, this.yScale],
|
|
209
388
|
"width": plotWidth,
|
|
210
389
|
"height": plotHeight,
|
|
211
390
|
"dataHints": this.dataHints,
|
|
212
391
|
"patterns": patterns,
|
|
213
|
-
"a11yAltTextConfig": a11yAltTextConfig
|
|
392
|
+
"a11yAltTextConfig": a11yAltTextConfig,
|
|
393
|
+
"onMouseMove": this.onPlotMouseMove,
|
|
394
|
+
"onMouseLeave": this.onPlotMouseLeave
|
|
214
395
|
}), this.renderTooltip(), this.renderChart())), this.renderLegend());
|
|
215
396
|
}
|
|
216
|
-
return
|
|
397
|
+
return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SChart, _ref6.cn("SChart", _objectSpread({}, assignProps({
|
|
217
398
|
"gap": 6,
|
|
218
399
|
"__excludeProps": ["onClick", "data"]
|
|
219
|
-
},
|
|
400
|
+
}, _ref2))), /* @__PURE__ */ React.createElement(Plot, _ref6.cn("Plot", {
|
|
401
|
+
"ref": this.plotRef,
|
|
220
402
|
"data": data,
|
|
221
403
|
"scale": [this.xScale, this.yScale],
|
|
222
404
|
"width": plotWidth,
|
|
223
405
|
"height": plotHeight,
|
|
224
406
|
"dataHints": this.dataHints,
|
|
225
407
|
"patterns": patterns,
|
|
226
|
-
"a11yAltTextConfig": a11yAltTextConfig
|
|
227
|
-
|
|
408
|
+
"a11yAltTextConfig": a11yAltTextConfig,
|
|
409
|
+
"onMouseMove": this.onPlotMouseMove,
|
|
410
|
+
"onMouseLeave": this.onPlotMouseLeave
|
|
411
|
+
}), this.renderTooltip(), this.renderChart()), /* @__PURE__ */ React.createElement(Flex, _ref6.cn("Flex", {
|
|
228
412
|
"direction": "column",
|
|
229
413
|
"gap": 2
|
|
230
|
-
}), header && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Box,
|
|
414
|
+
}), header && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Box, _ref6.cn("Box", {}), header), /* @__PURE__ */ React.createElement(Divider, _ref6.cn("Divider", {}))), this.renderLegend()));
|
|
231
415
|
}
|
|
232
416
|
}, {
|
|
233
417
|
key: "getLegendAriaLabel",
|
|
@@ -237,39 +421,32 @@ var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
|
|
|
237
421
|
});
|
|
238
422
|
}
|
|
239
423
|
}, {
|
|
240
|
-
key: "
|
|
424
|
+
key: "visualScale",
|
|
241
425
|
get: function get() {
|
|
242
|
-
var
|
|
243
|
-
var
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
426
|
+
var cigaretteItems = this.computeCigaretteItems();
|
|
427
|
+
var _cigaretteItems$reduc = cigaretteItems.reduce(function(acc, _ref1, index) {
|
|
428
|
+
var id = _ref1.id, visualWidth = _ref1.visualWidth;
|
|
429
|
+
var range2 = acc.range, domain2 = acc.domain;
|
|
430
|
+
if (visualWidth) {
|
|
431
|
+
range2.push(id);
|
|
432
|
+
if (domain2.length === 0) {
|
|
433
|
+
domain2.push(visualWidth + DEFAULT_GAP);
|
|
434
|
+
return acc;
|
|
435
|
+
}
|
|
436
|
+
if (index !== cigaretteItems.length - 1) {
|
|
437
|
+
var lastAddedDomain = domain2[domain2.length - 1];
|
|
438
|
+
domain2.push(lastAddedDomain + visualWidth + DEFAULT_GAP);
|
|
439
|
+
}
|
|
249
440
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
var _this$asProps4 = this.asProps, plotWidth = _this$asProps4.plotWidth, plotHeight = _this$asProps4.plotHeight, invertAxis = _this$asProps4.invertAxis;
|
|
257
|
-
var range = invertAxis ? [plotHeight, 0] : [0, plotWidth];
|
|
258
|
-
return scaleBand([0], range);
|
|
259
|
-
}
|
|
260
|
-
}, {
|
|
261
|
-
key: "valueScale",
|
|
262
|
-
get: function get() {
|
|
263
|
-
var _this$asProps5 = this.asProps, plotWidth = _this$asProps5.plotWidth, plotHeight = _this$asProps5.plotHeight, invertAxis = _this$asProps5.invertAxis;
|
|
264
|
-
var max = 0;
|
|
265
|
-
this.selectedData.forEach(function(value) {
|
|
266
|
-
max = max + value;
|
|
267
|
-
});
|
|
268
|
-
return scaleLinear().range(invertAxis ? [0, plotWidth] : [plotHeight, 0]).domain([0, max]);
|
|
441
|
+
return acc;
|
|
442
|
+
}, {
|
|
443
|
+
range: [],
|
|
444
|
+
domain: []
|
|
445
|
+
}), range = _cigaretteItems$reduc.range, domain = _cigaretteItems$reduc.domain;
|
|
446
|
+
return scaleThreshold(domain, range);
|
|
269
447
|
}
|
|
270
448
|
}]);
|
|
271
|
-
|
|
272
|
-
}(AbstractChart);
|
|
449
|
+
})(AbstractChart);
|
|
273
450
|
_defineProperty(CigaretteChartComponent, "displayName", "Cigarette.Bar");
|
|
274
451
|
_defineProperty(CigaretteChartComponent, "defaultProps", function(props) {
|
|
275
452
|
var _props$invertAxis;
|
|
@@ -284,7 +461,9 @@ _defineProperty(CigaretteChartComponent, "defaultProps", function(props) {
|
|
|
284
461
|
marginY: 0,
|
|
285
462
|
duration: 500,
|
|
286
463
|
plotWidth: !invertAxis && !props.plotWidth ? 44 : props.plotWidth,
|
|
287
|
-
plotHeight: invertAxis && !props.plotHeight ? 28 : props.plotHeight
|
|
464
|
+
plotHeight: invertAxis && !props.plotHeight ? 28 : props.plotHeight,
|
|
465
|
+
showPercentValueInTooltip: false,
|
|
466
|
+
minimalBarWidth: DEFAULT_MINIMAL_BAR_WIDTH
|
|
288
467
|
};
|
|
289
468
|
});
|
|
290
469
|
_defineProperty(CigaretteChartComponent, "enhance", [resolveColorEnhance(), uniqueIDEnhancement(), i18nEnhance(localizedMessages)]);
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
+
import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
|
|
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
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import { createComponent } from "@semcore/core";
|
|
9
|
+
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
11
10
|
import { scaleBand, scaleLinear } from "d3-scale";
|
|
12
|
-
import
|
|
11
|
+
import React from "react";
|
|
12
|
+
import "../../index.mjs";
|
|
13
13
|
import { AbstractChart } from "./AbstractChart.mjs";
|
|
14
14
|
import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
|
|
15
|
-
import
|
|
16
|
-
var CompactHorizontalBarChartComponent = /* @__PURE__ */ function(_AbstractChart) {
|
|
17
|
-
_inherits(CompactHorizontalBarChartComponent2, _AbstractChart);
|
|
18
|
-
var _super = _createSuper(CompactHorizontalBarChartComponent2);
|
|
15
|
+
import CompactHorizontalBar from "../../CompactHorizontalBar.mjs";
|
|
16
|
+
var CompactHorizontalBarChartComponent = /* @__PURE__ */ (function(_AbstractChart) {
|
|
19
17
|
function CompactHorizontalBarChartComponent2() {
|
|
20
18
|
_classCallCheck(this, CompactHorizontalBarChartComponent2);
|
|
21
|
-
return
|
|
19
|
+
return _callSuper(this, CompactHorizontalBarChartComponent2, arguments);
|
|
22
20
|
}
|
|
23
|
-
|
|
21
|
+
_inherits(CompactHorizontalBarChartComponent2, _AbstractChart);
|
|
22
|
+
return _createClass(CompactHorizontalBarChartComponent2, [{
|
|
24
23
|
key: "xScale",
|
|
25
24
|
get: function get() {
|
|
26
25
|
var _this$asProps$xScale;
|
|
@@ -90,14 +89,13 @@ var CompactHorizontalBarChartComponent = /* @__PURE__ */ function(_AbstractChart
|
|
|
90
89
|
key: "valueScale",
|
|
91
90
|
get: function get() {
|
|
92
91
|
var _this$asProps4 = this.asProps, _this$asProps4$margin = _this$asProps4.marginY, marginY = _this$asProps4$margin === void 0 ? 0 : _this$asProps4$margin, plotWidth = _this$asProps4.plotWidth;
|
|
93
|
-
var sum = _toConsumableArray(
|
|
92
|
+
var sum = _toConsumableArray(_superPropGet(CompactHorizontalBarChartComponent2, "flatValues", this, 1).values()).reduce(function(acc, d) {
|
|
94
93
|
return acc + d;
|
|
95
94
|
}, 0);
|
|
96
95
|
return scaleLinear().range([marginY, plotWidth]).domain([marginY, sum]);
|
|
97
96
|
}
|
|
98
97
|
}]);
|
|
99
|
-
|
|
100
|
-
}(AbstractChart);
|
|
98
|
+
})(AbstractChart);
|
|
101
99
|
_defineProperty(CompactHorizontalBarChartComponent, "displayName", "Chart.CompactHorizontalBar");
|
|
102
100
|
_defineProperty(CompactHorizontalBarChartComponent, "defaultProps", {
|
|
103
101
|
direction: "column",
|