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