@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/es6/Hover.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _callSuper from "@babel/runtime/helpers/callSuper";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
2
|
import { sstyled as _sstyled } from "@semcore/core";
|
|
9
3
|
import { assignProps as _assignProps2 } from "@semcore/core";
|
|
@@ -15,240 +9,217 @@ import trottle from '@semcore/core/lib/utils/rafTrottle';
|
|
|
15
9
|
import React from 'react';
|
|
16
10
|
import createElement from './createElement';
|
|
17
11
|
/*!__reshadow-styles__:"./style/hover.shadow.css"*/
|
|
18
|
-
|
|
12
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SHoverLine_wfr9y_gg_,.___SHoverLine_wfr9y_gg_:focus-visible{outline:0;stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SHoverRect_wfr9y_gg_,.___SHoverRect_wfr9y_gg_:focus-visible{outline:0;fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}", /*__inner_css_end__*/"wfr9y_gg_"),
|
|
19
13
|
/*__reshadow_css_end__*/
|
|
20
14
|
{
|
|
21
|
-
"__SHoverLine": "
|
|
22
|
-
"__SHoverRect": "
|
|
15
|
+
"__SHoverLine": "___SHoverLine_wfr9y_gg_",
|
|
16
|
+
"__SHoverRect": "___SHoverRect_wfr9y_gg_"
|
|
23
17
|
});
|
|
24
18
|
import Tooltip from './Tooltip';
|
|
25
19
|
import { scaleOfBandwidth, getIndexFromData, eventToPoint, invert, scaleToBand } from './utils';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
|
-
args[_key] = arguments[_key];
|
|
32
|
-
}
|
|
33
|
-
_this = _callSuper(this, Hover, [].concat(args));
|
|
34
|
-
_defineProperty(_this, "state", {
|
|
20
|
+
class Hover extends Component {
|
|
21
|
+
constructor(...args) {
|
|
22
|
+
super(...args);
|
|
23
|
+
_defineProperty(this, "state", {
|
|
35
24
|
xIndex: null,
|
|
36
25
|
yIndex: null
|
|
37
26
|
});
|
|
38
|
-
_defineProperty(
|
|
39
|
-
_defineProperty(
|
|
40
|
-
|
|
41
|
-
eventEmitter
|
|
42
|
-
data
|
|
43
|
-
scale
|
|
44
|
-
x
|
|
45
|
-
y
|
|
46
|
-
rootRef
|
|
47
|
-
patterns
|
|
48
|
-
plotId
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
yIndex: yIndex,
|
|
65
|
-
patterns: patterns
|
|
27
|
+
_defineProperty(this, "virtualElement", canUseDOM() ? document.createElement('div') : {});
|
|
28
|
+
_defineProperty(this, "handlerMouseMoveRoot", trottle((e, currentTarget) => {
|
|
29
|
+
const {
|
|
30
|
+
eventEmitter,
|
|
31
|
+
data,
|
|
32
|
+
scale,
|
|
33
|
+
x,
|
|
34
|
+
y,
|
|
35
|
+
rootRef,
|
|
36
|
+
patterns,
|
|
37
|
+
plotId
|
|
38
|
+
} = this.asProps;
|
|
39
|
+
const {
|
|
40
|
+
clientX,
|
|
41
|
+
clientY
|
|
42
|
+
} = e;
|
|
43
|
+
const [xScale, yScale] = scale;
|
|
44
|
+
const [pX, pY] = eventToPoint(e, rootRef.current);
|
|
45
|
+
const vX = invert(xScale, pX);
|
|
46
|
+
const vY = invert(yScale, pY);
|
|
47
|
+
const xIndex = x === undefined || vX === undefined ? null : getIndexFromData(data, xScale, x, vX);
|
|
48
|
+
const yIndex = y === undefined || vY === undefined ? null : getIndexFromData(data, yScale, y, vY);
|
|
49
|
+
const state = {
|
|
50
|
+
xIndex,
|
|
51
|
+
yIndex,
|
|
52
|
+
patterns
|
|
66
53
|
};
|
|
67
|
-
|
|
68
|
-
xRect
|
|
69
|
-
yRect
|
|
70
|
-
height
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
54
|
+
const {
|
|
55
|
+
x: xRect,
|
|
56
|
+
y: yRect,
|
|
57
|
+
height
|
|
58
|
+
} = rootRef.current.getBoundingClientRect();
|
|
59
|
+
const {
|
|
60
|
+
y: yOriginal,
|
|
61
|
+
height: heightOriginal
|
|
62
|
+
} = currentTarget.getBoundingClientRect();
|
|
63
|
+
const isRootTooltip = hasParent(e.target, rootRef.current);
|
|
64
|
+
this.setState(state, () => {
|
|
76
65
|
if (isRootTooltip) {
|
|
77
|
-
eventEmitter.emit(
|
|
66
|
+
eventEmitter.emit(`setTooltipPosition_${plotId}`, clientX, clientY);
|
|
78
67
|
} else {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
eventEmitter.emit(
|
|
68
|
+
const diff = clientY - yOriginal;
|
|
69
|
+
const dimension = diff / heightOriginal * 100;
|
|
70
|
+
const heightValue = height / 100 * dimension;
|
|
71
|
+
eventEmitter.emit(`setTooltipPosition_${plotId}`, pX + xRect, yRect + heightValue);
|
|
83
72
|
}
|
|
84
|
-
eventEmitter.emit(
|
|
85
|
-
eventEmitter.emit(
|
|
73
|
+
eventEmitter.emit(`setTooltipRenderingProps_${plotId}`, {}, state);
|
|
74
|
+
eventEmitter.emit(`setTooltipVisible_${plotId}`, xIndex !== null || yIndex !== null);
|
|
86
75
|
});
|
|
87
76
|
}));
|
|
88
|
-
_defineProperty(
|
|
89
|
-
|
|
77
|
+
_defineProperty(this, "handlerMouseLeaveRoot", trottle(() => {
|
|
78
|
+
const state = {
|
|
90
79
|
xIndex: null,
|
|
91
80
|
yIndex: null,
|
|
92
|
-
patterns:
|
|
81
|
+
patterns: this.asProps.patterns
|
|
93
82
|
};
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
this.setState(state, () => {
|
|
84
|
+
this.asProps.eventEmitter.emit(`setTooltipVisible_${this.asProps.plotId}`, false);
|
|
96
85
|
});
|
|
97
86
|
}));
|
|
98
|
-
return _this;
|
|
99
87
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
this.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
88
|
+
componentDidMount() {
|
|
89
|
+
const {
|
|
90
|
+
eventEmitter
|
|
91
|
+
} = this.asProps;
|
|
92
|
+
this.unsubscribeMouseMoveRoot = eventEmitter.subscribe('onMouseMoveChart', e => {
|
|
93
|
+
e.persist();
|
|
94
|
+
this.handlerMouseMoveRoot(e, e.currentTarget);
|
|
95
|
+
});
|
|
96
|
+
this.unsubscribeMouseLeaveRoot = eventEmitter.subscribe('onMouseLeaveChart', this.handlerMouseLeaveRoot);
|
|
97
|
+
}
|
|
98
|
+
componentWillUnmount() {
|
|
99
|
+
if (this.unsubscribeMouseMoveRoot) {
|
|
100
|
+
this.unsubscribeMouseMoveRoot();
|
|
111
101
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
value: function componentWillUnmount() {
|
|
115
|
-
if (this.unsubscribeMouseMoveRoot) {
|
|
116
|
-
this.unsubscribeMouseMoveRoot();
|
|
117
|
-
}
|
|
118
|
-
if (this.unsubscribeMouseLeaveRoot) {
|
|
119
|
-
this.unsubscribeMouseLeaveRoot();
|
|
120
|
-
}
|
|
102
|
+
if (this.unsubscribeMouseLeaveRoot) {
|
|
103
|
+
this.unsubscribeMouseLeaveRoot();
|
|
121
104
|
}
|
|
122
|
-
}]);
|
|
123
|
-
}(Component);
|
|
124
|
-
_defineProperty(Hover, "style", style);
|
|
125
|
-
var HoverLineRoot = /*#__PURE__*/function (_Hover2) {
|
|
126
|
-
function HoverLineRoot() {
|
|
127
|
-
_classCallCheck(this, HoverLineRoot);
|
|
128
|
-
return _callSuper(this, HoverLineRoot, arguments);
|
|
129
105
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
return _ref3 = sstyled(styles), /*#__PURE__*/React.createElement(React.Fragment, null, xIndex !== null ? /*#__PURE__*/React.createElement(SHoverLine, _ref3.cn("SHoverLine", {
|
|
158
|
-
"aria-hidden": true,
|
|
159
|
-
"render": 'line',
|
|
160
|
-
"index": xIndex,
|
|
161
|
-
"x1": x1,
|
|
162
|
-
"y1": yRange[0],
|
|
163
|
-
"x2": x1,
|
|
164
|
-
"y2": yRange[1]
|
|
165
|
-
})) : null, yIndex !== null ? /*#__PURE__*/React.createElement(SHoverLine, _ref3.cn("SHoverLine", {
|
|
166
|
-
"aria-hidden": true,
|
|
167
|
-
"render": 'line',
|
|
168
|
-
"index": yIndex,
|
|
169
|
-
"x1": xRange[0],
|
|
170
|
-
"y1": y1,
|
|
171
|
-
"x2": xRange[1],
|
|
172
|
-
"y2": y1
|
|
173
|
-
})) : null);
|
|
106
|
+
}
|
|
107
|
+
_defineProperty(Hover, "style", style);
|
|
108
|
+
class HoverLineRoot extends Hover {
|
|
109
|
+
render() {
|
|
110
|
+
var _ref3;
|
|
111
|
+
const SHoverLine = this.Element;
|
|
112
|
+
const {
|
|
113
|
+
styles,
|
|
114
|
+
x,
|
|
115
|
+
y,
|
|
116
|
+
data,
|
|
117
|
+
scale,
|
|
118
|
+
hideHoverLine
|
|
119
|
+
} = this.asProps;
|
|
120
|
+
const {
|
|
121
|
+
xIndex,
|
|
122
|
+
yIndex
|
|
123
|
+
} = this.state;
|
|
124
|
+
const [xScale, yScale] = scale;
|
|
125
|
+
const xRange = xScale.range();
|
|
126
|
+
const yRange = yScale.range();
|
|
127
|
+
const x1 = xIndex !== null ? scaleOfBandwidth(xScale, data[xIndex][x]) : undefined;
|
|
128
|
+
const y1 = yIndex !== null ? scaleOfBandwidth(yScale, data[yIndex][y]) : undefined;
|
|
129
|
+
const isHide = typeof hideHoverLine === 'function' ? hideHoverLine(xIndex, yIndex) : hideHoverLine;
|
|
130
|
+
if (isHide) {
|
|
131
|
+
return null;
|
|
174
132
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
133
|
+
return _ref3 = sstyled(styles), /*#__PURE__*/React.createElement(React.Fragment, null, xIndex !== null ? /*#__PURE__*/React.createElement(SHoverLine, _ref3.cn("SHoverLine", {
|
|
134
|
+
"aria-hidden": true,
|
|
135
|
+
"render": 'line',
|
|
136
|
+
"index": xIndex,
|
|
137
|
+
"x1": x1,
|
|
138
|
+
"y1": yRange[0],
|
|
139
|
+
"x2": x1,
|
|
140
|
+
"y2": yRange[1]
|
|
141
|
+
})) : null, yIndex !== null ? /*#__PURE__*/React.createElement(SHoverLine, _ref3.cn("SHoverLine", {
|
|
142
|
+
"aria-hidden": true,
|
|
143
|
+
"render": 'line',
|
|
144
|
+
"index": yIndex,
|
|
145
|
+
"x1": xRange[0],
|
|
146
|
+
"y1": y1,
|
|
147
|
+
"x2": xRange[1],
|
|
148
|
+
"y2": y1
|
|
149
|
+
})) : null);
|
|
182
150
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
return _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(React.Fragment, null, xIndex !== null ? /*#__PURE__*/React.createElement(SHoverRect, _ref4.cn("SHoverRect", {
|
|
210
|
-
"aria-hidden": true,
|
|
211
|
-
"render": 'rect',
|
|
212
|
-
"index": xIndex,
|
|
213
|
-
"width": xBand.step() - xBand.paddingInner() / 2,
|
|
214
|
-
"height": yRange[0] - yRange[1],
|
|
215
|
-
"x": xScale(data[xIndex][x]) - xBand.step() * xBand.paddingInner() / 2,
|
|
216
|
-
"y": yRange[1]
|
|
217
|
-
})) : null, yIndex !== null ? /*#__PURE__*/React.createElement(SHoverRect, _ref4.cn("SHoverRect", {
|
|
218
|
-
"aria-hidden": true,
|
|
219
|
-
"render": 'rect',
|
|
220
|
-
"index": yIndex,
|
|
221
|
-
"width": xRange[1] - xRange[0],
|
|
222
|
-
"height": yBand.step() - yBand.paddingInner() / 2,
|
|
223
|
-
"x": xRange[0],
|
|
224
|
-
"y": yScale(data[yIndex][y]) - yBand.step() * yBand.paddingInner() / 2
|
|
225
|
-
})) : null);
|
|
151
|
+
}
|
|
152
|
+
_defineProperty(HoverLineRoot, "displayName", 'HoverLine');
|
|
153
|
+
class HoverRectRoot extends Hover {
|
|
154
|
+
render() {
|
|
155
|
+
var _ref4;
|
|
156
|
+
const SHoverRect = this.Element;
|
|
157
|
+
const {
|
|
158
|
+
styles,
|
|
159
|
+
x,
|
|
160
|
+
y,
|
|
161
|
+
data,
|
|
162
|
+
scale,
|
|
163
|
+
hideHoverLine
|
|
164
|
+
} = this.asProps;
|
|
165
|
+
const {
|
|
166
|
+
xIndex,
|
|
167
|
+
yIndex
|
|
168
|
+
} = this.state;
|
|
169
|
+
const [xScale, yScale] = scale;
|
|
170
|
+
const xRange = xScale.range();
|
|
171
|
+
const yRange = yScale.range();
|
|
172
|
+
const xBand = scaleToBand(xScale);
|
|
173
|
+
const yBand = scaleToBand(yScale);
|
|
174
|
+
if (hideHoverLine) {
|
|
175
|
+
return null;
|
|
226
176
|
}
|
|
227
|
-
|
|
228
|
-
|
|
177
|
+
return _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(React.Fragment, null, xIndex !== null ? /*#__PURE__*/React.createElement(SHoverRect, _ref4.cn("SHoverRect", {
|
|
178
|
+
"aria-hidden": true,
|
|
179
|
+
"render": 'rect',
|
|
180
|
+
"index": xIndex,
|
|
181
|
+
"width": xBand.step() - xBand.paddingInner() / 2,
|
|
182
|
+
"height": yRange[0] - yRange[1],
|
|
183
|
+
"x": xScale(data[xIndex][x]) - xBand.step() * xBand.paddingInner() / 2,
|
|
184
|
+
"y": yRange[1]
|
|
185
|
+
})) : null, yIndex !== null ? /*#__PURE__*/React.createElement(SHoverRect, _ref4.cn("SHoverRect", {
|
|
186
|
+
"aria-hidden": true,
|
|
187
|
+
"render": 'rect',
|
|
188
|
+
"index": yIndex,
|
|
189
|
+
"width": xRange[1] - xRange[0],
|
|
190
|
+
"height": yBand.step() - yBand.paddingInner() / 2,
|
|
191
|
+
"x": xRange[0],
|
|
192
|
+
"y": yScale(data[yIndex][y]) - yBand.step() * yBand.paddingInner() / 2
|
|
193
|
+
})) : null);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
229
196
|
_defineProperty(HoverRectRoot, "displayName", 'HoverRect');
|
|
230
197
|
function HoverLineTooltip(props) {
|
|
231
198
|
var _ref = arguments[0],
|
|
232
199
|
_ref5;
|
|
233
|
-
|
|
234
|
-
return _ref5 = sstyled(props.styles), /*#__PURE__*/React.createElement(SHoverLineTooltip, _ref5.cn("SHoverLineTooltip",
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
200
|
+
const SHoverLineTooltip = Tooltip;
|
|
201
|
+
return _ref5 = sstyled(props.styles), /*#__PURE__*/React.createElement(SHoverLineTooltip, _ref5.cn("SHoverLineTooltip", {
|
|
202
|
+
..._assignProps({
|
|
203
|
+
"tag": HoverLine,
|
|
204
|
+
"excludeAnchorProps": true
|
|
205
|
+
}, _ref)
|
|
206
|
+
}));
|
|
238
207
|
}
|
|
239
208
|
function HoverRectTooltip(props) {
|
|
240
209
|
var _ref2 = arguments[0],
|
|
241
210
|
_ref6;
|
|
242
|
-
|
|
243
|
-
return _ref6 = sstyled(props.styles), /*#__PURE__*/React.createElement(SHoverRectTooltip, _ref6.cn("SHoverRectTooltip",
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
211
|
+
const SHoverRectTooltip = Tooltip;
|
|
212
|
+
return _ref6 = sstyled(props.styles), /*#__PURE__*/React.createElement(SHoverRectTooltip, _ref6.cn("SHoverRectTooltip", {
|
|
213
|
+
..._assignProps2({
|
|
214
|
+
"tag": HoverRect,
|
|
215
|
+
"excludeAnchorProps": true
|
|
216
|
+
}, _ref2)
|
|
217
|
+
}));
|
|
247
218
|
}
|
|
248
|
-
|
|
219
|
+
const HoverLine = createElement(HoverLineRoot, {
|
|
249
220
|
Tooltip: [HoverLineTooltip, Tooltip._______childrenComponents]
|
|
250
221
|
});
|
|
251
|
-
|
|
222
|
+
const HoverRect = createElement(HoverRectRoot, {
|
|
252
223
|
Tooltip: [HoverRectTooltip, Tooltip._______childrenComponents]
|
|
253
224
|
});
|
|
254
225
|
export { HoverLine, HoverRect };
|
package/lib/es6/Hover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hover.js","names":["Component","sstyled","Root","canUseDOM","hasParent","trottle","React","createElement","style","_sstyled","insert","Tooltip","scaleOfBandwidth","getIndexFromData","eventToPoint","invert","scaleToBand","Hover","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","xIndex","yIndex","document","e","currentTarget","_this$asProps","asProps","eventEmitter","data","scale","x","y","rootRef","patterns","plotId","clientX","clientY","_scale","_slicedToArray","xScale","yScale","_eventToPoint","current","_eventToPoint2","pX","pY","vX","vY","undefined","state","_rootRef$current$getB","getBoundingClientRect","xRect","yRect","height","_currentTarget$getBou","yOriginal","heightOriginal","isRootTooltip","target","setState","emit","diff","dimension","heightValue","_inherits","_createClass","key","value","componentDidMount","_this2","unsubscribeMouseMoveRoot","subscribe","persist","handlerMouseMoveRoot","unsubscribeMouseLeaveRoot","handlerMouseLeaveRoot","componentWillUnmount","HoverLineRoot","_Hover2","render","_ref3","SHoverLine","Element","_this$asProps2","styles","hideHoverLine","_this$state","_scale2","xRange","range","yRange","x1","y1","isHide","Fragment","cn","HoverRectRoot","_Hover3","_ref4","SHoverRect","_this$asProps3","_this$state2","_scale3","xBand","yBand","step","paddingInner","HoverLineTooltip","props","_ref","arguments[0]","_ref5","SHoverLineTooltip","_objectSpread","_assignProps","HoverLine","HoverRectTooltip","_ref2","_ref6","SHoverRectTooltip","_assignProps2","HoverRect","_______childrenComponents"],"sources":["../../src/Hover.jsx"],"sourcesContent":["import { Component, sstyled, Root } from '@semcore/core';\nimport canUseDOM from '@semcore/core/lib/utils/canUseDOM';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\nimport trottle from '@semcore/core/lib/utils/rafTrottle';\nimport React from 'react';\n\nimport createElement from './createElement';\nimport style from './style/hover.shadow.css';\nimport Tooltip from './Tooltip';\nimport { scaleOfBandwidth, getIndexFromData, eventToPoint, invert, scaleToBand } from './utils';\n\nclass Hover extends Component {\n static style = style;\n\n state = {\n xIndex: null,\n yIndex: null,\n };\n\n virtualElement = canUseDOM() ? document.createElement('div') : {};\n\n handlerMouseMoveRoot = trottle((e, currentTarget) => {\n const { eventEmitter, data, scale, x, y, rootRef, patterns, plotId } = this.asProps;\n const { clientX, clientY } = e;\n const [xScale, yScale] = scale;\n const [pX, pY] = eventToPoint(e, rootRef.current);\n const vX = invert(xScale, pX);\n const vY = invert(yScale, pY);\n const xIndex =\n x === undefined || vX === undefined ? null : getIndexFromData(data, xScale, x, vX);\n const yIndex =\n y === undefined || vY === undefined ? null : getIndexFromData(data, yScale, y, vY);\n const state = { xIndex, yIndex, patterns };\n\n const { x: xRect, y: yRect, height } = rootRef.current.getBoundingClientRect();\n const { y: yOriginal, height: heightOriginal } = currentTarget.getBoundingClientRect();\n const isRootTooltip = hasParent(e.target, rootRef.current);\n\n this.setState(state, () => {\n if (isRootTooltip) {\n eventEmitter.emit(`setTooltipPosition_${plotId}`, clientX, clientY);\n } else {\n const diff = clientY - yOriginal;\n const dimension = (diff / heightOriginal) * 100;\n const heightValue = height / 100 * dimension;\n\n eventEmitter.emit(`setTooltipPosition_${plotId}`, pX + xRect, yRect + heightValue);\n }\n eventEmitter.emit(`setTooltipRenderingProps_${plotId}`, {}, state);\n eventEmitter.emit(`setTooltipVisible_${plotId}`, xIndex !== null || yIndex !== null);\n });\n });\n\n handlerMouseLeaveRoot = trottle(() => {\n const state = {\n xIndex: null,\n yIndex: null,\n patterns: this.asProps.patterns,\n };\n this.setState(state, () => {\n this.asProps.eventEmitter.emit(`setTooltipVisible_${this.asProps.plotId}`, false);\n });\n });\n\n componentDidMount() {\n const { eventEmitter } = this.asProps;\n this.unsubscribeMouseMoveRoot = eventEmitter.subscribe('onMouseMoveChart', (e) => {\n e.persist();\n this.handlerMouseMoveRoot(e, e.currentTarget);\n });\n this.unsubscribeMouseLeaveRoot = eventEmitter.subscribe(\n 'onMouseLeaveChart',\n this.handlerMouseLeaveRoot,\n );\n }\n\n componentWillUnmount() {\n if (this.unsubscribeMouseMoveRoot) {\n this.unsubscribeMouseMoveRoot();\n }\n if (this.unsubscribeMouseLeaveRoot) {\n this.unsubscribeMouseLeaveRoot();\n }\n }\n}\n\nclass HoverLineRoot extends Hover {\n static displayName = 'HoverLine';\n\n render() {\n const SHoverLine = this.Element;\n const { styles, x, y, data, scale, hideHoverLine } = this.asProps;\n const { xIndex, yIndex } = this.state;\n const [xScale, yScale] = scale;\n\n const xRange = xScale.range();\n const yRange = yScale.range();\n const x1 = xIndex !== null ? scaleOfBandwidth(xScale, data[xIndex][x]) : undefined;\n const y1 = yIndex !== null ? scaleOfBandwidth(yScale, data[yIndex][y]) : undefined;\n\n const isHide =\n typeof hideHoverLine === 'function' ? hideHoverLine(xIndex, yIndex) : hideHoverLine;\n\n if (isHide) {\n return null;\n }\n\n return sstyled(styles)(\n <>\n {xIndex !== null\n ? (\n <SHoverLine\n aria-hidden\n render='line'\n index={xIndex}\n x1={x1}\n y1={yRange[0]}\n x2={x1}\n y2={yRange[1]}\n />\n )\n : null}\n {yIndex !== null\n ? (\n <SHoverLine\n aria-hidden\n render='line'\n index={yIndex}\n x1={xRange[0]}\n y1={y1}\n x2={xRange[1]}\n y2={y1}\n />\n )\n : null}\n </>,\n );\n }\n}\n\nclass HoverRectRoot extends Hover {\n static displayName = 'HoverRect';\n\n render() {\n const SHoverRect = this.Element;\n const { styles, x, y, data, scale, hideHoverLine } = this.asProps;\n const { xIndex, yIndex } = this.state;\n const [xScale, yScale] = scale;\n\n const xRange = xScale.range();\n const yRange = yScale.range();\n const xBand = scaleToBand(xScale);\n const yBand = scaleToBand(yScale);\n\n if (hideHoverLine) {\n return null;\n }\n\n return sstyled(styles)(\n <>\n {xIndex !== null\n ? (\n <SHoverRect\n aria-hidden\n render='rect'\n index={xIndex}\n width={xBand.step() - xBand.paddingInner() / 2}\n height={yRange[0] - yRange[1]}\n x={xScale(data[xIndex][x]) - (xBand.step() * xBand.paddingInner()) / 2}\n y={yRange[1]}\n />\n )\n : null}\n {yIndex !== null\n ? (\n <SHoverRect\n aria-hidden\n render='rect'\n index={yIndex}\n width={xRange[1] - xRange[0]}\n height={yBand.step() - yBand.paddingInner() / 2}\n x={xRange[0]}\n y={yScale(data[yIndex][y]) - (yBand.step() * yBand.paddingInner()) / 2}\n />\n )\n : null}\n </>,\n );\n }\n}\n\nfunction HoverLineTooltip(props) {\n const SHoverLineTooltip = Root;\n return sstyled(props.styles)(\n <SHoverLineTooltip render={Tooltip} tag={HoverLine} excludeAnchorProps />,\n );\n}\nfunction HoverRectTooltip(props) {\n const SHoverRectTooltip = Root;\n return sstyled(props.styles)(\n <SHoverRectTooltip render={Tooltip} tag={HoverRect} excludeAnchorProps />,\n );\n}\n\nconst HoverLine = createElement(HoverLineRoot, {\n Tooltip: [HoverLineTooltip, Tooltip._______childrenComponents],\n});\nconst HoverRect = createElement(HoverRectRoot, {\n Tooltip: [HoverRectTooltip, Tooltip._______childrenComponents],\n});\n\nexport { HoverLine, HoverRect };\n"],"mappings":";;;;;;;;;;AAAA,SAASA,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACxD,OAAOC,SAAS,MAAM,mCAAmC;AACzD,SAASC,SAAS,QAAQ,mCAAmC;AAC7D,OAAOC,OAAO,MAAM,oCAAoC;AACxD,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,aAAa,MAAM,iBAAiB;AAAC;AAAA,IAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;AAAA;AAE5C,OAAOC,OAAO,MAAM,WAAW;AAC/B,SAASC,gBAAgB,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,MA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;AAC/D,CAAC,CAAC;AACF,IAAMD,SAAS,GAAG7H,aAAa,CAACoG,aAAa,EAAE;EAC7ChG,OAAO,EAAE,CAACoH,gBAAgB,EAAEpH,OAAO,CAAC0H,yBAAyB;AAC/D,CAAC,CAAC;AAEF,SAASP,SAAS,EAAEM,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Hover.js","names":["Component","sstyled","Root","canUseDOM","hasParent","trottle","React","createElement","style","_sstyled","insert","Tooltip","scaleOfBandwidth","getIndexFromData","eventToPoint","invert","scaleToBand","Hover","constructor","args","_defineProperty","xIndex","yIndex","document","e","currentTarget","eventEmitter","data","scale","x","y","rootRef","patterns","plotId","asProps","clientX","clientY","xScale","yScale","pX","pY","current","vX","vY","undefined","state","xRect","yRect","height","getBoundingClientRect","yOriginal","heightOriginal","isRootTooltip","target","setState","emit","diff","dimension","heightValue","componentDidMount","unsubscribeMouseMoveRoot","subscribe","persist","handlerMouseMoveRoot","unsubscribeMouseLeaveRoot","handlerMouseLeaveRoot","componentWillUnmount","HoverLineRoot","render","_ref3","SHoverLine","Element","styles","hideHoverLine","xRange","range","yRange","x1","y1","isHide","Fragment","cn","HoverRectRoot","_ref4","SHoverRect","xBand","yBand","step","paddingInner","HoverLineTooltip","props","_ref","arguments[0]","_ref5","SHoverLineTooltip","_assignProps","HoverLine","HoverRectTooltip","_ref2","_ref6","SHoverRectTooltip","_assignProps2","HoverRect","_______childrenComponents"],"sources":["../../src/Hover.jsx"],"sourcesContent":["import { Component, sstyled, Root } from '@semcore/core';\nimport canUseDOM from '@semcore/core/lib/utils/canUseDOM';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\nimport trottle from '@semcore/core/lib/utils/rafTrottle';\nimport React from 'react';\n\nimport createElement from './createElement';\nimport style from './style/hover.shadow.css';\nimport Tooltip from './Tooltip';\nimport { scaleOfBandwidth, getIndexFromData, eventToPoint, invert, scaleToBand } from './utils';\n\nclass Hover extends Component {\n static style = style;\n\n state = {\n xIndex: null,\n yIndex: null,\n };\n\n virtualElement = canUseDOM() ? document.createElement('div') : {};\n\n handlerMouseMoveRoot = trottle((e, currentTarget) => {\n const { eventEmitter, data, scale, x, y, rootRef, patterns, plotId } = this.asProps;\n const { clientX, clientY } = e;\n const [xScale, yScale] = scale;\n const [pX, pY] = eventToPoint(e, rootRef.current);\n const vX = invert(xScale, pX);\n const vY = invert(yScale, pY);\n const xIndex =\n x === undefined || vX === undefined ? null : getIndexFromData(data, xScale, x, vX);\n const yIndex =\n y === undefined || vY === undefined ? null : getIndexFromData(data, yScale, y, vY);\n const state = { xIndex, yIndex, patterns };\n\n const { x: xRect, y: yRect, height } = rootRef.current.getBoundingClientRect();\n const { y: yOriginal, height: heightOriginal } = currentTarget.getBoundingClientRect();\n const isRootTooltip = hasParent(e.target, rootRef.current);\n\n this.setState(state, () => {\n if (isRootTooltip) {\n eventEmitter.emit(`setTooltipPosition_${plotId}`, clientX, clientY);\n } else {\n const diff = clientY - yOriginal;\n const dimension = (diff / heightOriginal) * 100;\n const heightValue = height / 100 * dimension;\n\n eventEmitter.emit(`setTooltipPosition_${plotId}`, pX + xRect, yRect + heightValue);\n }\n eventEmitter.emit(`setTooltipRenderingProps_${plotId}`, {}, state);\n eventEmitter.emit(`setTooltipVisible_${plotId}`, xIndex !== null || yIndex !== null);\n });\n });\n\n handlerMouseLeaveRoot = trottle(() => {\n const state = {\n xIndex: null,\n yIndex: null,\n patterns: this.asProps.patterns,\n };\n this.setState(state, () => {\n this.asProps.eventEmitter.emit(`setTooltipVisible_${this.asProps.plotId}`, false);\n });\n });\n\n componentDidMount() {\n const { eventEmitter } = this.asProps;\n this.unsubscribeMouseMoveRoot = eventEmitter.subscribe('onMouseMoveChart', (e) => {\n e.persist();\n this.handlerMouseMoveRoot(e, e.currentTarget);\n });\n this.unsubscribeMouseLeaveRoot = eventEmitter.subscribe(\n 'onMouseLeaveChart',\n this.handlerMouseLeaveRoot,\n );\n }\n\n componentWillUnmount() {\n if (this.unsubscribeMouseMoveRoot) {\n this.unsubscribeMouseMoveRoot();\n }\n if (this.unsubscribeMouseLeaveRoot) {\n this.unsubscribeMouseLeaveRoot();\n }\n }\n}\n\nclass HoverLineRoot extends Hover {\n static displayName = 'HoverLine';\n\n render() {\n const SHoverLine = this.Element;\n const { styles, x, y, data, scale, hideHoverLine } = this.asProps;\n const { xIndex, yIndex } = this.state;\n const [xScale, yScale] = scale;\n\n const xRange = xScale.range();\n const yRange = yScale.range();\n const x1 = xIndex !== null ? scaleOfBandwidth(xScale, data[xIndex][x]) : undefined;\n const y1 = yIndex !== null ? scaleOfBandwidth(yScale, data[yIndex][y]) : undefined;\n\n const isHide =\n typeof hideHoverLine === 'function' ? hideHoverLine(xIndex, yIndex) : hideHoverLine;\n\n if (isHide) {\n return null;\n }\n\n return sstyled(styles)(\n <>\n {xIndex !== null\n ? (\n <SHoverLine\n aria-hidden\n render='line'\n index={xIndex}\n x1={x1}\n y1={yRange[0]}\n x2={x1}\n y2={yRange[1]}\n />\n )\n : null}\n {yIndex !== null\n ? (\n <SHoverLine\n aria-hidden\n render='line'\n index={yIndex}\n x1={xRange[0]}\n y1={y1}\n x2={xRange[1]}\n y2={y1}\n />\n )\n : null}\n </>,\n );\n }\n}\n\nclass HoverRectRoot extends Hover {\n static displayName = 'HoverRect';\n\n render() {\n const SHoverRect = this.Element;\n const { styles, x, y, data, scale, hideHoverLine } = this.asProps;\n const { xIndex, yIndex } = this.state;\n const [xScale, yScale] = scale;\n\n const xRange = xScale.range();\n const yRange = yScale.range();\n const xBand = scaleToBand(xScale);\n const yBand = scaleToBand(yScale);\n\n if (hideHoverLine) {\n return null;\n }\n\n return sstyled(styles)(\n <>\n {xIndex !== null\n ? (\n <SHoverRect\n aria-hidden\n render='rect'\n index={xIndex}\n width={xBand.step() - xBand.paddingInner() / 2}\n height={yRange[0] - yRange[1]}\n x={xScale(data[xIndex][x]) - (xBand.step() * xBand.paddingInner()) / 2}\n y={yRange[1]}\n />\n )\n : null}\n {yIndex !== null\n ? (\n <SHoverRect\n aria-hidden\n render='rect'\n index={yIndex}\n width={xRange[1] - xRange[0]}\n height={yBand.step() - yBand.paddingInner() / 2}\n x={xRange[0]}\n y={yScale(data[yIndex][y]) - (yBand.step() * yBand.paddingInner()) / 2}\n />\n )\n : null}\n </>,\n );\n }\n}\n\nfunction HoverLineTooltip(props) {\n const SHoverLineTooltip = Root;\n return sstyled(props.styles)(\n <SHoverLineTooltip render={Tooltip} tag={HoverLine} excludeAnchorProps />,\n );\n}\nfunction HoverRectTooltip(props) {\n const SHoverRectTooltip = Root;\n return sstyled(props.styles)(\n <SHoverRectTooltip render={Tooltip} tag={HoverRect} excludeAnchorProps />,\n );\n}\n\nconst HoverLine = createElement(HoverLineRoot, {\n Tooltip: [HoverLineTooltip, Tooltip._______childrenComponents],\n});\nconst HoverRect = createElement(HoverRectRoot, {\n Tooltip: [HoverRectTooltip, Tooltip._______childrenComponents],\n});\n\nexport { HoverLine, HoverRect };\n"],"mappings":";;;;AAAA,SAASA,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACxD,OAAOC,SAAS,MAAM,mCAAmC;AACzD,SAASC,SAAS,QAAQ,mCAAmC;AAC7D,OAAOC,OAAO,MAAM,oCAAoC;AACxD,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,aAAa,MAAM,iBAAiB;AAAC;AAAA,MAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;AAAA;AAE5C,OAAOC,OAAO,MAAM,WAAW;AAC/B,SAASC,gBAAgB,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,MAAM,EAAEC,WAAW,QAAQ,SAAS;AAE/F,MAAMC,KAAK,SAASjB,SAAS,CAAC;EAAAkB,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,gBAGpB;MACNC,MAAM,EAAE,IAAI;MACZC,MAAM,EAAE;IACV,CAAC;IAAAF,eAAA,yBAEgBjB,SAAS,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