@semcore/d3-chart 16.0.2-prerelease.4 → 16.0.3-prerelease.0
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 +8 -0
- package/README.md +1 -50
- package/lib/cjs/AnimatedClipPath.js +13 -13
- package/lib/cjs/AnimatedClipPath.js.map +1 -1
- package/lib/cjs/Area.js +29 -27
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +97 -101
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +31 -32
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +26 -27
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +65 -68
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +94 -95
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +36 -34
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +16 -16
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +30 -31
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +27 -33
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +23 -23
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Pattern.js +13 -11
- package/lib/cjs/Pattern.js.map +1 -1
- package/lib/cjs/Plot.js +26 -27
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +125 -132
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +164 -145
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/Reference.js +47 -49
- package/lib/cjs/Reference.js.map +1 -1
- package/lib/cjs/ResponsiveContainer.js +19 -20
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +24 -25
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/StackBar.js +20 -23
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +14 -15
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +34 -35
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +28 -29
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/DataAccessibilityTable.js +2 -3
- package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +11 -12
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +10 -11
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/a11y/bezier.js +1 -2
- package/lib/cjs/a11y/bezier.js.map +1 -1
- package/lib/cjs/a11y/focus.js +4 -5
- package/lib/cjs/a11y/focus.js.map +1 -1
- package/lib/cjs/a11y/hints.js +5 -8
- package/lib/cjs/a11y/hints.js.map +1 -1
- package/lib/cjs/a11y/insights.js +63 -64
- package/lib/cjs/a11y/insights.js.map +1 -1
- package/lib/cjs/a11y/intl.js +1 -2
- package/lib/cjs/a11y/intl.js.map +1 -1
- package/lib/cjs/a11y/locale.js +4 -5
- package/lib/cjs/a11y/locale.js.map +1 -1
- package/lib/cjs/a11y/serialize.js +15 -17
- package/lib/cjs/a11y/serialize.js.map +1 -1
- package/lib/cjs/a11y/summarize.js +1 -2
- package/lib/cjs/a11y/summarize.js.map +1 -1
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/color.js +2 -3
- package/lib/cjs/color.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.js +43 -46
- 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 +17 -20
- 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 +17 -21
- 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 +18 -19
- 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 +19 -23
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +13 -14
- 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 +13 -14
- 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 +15 -16
- package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.js +17 -18
- 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 +14 -17
- 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 +14 -15
- 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 +12 -13
- package/lib/cjs/component/Chart/VennChart.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/index.js +7 -8
- package/lib/cjs/component/Chart/index.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +42 -20
- 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 +20 -20
- 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 +79 -67
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -2
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +18 -18
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/index.js +1 -2
- package/lib/cjs/component/ChartLegend/index.js.map +1 -1
- package/lib/cjs/component/Cigarette/Cigarette.js +18 -19
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js +22 -26
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
- package/lib/cjs/component/SvgElement.js +21 -0
- package/lib/cjs/component/SvgElement.js.map +1 -0
- package/lib/cjs/createElement.d.js.map +1 -1
- package/lib/cjs/createElement.js +7 -8
- package/lib/cjs/createElement.js.map +1 -1
- package/lib/cjs/index.js +9 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/types/Area.d.js.map +1 -1
- package/lib/cjs/types/Axis.d.js.map +1 -1
- package/lib/cjs/types/Bar.d.js.map +1 -1
- package/lib/cjs/types/Bubble.d.js.map +1 -1
- package/lib/cjs/types/ClipPath.d.js.map +1 -1
- package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Donut.d.js.map +1 -1
- package/lib/cjs/types/GroupBar.d.js.map +1 -1
- package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Hover.d.js.map +1 -1
- package/lib/cjs/types/Line.d.js.map +1 -1
- package/lib/cjs/types/Plot.d.js.map +1 -1
- package/lib/cjs/types/Radar.d.js.map +1 -1
- package/lib/cjs/types/Reference.d.js.map +1 -1
- package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/cjs/types/ScatterPlot.d.js.map +1 -1
- package/lib/cjs/types/StackBar.d.js.map +1 -1
- package/lib/cjs/types/StackedArea.d.js.map +1 -1
- package/lib/cjs/types/Tooltip.d.js.map +1 -1
- package/lib/cjs/types/Venn.d.js.map +1 -1
- package/lib/cjs/types/context.d.js.map +1 -1
- package/lib/cjs/types/index.d.js +2 -2
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js +31 -52
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/AnimatedClipPath.js +11 -10
- package/lib/es6/AnimatedClipPath.js.map +1 -1
- package/lib/es6/Area.js +27 -24
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +96 -98
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +28 -27
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +24 -24
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +63 -65
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +92 -92
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +36 -33
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +14 -13
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +27 -26
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +24 -28
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +20 -19
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Pattern.js +4 -2
- package/lib/es6/Pattern.js.map +1 -1
- package/lib/es6/Plot.js +25 -25
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +122 -128
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +162 -142
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/Reference.js +44 -43
- package/lib/es6/Reference.js.map +1 -1
- package/lib/es6/ResponsiveContainer.js +17 -17
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +22 -22
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/StackBar.js +17 -19
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +12 -12
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +33 -33
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +26 -26
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +11 -11
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +9 -9
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/a11y/bezier.js.map +1 -1
- package/lib/es6/a11y/focus.js +3 -3
- package/lib/es6/a11y/focus.js.map +1 -1
- package/lib/es6/a11y/hints.js +1 -1
- package/lib/es6/a11y/hints.js.map +1 -1
- package/lib/es6/a11y/insights.js +61 -61
- package/lib/es6/a11y/insights.js.map +1 -1
- package/lib/es6/a11y/intl.js.map +1 -1
- package/lib/es6/a11y/locale.js +2 -2
- package/lib/es6/a11y/locale.js.map +1 -1
- package/lib/es6/a11y/serialize.js +14 -13
- package/lib/es6/a11y/serialize.js.map +1 -1
- package/lib/es6/a11y/summarize.js.map +1 -1
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/color.js +1 -1
- package/lib/es6/color.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.js +40 -41
- 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 +16 -16
- 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 +15 -17
- 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 +17 -15
- 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 +17 -17
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js +11 -10
- 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 +12 -10
- 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 +14 -12
- 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 +15 -14
- 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 +12 -13
- package/lib/es6/component/Chart/RadarChart.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.js +13 -11
- 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 +10 -9
- package/lib/es6/component/Chart/VennChart.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
- package/lib/es6/component/Chart/index.js +6 -6
- package/lib/es6/component/Chart/index.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +40 -17
- 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 +18 -17
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +77 -64
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +16 -15
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/index.js.map +1 -1
- package/lib/es6/component/Cigarette/Cigarette.js +16 -16
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.js +20 -21
- package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
- package/lib/es6/component/SvgElement.js +14 -0
- package/lib/es6/component/SvgElement.js.map +1 -0
- package/lib/es6/createElement.d.js.map +1 -1
- package/lib/es6/createElement.js +5 -5
- package/lib/es6/createElement.js.map +1 -1
- package/lib/es6/index.js +1 -0
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/types/Area.d.js.map +1 -1
- package/lib/es6/types/Axis.d.js.map +1 -1
- package/lib/es6/types/Bar.d.js.map +1 -1
- package/lib/es6/types/Bubble.d.js.map +1 -1
- package/lib/es6/types/ClipPath.d.js.map +1 -1
- package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Donut.d.js.map +1 -1
- package/lib/es6/types/GroupBar.d.js.map +1 -1
- package/lib/es6/types/HorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Hover.d.js.map +1 -1
- package/lib/es6/types/Line.d.js.map +1 -1
- package/lib/es6/types/Plot.d.js.map +1 -1
- package/lib/es6/types/Radar.d.js.map +1 -1
- package/lib/es6/types/Reference.d.js.map +1 -1
- package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/es6/types/ScatterPlot.d.js.map +1 -1
- package/lib/es6/types/StackBar.d.js.map +1 -1
- package/lib/es6/types/StackedArea.d.js.map +1 -1
- package/lib/es6/types/Tooltip.d.js.map +1 -1
- package/lib/es6/types/Venn.d.js.map +1 -1
- package/lib/es6/types/context.d.js.map +1 -1
- package/lib/es6/types/index.d.js +1 -0
- package/lib/es6/types/index.d.js.map +1 -1
- package/lib/es6/utils.js +11 -13
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/AnimatedClipPath.mjs +10 -7
- package/lib/esm/Area.mjs +30 -25
- package/lib/esm/Axis.mjs +67 -67
- package/lib/esm/Bar.mjs +31 -28
- package/lib/esm/Bubble.mjs +28 -26
- package/lib/esm/CompactHorizontalBar.mjs +61 -60
- package/lib/esm/Donut.mjs +50 -49
- package/lib/esm/Dots.mjs +32 -27
- package/lib/esm/GroupBar.mjs +14 -11
- package/lib/esm/HorizontalBar.mjs +30 -27
- package/lib/esm/Hover.mjs +28 -30
- package/lib/esm/Line.mjs +23 -20
- package/lib/esm/Pattern.mjs +1 -1
- package/lib/esm/Plot.mjs +27 -25
- package/lib/esm/Radar.mjs +90 -94
- package/lib/esm/RadialTree.mjs +86 -86
- package/lib/esm/Reference.mjs +34 -31
- package/lib/esm/ResponsiveContainer.mjs +19 -17
- package/lib/esm/ScatterPlot.mjs +26 -24
- package/lib/esm/StackBar.mjs +17 -17
- package/lib/esm/StackedArea.mjs +13 -11
- package/lib/esm/Tooltip.mjs +35 -33
- package/lib/esm/Venn.mjs +29 -27
- package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -2
- package/lib/esm/a11y/PlotA11yModule.mjs +8 -8
- package/lib/esm/a11y/PlotA11yView.mjs +9 -9
- package/lib/esm/a11y/focus.mjs +3 -3
- package/lib/esm/a11y/hints.mjs +1 -1
- package/lib/esm/a11y/insights.mjs +77 -78
- package/lib/esm/a11y/intl.mjs +1 -1
- package/lib/esm/a11y/locale.mjs +2 -2
- package/lib/esm/a11y/serialize.mjs +12 -12
- package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/component/Chart/AbstractChart.mjs +38 -37
- package/lib/esm/component/Chart/AreaChart.mjs +19 -15
- package/lib/esm/component/Chart/BarChart.mjs +20 -17
- package/lib/esm/component/Chart/BubbleChart.mjs +16 -13
- package/lib/esm/component/Chart/CigaretteChart.mjs +24 -17
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +18 -10
- package/lib/esm/component/Chart/DonutChart.mjs +13 -10
- package/lib/esm/component/Chart/HistogramChart.mjs +18 -12
- package/lib/esm/component/Chart/LineChart.mjs +18 -12
- package/lib/esm/component/Chart/RadarChart.mjs +19 -12
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +14 -11
- package/lib/esm/component/Chart/VennChart.mjs +12 -9
- package/lib/esm/component/Chart/index.mjs +6 -6
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +42 -17
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +21 -18
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +67 -56
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +23 -20
- package/lib/esm/component/Cigarette/Cigarette.mjs +18 -16
- package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +20 -19
- package/lib/esm/component/SvgElement.mjs +14 -0
- package/lib/esm/createElement.mjs +5 -5
- package/lib/esm/index.mjs +2 -0
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/utils.mjs +8 -8
- package/lib/types/Area.d.ts +7 -6
- package/lib/types/Axis.d.ts +4 -3
- package/lib/types/Bar.d.ts +7 -6
- package/lib/types/Bubble.d.ts +6 -5
- package/lib/types/ClipPath.d.ts +4 -3
- package/lib/types/CompactHorizontalBar.d.ts +7 -8
- package/lib/types/Donut.d.ts +6 -5
- package/lib/types/GroupBar.d.ts +6 -6
- package/lib/types/HorizontalBar.d.ts +7 -6
- package/lib/types/Hover.d.ts +8 -8
- package/lib/types/Line.d.ts +7 -6
- package/lib/types/Pattern.d.ts +51 -51
- package/lib/types/Plot.d.ts +10 -9
- package/lib/types/Radar.d.ts +8 -7
- package/lib/types/RadialTree.d.ts +9 -54
- package/lib/types/Reference.d.ts +5 -4
- package/lib/types/ResponsiveContainer.d.ts +5 -4
- package/lib/types/ScatterPlot.d.ts +6 -5
- package/lib/types/StackBar.d.ts +7 -6
- package/lib/types/StackedArea.d.ts +6 -5
- package/lib/types/Tooltip.d.ts +14 -12
- package/lib/types/Venn.d.ts +7 -6
- package/lib/types/a11y/DataAccessibilityTable.d.ts +2 -2
- package/lib/types/a11y/PlotA11yModule.d.ts +1 -1
- package/lib/types/a11y/hints.d.ts +5 -5
- package/lib/types/a11y/insights.d.ts +1 -1
- package/lib/types/a11y/intl.d.ts +1 -1
- package/lib/types/a11y/serialize.d.ts +7 -7
- package/lib/types/a11y/summarize.d.ts +2 -2
- package/lib/types/component/Chart/AbstractChart.d.ts +6 -6
- package/lib/types/component/Chart/AbstractChart.type.d.ts +27 -27
- package/lib/types/component/Chart/AreaChart.d.ts +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +6 -6
- package/lib/types/component/Chart/BarChart.d.ts +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +6 -6
- package/lib/types/component/Chart/BubbleChart.d.ts +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +4 -4
- package/lib/types/component/Chart/CigaretteChart.d.ts +1 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +4 -4
- package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +5 -5
- package/lib/types/component/Chart/DonutChart.d.ts +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +5 -5
- package/lib/types/component/Chart/HistogramChart.d.ts +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +4 -4
- package/lib/types/component/Chart/LineChart.d.ts +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +7 -7
- package/lib/types/component/Chart/RadarChart.d.ts +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +4 -4
- package/lib/types/component/Chart/ScatterPlotChart.d.ts +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +5 -5
- package/lib/types/component/Chart/VennChart.d.ts +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +4 -4
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +6 -4
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +4 -5
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +4 -5
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +17 -10
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +5 -5
- package/lib/types/component/StackGroupBar/StackGroupBar.d.ts +1 -1
- package/lib/types/component/StackGroupBar/StackGroupBar.type.d.ts +3 -4
- package/lib/types/component/SvgElement.d.ts +10 -0
- package/lib/types/index.d.ts +2 -1
- package/lib/types/utils.d.ts +6 -6
- package/package.json +22 -23
package/lib/esm/Dots.mjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import { sstyled } from "@semcore/core";
|
|
3
|
+
import trottle from "@semcore/core/lib/utils/rafTrottle";
|
|
3
4
|
import { bisector } from "d3-array";
|
|
4
5
|
import React from "react";
|
|
5
|
-
import trottle from "@semcore/core/lib/utils/rafTrottle";
|
|
6
6
|
import createElement from "./createElement.mjs";
|
|
7
|
-
import { interpolateValue, eventToPoint, invert, getChartDefaultColorName } from "./utils.mjs";
|
|
8
7
|
import { getPatternSymbolSize, PatternSymbol } from "./Pattern.mjs";
|
|
8
|
+
import { interpolateValue, eventToPoint, invert, getChartDefaultColorName } from "./utils.mjs";
|
|
9
9
|
/*!__reshadow-styles__:"./style/dot.shadow.css"*/
|
|
10
10
|
var style = (
|
|
11
11
|
/*__reshadow_css_start__*/
|
|
12
12
|
(sstyled.insert(
|
|
13
13
|
/*__inner_css_start__*/
|
|
14
|
-
".
|
|
14
|
+
".___SDots_1odhs_gg_ .___SDot_1odhs_gg_{transition-duration:var(--duration_1odhs)}.___SDot_1odhs_gg_{stroke-width:1px;stroke:var(--intergalactic-chart-grid-border, #ffffff);fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:cx,cy,x,y;transition-timing-function:ease-in-out}.___SDot_1odhs_gg_.__hide_1odhs_gg_{display:none}.___SDot_1odhs_gg_.__color_1odhs_gg_{fill:var(--color_1odhs)}.___SDot_1odhs_gg_.__transparent_1odhs_gg_{opacity:.3}",
|
|
15
15
|
/*__inner_css_end__*/
|
|
16
|
-
"
|
|
16
|
+
"1odhs_gg_"
|
|
17
17
|
), /*__reshadow_css_end__*/
|
|
18
18
|
{
|
|
19
|
-
"__SDot": "
|
|
20
|
-
"_hide": "
|
|
21
|
-
"_color": "
|
|
22
|
-
"--color": "--
|
|
23
|
-
"_transparent": "
|
|
24
|
-
"__SDots": "
|
|
25
|
-
"--duration": "--
|
|
19
|
+
"__SDot": "___SDot_1odhs_gg_",
|
|
20
|
+
"_hide": "__hide_1odhs_gg_",
|
|
21
|
+
"_color": "__color_1odhs_gg_",
|
|
22
|
+
"--color": "--color_1odhs",
|
|
23
|
+
"_transparent": "__transparent_1odhs_gg_",
|
|
24
|
+
"__SDots": "___SDots_1odhs_gg_",
|
|
25
|
+
"--duration": "--duration_1odhs"
|
|
26
26
|
})
|
|
27
27
|
);
|
|
28
28
|
function Dots(props) {
|
|
@@ -32,6 +32,8 @@ function Dots(props) {
|
|
|
32
32
|
return d[x];
|
|
33
33
|
}).center;
|
|
34
34
|
var _React$useState = React.useState(null), _React$useState2 = _slicedToArray(_React$useState, 2), activeIndex = _React$useState2[0], setActiveIndex = _React$useState2[1];
|
|
35
|
+
var patternKey = color || getChartDefaultColorName(0);
|
|
36
|
+
var svgPatternId = "template_".concat(patternKey);
|
|
35
37
|
var data = React.useMemo(function() {
|
|
36
38
|
return props.data.filter(function(item) {
|
|
37
39
|
return item[y] !== interpolateValue;
|
|
@@ -57,6 +59,10 @@ function Dots(props) {
|
|
|
57
59
|
unsubscribeMouseLeaveRoot();
|
|
58
60
|
};
|
|
59
61
|
}, [eventEmitter, scale, data, x, y]);
|
|
62
|
+
var _getPatternSymbolSize = getPatternSymbolSize({
|
|
63
|
+
patternKey,
|
|
64
|
+
patterns
|
|
65
|
+
}), _getPatternSymbolSize2 = _slicedToArray(_getPatternSymbolSize, 2), width = _getPatternSymbolSize2[0], height = _getPatternSymbolSize2[1];
|
|
60
66
|
var dots = data.reduce(function(acc, d, i) {
|
|
61
67
|
var isPrev = d3.defined()(data[i - 1] || {});
|
|
62
68
|
var isNext = d3.defined()(data[i + 1] || {});
|
|
@@ -65,11 +71,6 @@ function Dots(props) {
|
|
|
65
71
|
var radius = radiusBase * (active ? 5 / 4 : 1);
|
|
66
72
|
if (!d3.defined()(d)) return acc;
|
|
67
73
|
if (!visible) return acc;
|
|
68
|
-
var patternKey = color || getChartDefaultColorName(0);
|
|
69
|
-
var _getPatternSymbolSize = getPatternSymbolSize({
|
|
70
|
-
patternKey,
|
|
71
|
-
patterns
|
|
72
|
-
}), _getPatternSymbolSize2 = _slicedToArray(_getPatternSymbolSize, 2), width = _getPatternSymbolSize2[0], height = _getPatternSymbolSize2[1];
|
|
73
74
|
if (!patterns) {
|
|
74
75
|
var _ref;
|
|
75
76
|
acc.push((_ref = sstyled(styles), /* @__PURE__ */ React.createElement(SDot, _ref.cn("SDot", {
|
|
@@ -90,19 +91,17 @@ function Dots(props) {
|
|
|
90
91
|
} else {
|
|
91
92
|
var _ref2;
|
|
92
93
|
acc.push((_ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SDot, _ref2.cn("SDot", {
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
94
|
+
"key": i,
|
|
95
|
+
"render": "use",
|
|
96
|
+
"href": "#".concat(svgPatternId),
|
|
97
|
+
"x": width + (d3.x()(d) - width / 2),
|
|
98
|
+
"y": d3.y()(d) - height / 2,
|
|
98
99
|
"value": d,
|
|
100
|
+
"transparent": transparent,
|
|
101
|
+
"radius": radius,
|
|
99
102
|
"visible": visible,
|
|
100
103
|
"active": active,
|
|
101
|
-
"hide": hide
|
|
102
|
-
"transparent": transparent,
|
|
103
|
-
"x": d3.x()(d) - width / 2,
|
|
104
|
-
"y": d3.y()(d) - height / 2,
|
|
105
|
-
"radius": radius
|
|
104
|
+
"hide": hide
|
|
106
105
|
}))));
|
|
107
106
|
}
|
|
108
107
|
return acc;
|
|
@@ -110,7 +109,13 @@ function Dots(props) {
|
|
|
110
109
|
var SDots = "g";
|
|
111
110
|
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SDots, _ref3.cn("SDots", {
|
|
112
111
|
"duration": "".concat(duration, "ms")
|
|
113
|
-
}),
|
|
112
|
+
}), /* @__PURE__ */ React.createElement(PatternSymbol, _ref3.cn("PatternSymbol", {
|
|
113
|
+
"color": resolveColor(color),
|
|
114
|
+
"patternKey": color,
|
|
115
|
+
"id": svgPatternId,
|
|
116
|
+
"patterns": patterns,
|
|
117
|
+
"x": -1 * width
|
|
118
|
+
})), dots);
|
|
114
119
|
}
|
|
115
120
|
Dots.style = style;
|
|
116
121
|
const Dots$1 = createElement(Dots);
|
package/lib/esm/GroupBar.mjs
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
4
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
3
6
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
7
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
|
-
import React from "react";
|
|
7
8
|
import { Component } from "@semcore/core";
|
|
8
9
|
import getOriginChildren from "@semcore/core/lib/utils/getOriginChildren";
|
|
9
|
-
import
|
|
10
|
+
import { scaleBand } from "d3-scale";
|
|
11
|
+
import React from "react";
|
|
10
12
|
import Bar from "./Bar.mjs";
|
|
13
|
+
import createElement from "./createElement.mjs";
|
|
11
14
|
import HorizontalBar from "./HorizontalBar.mjs";
|
|
12
|
-
import { scaleBand } from "d3-scale";
|
|
13
15
|
import { scaleToBand, getChartDefaultColorName } from "./utils.mjs";
|
|
16
|
+
function _callSuper(t, o, e) {
|
|
17
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
18
|
+
}
|
|
14
19
|
var GroupBarRoot = /* @__PURE__ */ function(_Component) {
|
|
15
|
-
_inherits(GroupBarRoot2, _Component);
|
|
16
|
-
var _super = _createSuper(GroupBarRoot2);
|
|
17
20
|
function GroupBarRoot2() {
|
|
18
21
|
_classCallCheck(this, GroupBarRoot2);
|
|
19
|
-
return
|
|
22
|
+
return _callSuper(this, GroupBarRoot2, arguments);
|
|
20
23
|
}
|
|
21
|
-
|
|
24
|
+
_inherits(GroupBarRoot2, _Component);
|
|
25
|
+
return _createClass(GroupBarRoot2, [{
|
|
22
26
|
key: "getScaleGroup",
|
|
23
27
|
value: function getScaleGroup() {
|
|
24
28
|
var _this$asProps = this.asProps, Children = _this$asProps.Children, scale = _this$asProps.scale, scaleGroup = _this$asProps.scaleGroup, x = _this$asProps.x;
|
|
@@ -39,7 +43,7 @@ var GroupBarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
39
43
|
key: "getBarProps",
|
|
40
44
|
value: function getBarProps(_ref, index) {
|
|
41
45
|
var y = _ref.y;
|
|
42
|
-
var _this$asProps2 = this.asProps, x = _this$asProps2.x, _this$asProps2$maxBar = _this$asProps2.maxBarSize, maxBarSize = _this$asProps2$maxBar === void 0 ?
|
|
46
|
+
var _this$asProps2 = this.asProps, x = _this$asProps2.x, _this$asProps2$maxBar = _this$asProps2.maxBarSize, maxBarSize = _this$asProps2$maxBar === void 0 ? Number.POSITIVE_INFINITY : _this$asProps2$maxBar, patterns = _this$asProps2.patterns;
|
|
43
47
|
var bandWidth = this.scaleGroup.bandwidth();
|
|
44
48
|
var width = Math.min(bandWidth, maxBarSize);
|
|
45
49
|
var offsetX = this.scaleGroup(y) + bandWidth / 2 - width / 2;
|
|
@@ -56,7 +60,7 @@ var GroupBarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
56
60
|
key: "getHorizontalBarProps",
|
|
57
61
|
value: function getHorizontalBarProps(_ref2, index) {
|
|
58
62
|
var x = _ref2.x;
|
|
59
|
-
var _this$asProps3 = this.asProps, y = _this$asProps3.y, _this$asProps3$maxBar = _this$asProps3.maxBarSize, maxBarSize = _this$asProps3$maxBar === void 0 ?
|
|
63
|
+
var _this$asProps3 = this.asProps, y = _this$asProps3.y, _this$asProps3$maxBar = _this$asProps3.maxBarSize, maxBarSize = _this$asProps3$maxBar === void 0 ? Number.POSITIVE_INFINITY : _this$asProps3$maxBar;
|
|
60
64
|
var bandWidth = this.scaleGroup.bandwidth();
|
|
61
65
|
var height = Math.min(bandWidth, maxBarSize);
|
|
62
66
|
var offsetY = this.scaleGroup(x) + bandWidth / 2 - height / 2;
|
|
@@ -82,7 +86,6 @@ var GroupBarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
82
86
|
});
|
|
83
87
|
}
|
|
84
88
|
}]);
|
|
85
|
-
return GroupBarRoot2;
|
|
86
89
|
}(Component);
|
|
87
90
|
_defineProperty(GroupBarRoot, "displayName", "GroupBar");
|
|
88
91
|
var GroupBar = createElement(GroupBarRoot, {
|
|
@@ -1,41 +1,46 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
4
7
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
8
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
9
|
import { sstyled, Component } from "@semcore/core";
|
|
8
|
-
import React from "react";
|
|
9
10
|
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
10
|
-
import
|
|
11
|
+
import React from "react";
|
|
11
12
|
import AnimatedClipPath from "./AnimatedClipPath.mjs";
|
|
12
|
-
import
|
|
13
|
+
import createElement from "./createElement.mjs";
|
|
13
14
|
import { PatternFill } from "./Pattern.mjs";
|
|
15
|
+
import { scaleToBand, roundedPath } from "./utils.mjs";
|
|
16
|
+
function _callSuper(t, o, e) {
|
|
17
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
18
|
+
}
|
|
14
19
|
/*!__reshadow-styles__:"./style/bar.shadow.css"*/
|
|
15
20
|
var style = (
|
|
16
21
|
/*__reshadow_css_start__*/
|
|
17
22
|
(sstyled.insert(
|
|
18
23
|
/*__inner_css_start__*/
|
|
19
|
-
".
|
|
24
|
+
".___SBar_1e83s_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_1e83s);transition-timing-function:ease-in-out}.___SBar_1e83s_gg_.__color_1e83s_gg_{fill:var(--color_1e83s)}.___SBar_1e83s_gg_.__pattern_1e83s_gg_.__color_1e83s_gg_{fill:var(--pattern_1e83s);stroke:var(--color_1e83s);stroke-width:1px}.___SBar_1e83s_gg_.__hide_1e83s_gg_{display:none}.___SBar_1e83s_gg_.__transparent_1e83s_gg_{opacity:.3}.___SBackground_1e83s_gg_.__onClick_1e83s_gg_,.___SBar_1e83s_gg_.__onClick_1e83s_gg_{cursor:pointer}.___SBackground_1e83s_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9)}.___SBarAnnotation_1e83s_gg_{display:flex;justify-content:space-between}.___SBarLabel_1e83s_gg_{color:var(--intergalactic-text-primary, #191b23);margin-right:auto}.___SBarLabel_1e83s_gg_,.___SBarPercent_1e83s_gg_,.___SBarValue_1e83s_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SBarPercent_1e83s_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SBarValue_1e83s_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary, #191b23);text-align:right}.___SCompactHorizontalBarHoverRect_1e83s_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}",
|
|
20
25
|
/*__inner_css_end__*/
|
|
21
|
-
"
|
|
26
|
+
"1e83s_gg_"
|
|
22
27
|
), /*__reshadow_css_end__*/
|
|
23
28
|
{
|
|
24
|
-
"__SBar": "
|
|
25
|
-
"--duration": "--
|
|
26
|
-
"_color": "
|
|
27
|
-
"--color": "--
|
|
28
|
-
"_pattern": "
|
|
29
|
-
"--pattern": "--
|
|
30
|
-
"_hide": "
|
|
31
|
-
"_transparent": "
|
|
32
|
-
"_onClick": "
|
|
33
|
-
"__SBackground": "
|
|
34
|
-
"__SBarAnnotation": "
|
|
35
|
-
"__SBarLabel": "
|
|
36
|
-
"__SBarPercent": "
|
|
37
|
-
"__SBarValue": "
|
|
38
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
29
|
+
"__SBar": "___SBar_1e83s_gg_",
|
|
30
|
+
"--duration": "--duration_1e83s",
|
|
31
|
+
"_color": "__color_1e83s_gg_",
|
|
32
|
+
"--color": "--color_1e83s",
|
|
33
|
+
"_pattern": "__pattern_1e83s_gg_",
|
|
34
|
+
"--pattern": "--pattern_1e83s",
|
|
35
|
+
"_hide": "__hide_1e83s_gg_",
|
|
36
|
+
"_transparent": "__transparent_1e83s_gg_",
|
|
37
|
+
"_onClick": "__onClick_1e83s_gg_",
|
|
38
|
+
"__SBackground": "___SBackground_1e83s_gg_",
|
|
39
|
+
"__SBarAnnotation": "___SBarAnnotation_1e83s_gg_",
|
|
40
|
+
"__SBarLabel": "___SBarLabel_1e83s_gg_",
|
|
41
|
+
"__SBarPercent": "___SBarPercent_1e83s_gg_",
|
|
42
|
+
"__SBarValue": "___SBarValue_1e83s_gg_",
|
|
43
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_1e83s_gg_"
|
|
39
44
|
})
|
|
40
45
|
);
|
|
41
46
|
var MIN_WIDTH = 2;
|
|
@@ -46,13 +51,12 @@ var calcPartBarX = function calcPartBarX2(x, minWidth, width) {
|
|
|
46
51
|
return Object.is(x, 0) ? minWidth : 0;
|
|
47
52
|
};
|
|
48
53
|
var HorizontalBarRoot = /* @__PURE__ */ function(_Component) {
|
|
49
|
-
_inherits(HorizontalBarRoot2, _Component);
|
|
50
|
-
var _super = _createSuper(HorizontalBarRoot2);
|
|
51
54
|
function HorizontalBarRoot2() {
|
|
52
55
|
_classCallCheck(this, HorizontalBarRoot2);
|
|
53
|
-
return
|
|
56
|
+
return _callSuper(this, HorizontalBarRoot2, arguments);
|
|
54
57
|
}
|
|
55
|
-
|
|
58
|
+
_inherits(HorizontalBarRoot2, _Component);
|
|
59
|
+
return _createClass(HorizontalBarRoot2, [{
|
|
56
60
|
key: "getBackgroundProps",
|
|
57
61
|
value: function getBackgroundProps(_props, index) {
|
|
58
62
|
var _this$asProps = this.asProps, data = _this$asProps.data, y = _this$asProps.y;
|
|
@@ -66,7 +70,7 @@ var HorizontalBarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
66
70
|
value: function renderBar(d, i) {
|
|
67
71
|
var _ref, _d$x, _d$x2, _d$x3;
|
|
68
72
|
var SBar = this.Element;
|
|
69
|
-
var _this$asProps2 = this.asProps, styles = _this$asProps2.styles, color = _this$asProps2.color, x = _this$asProps2.x, x0 = _this$asProps2.x0, y = _this$asProps2.y, scale = _this$asProps2.scale, hide = _this$asProps2.hide, offsetProps = _this$asProps2.offset, uid = _this$asProps2.uid, duration = _this$asProps2.duration, r = _this$asProps2.r, wMin = _this$asProps2.wMin, heightProps = _this$asProps2.height, onMouseMove = _this$asProps2.onMouseMove, onMouseLeave = _this$asProps2.onMouseLeave, groupKey = _this$asProps2.groupKey, transparent = _this$asProps2.transparent, _this$asProps2$maxBar = _this$asProps2.maxBarSize, maxBarSize = _this$asProps2$maxBar === void 0 ?
|
|
73
|
+
var _this$asProps2 = this.asProps, styles = _this$asProps2.styles, color = _this$asProps2.color, x = _this$asProps2.x, x0 = _this$asProps2.x0, y = _this$asProps2.y, scale = _this$asProps2.scale, hide = _this$asProps2.hide, offsetProps = _this$asProps2.offset, uid = _this$asProps2.uid, duration = _this$asProps2.duration, r = _this$asProps2.r, wMin = _this$asProps2.wMin, heightProps = _this$asProps2.height, onMouseMove = _this$asProps2.onMouseMove, onMouseLeave = _this$asProps2.onMouseLeave, groupKey = _this$asProps2.groupKey, transparent = _this$asProps2.transparent, _this$asProps2$maxBar = _this$asProps2.maxBarSize, maxBarSize = _this$asProps2$maxBar === void 0 ? Number.POSITIVE_INFINITY : _this$asProps2$maxBar, resolveColor = _this$asProps2.resolveColor, patterns = _this$asProps2.patterns, onClick = _this$asProps2.onClick;
|
|
70
74
|
var offset = typeof offsetProps === "function" ? offsetProps(i) : offsetProps;
|
|
71
75
|
var _scale = _slicedToArray(scale, 2), xScale = _scale[0], yScale = _scale[1];
|
|
72
76
|
var absWidth = Math.abs(xScale(d[x]) - Math.max(xScale(xScale.domain()[0]), xScale((_d$x = d[x0]) !== null && _d$x !== void 0 ? _d$x : 0)));
|
|
@@ -136,7 +140,6 @@ var HorizontalBarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
136
140
|
}));
|
|
137
141
|
}
|
|
138
142
|
}]);
|
|
139
|
-
return HorizontalBarRoot2;
|
|
140
143
|
}(Component);
|
|
141
144
|
_defineProperty(HorizontalBarRoot, "displayName", "HorizontalBar");
|
|
142
145
|
_defineProperty(HorizontalBarRoot, "enhance", [uniqueIDEnhancement()]);
|
package/lib/esm/Hover.mjs
CHANGED
|
@@ -2,47 +2,49 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
-
import
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
6
8
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
8
9
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
|
-
import { sstyled,
|
|
10
|
-
import React from "react";
|
|
10
|
+
import { sstyled, assignProps, Component } from "@semcore/core";
|
|
11
11
|
import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
|
|
12
12
|
import trottle from "@semcore/core/lib/utils/rafTrottle";
|
|
13
|
+
import React from "react";
|
|
13
14
|
import createElement from "./createElement.mjs";
|
|
14
|
-
import { eventToPoint, invert, getIndexFromData, scaleOfBandwidth, scaleToBand } from "./utils.mjs";
|
|
15
15
|
import Tooltip from "./Tooltip.mjs";
|
|
16
|
+
import { scaleOfBandwidth, scaleToBand, eventToPoint, invert, getIndexFromData } from "./utils.mjs";
|
|
17
|
+
function _callSuper(t, o, e) {
|
|
18
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
19
|
+
}
|
|
16
20
|
/*!__reshadow-styles__:"./style/hover.shadow.css"*/
|
|
17
21
|
var style = (
|
|
18
22
|
/*__reshadow_css_start__*/
|
|
19
23
|
(sstyled.insert(
|
|
20
24
|
/*__inner_css_start__*/
|
|
21
|
-
".
|
|
25
|
+
".___SHoverLine_1s6xw_gg_,.___SHoverLine_1s6xw_gg_:focus-visible{outline:0;stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SHoverRect_1s6xw_gg_,.___SHoverRect_1s6xw_gg_:focus-visible{outline:0;fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}",
|
|
22
26
|
/*__inner_css_end__*/
|
|
23
|
-
"
|
|
27
|
+
"1s6xw_gg_"
|
|
24
28
|
), /*__reshadow_css_end__*/
|
|
25
29
|
{
|
|
26
|
-
"__SHoverLine": "
|
|
27
|
-
"__SHoverRect": "
|
|
30
|
+
"__SHoverLine": "___SHoverLine_1s6xw_gg_",
|
|
31
|
+
"__SHoverRect": "___SHoverRect_1s6xw_gg_"
|
|
28
32
|
})
|
|
29
33
|
);
|
|
30
34
|
var Hover = /* @__PURE__ */ function(_Component) {
|
|
31
|
-
_inherits(Hover2, _Component);
|
|
32
|
-
var _super = _createSuper(Hover2);
|
|
33
35
|
function Hover2() {
|
|
34
36
|
var _this;
|
|
35
37
|
_classCallCheck(this, Hover2);
|
|
36
38
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
37
39
|
args[_key] = arguments[_key];
|
|
38
40
|
}
|
|
39
|
-
_this =
|
|
40
|
-
_defineProperty(
|
|
41
|
+
_this = _callSuper(this, Hover2, [].concat(args));
|
|
42
|
+
_defineProperty(_this, "state", {
|
|
41
43
|
xIndex: null,
|
|
42
44
|
yIndex: null
|
|
43
45
|
});
|
|
44
|
-
_defineProperty(
|
|
45
|
-
_defineProperty(
|
|
46
|
+
_defineProperty(_this, "virtualElement", canUseDOM() ? document.createElement("div") : {});
|
|
47
|
+
_defineProperty(_this, "handlerMouseMoveRoot", trottle(function(e) {
|
|
46
48
|
var _this$asProps = _this.asProps, eventEmitter = _this$asProps.eventEmitter, data = _this$asProps.data, scale = _this$asProps.scale, x = _this$asProps.x, y = _this$asProps.y, rootRef = _this$asProps.rootRef, patterns = _this$asProps.patterns;
|
|
47
49
|
var clientX = e.clientX, clientY = e.clientY;
|
|
48
50
|
var _scale = _slicedToArray(scale, 2), xScale = _scale[0], yScale = _scale[1];
|
|
@@ -62,7 +64,7 @@ var Hover = /* @__PURE__ */ function(_Component) {
|
|
|
62
64
|
eventEmitter.emit("setTooltipVisible", xIndex !== null || yIndex !== null);
|
|
63
65
|
});
|
|
64
66
|
}));
|
|
65
|
-
_defineProperty(
|
|
67
|
+
_defineProperty(_this, "handlerMouseLeaveRoot", trottle(function() {
|
|
66
68
|
var state = {
|
|
67
69
|
xIndex: null,
|
|
68
70
|
yIndex: null,
|
|
@@ -74,7 +76,8 @@ var Hover = /* @__PURE__ */ function(_Component) {
|
|
|
74
76
|
}));
|
|
75
77
|
return _this;
|
|
76
78
|
}
|
|
77
|
-
|
|
79
|
+
_inherits(Hover2, _Component);
|
|
80
|
+
return _createClass(Hover2, [{
|
|
78
81
|
key: "componentDidMount",
|
|
79
82
|
value: function componentDidMount() {
|
|
80
83
|
var _this2 = this;
|
|
@@ -96,17 +99,15 @@ var Hover = /* @__PURE__ */ function(_Component) {
|
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
101
|
}]);
|
|
99
|
-
return Hover2;
|
|
100
102
|
}(Component);
|
|
101
103
|
_defineProperty(Hover, "style", style);
|
|
102
|
-
var HoverLineRoot = /* @__PURE__ */ function(
|
|
103
|
-
_inherits(HoverLineRoot2, _Hover);
|
|
104
|
-
var _super2 = _createSuper(HoverLineRoot2);
|
|
104
|
+
var HoverLineRoot = /* @__PURE__ */ function(_Hover2) {
|
|
105
105
|
function HoverLineRoot2() {
|
|
106
106
|
_classCallCheck(this, HoverLineRoot2);
|
|
107
|
-
return
|
|
107
|
+
return _callSuper(this, HoverLineRoot2, arguments);
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
_inherits(HoverLineRoot2, _Hover2);
|
|
110
|
+
return _createClass(HoverLineRoot2, [{
|
|
110
111
|
key: "render",
|
|
111
112
|
value: function render() {
|
|
112
113
|
var _ref3;
|
|
@@ -141,17 +142,15 @@ var HoverLineRoot = /* @__PURE__ */ function(_Hover) {
|
|
|
141
142
|
})) : null);
|
|
142
143
|
}
|
|
143
144
|
}]);
|
|
144
|
-
return HoverLineRoot2;
|
|
145
145
|
}(Hover);
|
|
146
146
|
_defineProperty(HoverLineRoot, "displayName", "HoverLine");
|
|
147
|
-
var HoverRectRoot = /* @__PURE__ */ function(
|
|
148
|
-
_inherits(HoverRectRoot2, _Hover2);
|
|
149
|
-
var _super3 = _createSuper(HoverRectRoot2);
|
|
147
|
+
var HoverRectRoot = /* @__PURE__ */ function(_Hover3) {
|
|
150
148
|
function HoverRectRoot2() {
|
|
151
149
|
_classCallCheck(this, HoverRectRoot2);
|
|
152
|
-
return
|
|
150
|
+
return _callSuper(this, HoverRectRoot2, arguments);
|
|
153
151
|
}
|
|
154
|
-
|
|
152
|
+
_inherits(HoverRectRoot2, _Hover3);
|
|
153
|
+
return _createClass(HoverRectRoot2, [{
|
|
155
154
|
key: "render",
|
|
156
155
|
value: function render() {
|
|
157
156
|
var _ref4;
|
|
@@ -185,7 +184,6 @@ var HoverRectRoot = /* @__PURE__ */ function(_Hover2) {
|
|
|
185
184
|
})) : null);
|
|
186
185
|
}
|
|
187
186
|
}]);
|
|
188
|
-
return HoverRectRoot2;
|
|
189
187
|
}(Hover);
|
|
190
188
|
_defineProperty(HoverRectRoot, "displayName", "HoverRect");
|
|
191
189
|
var HoverLineTooltip = function HoverLineTooltip2(props) {
|
package/lib/esm/Line.mjs
CHANGED
|
@@ -1,46 +1,50 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
4
7
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
8
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
9
|
import { sstyled, Component } from "@semcore/core";
|
|
8
|
-
import React from "react";
|
|
9
|
-
import { line, curveLinear, area, curveCardinal } from "d3-shape";
|
|
10
10
|
import uniqueIDEnhancement, { useUID } from "@semcore/core/lib/utils/uniqueID";
|
|
11
|
+
import { area, curveCardinal, line, curveLinear } from "d3-shape";
|
|
12
|
+
import React from "react";
|
|
13
|
+
import AnimatedClipPath from "./AnimatedClipPath.mjs";
|
|
11
14
|
import createElement from "./createElement.mjs";
|
|
12
|
-
import { definedData, scaleOfBandwidth, interpolateValue, getNullData, definedNullData, getChartDefaultColorName } from "./utils.mjs";
|
|
13
15
|
import Dots from "./Dots.mjs";
|
|
14
|
-
import AnimatedClipPath from "./AnimatedClipPath.mjs";
|
|
15
16
|
import { resolvePatternDasharray } from "./Pattern.mjs";
|
|
17
|
+
import { interpolateValue, getNullData, definedData, definedNullData, getChartDefaultColorName, scaleOfBandwidth } from "./utils.mjs";
|
|
18
|
+
function _callSuper(t, o, e) {
|
|
19
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
20
|
+
}
|
|
16
21
|
/*!__reshadow-styles__:"./style/line.shadow.css"*/
|
|
17
22
|
var style = (
|
|
18
23
|
/*__reshadow_css_start__*/
|
|
19
24
|
(sstyled.insert(
|
|
20
25
|
/*__inner_css_start__*/
|
|
21
|
-
".
|
|
26
|
+
".___SLine_h7ktk_gg_{fill:transparent;stroke-width:3;stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:d;transition-duration:var(--duration_h7ktk);transition-timing-function:ease-in-out}.___SLine_h7ktk_gg_.__color_h7ktk_gg_{stroke:var(--color_h7ktk)}.___SLine_h7ktk_gg_.__hide_h7ktk_gg_{display:none}.___SLine_h7ktk_gg_.__transparent_h7ktk_gg_{opacity:.3}.___SNull_h7ktk_gg_{fill:transparent;stroke:var(--intergalactic-border-primary, #c4c7cf);stroke-dasharray:4}.___SNull_h7ktk_gg_.__hide_h7ktk_gg_{display:none}.___SLineArea_h7ktk_gg_{transition-property:d;transition-duration:var(--duration_h7ktk);transition-timing-function:ease-in-out;opacity:.3;fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SLineArea_h7ktk_gg_.__color_h7ktk_gg_{fill:var(--color_h7ktk)}",
|
|
22
27
|
/*__inner_css_end__*/
|
|
23
|
-
"
|
|
28
|
+
"h7ktk_gg_"
|
|
24
29
|
), /*__reshadow_css_end__*/
|
|
25
30
|
{
|
|
26
|
-
"__SLine": "
|
|
27
|
-
"--duration": "--
|
|
28
|
-
"_color": "
|
|
29
|
-
"--color": "--
|
|
30
|
-
"_hide": "
|
|
31
|
-
"_transparent": "
|
|
32
|
-
"__SNull": "
|
|
33
|
-
"__SLineArea": "
|
|
31
|
+
"__SLine": "___SLine_h7ktk_gg_",
|
|
32
|
+
"--duration": "--duration_h7ktk",
|
|
33
|
+
"_color": "__color_h7ktk_gg_",
|
|
34
|
+
"--color": "--color_h7ktk",
|
|
35
|
+
"_hide": "__hide_h7ktk_gg_",
|
|
36
|
+
"_transparent": "__transparent_h7ktk_gg_",
|
|
37
|
+
"__SNull": "___SNull_h7ktk_gg_",
|
|
38
|
+
"__SLineArea": "___SLineArea_h7ktk_gg_"
|
|
34
39
|
})
|
|
35
40
|
);
|
|
36
41
|
var LineRoot = /* @__PURE__ */ function(_Component) {
|
|
37
|
-
_inherits(LineRoot2, _Component);
|
|
38
|
-
var _super = _createSuper(LineRoot2);
|
|
39
42
|
function LineRoot2() {
|
|
40
43
|
_classCallCheck(this, LineRoot2);
|
|
41
|
-
return
|
|
44
|
+
return _callSuper(this, LineRoot2, arguments);
|
|
42
45
|
}
|
|
43
|
-
|
|
46
|
+
_inherits(LineRoot2, _Component);
|
|
47
|
+
return _createClass(LineRoot2, [{
|
|
44
48
|
key: "getDotsProps",
|
|
45
49
|
value: function getDotsProps() {
|
|
46
50
|
var _this$asProps = this.asProps, x = _this$asProps.x, y = _this$asProps.y, d3 = _this$asProps.d3, color = _this$asProps.color, resolveColor = _this$asProps.resolveColor, duration = _this$asProps.duration, transparent = _this$asProps.transparent, patterns = _this$asProps.patterns;
|
|
@@ -120,7 +124,6 @@ var LineRoot = /* @__PURE__ */ function(_Component) {
|
|
|
120
124
|
})));
|
|
121
125
|
}
|
|
122
126
|
}]);
|
|
123
|
-
return LineRoot2;
|
|
124
127
|
}(Component);
|
|
125
128
|
_defineProperty(LineRoot, "displayName", "Line");
|
|
126
129
|
_defineProperty(LineRoot, "style", style);
|
package/lib/esm/Pattern.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
4
|
-
import React from "react";
|
|
5
4
|
import propsForElement from "@semcore/core/lib/utils/propsForElement";
|
|
5
|
+
import React from "react";
|
|
6
6
|
var _excluded = ["color", "patternKey", "patterns"];
|
|
7
7
|
var defaultDasharrays = ["4 4", "8 8", "2 4", "4 8", "8 2", "8 4", "12 4", "2 2"];
|
|
8
8
|
var defaultPatterns = {
|
package/lib/esm/Plot.mjs
CHANGED
|
@@ -2,47 +2,49 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
-
import
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
6
8
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
8
9
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
10
|
import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
|
|
10
|
-
import
|
|
11
|
-
import { Box } from "@semcore/flex-box";
|
|
12
|
-
import EventEmitter from "@semcore/core/lib/utils/eventEmitter";
|
|
11
|
+
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
13
12
|
import keyboardFocusEnhance from "@semcore/core/lib/utils/enhances/keyboardFocusEnhance";
|
|
14
|
-
import { uniqueId, eventToPoint } from "./utils.mjs";
|
|
15
|
-
import { PlotA11yModule } from "./a11y/PlotA11yModule.mjs";
|
|
16
|
-
import { makeDataHintsContainer, makeDataHintsHandlers } from "./a11y/hints.mjs";
|
|
17
13
|
import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
|
|
14
|
+
import EventEmitter from "@semcore/core/lib/utils/eventEmitter";
|
|
15
|
+
import { Box } from "@semcore/flex-box";
|
|
16
|
+
import React from "react";
|
|
17
|
+
import { makeDataHintsContainer, makeDataHintsHandlers } from "./a11y/hints.mjs";
|
|
18
|
+
import { PlotA11yModule } from "./a11y/PlotA11yModule.mjs";
|
|
18
19
|
import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
19
|
-
import
|
|
20
|
+
import { uniqueId, eventToPoint } from "./utils.mjs";
|
|
21
|
+
function _callSuper(t, o, e) {
|
|
22
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
23
|
+
}
|
|
20
24
|
/*!__reshadow-styles__:"./style/plot.shadow.css"*/
|
|
21
25
|
var style = (
|
|
22
26
|
/*__reshadow_css_start__*/
|
|
23
27
|
(sstyled.insert(
|
|
24
28
|
/*__inner_css_start__*/
|
|
25
|
-
".
|
|
29
|
+
".___SPlot_15k93_gg_{overflow:hidden}.___SPlot_15k93_gg_:active,.___SPlot_15k93_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}foreignObject[data-aria-only]{pointer-events:none}.___SPlot_15k93_gg_.__keyboardFocused_15k93_gg_{border:1px solid var(--intergalactic-chart-palette-order-9, #008ff8);box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}",
|
|
26
30
|
/*__inner_css_end__*/
|
|
27
|
-
"
|
|
31
|
+
"15k93_gg_"
|
|
28
32
|
), /*__reshadow_css_end__*/
|
|
29
33
|
{
|
|
30
|
-
"__SPlot": "
|
|
31
|
-
"_keyboardFocused": "
|
|
34
|
+
"__SPlot": "___SPlot_15k93_gg_",
|
|
35
|
+
"_keyboardFocused": "__keyboardFocused_15k93_gg_"
|
|
32
36
|
})
|
|
33
37
|
);
|
|
34
38
|
var PlotRoot = /* @__PURE__ */ function(_Component) {
|
|
35
|
-
_inherits(PlotRoot2, _Component);
|
|
36
|
-
var _super = _createSuper(PlotRoot2);
|
|
37
39
|
function PlotRoot2(props) {
|
|
38
40
|
var _this;
|
|
39
41
|
_classCallCheck(this, PlotRoot2);
|
|
40
|
-
_this =
|
|
41
|
-
_defineProperty(
|
|
42
|
-
_defineProperty(
|
|
43
|
-
_defineProperty(
|
|
44
|
-
_defineProperty(
|
|
45
|
-
_defineProperty(
|
|
42
|
+
_this = _callSuper(this, PlotRoot2, [props]);
|
|
43
|
+
_defineProperty(_this, "plotId", uniqueId());
|
|
44
|
+
_defineProperty(_this, "rootRef", /* @__PURE__ */ React.createRef());
|
|
45
|
+
_defineProperty(_this, "dataStructureHints", _this.props.dataHints || makeDataHintsContainer());
|
|
46
|
+
_defineProperty(_this, "dataHintsHandler", makeDataHintsHandlers(_this.dataStructureHints));
|
|
47
|
+
_defineProperty(_this, "handlerMouseMove", function(e) {
|
|
46
48
|
var scale = _this.asProps.scale;
|
|
47
49
|
_this.eventEmitter.emit("onMouseMoveRoot", e);
|
|
48
50
|
if (scale && scale.length >= 2) {
|
|
@@ -57,19 +59,20 @@ var PlotRoot = /* @__PURE__ */ function(_Component) {
|
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
});
|
|
60
|
-
_defineProperty(
|
|
62
|
+
_defineProperty(_this, "handlerMouseLeave", function(e) {
|
|
61
63
|
_this.eventEmitter.emit("onMouseLeaveRoot", e);
|
|
62
64
|
_this.eventEmitter.emit("onMouseLeaveChart", e);
|
|
63
65
|
});
|
|
64
66
|
_this.eventEmitter = props.eventEmitter || new EventEmitter();
|
|
65
67
|
return _this;
|
|
66
68
|
}
|
|
67
|
-
|
|
69
|
+
_inherits(PlotRoot2, _Component);
|
|
70
|
+
return _createClass(PlotRoot2, [{
|
|
68
71
|
key: "setContext",
|
|
69
72
|
value: function setContext() {
|
|
70
73
|
var _scale$, _scale$$domain;
|
|
71
74
|
var _this$asProps = this.asProps, scale = _this$asProps.scale, data = _this$asProps.data, width = _this$asProps.width, height = _this$asProps.height, locale = _this$asProps.locale, resolveColor = _this$asProps.resolveColor, patterns = _this$asProps.patterns, duration = _this$asProps.duration;
|
|
72
|
-
var yScaleDomain = scale === null || scale === void 0
|
|
75
|
+
var yScaleDomain = scale === null || scale === void 0 || (_scale$ = scale[1]) === null || _scale$ === void 0 || (_scale$$domain = _scale$.domain) === null || _scale$$domain === void 0 ? void 0 : _scale$$domain.call(_scale$);
|
|
73
76
|
if (yScaleDomain !== null && yScaleDomain !== void 0 && yScaleDomain.length && data !== null && data !== void 0 && data.length) {
|
|
74
77
|
this.dataHintsHandler.setPointsDensity(data.length / width, Math.abs(yScaleDomain[1] - yScaleDomain[0]) / height);
|
|
75
78
|
}
|
|
@@ -119,7 +122,6 @@ var PlotRoot = /* @__PURE__ */ function(_Component) {
|
|
|
119
122
|
}))));
|
|
120
123
|
}
|
|
121
124
|
}]);
|
|
122
|
-
return PlotRoot2;
|
|
123
125
|
}(Component);
|
|
124
126
|
_defineProperty(PlotRoot, "displayName", "Plot");
|
|
125
127
|
_defineProperty(PlotRoot, "style", style);
|