@semcore/d3-chart 16.5.0 → 17.0.0-prerelease.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/lib/cjs/AnimatedClipPath.js +28 -41
- package/lib/cjs/AnimatedClipPath.js.map +1 -1
- package/lib/cjs/Area.js +187 -223
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +248 -327
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +162 -185
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +219 -248
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +448 -482
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +349 -396
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +67 -86
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +78 -93
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +149 -167
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +178 -207
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +182 -222
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Pattern.js +124 -126
- package/lib/cjs/Pattern.js.map +1 -1
- package/lib/cjs/Plot.js +100 -126
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +576 -681
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +518 -571
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/Reference.js +147 -178
- package/lib/cjs/Reference.js.map +1 -1
- package/lib/cjs/ResponsiveContainer.js +64 -82
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +169 -199
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/StackBar.js +135 -177
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +60 -73
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +193 -208
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +182 -217
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/DataAccessibilityTable.js +45 -83
- package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +37 -97
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +97 -91
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/a11y/bezier.js +17 -23
- package/lib/cjs/a11y/bezier.js.map +1 -1
- package/lib/cjs/a11y/focus.js +16 -16
- package/lib/cjs/a11y/focus.js.map +1 -1
- package/lib/cjs/a11y/hints.js +72 -75
- package/lib/cjs/a11y/hints.js.map +1 -1
- package/lib/cjs/a11y/insights.js +354 -525
- package/lib/cjs/a11y/insights.js.map +1 -1
- package/lib/cjs/a11y/intl.js +5 -5
- package/lib/cjs/a11y/intl.js.map +1 -1
- package/lib/cjs/a11y/locale.js +12 -19
- package/lib/cjs/a11y/locale.js.map +1 -1
- package/lib/cjs/a11y/serialize.js +164 -203
- package/lib/cjs/a11y/serialize.js.map +1 -1
- package/lib/cjs/a11y/summarize.js +7 -6
- package/lib/cjs/a11y/summarize.js.map +1 -1
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +16 -16
- 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 +16 -16
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/color.js +1 -1
- package/lib/cjs/color.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.js +421 -466
- 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 +97 -115
- 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 +229 -216
- 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 +114 -136
- 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 +280 -305
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +76 -108
- 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 +80 -95
- 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 +126 -148
- 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 +95 -113
- 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 +84 -110
- 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 +119 -143
- 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 +103 -122
- 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 +2 -2
- package/lib/cjs/component/Chart/index.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +72 -105
- 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 +58 -70
- 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 +208 -221
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +63 -73
- 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 +4 -4
- package/lib/cjs/component/ChartLegend/index.js.map +1 -1
- package/lib/cjs/component/Cigarette/Cigarette.js +115 -129
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js +107 -137
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/cjs/component/SvgElement.js +7 -7
- package/lib/cjs/component/SvgElement.js.map +1 -1
- package/lib/cjs/createElement.js +66 -65
- package/lib/cjs/createElement.js.map +1 -1
- package/lib/cjs/index.js +62 -62
- package/lib/cjs/style/axis.shadow.css +3 -0
- package/lib/cjs/style/plot.shadow.css +1 -3
- 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 +15 -15
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/types/Axis.d.js.map +1 -1
- package/lib/cjs/types/CompactHorizontalBar.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/ResponsiveContainer.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/index.d.js +80 -80
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js +122 -145
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/AnimatedClipPath.js +24 -37
- package/lib/es6/AnimatedClipPath.js.map +1 -1
- package/lib/es6/Area.js +179 -215
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +242 -321
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +154 -177
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +206 -235
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +433 -467
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +337 -384
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +60 -79
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +74 -89
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +141 -159
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +174 -203
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +173 -213
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Pattern.js +68 -74
- package/lib/es6/Pattern.js.map +1 -1
- package/lib/es6/Plot.js +95 -121
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +554 -659
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +500 -553
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/Reference.js +140 -171
- package/lib/es6/Reference.js.map +1 -1
- package/lib/es6/ResponsiveContainer.js +58 -76
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +161 -191
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/StackBar.js +130 -172
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +56 -69
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +183 -198
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +169 -204
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/DataAccessibilityTable.js +41 -80
- package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +35 -95
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +89 -84
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/a11y/bezier.js +16 -23
- package/lib/es6/a11y/bezier.js.map +1 -1
- package/lib/es6/a11y/focus.js +15 -16
- package/lib/es6/a11y/focus.js.map +1 -1
- package/lib/es6/a11y/hints.js +67 -73
- package/lib/es6/a11y/hints.js.map +1 -1
- package/lib/es6/a11y/insights.js +353 -524
- package/lib/es6/a11y/insights.js.map +1 -1
- package/lib/es6/a11y/intl.js +4 -5
- package/lib/es6/a11y/intl.js.map +1 -1
- package/lib/es6/a11y/locale.js +11 -18
- package/lib/es6/a11y/locale.js.map +1 -1
- package/lib/es6/a11y/serialize.js +162 -203
- package/lib/es6/a11y/serialize.js.map +1 -1
- package/lib/es6/a11y/summarize.js +6 -6
- package/lib/es6/a11y/summarize.js.map +1 -1
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +15 -15
- 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 +15 -15
- 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 +416 -462
- 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 +92 -111
- 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 +225 -213
- 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 +109 -132
- 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 +276 -301
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js +70 -103
- 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 +74 -90
- 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 +121 -144
- 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 +90 -109
- 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 +80 -107
- 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 +113 -138
- 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 +97 -117
- 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/ChartLegend/BaseLegend.js +70 -104
- 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 +53 -65
- 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 +198 -211
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +58 -68
- 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/Cigarette/Cigarette.js +108 -122
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.js +100 -130
- package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/es6/component/SvgElement.js +4 -5
- package/lib/es6/component/SvgElement.js.map +1 -1
- package/lib/es6/createElement.js +55 -54
- package/lib/es6/createElement.js.map +1 -1
- package/lib/es6/style/axis.shadow.css +3 -0
- package/lib/es6/style/plot.shadow.css +1 -3
- 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 +14 -14
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/types/Axis.d.js.map +1 -1
- package/lib/es6/types/CompactHorizontalBar.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/ResponsiveContainer.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/utils.js +105 -144
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/AnimatedClipPath.mjs +24 -36
- package/lib/esm/Area.mjs +178 -149
- package/lib/esm/Axis.mjs +241 -242
- package/lib/esm/Bar.mjs +155 -137
- package/lib/esm/Bubble.mjs +205 -171
- package/lib/esm/CompactHorizontalBar.mjs +428 -383
- package/lib/esm/Donut.mjs +315 -266
- package/lib/esm/Dots.mjs +60 -49
- package/lib/esm/GroupBar.mjs +71 -75
- package/lib/esm/HorizontalBar.mjs +142 -120
- package/lib/esm/Hover.mjs +173 -163
- package/lib/esm/Line.mjs +174 -145
- package/lib/esm/Pattern.mjs +67 -63
- package/lib/esm/Plot.mjs +98 -95
- package/lib/esm/Radar.mjs +550 -498
- package/lib/esm/RadialTree.mjs +512 -416
- package/lib/esm/Reference.mjs +137 -122
- package/lib/esm/ResponsiveContainer.mjs +58 -69
- package/lib/esm/ScatterPlot.mjs +163 -162
- package/lib/esm/StackBar.mjs +126 -147
- package/lib/esm/StackedArea.mjs +53 -61
- package/lib/esm/Tooltip.mjs +185 -175
- package/lib/esm/Venn.mjs +170 -170
- package/lib/esm/a11y/DataAccessibilityTable.mjs +46 -73
- package/lib/esm/a11y/PlotA11yModule.mjs +37 -80
- package/lib/esm/a11y/PlotA11yView.mjs +99 -74
- package/lib/esm/a11y/bezier.mjs +16 -23
- package/lib/esm/a11y/focus.mjs +15 -16
- package/lib/esm/a11y/hints.mjs +65 -71
- package/lib/esm/a11y/insights.mjs +347 -495
- package/lib/esm/a11y/intl.mjs +4 -5
- package/lib/esm/a11y/locale.mjs +12 -14
- package/lib/esm/a11y/serialize.mjs +139 -152
- package/lib/esm/a11y/summarize.mjs +3 -3
- package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +1 -1
- 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 +1 -1
- package/lib/esm/color.mjs +1 -1
- package/lib/esm/component/Chart/AbstractChart.mjs +422 -415
- package/lib/esm/component/Chart/AreaChart.mjs +92 -91
- package/lib/esm/component/Chart/BarChart.mjs +225 -177
- package/lib/esm/component/Chart/BubbleChart.mjs +110 -118
- package/lib/esm/component/Chart/CigaretteChart.mjs +277 -268
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +70 -87
- package/lib/esm/component/Chart/DonutChart.mjs +74 -84
- package/lib/esm/component/Chart/HistogramChart.mjs +121 -117
- package/lib/esm/component/Chart/LineChart.mjs +90 -89
- package/lib/esm/component/Chart/RadarChart.mjs +81 -97
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +113 -111
- package/lib/esm/component/Chart/VennChart.mjs +98 -111
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +75 -97
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +54 -55
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +194 -165
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.type.mjs +1 -1
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +60 -58
- package/lib/esm/component/Cigarette/Cigarette.mjs +109 -99
- package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +97 -111
- package/lib/esm/component/SvgElement.mjs +4 -4
- package/lib/esm/createElement.mjs +54 -37
- package/lib/esm/style/axis.shadow.css +3 -0
- package/lib/esm/style/plot.shadow.css +1 -3
- 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 +1 -1
- package/lib/esm/utils.mjs +103 -138
- package/lib/types/Axis.d.ts +4 -0
- package/lib/types/CompactHorizontalBar.d.ts +1 -1
- package/lib/types/Hover.d.ts +1 -1
- package/lib/types/Line.d.ts +1 -1
- package/lib/types/Plot.d.ts +1 -1
- package/lib/types/Radar.d.ts +1 -1
- package/lib/types/ResponsiveContainer.d.ts +1 -1
- package/lib/types/Tooltip.d.ts +1 -3
- package/lib/types/Venn.d.ts +1 -1
- package/lib/types/a11y/PlotA11yModule.d.ts +4 -11
- package/lib/types/a11y/PlotA11yView.d.ts +12 -1
- package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
- package/lib/types/component/Chart/AbstractChart.d.ts +1 -1
- package/lib/types/component/Chart/AbstractChart.type.d.ts +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -1
- package/lib/types/utils.d.ts +10 -10
- package/package.json +11 -14
package/lib/esm/Dots.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
1
|
import { sstyled } from "@semcore/core";
|
|
3
2
|
import trottle from "@semcore/core/lib/utils/rafTrottle";
|
|
4
3
|
import { bisector } from "d3-array";
|
|
@@ -7,77 +6,89 @@ import createElement from "./createElement.mjs";
|
|
|
7
6
|
import { getPatternSymbolSize, PatternSymbol } from "./Pattern.mjs";
|
|
8
7
|
import { interpolateValue, eventToPoint, invert, getChartDefaultColorName } from "./utils.mjs";
|
|
9
8
|
/*!__reshadow-styles__:"./style/dot.shadow.css"*/
|
|
10
|
-
|
|
9
|
+
const style = (
|
|
11
10
|
/*__reshadow_css_start__*/
|
|
12
11
|
(sstyled.insert(
|
|
13
12
|
/*__inner_css_start__*/
|
|
14
|
-
".
|
|
13
|
+
".___SDots_kz49v_gg_ .___SDot_kz49v_gg_{transition-duration:var(--duration_kz49v)}.___SDot_kz49v_gg_{stroke-width:1px;stroke:var(--intergalactic-chart-grid-border, #ffffff);fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:cx,cy,x,y;transition-timing-function:ease-in-out}.___SDot_kz49v_gg_.__hide_kz49v_gg_{display:none}.___SDot_kz49v_gg_.__color_kz49v_gg_{fill:var(--color_kz49v)}.___SDot_kz49v_gg_.__transparent_kz49v_gg_{opacity:.3}",
|
|
15
14
|
/*__inner_css_end__*/
|
|
16
|
-
"
|
|
15
|
+
"kz49v_gg_"
|
|
17
16
|
), /*__reshadow_css_end__*/
|
|
18
17
|
{
|
|
19
|
-
"__SDot": "
|
|
20
|
-
"_hide": "
|
|
21
|
-
"_color": "
|
|
22
|
-
"--color": "--
|
|
23
|
-
"_transparent": "
|
|
24
|
-
"__SDots": "
|
|
25
|
-
"--duration": "--
|
|
18
|
+
"__SDot": "___SDot_kz49v_gg_",
|
|
19
|
+
"_hide": "__hide_kz49v_gg_",
|
|
20
|
+
"_color": "__color_kz49v_gg_",
|
|
21
|
+
"--color": "--color_kz49v",
|
|
22
|
+
"_transparent": "__transparent_kz49v_gg_",
|
|
23
|
+
"__SDots": "___SDots_kz49v_gg_",
|
|
24
|
+
"--duration": "--duration_kz49v"
|
|
26
25
|
})
|
|
27
26
|
);
|
|
28
27
|
function Dots(props) {
|
|
29
28
|
var _ref3;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
const {
|
|
30
|
+
Element: SDot,
|
|
31
|
+
styles,
|
|
32
|
+
color,
|
|
33
|
+
d3,
|
|
34
|
+
x,
|
|
35
|
+
y,
|
|
36
|
+
eventEmitter,
|
|
37
|
+
display,
|
|
38
|
+
hide,
|
|
39
|
+
rootRef,
|
|
40
|
+
scale,
|
|
41
|
+
duration = 500,
|
|
42
|
+
transparent,
|
|
43
|
+
radius: radiusBase = 4,
|
|
44
|
+
resolveColor,
|
|
45
|
+
patterns,
|
|
46
|
+
onClick
|
|
47
|
+
} = props;
|
|
48
|
+
const bisect = bisector((d) => d[x]).center;
|
|
49
|
+
const [activeIndex, setActiveIndex] = React.useState(null);
|
|
50
|
+
const patternKey = color || getChartDefaultColorName(0);
|
|
51
|
+
const svgPatternId = `template_${patternKey}`;
|
|
52
|
+
const data = React.useMemo(() => props.data.filter((item) => item[y] !== interpolateValue), [props.data]);
|
|
53
|
+
const handlerMouseMoveRoot = React.useCallback(trottle((e) => {
|
|
54
|
+
const [xScale] = scale;
|
|
55
|
+
const [pX] = eventToPoint(e, rootRef.current);
|
|
56
|
+
const vX = invert(xScale, pX);
|
|
46
57
|
setActiveIndex(bisect(data, vX));
|
|
47
58
|
}), [scale, data]);
|
|
48
|
-
|
|
59
|
+
const handlerMouseLeaveRoot = React.useCallback(trottle(() => {
|
|
49
60
|
setActiveIndex(null);
|
|
50
61
|
}), []);
|
|
51
|
-
|
|
62
|
+
const handlerOnClick = React.useCallback((e) => {
|
|
52
63
|
e.stopPropagation();
|
|
53
64
|
if (!onClick) return;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
65
|
+
const [xScale] = scale;
|
|
66
|
+
const [pX] = eventToPoint(e, rootRef.current);
|
|
67
|
+
const vX = invert(xScale, pX);
|
|
68
|
+
const index = bisect(data, vX);
|
|
58
69
|
onClick(index, e);
|
|
59
70
|
}, [scale, data, onClick]);
|
|
60
|
-
React.useEffect(
|
|
61
|
-
|
|
71
|
+
React.useEffect(() => {
|
|
72
|
+
const unsubscribeMouseMoveRoot = eventEmitter.subscribe("onMouseMoveChart", (e) => {
|
|
62
73
|
e.persist();
|
|
63
74
|
handlerMouseMoveRoot(e);
|
|
64
75
|
});
|
|
65
|
-
|
|
66
|
-
return
|
|
76
|
+
const unsubscribeMouseLeaveRoot = eventEmitter.subscribe("onMouseLeaveChart", handlerMouseLeaveRoot);
|
|
77
|
+
return () => {
|
|
67
78
|
unsubscribeMouseMoveRoot();
|
|
68
79
|
unsubscribeMouseLeaveRoot();
|
|
69
80
|
};
|
|
70
81
|
}, [eventEmitter, scale, data, x, y]);
|
|
71
|
-
|
|
82
|
+
const [width, height] = getPatternSymbolSize({
|
|
72
83
|
patternKey,
|
|
73
84
|
patterns
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
85
|
+
});
|
|
86
|
+
const dots = data.reduce((acc, d, i) => {
|
|
87
|
+
const isPrev = d3.defined()(data[i - 1] || {});
|
|
88
|
+
const isNext = d3.defined()(data[i + 1] || {});
|
|
89
|
+
const active = i === activeIndex;
|
|
90
|
+
const visible = typeof display === "function" ? display(i, i === activeIndex, !isPrev && !isNext) : display || i === activeIndex || !isPrev && !isNext;
|
|
91
|
+
const radius = radiusBase * (active ? 5 / 4 : 1);
|
|
81
92
|
if (!d3.defined()(d)) return acc;
|
|
82
93
|
if (!visible) return acc;
|
|
83
94
|
if (!patterns) {
|
|
@@ -87,7 +98,7 @@ function Dots(props) {
|
|
|
87
98
|
"color": resolveColor(color),
|
|
88
99
|
"patternKey": patternKey,
|
|
89
100
|
"patterns": patterns,
|
|
90
|
-
"key":
|
|
101
|
+
"key": `${i}`,
|
|
91
102
|
"value": d,
|
|
92
103
|
"visible": visible,
|
|
93
104
|
"active": active,
|
|
@@ -103,7 +114,7 @@ function Dots(props) {
|
|
|
103
114
|
acc.push((_ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SDot, _ref2.cn("SDot", {
|
|
104
115
|
"key": i,
|
|
105
116
|
"render": "use",
|
|
106
|
-
"href":
|
|
117
|
+
"href": `#${svgPatternId}`,
|
|
107
118
|
"x": width + (d3.x()(d) - width / 2),
|
|
108
119
|
"y": d3.y()(d) - height / 2,
|
|
109
120
|
"value": d,
|
|
@@ -117,9 +128,9 @@ function Dots(props) {
|
|
|
117
128
|
}
|
|
118
129
|
return acc;
|
|
119
130
|
}, []);
|
|
120
|
-
|
|
131
|
+
const SDots = "g";
|
|
121
132
|
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SDots, _ref3.cn("SDots", {
|
|
122
|
-
"duration":
|
|
133
|
+
"duration": `${duration}ms`,
|
|
123
134
|
"onClickCapture": handlerOnClick
|
|
124
135
|
}), /* @__PURE__ */ React.createElement(PatternSymbol, _ref3.cn("PatternSymbol", {
|
|
125
136
|
"color": resolveColor(color),
|
package/lib/esm/GroupBar.mjs
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
2
|
import { Component } from "@semcore/core";
|
|
7
3
|
import getOriginChildren from "@semcore/core/lib/utils/getOriginChildren";
|
|
@@ -11,79 +7,79 @@ import Bar from "./Bar.mjs";
|
|
|
11
7
|
import createElement from "./createElement.mjs";
|
|
12
8
|
import HorizontalBar from "./HorizontalBar.mjs";
|
|
13
9
|
import { scaleToBand, getChartDefaultColorName } from "./utils.mjs";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
class GroupBarRoot extends Component {
|
|
11
|
+
getScaleGroup() {
|
|
12
|
+
const {
|
|
13
|
+
Children,
|
|
14
|
+
scale,
|
|
15
|
+
scaleGroup,
|
|
16
|
+
x
|
|
17
|
+
} = this.asProps;
|
|
18
|
+
const xyScale = x ? scale[0] : scale[1];
|
|
19
|
+
if (scaleGroup) return scaleGroup;
|
|
20
|
+
const domain = React.Children.toArray(getOriginChildren(Children)).reduce((acc, child) => {
|
|
21
|
+
if (/* @__PURE__ */ React.isValidElement(child) && child.type === GroupBar.Bar && !child.props.hide) {
|
|
22
|
+
acc.push(child.props.y);
|
|
23
|
+
}
|
|
24
|
+
if (/* @__PURE__ */ React.isValidElement(child) && child.type === GroupBar.HorizontalBar && !child.props.hide) {
|
|
25
|
+
acc.push(child.props.x);
|
|
26
|
+
}
|
|
27
|
+
return acc;
|
|
28
|
+
}, []);
|
|
29
|
+
return scaleBand().range([0, scaleToBand(xyScale).bandwidth()]).domain(domain).paddingInner(0.1).paddingOuter(0.1);
|
|
18
30
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
}, {
|
|
71
|
-
key: "render",
|
|
72
|
-
value: function render() {
|
|
73
|
-
var Element = this.Element;
|
|
74
|
-
this.scaleGroup = this.getScaleGroup();
|
|
75
|
-
this.asProps.dataHintsHandler.establishDataType("grouped-values");
|
|
76
|
-
return /* @__PURE__ */ React.createElement(Element, {
|
|
77
|
-
"aria-hidden": true,
|
|
78
|
-
render: "g",
|
|
79
|
-
childrenPosition: "inside",
|
|
80
|
-
scaleGroup: this.scaleGroup
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}]);
|
|
84
|
-
})(Component);
|
|
31
|
+
getBarProps({
|
|
32
|
+
y
|
|
33
|
+
}, index) {
|
|
34
|
+
const {
|
|
35
|
+
x,
|
|
36
|
+
maxBarSize = Number.POSITIVE_INFINITY,
|
|
37
|
+
patterns
|
|
38
|
+
} = this.asProps;
|
|
39
|
+
const bandWidth = this.scaleGroup.bandwidth();
|
|
40
|
+
const width = Math.min(bandWidth, maxBarSize);
|
|
41
|
+
const offsetX = this.scaleGroup(y) + bandWidth / 2 - width / 2;
|
|
42
|
+
return {
|
|
43
|
+
offset: [offsetX, 0],
|
|
44
|
+
width,
|
|
45
|
+
color: getChartDefaultColorName(index),
|
|
46
|
+
x,
|
|
47
|
+
groupKey: x,
|
|
48
|
+
patterns
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
getHorizontalBarProps({
|
|
52
|
+
x
|
|
53
|
+
}, index) {
|
|
54
|
+
const {
|
|
55
|
+
y,
|
|
56
|
+
maxBarSize = Number.POSITIVE_INFINITY
|
|
57
|
+
} = this.asProps;
|
|
58
|
+
const bandWidth = this.scaleGroup.bandwidth();
|
|
59
|
+
const height = Math.min(bandWidth, maxBarSize);
|
|
60
|
+
const offsetY = this.scaleGroup(x) + bandWidth / 2 - height / 2;
|
|
61
|
+
return {
|
|
62
|
+
offset: [0, offsetY],
|
|
63
|
+
height,
|
|
64
|
+
color: getChartDefaultColorName(index),
|
|
65
|
+
y,
|
|
66
|
+
groupKey: y
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
render() {
|
|
70
|
+
const Element = this.Element;
|
|
71
|
+
this.scaleGroup = this.getScaleGroup();
|
|
72
|
+
this.asProps.dataHintsHandler.establishDataType("grouped-values");
|
|
73
|
+
return /* @__PURE__ */ React.createElement(Element, {
|
|
74
|
+
"aria-hidden": true,
|
|
75
|
+
render: "g",
|
|
76
|
+
childrenPosition: "inside",
|
|
77
|
+
scaleGroup: this.scaleGroup
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
85
81
|
_defineProperty(GroupBarRoot, "displayName", "GroupBar");
|
|
86
|
-
|
|
82
|
+
const GroupBar = createElement(GroupBarRoot, {
|
|
87
83
|
Bar,
|
|
88
84
|
HorizontalBar
|
|
89
85
|
});
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
2
|
import { sstyled, Component } from "@semcore/core";
|
|
8
3
|
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
@@ -12,144 +7,165 @@ import createElement from "./createElement.mjs";
|
|
|
12
7
|
import { PatternFill } from "./Pattern.mjs";
|
|
13
8
|
import { scaleToBand, roundedPath } from "./utils.mjs";
|
|
14
9
|
/*!__reshadow-styles__:"./style/bar.shadow.css"*/
|
|
15
|
-
|
|
10
|
+
const style = (
|
|
16
11
|
/*__reshadow_css_start__*/
|
|
17
12
|
(sstyled.insert(
|
|
18
13
|
/*__inner_css_start__*/
|
|
19
|
-
".
|
|
14
|
+
".___SBar_1j50a_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_1j50a);transition-timing-function:ease-in-out}.___SBar_1j50a_gg_.__color_1j50a_gg_{fill:var(--color_1j50a)}.___SBar_1j50a_gg_.__pattern_1j50a_gg_.__color_1j50a_gg_{fill:var(--pattern_1j50a);stroke:var(--color_1j50a);stroke-width:1px}.___SBar_1j50a_gg_.__hide_1j50a_gg_{display:none}.___SBar_1j50a_gg_.__transparent_1j50a_gg_{opacity:.3}.___SBackground_1j50a_gg_.__onClick_1j50a_gg_,.___SBar_1j50a_gg_.__onClick_1j50a_gg_{cursor:pointer}.___SBackground_1j50a_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9)}.___SBarAnnotation_1j50a_gg_{display:flex;justify-content:space-between}.___SBarLabel_1j50a_gg_{color:var(--intergalactic-text-primary, #191b23);margin-right:auto}.___SBarLabel_1j50a_gg_,.___SBarPercent_1j50a_gg_,.___SBarValue_1j50a_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SBarPercent_1j50a_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SBarValue_1j50a_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary, #191b23);text-align:right}.___SCompactHorizontalBarHoverRect_1j50a_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}",
|
|
20
15
|
/*__inner_css_end__*/
|
|
21
|
-
"
|
|
16
|
+
"1j50a_gg_"
|
|
22
17
|
), /*__reshadow_css_end__*/
|
|
23
18
|
{
|
|
24
|
-
"__SBar": "
|
|
25
|
-
"--duration": "--
|
|
26
|
-
"_color": "
|
|
27
|
-
"--color": "--
|
|
28
|
-
"_pattern": "
|
|
29
|
-
"--pattern": "--
|
|
30
|
-
"_hide": "
|
|
31
|
-
"_transparent": "
|
|
32
|
-
"_onClick": "
|
|
33
|
-
"__SBackground": "
|
|
34
|
-
"__SBarAnnotation": "
|
|
35
|
-
"__SBarLabel": "
|
|
36
|
-
"__SBarPercent": "
|
|
37
|
-
"__SBarValue": "
|
|
38
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
19
|
+
"__SBar": "___SBar_1j50a_gg_",
|
|
20
|
+
"--duration": "--duration_1j50a",
|
|
21
|
+
"_color": "__color_1j50a_gg_",
|
|
22
|
+
"--color": "--color_1j50a",
|
|
23
|
+
"_pattern": "__pattern_1j50a_gg_",
|
|
24
|
+
"--pattern": "--pattern_1j50a",
|
|
25
|
+
"_hide": "__hide_1j50a_gg_",
|
|
26
|
+
"_transparent": "__transparent_1j50a_gg_",
|
|
27
|
+
"_onClick": "__onClick_1j50a_gg_",
|
|
28
|
+
"__SBackground": "___SBackground_1j50a_gg_",
|
|
29
|
+
"__SBarAnnotation": "___SBarAnnotation_1j50a_gg_",
|
|
30
|
+
"__SBarLabel": "___SBarLabel_1j50a_gg_",
|
|
31
|
+
"__SBarPercent": "___SBarPercent_1j50a_gg_",
|
|
32
|
+
"__SBarValue": "___SBarValue_1j50a_gg_",
|
|
33
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_1j50a_gg_"
|
|
39
34
|
})
|
|
40
35
|
);
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
const MIN_WIDTH = 2;
|
|
37
|
+
const calcPartBarX = (x, minWidth, width) => {
|
|
43
38
|
if (x <= 0) {
|
|
44
39
|
return width <= minWidth ? minWidth : 0;
|
|
45
40
|
}
|
|
46
41
|
return Object.is(x, 0) ? minWidth : 0;
|
|
47
42
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
class HorizontalBarRoot extends Component {
|
|
44
|
+
getBackgroundProps(_props, index) {
|
|
45
|
+
const {
|
|
46
|
+
data,
|
|
47
|
+
y
|
|
48
|
+
} = this.asProps;
|
|
49
|
+
return {
|
|
50
|
+
value: data[index][y],
|
|
51
|
+
index
|
|
52
|
+
};
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
renderBar(d, i) {
|
|
55
|
+
var _ref;
|
|
56
|
+
const SBar = this.Element;
|
|
57
|
+
const {
|
|
58
|
+
styles,
|
|
59
|
+
color,
|
|
60
|
+
x,
|
|
61
|
+
x0,
|
|
62
|
+
y,
|
|
63
|
+
scale,
|
|
64
|
+
hide,
|
|
65
|
+
offset: offsetProps,
|
|
66
|
+
uid,
|
|
67
|
+
duration,
|
|
68
|
+
r,
|
|
69
|
+
wMin,
|
|
70
|
+
height: heightProps,
|
|
71
|
+
onMouseMove,
|
|
72
|
+
onMouseLeave,
|
|
73
|
+
groupKey,
|
|
74
|
+
transparent,
|
|
75
|
+
maxBarSize = Number.POSITIVE_INFINITY,
|
|
76
|
+
resolveColor,
|
|
77
|
+
patterns,
|
|
78
|
+
onClick
|
|
79
|
+
} = this.asProps;
|
|
80
|
+
const offset = typeof offsetProps === "function" ? offsetProps(i) : offsetProps;
|
|
81
|
+
const [xScale, yScale] = scale;
|
|
82
|
+
const absWidth = Math.abs(xScale(d[x]) - Math.max(xScale(xScale.domain()[0]), xScale(d[x0] ?? 0)));
|
|
83
|
+
const bandHeight = heightProps || scaleToBand(yScale).bandwidth();
|
|
84
|
+
const height = Math.min(bandHeight, maxBarSize);
|
|
85
|
+
const width = Number(d[x] - (d[x0] ?? 0)) === 0 ? 0 : Math.max(absWidth, wMin);
|
|
86
|
+
const barY = yScale(d[y]) + bandHeight / 2 - height / 2 + offset[1];
|
|
87
|
+
const barX = xScale(Math.min(d[x0] ?? 0, width <= wMin && d[x] < 0 ? 0 : d[x])) + offset[0] - calcPartBarX(d[x], wMin, width);
|
|
88
|
+
const handleClick = (event) => onClick == null ? void 0 : onClick(d, event, i, x);
|
|
89
|
+
const dSvg = getHorizontalRect({
|
|
90
|
+
x: barX,
|
|
91
|
+
y: barY,
|
|
92
|
+
width,
|
|
93
|
+
height,
|
|
94
|
+
radius: Array.isArray(r) ? r[i] : r,
|
|
95
|
+
position: d[x] > 0 || Object.is(d[x], 0) ? "right" : "left"
|
|
96
|
+
});
|
|
97
|
+
if (groupKey) {
|
|
98
|
+
this.asProps.dataHintsHandler.describeGroupedValues(groupKey, x);
|
|
99
|
+
} else {
|
|
100
|
+
this.asProps.dataHintsHandler.describeValueEntity(`${i}.${x}`, groupKey ?? d[y]);
|
|
62
101
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"d": dSvg,
|
|
112
|
-
"onClickCapture": handleClick,
|
|
113
|
-
"use:duration": "".concat(duration, "ms"),
|
|
114
|
-
"onMouseMove": onMouseMove,
|
|
115
|
-
"onMouseLeave": onMouseLeave
|
|
116
|
-
}))), patterns && /* @__PURE__ */ React.createElement(PatternFill, _ref.cn("PatternFill", {
|
|
117
|
-
"id": "".concat(uid, "-").concat(i, "-pattern"),
|
|
118
|
-
"patternKey": color,
|
|
119
|
-
"color": resolveColor(color),
|
|
120
|
-
"patterns": patterns
|
|
121
|
-
})));
|
|
122
|
-
}
|
|
123
|
-
}, {
|
|
124
|
-
key: "render",
|
|
125
|
-
value: function render() {
|
|
126
|
-
var _this$asProps3 = this.asProps, data = _this$asProps3.data, uid = _this$asProps3.uid, size = _this$asProps3.size, duration = _this$asProps3.duration;
|
|
127
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, data.map(this.renderBar.bind(this)), duration && /* @__PURE__ */ React.createElement(AnimatedClipPath, {
|
|
128
|
-
"aria-hidden": true,
|
|
129
|
-
duration,
|
|
130
|
-
id: uid,
|
|
131
|
-
x: "0",
|
|
132
|
-
y: "0",
|
|
133
|
-
width: 0,
|
|
134
|
-
height: size[1]
|
|
135
|
-
}));
|
|
136
|
-
}
|
|
137
|
-
}]);
|
|
138
|
-
})(Component);
|
|
102
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, {
|
|
103
|
+
key: `horizontal-bar-${i}`
|
|
104
|
+
}, (_ref = sstyled(styles), /* @__PURE__ */ React.createElement(SBar, _ref.cn("SBar", {
|
|
105
|
+
"aria-hidden": true,
|
|
106
|
+
"render": "path",
|
|
107
|
+
"clipPath": `url(#${uid})`,
|
|
108
|
+
"__excludeProps": ["data", "scale", "value", "onClick", "offset"],
|
|
109
|
+
"childrenPosition": "above",
|
|
110
|
+
"value": d,
|
|
111
|
+
"index": i,
|
|
112
|
+
"hide": hide,
|
|
113
|
+
"color": resolveColor(color),
|
|
114
|
+
"pattern": patterns ? `url(#${uid}-${i}-pattern)` : void 0,
|
|
115
|
+
"transparent": transparent,
|
|
116
|
+
"x": barX,
|
|
117
|
+
"y": barY,
|
|
118
|
+
"width": width,
|
|
119
|
+
"height": height,
|
|
120
|
+
"d": dSvg,
|
|
121
|
+
"onClickCapture": handleClick,
|
|
122
|
+
"use:duration": `${duration}ms`,
|
|
123
|
+
"onMouseMove": onMouseMove,
|
|
124
|
+
"onMouseLeave": onMouseLeave
|
|
125
|
+
}))), patterns && /* @__PURE__ */ React.createElement(PatternFill, _ref.cn("PatternFill", {
|
|
126
|
+
"id": `${uid}-${i}-pattern`,
|
|
127
|
+
"patternKey": color,
|
|
128
|
+
"color": resolveColor(color),
|
|
129
|
+
"patterns": patterns
|
|
130
|
+
})));
|
|
131
|
+
}
|
|
132
|
+
render() {
|
|
133
|
+
const {
|
|
134
|
+
data,
|
|
135
|
+
uid,
|
|
136
|
+
size,
|
|
137
|
+
duration
|
|
138
|
+
} = this.asProps;
|
|
139
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, data.map(this.renderBar.bind(this)), duration && /* @__PURE__ */ React.createElement(AnimatedClipPath, {
|
|
140
|
+
"aria-hidden": true,
|
|
141
|
+
duration,
|
|
142
|
+
id: uid,
|
|
143
|
+
x: "0",
|
|
144
|
+
y: "0",
|
|
145
|
+
width: 0,
|
|
146
|
+
height: size[1]
|
|
147
|
+
}));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
139
150
|
_defineProperty(HorizontalBarRoot, "displayName", "HorizontalBar");
|
|
140
151
|
_defineProperty(HorizontalBarRoot, "enhance", [uniqueIDEnhancement()]);
|
|
141
152
|
_defineProperty(HorizontalBarRoot, "style", style);
|
|
142
153
|
_defineProperty(HorizontalBarRoot, "defaultProps", {
|
|
143
154
|
offset: [0, 0],
|
|
144
155
|
duration: 500,
|
|
145
|
-
r:
|
|
156
|
+
r: 0,
|
|
146
157
|
wMin: MIN_WIDTH
|
|
147
158
|
});
|
|
148
159
|
function Background(props) {
|
|
149
160
|
var _ref2;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
161
|
+
const {
|
|
162
|
+
Element: SBackground,
|
|
163
|
+
styles,
|
|
164
|
+
scale,
|
|
165
|
+
value
|
|
166
|
+
} = props;
|
|
167
|
+
const [xScale, yScale] = scale;
|
|
168
|
+
const xRange = xScale.range();
|
|
153
169
|
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SBackground, _ref2.cn("SBackground", {
|
|
154
170
|
"aria-hidden": true,
|
|
155
171
|
"render": "rect",
|
|
@@ -160,8 +176,14 @@ function Background(props) {
|
|
|
160
176
|
"y": yScale(value)
|
|
161
177
|
}));
|
|
162
178
|
}
|
|
163
|
-
function getHorizontalRect(
|
|
164
|
-
|
|
179
|
+
function getHorizontalRect({
|
|
180
|
+
x,
|
|
181
|
+
y,
|
|
182
|
+
width,
|
|
183
|
+
height,
|
|
184
|
+
radius,
|
|
185
|
+
position
|
|
186
|
+
}) {
|
|
165
187
|
if (width < radius) radius = width;
|
|
166
188
|
if (radius) {
|
|
167
189
|
if (position === "right") return roundedPath(x, y, width, height, radius, false, true, false, true);
|