@semcore/d3-chart 16.5.0 → 17.0.0-prerelease.9
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 +9 -12
package/lib/esm/StackedArea.mjs
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
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 { Component } from "@semcore/core";
|
|
8
3
|
import getOriginChildren from "@semcore/core/lib/utils/getOriginChildren";
|
|
@@ -11,69 +6,66 @@ import React from "react";
|
|
|
11
6
|
import Area from "./Area.mjs";
|
|
12
7
|
import createElement from "./createElement.mjs";
|
|
13
8
|
import { getChartDefaultColorName } from "./utils.mjs";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return acc;
|
|
32
|
-
}, []);
|
|
33
|
-
stack2.keys(keys.reverse());
|
|
34
|
-
}
|
|
35
|
-
return stack2(data);
|
|
36
|
-
}
|
|
37
|
-
}, {
|
|
38
|
-
key: "getAreaProps",
|
|
39
|
-
value: function getAreaProps(_ref, index) {
|
|
40
|
-
var y = _ref.y;
|
|
41
|
-
var _this$asProps2 = this.asProps, x = _this$asProps2.x, patterns = _this$asProps2.patterns;
|
|
42
|
-
var series = this.series.find(function(s) {
|
|
43
|
-
return s.key === y;
|
|
44
|
-
}) || [];
|
|
45
|
-
return {
|
|
46
|
-
color: getChartDefaultColorName(index),
|
|
47
|
-
patterns,
|
|
48
|
-
data: series.map(function(s) {
|
|
49
|
-
return _objectSpread(_objectSpread({}, s.data), {}, _defineProperty(_defineProperty({}, y, s.data[y] === null ? null : s[1]), Y0, s[0]));
|
|
50
|
-
}),
|
|
51
|
-
y0: Y0,
|
|
52
|
-
x
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}, {
|
|
56
|
-
key: "render",
|
|
57
|
-
value: function render() {
|
|
58
|
-
var Element = this.Element;
|
|
59
|
-
this.series = this.getSeries();
|
|
60
|
-
return /* @__PURE__ */ React.createElement(Element, {
|
|
61
|
-
"aria-hidden": true,
|
|
62
|
-
render: "g",
|
|
63
|
-
series: this.series
|
|
64
|
-
});
|
|
9
|
+
const DEFAULT_INSTANCE = Symbol("DEFAULT_INSTANCE");
|
|
10
|
+
const Y0 = Symbol("Y0");
|
|
11
|
+
class StackedAreaRoot extends Component {
|
|
12
|
+
getSeries() {
|
|
13
|
+
const {
|
|
14
|
+
Children,
|
|
15
|
+
data,
|
|
16
|
+
stack: stack2
|
|
17
|
+
} = this.asProps;
|
|
18
|
+
if (stack2[DEFAULT_INSTANCE]) {
|
|
19
|
+
const keys = React.Children.toArray(getOriginChildren(Children)).reduce((acc, child) => {
|
|
20
|
+
if (/* @__PURE__ */ React.isValidElement(child) && child.type === StackedArea.Area && !child.props.hide) {
|
|
21
|
+
acc.push(child.props.y);
|
|
22
|
+
}
|
|
23
|
+
return acc;
|
|
24
|
+
}, []);
|
|
25
|
+
stack2.keys(keys.reverse());
|
|
65
26
|
}
|
|
66
|
-
|
|
67
|
-
}
|
|
27
|
+
return stack2(data);
|
|
28
|
+
}
|
|
29
|
+
getAreaProps({
|
|
30
|
+
y
|
|
31
|
+
}, index) {
|
|
32
|
+
const {
|
|
33
|
+
x,
|
|
34
|
+
patterns
|
|
35
|
+
} = this.asProps;
|
|
36
|
+
const series = this.series.find((s) => s.key === y) || [];
|
|
37
|
+
return {
|
|
38
|
+
color: getChartDefaultColorName(index),
|
|
39
|
+
patterns,
|
|
40
|
+
data: series.map((s) => ({
|
|
41
|
+
...s.data,
|
|
42
|
+
// if null is passed in the data, then we pass it, because d3 null leads to 0
|
|
43
|
+
[y]: s.data[y] === null ? null : s[1],
|
|
44
|
+
[Y0]: s[0]
|
|
45
|
+
})),
|
|
46
|
+
y0: Y0,
|
|
47
|
+
x
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
render() {
|
|
51
|
+
const Element = this.Element;
|
|
52
|
+
this.series = this.getSeries();
|
|
53
|
+
return /* @__PURE__ */ React.createElement(Element, {
|
|
54
|
+
"aria-hidden": true,
|
|
55
|
+
render: "g",
|
|
56
|
+
series: this.series
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
68
60
|
_defineProperty(StackedAreaRoot, "displayName", "StackedArea");
|
|
69
|
-
_defineProperty(StackedAreaRoot, "defaultProps",
|
|
70
|
-
|
|
61
|
+
_defineProperty(StackedAreaRoot, "defaultProps", () => {
|
|
62
|
+
const stack$1 = stack();
|
|
71
63
|
stack$1[DEFAULT_INSTANCE] = true;
|
|
72
64
|
return {
|
|
73
65
|
stack: stack$1
|
|
74
66
|
};
|
|
75
67
|
});
|
|
76
|
-
|
|
68
|
+
const StackedArea = createElement(StackedAreaRoot, {
|
|
77
69
|
Area
|
|
78
70
|
});
|
|
79
71
|
export {
|
package/lib/esm/Tooltip.mjs
CHANGED
|
@@ -1,183 +1,175 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
|
-
import { assignProps, Component
|
|
2
|
+
import { sstyled, assignProps, Component } from "@semcore/core";
|
|
3
|
+
import { Box, Popper } from "@semcore/base-components";
|
|
9
4
|
import findComponent from "@semcore/core/lib/utils/findComponent";
|
|
10
5
|
import { useColorResolver } from "@semcore/core/lib/utils/use/useColorResolver";
|
|
11
|
-
import { Box } from "@semcore/flex-box";
|
|
12
|
-
import Popper from "@semcore/popper";
|
|
13
6
|
import React from "react";
|
|
14
7
|
import createElement from "./createElement.mjs";
|
|
15
8
|
import { PatternSymbol } from "./Pattern.mjs";
|
|
16
9
|
import { getChartDefaultColorName } from "./utils.mjs";
|
|
17
|
-
var _excluded = ["Children", "children", "tag", "forcedAdvancedMode", "onClick"];
|
|
18
10
|
/*!__reshadow-styles__:"./style/tooltip.shadow.css"*/
|
|
19
|
-
|
|
11
|
+
const style = (
|
|
20
12
|
/*__reshadow_css_start__*/
|
|
21
13
|
(sstyled.insert(
|
|
22
14
|
/*__inner_css_start__*/
|
|
23
|
-
".
|
|
15
|
+
".___STooltip_ieg87_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);position:relative;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);border-radius:var(--intergalactic-popper-rounded, 6px);border:1px solid var(--intergalactic-border-secondary, #e0e1e9);box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper, 0px 1px 12px 0px rgba(25, 27, 35, 0.15));padding:var(--intergalactic-spacing-3x, 12px)}.___STitle_ieg87_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SDotGroup_ieg87_gg_{display:flex;align-items:center}.___SDot_ieg87_gg_{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SDotCircle_ieg87_gg_.__color_ieg87_gg_{background-color:var(--color_ieg87);width:8px;height:8px;border-radius:50%}.___SFooter_ieg87_gg_{background:var(--intergalactic-bg-secondary-neutral, #f4f5f9);padding:var(--intergalactic-spacing-1x, 4px) var(--intergalactic-spacing-3x, 12px);border-radius:0 0 var(--intergalactic-rounded-medium, 6px) var(--intergalactic-rounded-medium, 6px);margin:var(--intergalactic-spacing-3x, 12px) calc(-1*var(--intergalactic-spacing-3x, 12px)) calc(-1*var(--intergalactic-spacing-3x, 12px))}",
|
|
24
16
|
/*__inner_css_end__*/
|
|
25
|
-
"
|
|
17
|
+
"ieg87_gg_"
|
|
26
18
|
), /*__reshadow_css_end__*/
|
|
27
19
|
{
|
|
28
|
-
"__STooltip": "
|
|
29
|
-
"__STitle": "
|
|
30
|
-
"__SDotGroup": "
|
|
31
|
-
"__SDot": "
|
|
32
|
-
"__SDotCircle": "
|
|
33
|
-
"_color": "
|
|
34
|
-
"--color": "--
|
|
35
|
-
"__SFooter": "
|
|
20
|
+
"__STooltip": "___STooltip_ieg87_gg_",
|
|
21
|
+
"__STitle": "___STitle_ieg87_gg_",
|
|
22
|
+
"__SDotGroup": "___SDotGroup_ieg87_gg_",
|
|
23
|
+
"__SDot": "___SDot_ieg87_gg_",
|
|
24
|
+
"__SDotCircle": "___SDotCircle_ieg87_gg_",
|
|
25
|
+
"_color": "__color_ieg87_gg_",
|
|
26
|
+
"--color": "--color_ieg87",
|
|
27
|
+
"__SFooter": "___SFooter_ieg87_gg_"
|
|
36
28
|
})
|
|
37
29
|
);
|
|
38
|
-
|
|
30
|
+
const TooltipDotRenderContext = /* @__PURE__ */ React.createContext({
|
|
39
31
|
index: -1,
|
|
40
32
|
indexKeysCache: /* @__PURE__ */ new Set()
|
|
41
33
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
47
|
-
args[_key] = arguments[_key];
|
|
48
|
-
}
|
|
49
|
-
_this = _callSuper(this, TooltipRoot2, [].concat(args));
|
|
50
|
-
_defineProperty(_this, "state", {
|
|
34
|
+
class TooltipRoot extends Component {
|
|
35
|
+
constructor(...args) {
|
|
36
|
+
super(...args);
|
|
37
|
+
_defineProperty(this, "state", {
|
|
51
38
|
$visible: false,
|
|
52
39
|
anchorProps: {},
|
|
53
40
|
tooltipProps: {}
|
|
54
41
|
});
|
|
55
|
-
_defineProperty(
|
|
42
|
+
_defineProperty(this, "renderContext", {
|
|
56
43
|
index: -1,
|
|
57
44
|
indexKeysCache: /* @__PURE__ */ new Set()
|
|
58
45
|
});
|
|
59
|
-
_defineProperty(
|
|
60
|
-
|
|
61
|
-
});
|
|
62
|
-
_defineProperty(_this, "virtualElementPosition", {
|
|
46
|
+
_defineProperty(this, "handlerCancel", () => false);
|
|
47
|
+
_defineProperty(this, "virtualElementPosition", {
|
|
63
48
|
x: 0,
|
|
64
49
|
y: 0
|
|
65
50
|
});
|
|
66
|
-
_defineProperty(
|
|
67
|
-
_defineProperty(
|
|
68
|
-
_defineProperty(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
51
|
+
_defineProperty(this, "virtualTriggerElement", null);
|
|
52
|
+
_defineProperty(this, "unsubscribe", []);
|
|
53
|
+
_defineProperty(this, "handleTriggerClick", (e) => {
|
|
54
|
+
const {
|
|
55
|
+
onClick
|
|
56
|
+
} = this.asProps;
|
|
57
|
+
const {
|
|
58
|
+
xIndex,
|
|
59
|
+
yIndex
|
|
60
|
+
} = this.state.tooltipProps;
|
|
61
|
+
const index = xIndex ?? yIndex;
|
|
62
|
+
onClick == null ? void 0 : onClick(index, e);
|
|
73
63
|
});
|
|
74
|
-
return _this;
|
|
75
64
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
getTriggerProps() {
|
|
66
|
+
const {
|
|
67
|
+
x,
|
|
68
|
+
y,
|
|
69
|
+
hideHoverLine
|
|
70
|
+
} = this.asProps;
|
|
71
|
+
return {
|
|
72
|
+
x,
|
|
73
|
+
y,
|
|
74
|
+
hideHoverLine
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
getPopperProps() {
|
|
78
|
+
if (this.asProps.excludeAnchorProps) {
|
|
81
79
|
return {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
hideHoverLine
|
|
80
|
+
$visible: this.state.$visible,
|
|
81
|
+
...this.state.tooltipProps
|
|
85
82
|
};
|
|
86
83
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
return {
|
|
85
|
+
$visible: this.state.$visible,
|
|
86
|
+
...this.state.anchorProps,
|
|
87
|
+
...this.state.tooltipProps
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
componentDidMount() {
|
|
91
|
+
const {
|
|
92
|
+
eventEmitter,
|
|
93
|
+
plotId
|
|
94
|
+
} = this.asProps;
|
|
95
|
+
this.unsubscribe.push(eventEmitter.subscribe(`setTooltipRenderingProps_${plotId}`, (anchorProps, tooltipProps) => {
|
|
96
|
+
this.setState({
|
|
97
|
+
anchorProps,
|
|
98
|
+
tooltipProps
|
|
99
|
+
});
|
|
100
|
+
}), eventEmitter.subscribe(`setTooltipVisible_${plotId}`, (visible) => this.setState({
|
|
101
|
+
$visible: visible
|
|
102
|
+
})), eventEmitter.subscribe(`setTooltipPosition_${plotId}`, (x, y) => {
|
|
103
|
+
var _a;
|
|
104
|
+
this.virtualElementPosition.x = x;
|
|
105
|
+
this.virtualElementPosition.y = y;
|
|
106
|
+
if (this.virtualTriggerElement === null) {
|
|
107
|
+
this.virtualTriggerElement = {};
|
|
108
|
+
setTimeout(() => {
|
|
109
|
+
this.setPopperTrigger(this.virtualTriggerElement);
|
|
110
|
+
}, 0);
|
|
94
111
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
tooltipProps
|
|
108
|
-
});
|
|
109
|
-
}), eventEmitter.subscribe("setTooltipVisible_".concat(plotId), function(visible) {
|
|
110
|
-
return _this2.setState({
|
|
111
|
-
$visible: visible
|
|
112
|
-
});
|
|
113
|
-
}), eventEmitter.subscribe("setTooltipPosition_".concat(plotId), function(x, y) {
|
|
114
|
-
var _this2$popper$current;
|
|
115
|
-
_this2.virtualElementPosition.x = x;
|
|
116
|
-
_this2.virtualElementPosition.y = y;
|
|
117
|
-
if (_this2.virtualTriggerElement === null) {
|
|
118
|
-
_this2.virtualTriggerElement = {};
|
|
119
|
-
setTimeout(function() {
|
|
120
|
-
_this2.setPopperTrigger(_this2.virtualTriggerElement);
|
|
121
|
-
}, 0);
|
|
122
|
-
}
|
|
123
|
-
_this2.virtualTriggerElement.getBoundingClientRect = function() {
|
|
124
|
-
var _this2$virtualElement = _this2.virtualElementPosition, x2 = _this2$virtualElement.x, y2 = _this2$virtualElement.y;
|
|
125
|
-
return {
|
|
126
|
-
width: 0,
|
|
127
|
-
height: 0,
|
|
128
|
-
top: y2,
|
|
129
|
-
right: x2,
|
|
130
|
-
bottom: y2,
|
|
131
|
-
left: x2
|
|
132
|
-
};
|
|
112
|
+
this.virtualTriggerElement.getBoundingClientRect = () => {
|
|
113
|
+
const {
|
|
114
|
+
x: x2,
|
|
115
|
+
y: y2
|
|
116
|
+
} = this.virtualElementPosition;
|
|
117
|
+
return {
|
|
118
|
+
width: 0,
|
|
119
|
+
height: 0,
|
|
120
|
+
top: y2,
|
|
121
|
+
right: x2,
|
|
122
|
+
bottom: y2,
|
|
123
|
+
left: x2
|
|
133
124
|
};
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
125
|
+
};
|
|
126
|
+
(_a = this.popper.current) == null ? void 0 : _a.update();
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
componentWillUnmount() {
|
|
130
|
+
this.unsubscribe.forEach((unsubscribe) => unsubscribe());
|
|
131
|
+
}
|
|
132
|
+
render() {
|
|
133
|
+
var _ref = this.asProps;
|
|
134
|
+
const {
|
|
135
|
+
Children,
|
|
136
|
+
children,
|
|
137
|
+
tag,
|
|
138
|
+
forcedAdvancedMode,
|
|
139
|
+
onClick: _,
|
|
140
|
+
...other
|
|
141
|
+
} = this.asProps;
|
|
142
|
+
const advancedMode = forcedAdvancedMode || !!findComponent(Children, [Tooltip.Trigger.displayName, Tooltip.Popper.displayName]);
|
|
143
|
+
this.renderContext.index = -1;
|
|
144
|
+
this.renderContext.indexKeysCache.clear();
|
|
145
|
+
this.renderContext.patterns = this.asProps.patterns ?? this.state.tooltipProps.patterns;
|
|
146
|
+
return /* @__PURE__ */ React.createElement(TooltipDotRenderContext.Provider, {
|
|
147
|
+
value: this.renderContext
|
|
148
|
+
}, /* @__PURE__ */ React.createElement(Popper, assignProps({
|
|
149
|
+
"visible": this.state.$visible,
|
|
150
|
+
"onFirstUpdate": this.handlerCancel,
|
|
151
|
+
"onOutsideClick": this.handlerCancel,
|
|
152
|
+
"interaction": "none",
|
|
153
|
+
"explicitTriggerSet": true,
|
|
154
|
+
"offset": 8,
|
|
155
|
+
"flip": {
|
|
156
|
+
allowedAutoPlacements: ["left", "right"]
|
|
157
|
+
}
|
|
158
|
+
}, _ref), ({
|
|
159
|
+
popper,
|
|
160
|
+
setTrigger
|
|
161
|
+
}) => {
|
|
162
|
+
var _a;
|
|
163
|
+
this.setPopperTrigger = setTrigger;
|
|
164
|
+
this.popper = popper;
|
|
165
|
+
(_a = this.popper.current) == null ? void 0 : _a.update();
|
|
166
|
+
return advancedMode ? /* @__PURE__ */ React.createElement(Children, null) : /* @__PURE__ */ React.createElement(React.Fragment, null, tag && /* @__PURE__ */ React.createElement(Tooltip.Trigger, {
|
|
167
|
+
tag,
|
|
168
|
+
onClick: this.handleTriggerClick
|
|
169
|
+
}), /* @__PURE__ */ React.createElement(Tooltip.Popper, other, children));
|
|
170
|
+
}));
|
|
171
|
+
}
|
|
172
|
+
}
|
|
181
173
|
_defineProperty(TooltipRoot, "displayName", "Tooltip");
|
|
182
174
|
_defineProperty(TooltipRoot, "style", style);
|
|
183
175
|
function PopperTrigger() {
|
|
@@ -186,10 +178,14 @@ function PopperTrigger() {
|
|
|
186
178
|
}
|
|
187
179
|
function PopperPopper(props) {
|
|
188
180
|
var _ref6;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
181
|
+
const {
|
|
182
|
+
Element: STooltip,
|
|
183
|
+
styles,
|
|
184
|
+
$visible,
|
|
185
|
+
x,
|
|
186
|
+
y
|
|
187
|
+
} = props;
|
|
188
|
+
const handlerCancel = React.useCallback(() => false, []);
|
|
193
189
|
if (!$visible) return null;
|
|
194
190
|
return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(STooltip, _ref6.cn("STooltip", {
|
|
195
191
|
"render": Popper.Popper,
|
|
@@ -202,48 +198,62 @@ function PopperPopper(props) {
|
|
|
202
198
|
PopperPopper.style = style;
|
|
203
199
|
function Title(props) {
|
|
204
200
|
var _ref3 = arguments[0], _ref7;
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
201
|
+
const STitle = Box;
|
|
202
|
+
const {
|
|
203
|
+
styles
|
|
204
|
+
} = props;
|
|
205
|
+
return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(STitle, _ref7.cn("STitle", {
|
|
206
|
+
...assignProps({
|
|
207
|
+
"__excludeProps": ["data", "scale"]
|
|
208
|
+
}, _ref3)
|
|
209
|
+
}));
|
|
210
210
|
}
|
|
211
211
|
Title.style = style;
|
|
212
212
|
function Dot(props) {
|
|
213
|
-
var _ref4 = arguments[0], _ref8
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
213
|
+
var _ref4 = arguments[0], _ref8;
|
|
214
|
+
const {
|
|
215
|
+
styles,
|
|
216
|
+
color,
|
|
217
|
+
Children
|
|
218
|
+
} = props;
|
|
219
|
+
const resolveColor = useColorResolver();
|
|
220
|
+
const renderContext = React.useContext(TooltipDotRenderContext);
|
|
221
|
+
const defaultColor = getChartDefaultColorName(renderContext.index);
|
|
222
|
+
const patterns = props.patterns ?? renderContext.patterns;
|
|
223
|
+
const key = Children;
|
|
220
224
|
if (!renderContext.indexKeysCache.has(key)) {
|
|
221
225
|
renderContext.indexKeysCache.add(key);
|
|
222
226
|
renderContext.index += 1;
|
|
223
227
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(SDotGroup, _ref8.cn("SDotGroup",
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
const SDotGroup = Box;
|
|
229
|
+
const SDot = Box;
|
|
230
|
+
const SDotCircle = Box;
|
|
231
|
+
return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(SDotGroup, _ref8.cn("SDotGroup", {
|
|
232
|
+
...assignProps({
|
|
233
|
+
"__excludeProps": ["data", "scale"]
|
|
234
|
+
}, _ref4)
|
|
235
|
+
}), patterns ? /* @__PURE__ */ React.createElement(SDot, _ref8.cn("SDot", {}), /* @__PURE__ */ React.createElement(PatternSymbol, _ref8.cn("PatternSymbol", {
|
|
236
|
+
"color": resolveColor(color ?? defaultColor),
|
|
237
|
+
"patternKey": color ?? defaultColor
|
|
232
238
|
}))) : /* @__PURE__ */ React.createElement(SDot, _ref8.cn("SDot", {}), /* @__PURE__ */ React.createElement(SDotCircle, _ref8.cn("SDotCircle", {
|
|
233
|
-
"color": resolveColor(color
|
|
239
|
+
"color": resolveColor(color ?? defaultColor)
|
|
234
240
|
}))), /* @__PURE__ */ React.createElement(Children, _ref8.cn("Children", {})));
|
|
235
241
|
}
|
|
236
242
|
Dot.style = style;
|
|
237
243
|
function Footer(props) {
|
|
238
244
|
var _ref5 = arguments[0], _ref9;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
245
|
+
const {
|
|
246
|
+
styles
|
|
247
|
+
} = props;
|
|
248
|
+
const SFooter = Box;
|
|
249
|
+
return _ref9 = sstyled(styles), /* @__PURE__ */ React.createElement(SFooter, _ref9.cn("SFooter", {
|
|
250
|
+
...assignProps({
|
|
251
|
+
"__excludeProps": ["data", "scale"]
|
|
252
|
+
}, _ref5)
|
|
253
|
+
}));
|
|
244
254
|
}
|
|
245
255
|
Footer.style = style;
|
|
246
|
-
|
|
256
|
+
const Tooltip = createElement(TooltipRoot, {
|
|
247
257
|
Trigger: PopperTrigger,
|
|
248
258
|
Popper: PopperPopper,
|
|
249
259
|
Title,
|