@semcore/d3-chart 17.3.1 → 18.0.0-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 +6 -0
- package/lib/cjs/Area.js +11 -11
- package/lib/cjs/Axis.js +55 -58
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +16 -16
- package/lib/cjs/Bubble.js +14 -14
- package/lib/cjs/CompactHorizontalBar.js +16 -16
- package/lib/cjs/Donut.js +9 -9
- package/lib/cjs/Dots.js +14 -11
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +16 -16
- package/lib/cjs/Hover.js +158 -39
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +9 -9
- package/lib/cjs/Plot.js +6 -4
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +19 -19
- package/lib/cjs/RadialTree.js +12 -12
- package/lib/cjs/Reference.js +12 -12
- package/lib/cjs/ScatterPlot.js +9 -9
- package/lib/cjs/Tooltip.js +20 -11
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +9 -9
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/lib/cjs/component/Chart/AbstractChart.js +139 -50
- 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 +12 -10
- 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 +9 -7
- 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 +21 -8
- 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 +33 -30
- 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 +2 -1
- 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 +5 -4
- 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 +6 -4
- 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 +9 -7
- 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 +3 -2
- 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 +19 -7
- 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 +6 -5
- 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/ChartLegend/BaseLegend.js +4 -2
- 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 +4 -4
- package/lib/cjs/component/ChartLegend/LegendFlex/legend-flex.shadow.css +2 -2
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +23 -18
- 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/LegendItem/legend-item.shadow.css +16 -40
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +12 -8
- 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/LegendTable/legend-table.shadow.css +6 -2
- package/lib/cjs/style/abstract-chart.shadow.css +31 -1
- package/lib/cjs/style/area.shadow.css +6 -5
- package/lib/cjs/style/axis.shadow.css +2 -2
- package/lib/cjs/style/bar.shadow.css +7 -7
- package/lib/cjs/style/bubble.shadow.css +4 -4
- package/lib/cjs/style/donut.shadow.css +3 -3
- package/lib/cjs/style/dot.shadow.css +9 -3
- package/lib/cjs/style/hover.shadow.css +19 -1
- package/lib/cjs/style/line.shadow.css +4 -4
- package/lib/cjs/style/radar.shadow.css +5 -5
- package/lib/cjs/style/radial-tree.shadow.css +3 -3
- package/lib/cjs/style/reference.shadow.css +1 -1
- package/lib/cjs/style/scatterplot.shadow.css +1 -1
- package/lib/cjs/style/tooltip.shadow.css +23 -14
- package/lib/cjs/style/venn.shadow.css +3 -3
- package/lib/cjs/types/Hover.d.js.map +1 -1
- package/lib/cjs/utils/TextMeasurer.js +33 -0
- package/lib/cjs/utils/TextMeasurer.js.map +1 -0
- package/lib/es6/Area.js +11 -11
- package/lib/es6/Axis.js +55 -57
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +16 -16
- package/lib/es6/Bubble.js +14 -14
- package/lib/es6/CompactHorizontalBar.js +16 -16
- package/lib/es6/Donut.js +9 -9
- package/lib/es6/Dots.js +14 -11
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/HorizontalBar.js +16 -16
- package/lib/es6/Hover.js +158 -39
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +9 -9
- package/lib/es6/Plot.js +6 -4
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +19 -19
- package/lib/es6/RadialTree.js +12 -12
- package/lib/es6/Reference.js +12 -12
- package/lib/es6/ScatterPlot.js +9 -9
- package/lib/es6/Tooltip.js +20 -11
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +9 -9
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +2 -2
- package/lib/es6/component/Chart/AbstractChart.js +136 -48
- 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 +12 -10
- 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 +9 -7
- 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 +22 -9
- 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 +33 -30
- 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 +2 -1
- 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 +5 -4
- 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 +6 -4
- 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 +9 -7
- 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 +3 -2
- 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 +20 -8
- 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 +6 -5
- 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 +4 -2
- 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 +4 -4
- package/lib/es6/component/ChartLegend/LegendFlex/legend-flex.shadow.css +2 -2
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +23 -18
- 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/LegendItem/legend-item.shadow.css +16 -40
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +12 -8
- 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/LegendTable/legend-table.shadow.css +6 -2
- package/lib/es6/style/abstract-chart.shadow.css +31 -1
- package/lib/es6/style/area.shadow.css +6 -5
- package/lib/es6/style/axis.shadow.css +2 -2
- package/lib/es6/style/bar.shadow.css +7 -7
- package/lib/es6/style/bubble.shadow.css +4 -4
- package/lib/es6/style/donut.shadow.css +3 -3
- package/lib/es6/style/dot.shadow.css +9 -3
- package/lib/es6/style/hover.shadow.css +19 -1
- package/lib/es6/style/line.shadow.css +4 -4
- package/lib/es6/style/radar.shadow.css +5 -5
- package/lib/es6/style/radial-tree.shadow.css +3 -3
- package/lib/es6/style/reference.shadow.css +1 -1
- package/lib/es6/style/scatterplot.shadow.css +1 -1
- package/lib/es6/style/tooltip.shadow.css +23 -14
- package/lib/es6/style/venn.shadow.css +3 -3
- package/lib/es6/types/Hover.d.js.map +1 -1
- package/lib/es6/utils/TextMeasurer.js +25 -0
- package/lib/es6/utils/TextMeasurer.js.map +1 -0
- package/lib/esm/Area.mjs +12 -12
- package/lib/esm/Axis.mjs +56 -58
- package/lib/esm/Bar.mjs +17 -17
- package/lib/esm/Bubble.mjs +15 -15
- package/lib/esm/CompactHorizontalBar.mjs +17 -17
- package/lib/esm/Donut.mjs +10 -10
- package/lib/esm/Dots.mjs +15 -12
- package/lib/esm/HorizontalBar.mjs +17 -17
- package/lib/esm/Hover.mjs +157 -40
- package/lib/esm/Line.mjs +10 -10
- package/lib/esm/Plot.mjs +7 -5
- package/lib/esm/Radar.mjs +20 -20
- package/lib/esm/RadialTree.mjs +13 -13
- package/lib/esm/Reference.mjs +13 -13
- package/lib/esm/ScatterPlot.mjs +10 -10
- package/lib/esm/Tooltip.mjs +21 -12
- package/lib/esm/Venn.mjs +10 -10
- package/lib/esm/a11y/PlotA11yModule.mjs +3 -3
- package/lib/esm/a11y/PlotA11yView.mjs +3 -3
- package/lib/esm/component/Chart/AbstractChart.mjs +150 -54
- package/lib/esm/component/Chart/AreaChart.mjs +12 -10
- package/lib/esm/component/Chart/BarChart.mjs +9 -7
- package/lib/esm/component/Chart/BubbleChart.mjs +29 -9
- package/lib/esm/component/Chart/CigaretteChart.mjs +33 -30
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +2 -1
- package/lib/esm/component/Chart/DonutChart.mjs +5 -4
- package/lib/esm/component/Chart/HistogramChart.mjs +6 -4
- package/lib/esm/component/Chart/LineChart.mjs +9 -7
- package/lib/esm/component/Chart/RadarChart.mjs +3 -2
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +25 -8
- package/lib/esm/component/Chart/VennChart.mjs +6 -5
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +4 -2
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +5 -5
- package/lib/esm/component/ChartLegend/LegendFlex/legend-flex.shadow.css +2 -2
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +24 -19
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.type.mjs +1 -1
- package/lib/esm/component/ChartLegend/LegendItem/legend-item.shadow.css +16 -40
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +13 -9
- package/lib/esm/component/ChartLegend/LegendTable/legend-table.shadow.css +6 -2
- package/lib/esm/style/abstract-chart.shadow.css +31 -1
- package/lib/esm/style/area.shadow.css +6 -5
- package/lib/esm/style/axis.shadow.css +2 -2
- package/lib/esm/style/bar.shadow.css +7 -7
- package/lib/esm/style/bubble.shadow.css +4 -4
- package/lib/esm/style/donut.shadow.css +3 -3
- package/lib/esm/style/dot.shadow.css +9 -3
- package/lib/esm/style/hover.shadow.css +19 -1
- package/lib/esm/style/line.shadow.css +4 -4
- package/lib/esm/style/radar.shadow.css +5 -5
- package/lib/esm/style/radial-tree.shadow.css +3 -3
- package/lib/esm/style/reference.shadow.css +1 -1
- package/lib/esm/style/scatterplot.shadow.css +1 -1
- package/lib/esm/style/tooltip.shadow.css +23 -14
- package/lib/esm/style/venn.shadow.css +3 -3
- package/lib/esm/utils/TextMeasurer.mjs +27 -0
- package/lib/types/Hover.d.ts +2 -0
- package/lib/types/component/Chart/AbstractChart.d.ts +11 -6
- package/lib/types/component/Chart/AbstractChart.d.ts.map +1 -1
- package/lib/types/component/Chart/AbstractChart.type.d.ts +20 -2
- package/lib/types/component/Chart/AbstractChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/AreaChart.d.ts.map +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +1 -0
- package/lib/types/component/Chart/AreaChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/BarChart.d.ts.map +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +1 -0
- package/lib/types/component/Chart/BarChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/BubbleChart.d.ts.map +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +2 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +2 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts.map +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +2 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/DonutChart.d.ts.map +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +2 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/HistogramChart.d.ts.map +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -0
- package/lib/types/component/Chart/HistogramChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/LineChart.d.ts.map +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +1 -0
- package/lib/types/component/Chart/LineChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/RadarChart.d.ts.map +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +2 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.d.ts.map +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +2 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/VennChart.d.ts.map +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +2 -1
- package/lib/types/component/Chart/VennChart.type.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +5 -1
- package/lib/types/component/ChartLegend/BaseLegend.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +3 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts.map +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +2 -0
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts.map +1 -1
- package/lib/types/utils/TextMeasurer.d.ts +5 -0
- package/lib/types/utils/TextMeasurer.d.ts.map +1 -0
- package/package.json +15 -15
package/lib/esm/Hover.mjs
CHANGED
|
@@ -7,20 +7,32 @@ import React from "react";
|
|
|
7
7
|
import createElement from "./createElement.mjs";
|
|
8
8
|
import Tooltip from "./Tooltip.mjs";
|
|
9
9
|
import { eventToPoint, invert, getIndexFromData, scaleOfBandwidth, scaleToBand } from "./utils.mjs";
|
|
10
|
+
import { TextMeasurer } from "./utils/TextMeasurer.mjs";
|
|
10
11
|
/*!__reshadow-styles__:"./style/hover.shadow.css"*/
|
|
11
12
|
const style = (
|
|
12
13
|
/*__reshadow_css_start__*/
|
|
13
14
|
(sstyled.insert(
|
|
14
15
|
/*__inner_css_start__*/
|
|
15
|
-
".
|
|
16
|
+
".___SHoverLine_j53e0_gg_,.___SHoverLine_j53e0_gg_:focus-visible{outline:none;stroke:var(--intergalactic-chart-grid-x-axis,oklch(.88 .002 175.6))}.___SHoverRect_j53e0_gg_,.___SHoverRect_j53e0_gg_:focus-visible{outline:none;fill:var(--intergalactic-chart-grid-bar-chart-hover,oklch(.177 .033 175.6/.042))}.___STick_j53e0_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-chart-grid-text-label,oklch(.097 .023 156.5/.468));transform:translateY(12px);text-anchor:middle;cursor:default}.___STick_j53e0_gg_,.___STick_j53e0_gg_ tspan{dominant-baseline:hanging}.___STickHover_j53e0_gg_{fill:var(--intergalactic-chart-x-axis-accent-tick,oklch(.96 .001 180))}",
|
|
16
17
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
18
|
+
"j53e0_gg_"
|
|
18
19
|
), /*__reshadow_css_end__*/
|
|
19
20
|
{
|
|
20
|
-
"__SHoverLine": "
|
|
21
|
-
"__SHoverRect": "
|
|
21
|
+
"__SHoverLine": "___SHoverLine_j53e0_gg_",
|
|
22
|
+
"__SHoverRect": "___SHoverRect_j53e0_gg_",
|
|
23
|
+
"__STickHover": "___STickHover_j53e0_gg_",
|
|
24
|
+
"__STick": "___STick_j53e0_gg_"
|
|
22
25
|
})
|
|
23
26
|
);
|
|
27
|
+
const STROKE_WIDTH = 1;
|
|
28
|
+
const NOTCH_WIDTH = 9;
|
|
29
|
+
const NOTCH_DELTA = NOTCH_WIDTH / 2 - STROKE_WIDTH / 4;
|
|
30
|
+
function formatValue(value) {
|
|
31
|
+
if (value instanceof Date) {
|
|
32
|
+
return value.toLocaleDateString();
|
|
33
|
+
}
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
24
36
|
class Hover extends Component {
|
|
25
37
|
constructor(...args) {
|
|
26
38
|
super(...args);
|
|
@@ -28,8 +40,9 @@ class Hover extends Component {
|
|
|
28
40
|
xIndex: null,
|
|
29
41
|
yIndex: null
|
|
30
42
|
});
|
|
43
|
+
_defineProperty(this, "measurer", new TextMeasurer());
|
|
31
44
|
_defineProperty(this, "virtualElement", canUseDOM() ? document.createElement("div") : {});
|
|
32
|
-
_defineProperty(this, "handlerMouseMoveRoot", trottle((e, currentTarget) => {
|
|
45
|
+
_defineProperty(this, "handlerMouseMoveRoot", trottle((e, currentTarget, isTickUnder) => {
|
|
33
46
|
const {
|
|
34
47
|
eventEmitter,
|
|
35
48
|
data,
|
|
@@ -66,14 +79,18 @@ class Hover extends Component {
|
|
|
66
79
|
} = currentTarget.getBoundingClientRect();
|
|
67
80
|
const isRootTooltip = hasParent(e.target, rootRef.current);
|
|
68
81
|
this.setState(state, () => {
|
|
82
|
+
let x2, y2;
|
|
69
83
|
if (isRootTooltip) {
|
|
70
|
-
|
|
84
|
+
x2 = clientX;
|
|
85
|
+
y2 = isTickUnder ? yRect + height / 2 : clientY;
|
|
71
86
|
} else {
|
|
72
87
|
const diff = clientY - yOriginal;
|
|
73
88
|
const dimension = diff / heightOriginal * 100;
|
|
74
89
|
const heightValue = height / 100 * dimension;
|
|
75
|
-
|
|
90
|
+
x2 = pX + xRect;
|
|
91
|
+
y2 = isTickUnder ? yRect + height / 2 : yRect + heightValue;
|
|
76
92
|
}
|
|
93
|
+
eventEmitter.emit(`setTooltipPosition_${plotId}`, x2, y2);
|
|
77
94
|
eventEmitter.emit(`setTooltipRenderingProps_${plotId}`, {}, state);
|
|
78
95
|
eventEmitter.emit(`setTooltipVisible_${plotId}`, xIndex !== null || yIndex !== null);
|
|
79
96
|
});
|
|
@@ -93,9 +110,9 @@ class Hover extends Component {
|
|
|
93
110
|
const {
|
|
94
111
|
eventEmitter
|
|
95
112
|
} = this.asProps;
|
|
96
|
-
this.unsubscribeMouseMoveRoot = eventEmitter.subscribe("onMouseMoveChart", (e) => {
|
|
113
|
+
this.unsubscribeMouseMoveRoot = eventEmitter.subscribe("onMouseMoveChart", (e, _, isTickUnder) => {
|
|
97
114
|
e.persist();
|
|
98
|
-
this.handlerMouseMoveRoot(e, e.currentTarget);
|
|
115
|
+
this.handlerMouseMoveRoot(e, e.currentTarget, isTickUnder);
|
|
99
116
|
});
|
|
100
117
|
this.unsubscribeMouseLeaveRoot = eventEmitter.subscribe("onMouseLeaveChart", this.handlerMouseLeaveRoot);
|
|
101
118
|
}
|
|
@@ -112,6 +129,17 @@ _defineProperty(Hover, "style", style);
|
|
|
112
129
|
class HoverLineRoot extends Hover {
|
|
113
130
|
render() {
|
|
114
131
|
var _ref3;
|
|
132
|
+
const {
|
|
133
|
+
hideHoverLine
|
|
134
|
+
} = this.asProps;
|
|
135
|
+
const {
|
|
136
|
+
xIndex,
|
|
137
|
+
yIndex
|
|
138
|
+
} = this.state;
|
|
139
|
+
const isHide = typeof hideHoverLine === "function" ? hideHoverLine(xIndex, yIndex) : hideHoverLine;
|
|
140
|
+
if (isHide) {
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
115
143
|
const SHoverLine = this.Element;
|
|
116
144
|
const {
|
|
117
145
|
styles,
|
|
@@ -119,44 +147,76 @@ class HoverLineRoot extends Hover {
|
|
|
119
147
|
y,
|
|
120
148
|
data,
|
|
121
149
|
scale,
|
|
122
|
-
|
|
150
|
+
dataHints,
|
|
151
|
+
hideTickHover
|
|
123
152
|
} = this.asProps;
|
|
124
|
-
const {
|
|
125
|
-
xIndex,
|
|
126
|
-
yIndex
|
|
127
|
-
} = this.state;
|
|
128
153
|
const [xScale, yScale] = scale;
|
|
129
154
|
const xRange = xScale.range();
|
|
130
155
|
const yRange = yScale.range();
|
|
131
156
|
const x1 = xIndex !== null ? scaleOfBandwidth(xScale, data[xIndex][x]) : void 0;
|
|
132
157
|
const y1 = yIndex !== null ? scaleOfBandwidth(yScale, data[yIndex][y]) : void 0;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return null;
|
|
136
|
-
}
|
|
137
|
-
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(React.Fragment, null, xIndex !== null ? /* @__PURE__ */ React.createElement(SHoverLine, _ref3.cn("SHoverLine", {
|
|
138
|
-
"aria-hidden": true,
|
|
139
|
-
"render": "line",
|
|
158
|
+
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(React.Fragment, null, xIndex !== null ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SHoverLine, _ref3.cn("SHoverLine", {
|
|
159
|
+
"render": "g",
|
|
140
160
|
"index": xIndex,
|
|
161
|
+
"stroke-width": STROKE_WIDTH,
|
|
162
|
+
"aria-hidden": true
|
|
163
|
+
}), /* @__PURE__ */ React.createElement("line", _ref3.cn("line", {
|
|
164
|
+
"x1": x1 - NOTCH_DELTA,
|
|
165
|
+
"x2": x1 + NOTCH_DELTA,
|
|
166
|
+
"y1": yRange[0],
|
|
167
|
+
"y2": yRange[0]
|
|
168
|
+
})), /* @__PURE__ */ React.createElement("line", _ref3.cn("line", {
|
|
141
169
|
"x1": x1,
|
|
142
170
|
"y1": yRange[0],
|
|
143
171
|
"x2": x1,
|
|
144
172
|
"y2": yRange[1]
|
|
145
|
-
}))
|
|
146
|
-
"
|
|
147
|
-
"
|
|
173
|
+
})), /* @__PURE__ */ React.createElement("line", _ref3.cn("line", {
|
|
174
|
+
"x1": x1 - NOTCH_DELTA,
|
|
175
|
+
"x2": x1 + NOTCH_DELTA,
|
|
176
|
+
"y1": yRange[1],
|
|
177
|
+
"y2": yRange[1]
|
|
178
|
+
}))), !hideTickHover && /* @__PURE__ */ React.createElement(HoveredTick, _ref3.cn("HoveredTick", {
|
|
179
|
+
"tickFormatter": dataHints.titles.getHorizontalAxesTitle ?? formatValue,
|
|
180
|
+
"value": data[xIndex]?.[x],
|
|
181
|
+
"isFirstTick": xIndex === 0,
|
|
182
|
+
"isLastTick": xIndex === data.length - 1,
|
|
183
|
+
"textMeasurer": this.measurer,
|
|
184
|
+
"styles": styles,
|
|
185
|
+
"x": x1,
|
|
186
|
+
"y": yRange[0]
|
|
187
|
+
}))) : null, yIndex !== null ? /* @__PURE__ */ React.createElement(SHoverLine, _ref3.cn("SHoverLine", {
|
|
188
|
+
"render": "g",
|
|
148
189
|
"index": yIndex,
|
|
190
|
+
"stroke-width": STROKE_WIDTH,
|
|
191
|
+
"aria-hidden": true
|
|
192
|
+
}), /* @__PURE__ */ React.createElement("line", _ref3.cn("line", {
|
|
193
|
+
"x1": xRange[0],
|
|
194
|
+
"y1": y1 - NOTCH_DELTA,
|
|
195
|
+
"x2": xRange[0],
|
|
196
|
+
"y2": y1 + NOTCH_DELTA
|
|
197
|
+
})), /* @__PURE__ */ React.createElement("line", _ref3.cn("line", {
|
|
149
198
|
"x1": xRange[0],
|
|
150
199
|
"y1": y1,
|
|
151
200
|
"x2": xRange[1],
|
|
152
201
|
"y2": y1
|
|
153
|
-
}))
|
|
202
|
+
})), /* @__PURE__ */ React.createElement("line", _ref3.cn("line", {
|
|
203
|
+
"x1": xRange[1],
|
|
204
|
+
"y1": y1 - NOTCH_DELTA,
|
|
205
|
+
"x2": xRange[1],
|
|
206
|
+
"y2": y1 + NOTCH_DELTA
|
|
207
|
+
}))) : null);
|
|
154
208
|
}
|
|
155
209
|
}
|
|
156
210
|
_defineProperty(HoverLineRoot, "displayName", "HoverLine");
|
|
157
211
|
class HoverRectRoot extends Hover {
|
|
158
212
|
render() {
|
|
159
213
|
var _ref4;
|
|
214
|
+
const {
|
|
215
|
+
hideHoverLine
|
|
216
|
+
} = this.asProps;
|
|
217
|
+
if (hideHoverLine) {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
160
220
|
const SHoverRect = this.Element;
|
|
161
221
|
const {
|
|
162
222
|
styles,
|
|
@@ -164,7 +224,8 @@ class HoverRectRoot extends Hover {
|
|
|
164
224
|
y,
|
|
165
225
|
data,
|
|
166
226
|
scale,
|
|
167
|
-
|
|
227
|
+
dataHints,
|
|
228
|
+
hideTickHover
|
|
168
229
|
} = this.asProps;
|
|
169
230
|
const {
|
|
170
231
|
xIndex,
|
|
@@ -175,33 +236,89 @@ class HoverRectRoot extends Hover {
|
|
|
175
236
|
const yRange = yScale.range();
|
|
176
237
|
const xBand = scaleToBand(xScale);
|
|
177
238
|
const yBand = scaleToBand(yScale);
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
239
|
+
const xStep = xBand.step();
|
|
240
|
+
const xPaddingInner = xBand.paddingInner();
|
|
241
|
+
const yStep = yBand.step();
|
|
242
|
+
const yPaddingInner = yBand.paddingInner();
|
|
243
|
+
return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(React.Fragment, null, xIndex !== null && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SHoverRect, _ref4.cn("SHoverRect", {
|
|
182
244
|
"aria-hidden": true,
|
|
183
245
|
"render": "rect",
|
|
184
246
|
"index": xIndex,
|
|
185
|
-
"width":
|
|
247
|
+
"width": xStep - xPaddingInner / 2,
|
|
186
248
|
"height": yRange[0] - yRange[1],
|
|
187
|
-
"x": xScale(data[xIndex][x]) -
|
|
249
|
+
"x": xScale(data[xIndex][x]) - xStep * xPaddingInner / 2,
|
|
188
250
|
"y": yRange[1]
|
|
189
|
-
}))
|
|
251
|
+
})), !hideTickHover && /* @__PURE__ */ React.createElement(HoveredTick, _ref4.cn("HoveredTick", {
|
|
252
|
+
"tickFormatter": dataHints.titles.getHorizontalAxesTitle ?? formatValue,
|
|
253
|
+
"value": data[xIndex]?.[x],
|
|
254
|
+
"textMeasurer": this.measurer,
|
|
255
|
+
"styles": styles,
|
|
256
|
+
"x": xScale(data[xIndex][x]) + xStep * (1 - xPaddingInner) / 2,
|
|
257
|
+
"y": yRange[0]
|
|
258
|
+
}))), yIndex !== null && /* @__PURE__ */ React.createElement(SHoverRect, _ref4.cn("SHoverRect", {
|
|
190
259
|
"aria-hidden": true,
|
|
191
260
|
"render": "rect",
|
|
192
261
|
"index": yIndex,
|
|
193
262
|
"width": xRange[1] - xRange[0],
|
|
194
|
-
"height":
|
|
263
|
+
"height": yStep - yPaddingInner / 2,
|
|
195
264
|
"x": xRange[0],
|
|
196
|
-
"y": yScale(data[yIndex][y]) -
|
|
197
|
-
}))
|
|
265
|
+
"y": yScale(data[yIndex][y]) - yStep * yPaddingInner / 2
|
|
266
|
+
})));
|
|
198
267
|
}
|
|
199
268
|
}
|
|
200
269
|
_defineProperty(HoverRectRoot, "displayName", "HoverRect");
|
|
270
|
+
const HOVERED_TICK_PADDING_X = 12;
|
|
271
|
+
const HOVERED_TICK_PADDING_Y = 4;
|
|
272
|
+
const HOVERED_TOCK_BORDER_RADIUS = 6;
|
|
273
|
+
function HoveredTick(props) {
|
|
274
|
+
var _ref5;
|
|
275
|
+
const {
|
|
276
|
+
paddingX = HOVERED_TICK_PADDING_X,
|
|
277
|
+
paddingY = HOVERED_TICK_PADDING_Y,
|
|
278
|
+
borderRadius = HOVERED_TOCK_BORDER_RADIUS,
|
|
279
|
+
tickFormatter,
|
|
280
|
+
value,
|
|
281
|
+
isFirstTick = false,
|
|
282
|
+
isLastTick = false,
|
|
283
|
+
textMeasurer,
|
|
284
|
+
styles,
|
|
285
|
+
x,
|
|
286
|
+
y
|
|
287
|
+
} = props;
|
|
288
|
+
const STickWrapper = "g";
|
|
289
|
+
const STickHover = "rect";
|
|
290
|
+
const STick = "text";
|
|
291
|
+
const formattedValue = tickFormatter(value);
|
|
292
|
+
const {
|
|
293
|
+
width: textWidth,
|
|
294
|
+
height: textHeight
|
|
295
|
+
} = formattedValue !== void 0 ? textMeasurer.measure(formattedValue) : {
|
|
296
|
+
width: 0,
|
|
297
|
+
height: 0
|
|
298
|
+
};
|
|
299
|
+
const hoverX = isFirstTick ? x - NOTCH_DELTA : isLastTick ? x - textWidth - paddingX * 2 + NOTCH_DELTA : x - paddingX - textWidth / 2;
|
|
300
|
+
const tickX = isFirstTick ? x + paddingX + textWidth / 2 - NOTCH_DELTA : isLastTick ? x - textWidth / 2 - paddingX + NOTCH_DELTA : x;
|
|
301
|
+
const hoverPos = {
|
|
302
|
+
x: hoverX,
|
|
303
|
+
y: y + textHeight / 2 - paddingY / 2,
|
|
304
|
+
width: textWidth + paddingX * 2,
|
|
305
|
+
height: textHeight + paddingY * 2
|
|
306
|
+
};
|
|
307
|
+
const tickPos = {
|
|
308
|
+
x: tickX,
|
|
309
|
+
y
|
|
310
|
+
};
|
|
311
|
+
return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(STickWrapper, _ref5.cn("STickWrapper", {}), /* @__PURE__ */ React.createElement(STickHover, _ref5.cn("STickHover", {
|
|
312
|
+
...hoverPos,
|
|
313
|
+
"rx": borderRadius
|
|
314
|
+
})), /* @__PURE__ */ React.createElement(STick, _ref5.cn("STick", {
|
|
315
|
+
...tickPos
|
|
316
|
+
}), formattedValue));
|
|
317
|
+
}
|
|
201
318
|
function HoverLineTooltip(props) {
|
|
202
|
-
var _ref = arguments[0],
|
|
319
|
+
var _ref = arguments[0], _ref6;
|
|
203
320
|
const SHoverLineTooltip = Tooltip;
|
|
204
|
-
return
|
|
321
|
+
return _ref6 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SHoverLineTooltip, _ref6.cn("SHoverLineTooltip", {
|
|
205
322
|
...assignProps({
|
|
206
323
|
"tag": HoverLine,
|
|
207
324
|
"excludeAnchorProps": true
|
|
@@ -209,9 +326,9 @@ function HoverLineTooltip(props) {
|
|
|
209
326
|
}));
|
|
210
327
|
}
|
|
211
328
|
function HoverRectTooltip(props) {
|
|
212
|
-
var _ref2 = arguments[0],
|
|
329
|
+
var _ref2 = arguments[0], _ref7;
|
|
213
330
|
const SHoverRectTooltip = Tooltip;
|
|
214
|
-
return
|
|
331
|
+
return _ref7 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SHoverRectTooltip, _ref7.cn("SHoverRectTooltip", {
|
|
215
332
|
...assignProps({
|
|
216
333
|
"tag": HoverRect,
|
|
217
334
|
"excludeAnchorProps": true
|
package/lib/esm/Line.mjs
CHANGED
|
@@ -14,19 +14,19 @@ const style = (
|
|
|
14
14
|
/*__reshadow_css_start__*/
|
|
15
15
|
(sstyled.insert(
|
|
16
16
|
/*__inner_css_start__*/
|
|
17
|
-
".
|
|
17
|
+
".___SLine_ty5xk_gg_{fill:#0000;stroke-width:2;stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));transition-property:d;transition-duration:var(--duration_ty5xk);transition-timing-function:ease-in-out}.___SLine_ty5xk_gg_.__color_ty5xk_gg_{stroke:var(--color_ty5xk)}.___SLine_ty5xk_gg_.__hide_ty5xk_gg_{display:none}.___SLine_ty5xk_gg_.__transparent_ty5xk_gg_{opacity:.3}.___SNull_ty5xk_gg_{fill:#0000;stroke:var(--intergalactic-chart-palette-order-null,oklch(.9 .002 177));stroke-dasharray:4}.___SNull_ty5xk_gg_.__hide_ty5xk_gg_{display:none}.___SLineArea_ty5xk_gg_{transition-property:d;transition-duration:var(--duration_ty5xk);transition-timing-function:ease-in-out;opacity:.3;fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140))}.___SLineArea_ty5xk_gg_.__color_ty5xk_gg_{fill:var(--color_ty5xk)}",
|
|
18
18
|
/*__inner_css_end__*/
|
|
19
|
-
"
|
|
19
|
+
"ty5xk_gg_"
|
|
20
20
|
), /*__reshadow_css_end__*/
|
|
21
21
|
{
|
|
22
|
-
"__SLine": "
|
|
23
|
-
"--duration": "--
|
|
24
|
-
"_color": "
|
|
25
|
-
"--color": "--
|
|
26
|
-
"_hide": "
|
|
27
|
-
"_transparent": "
|
|
28
|
-
"__SNull": "
|
|
29
|
-
"__SLineArea": "
|
|
22
|
+
"__SLine": "___SLine_ty5xk_gg_",
|
|
23
|
+
"--duration": "--duration_ty5xk",
|
|
24
|
+
"_color": "__color_ty5xk_gg_",
|
|
25
|
+
"--color": "--color_ty5xk",
|
|
26
|
+
"_hide": "__hide_ty5xk_gg_",
|
|
27
|
+
"_transparent": "__transparent_ty5xk_gg_",
|
|
28
|
+
"__SNull": "___SNull_ty5xk_gg_",
|
|
29
|
+
"__SLineArea": "___SLineArea_ty5xk_gg_"
|
|
30
30
|
})
|
|
31
31
|
);
|
|
32
32
|
class LineRoot extends Component {
|
package/lib/esm/Plot.mjs
CHANGED
|
@@ -14,12 +14,12 @@ const style = (
|
|
|
14
14
|
/*__reshadow_css_start__*/
|
|
15
15
|
(sstyled.insert(
|
|
16
16
|
/*__inner_css_start__*/
|
|
17
|
-
".
|
|
17
|
+
".___SPlot_1f5de_gg_{overflow:hidden}.___SPlot_1f5de_gg_:focus{outline:none}.___SPlot_1f5de_gg_:active{outline:0;-webkit-text-decoration:none;text-decoration:none}foreignObject[data-aria-only]{pointer-events:none}.___SPlot_1f5de_gg_:has(foreignObject[data-aria-only]:focus-within){outline-color:var(--intergalactic-keyboard-focus-outline,#0020dd78);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;border-radius:var(--intergalactic-surface-rounded,8px)}@media (color-gamut:p3){.___SPlot_1f5de_gg_:has(foreignObject[data-aria-only]:focus-within){outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.424 .269 264.2/.469))}}",
|
|
18
18
|
/*__inner_css_end__*/
|
|
19
|
-
"
|
|
19
|
+
"1f5de_gg_"
|
|
20
20
|
), /*__reshadow_css_end__*/
|
|
21
21
|
{
|
|
22
|
-
"__SPlot": "
|
|
22
|
+
"__SPlot": "___SPlot_1f5de_gg_"
|
|
23
23
|
})
|
|
24
24
|
);
|
|
25
25
|
class PlotRoot extends Component {
|
|
@@ -39,8 +39,9 @@ class PlotRoot extends Component {
|
|
|
39
39
|
const [pX, pY] = eventToPoint(e, this.rootRef.current);
|
|
40
40
|
const [minX, maxX] = xScale.range();
|
|
41
41
|
const [maxY, minY] = yScale.range();
|
|
42
|
-
if (pX >= minX && pX <= maxX && pY >= minY
|
|
43
|
-
|
|
42
|
+
if (pX >= minX && pX <= maxX && pY >= minY) {
|
|
43
|
+
const isTickUnder = pY >= maxY;
|
|
44
|
+
this.eventEmitter.emit("onMouseMoveChart", e, this.rootRef.current, isTickUnder);
|
|
44
45
|
} else {
|
|
45
46
|
this.eventEmitter.emit("onMouseLeaveChart", e);
|
|
46
47
|
}
|
|
@@ -76,6 +77,7 @@ class PlotRoot extends Component {
|
|
|
76
77
|
eventEmitter: this.eventEmitter,
|
|
77
78
|
rootRef: this.rootRef,
|
|
78
79
|
dataHintsHandler: this.dataHintsHandler,
|
|
80
|
+
dataHints: this.dataStructureHints,
|
|
79
81
|
resolveColor,
|
|
80
82
|
patterns,
|
|
81
83
|
duration,
|
package/lib/esm/Radar.mjs
CHANGED
|
@@ -16,29 +16,29 @@ const style = (
|
|
|
16
16
|
/*__reshadow_css_start__*/
|
|
17
17
|
(sstyled.insert(
|
|
18
18
|
/*__inner_css_start__*/
|
|
19
|
-
".
|
|
19
|
+
".___SAxisLine_1hpm6_gg_,.___SAxisTick_1hpm6_gg_,.___SAxis_1hpm6_gg_{stroke:var(--intergalactic-chart-grid-line,oklch(.95 .002 180));stroke-width:1;fill:#0000}.___SAxisLine_1hpm6_gg_,.___SAxisTick_1hpm6_gg_{stroke-dasharray:2}.___SAxisLine_1hpm6_gg_.__active_1hpm6_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .002 175.6))}.___SAxisLabel_1hpm6_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_1hpm6_gg_.__xDirection_1hpm6_gg_{text-anchor:var(--xDirection_1hpm6)}.___SAxisLabel_1hpm6_gg_.__yDirection_1hpm6_gg_{dominant-baseline:var(--yDirection_1hpm6)}.___SPolygon_1hpm6_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));opacity:.2}.___SPolygon_1hpm6_gg_.__color_1hpm6_gg_{fill:var(--color_1hpm6)}.___SPolygon_1hpm6_gg_.__pattern_1hpm6_gg_.__color_1hpm6_gg_{fill:var(--pattern_1hpm6);stroke:var(--color_1hpm6);stroke-width:1px}.___SPolygonDot_1hpm6_gg_{stroke-width:2px;stroke:var(--intergalactic-chart-grid-border,#fff);r:6px;fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140))}.___SPolygonDot_1hpm6_gg_.__transparent_1hpm6_gg_{opacity:.3}.___SPolygonDot_1hpm6_gg_.__color_1hpm6_gg_{fill:var(--color_1hpm6)}.___SPolygonLine_1hpm6_gg_{stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));stroke-width:3;fill:#0000}.___SPolygonLine_1hpm6_gg_.__transparent_1hpm6_gg_{opacity:.3}.___SPolygonLine_1hpm6_gg_.__color_1hpm6_gg_{stroke:var(--color_1hpm6)}.___SPieRect_1hpm6_gg_{outline:none;fill:var(--intergalactic-chart-grid-bar-chart-hover,oklch(.177 .033 175.6/.042))}",
|
|
20
20
|
/*__inner_css_end__*/
|
|
21
|
-
"
|
|
21
|
+
"1hpm6_gg_"
|
|
22
22
|
), /*__reshadow_css_end__*/
|
|
23
23
|
{
|
|
24
|
-
"__SAxis": "
|
|
25
|
-
"__SAxisLine": "
|
|
26
|
-
"__SAxisTick": "
|
|
27
|
-
"_active": "
|
|
28
|
-
"__SAxisLabel": "
|
|
29
|
-
"_xDirection": "
|
|
30
|
-
"--xDirection": "--
|
|
31
|
-
"_yDirection": "
|
|
32
|
-
"--yDirection": "--
|
|
33
|
-
"__SPolygon": "
|
|
34
|
-
"_color": "
|
|
35
|
-
"--color": "--
|
|
36
|
-
"_pattern": "
|
|
37
|
-
"--pattern": "--
|
|
38
|
-
"__SPolygonDot": "
|
|
39
|
-
"_transparent": "
|
|
40
|
-
"__SPolygonLine": "
|
|
41
|
-
"__SPieRect": "
|
|
24
|
+
"__SAxis": "___SAxis_1hpm6_gg_",
|
|
25
|
+
"__SAxisLine": "___SAxisLine_1hpm6_gg_",
|
|
26
|
+
"__SAxisTick": "___SAxisTick_1hpm6_gg_",
|
|
27
|
+
"_active": "__active_1hpm6_gg_",
|
|
28
|
+
"__SAxisLabel": "___SAxisLabel_1hpm6_gg_",
|
|
29
|
+
"_xDirection": "__xDirection_1hpm6_gg_",
|
|
30
|
+
"--xDirection": "--xDirection_1hpm6",
|
|
31
|
+
"_yDirection": "__yDirection_1hpm6_gg_",
|
|
32
|
+
"--yDirection": "--yDirection_1hpm6",
|
|
33
|
+
"__SPolygon": "___SPolygon_1hpm6_gg_",
|
|
34
|
+
"_color": "__color_1hpm6_gg_",
|
|
35
|
+
"--color": "--color_1hpm6",
|
|
36
|
+
"_pattern": "__pattern_1hpm6_gg_",
|
|
37
|
+
"--pattern": "--pattern_1hpm6",
|
|
38
|
+
"__SPolygonDot": "___SPolygonDot_1hpm6_gg_",
|
|
39
|
+
"_transparent": "__transparent_1hpm6_gg_",
|
|
40
|
+
"__SPolygonLine": "___SPolygonLine_1hpm6_gg_",
|
|
41
|
+
"__SPieRect": "___SPieRect_1hpm6_gg_"
|
|
42
42
|
})
|
|
43
43
|
);
|
|
44
44
|
const clampAngle = (angle) => {
|
package/lib/esm/RadialTree.mjs
CHANGED
|
@@ -14,22 +14,22 @@ const style = (
|
|
|
14
14
|
/*__reshadow_css_start__*/
|
|
15
15
|
(sstyled.insert(
|
|
16
16
|
/*__inner_css_start__*/
|
|
17
|
-
".
|
|
17
|
+
".___SRadian_ojwuj_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info,oklch(.6 .166 277.7))}.___SLine_ojwuj_gg_{stroke:var(--intergalactic-text-large-info,oklch(.6 .166 277.7))}.___SLine_ojwuj_gg_.__stroke_ojwuj_gg_{stroke:var(--stroke_ojwuj)}.___SLine_ojwuj_gg_.__transparent_ojwuj_gg_{opacity:.3}.___SCap_ojwuj_gg_{transition:r .1s}.___SCap_ojwuj_gg_.__pattern_ojwuj_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:1px}.___SCap_ojwuj_gg_.__transparent_ojwuj_gg_,.___SIcon_ojwuj_gg_.__transparent_ojwuj_gg_{opacity:.3}.___SLabel_ojwuj_gg_{fill:var(--color_ojwuj)}.___SLabel_ojwuj_gg_.__transparent_ojwuj_gg_{opacity:.3}@media (hover:hover){.___SRadian_ojwuj_gg_:hover .___SLabel_ojwuj_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_ojwuj_gg_{transition:none}}",
|
|
18
18
|
/*__inner_css_end__*/
|
|
19
|
-
"
|
|
19
|
+
"ojwuj_gg_"
|
|
20
20
|
), /*__reshadow_css_end__*/
|
|
21
21
|
{
|
|
22
|
-
"__SRadian": "
|
|
23
|
-
"__SLine": "
|
|
24
|
-
"_stroke": "
|
|
25
|
-
"--stroke": "--
|
|
26
|
-
"_transparent": "
|
|
27
|
-
"__SCap": "
|
|
28
|
-
"_pattern": "
|
|
29
|
-
"__SIcon": "
|
|
30
|
-
"__SLabel": "
|
|
31
|
-
"--color": "--
|
|
32
|
-
"__SLineCap": "
|
|
22
|
+
"__SRadian": "___SRadian_ojwuj_gg_",
|
|
23
|
+
"__SLine": "___SLine_ojwuj_gg_",
|
|
24
|
+
"_stroke": "__stroke_ojwuj_gg_",
|
|
25
|
+
"--stroke": "--stroke_ojwuj",
|
|
26
|
+
"_transparent": "__transparent_ojwuj_gg_",
|
|
27
|
+
"__SCap": "___SCap_ojwuj_gg_",
|
|
28
|
+
"_pattern": "__pattern_ojwuj_gg_",
|
|
29
|
+
"__SIcon": "___SIcon_ojwuj_gg_",
|
|
30
|
+
"__SLabel": "___SLabel_ojwuj_gg_",
|
|
31
|
+
"--color": "--color_ojwuj",
|
|
32
|
+
"__SLineCap": "___SLineCap_ojwuj_gg_"
|
|
33
33
|
})
|
|
34
34
|
);
|
|
35
35
|
const baseAngle = -Math.PI / 2;
|
package/lib/esm/Reference.mjs
CHANGED
|
@@ -9,22 +9,22 @@ const style = (
|
|
|
9
9
|
/*__reshadow_css_start__*/
|
|
10
10
|
(sstyled.insert(
|
|
11
11
|
/*__inner_css_start__*/
|
|
12
|
-
".
|
|
12
|
+
".___SReferenceLine_1ycra_gg_{fill:none;stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .002 175.6))}.___STitle_1ycra_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-chart-grid-text-label,oklch(.097 .023 156.5/.468));transform-origin:var(--transform-origin_1ycra)}.___STitle_1ycra_gg_._position_top_1ycra_gg_{text-anchor:middle}.___STitle_1ycra_gg_._position_bottom_1ycra_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_1ycra_gg_._position_left_1ycra_gg_,.___STitle_1ycra_gg_._position_right_1ycra_gg_{transform:rotate(-90deg);dominant-baseline:middle;text-anchor:middle}.___SBackground_1ycra_gg_{fill:var(--intergalactic-chart-grid-period-bg,oklch(.96 .001 180))}.___SStripes_1ycra_gg_{fill:var(--fill_1ycra)}.___SStripesPatternPath_1ycra_gg_{stroke:var(--intergalactic-chart-grid-period-pattern,oklch(.95 .002 180));stroke-width:1px}",
|
|
13
13
|
/*__inner_css_end__*/
|
|
14
|
-
"
|
|
14
|
+
"1ycra_gg_"
|
|
15
15
|
), /*__reshadow_css_end__*/
|
|
16
16
|
{
|
|
17
|
-
"__SReferenceLine": "
|
|
18
|
-
"__STitle": "
|
|
19
|
-
"--transform-origin": "--transform-
|
|
20
|
-
"_position_top": "
|
|
21
|
-
"_position_bottom": "
|
|
22
|
-
"_position_right": "
|
|
23
|
-
"_position_left": "
|
|
24
|
-
"__SBackground": "
|
|
25
|
-
"__SStripes": "
|
|
26
|
-
"--fill": "--
|
|
27
|
-
"__SStripesPatternPath": "
|
|
17
|
+
"__SReferenceLine": "___SReferenceLine_1ycra_gg_",
|
|
18
|
+
"__STitle": "___STitle_1ycra_gg_",
|
|
19
|
+
"--transform-origin": "--transform-origin_1ycra",
|
|
20
|
+
"_position_top": "_position_top_1ycra_gg_",
|
|
21
|
+
"_position_bottom": "_position_bottom_1ycra_gg_",
|
|
22
|
+
"_position_right": "_position_right_1ycra_gg_",
|
|
23
|
+
"_position_left": "_position_left_1ycra_gg_",
|
|
24
|
+
"__SBackground": "___SBackground_1ycra_gg_",
|
|
25
|
+
"__SStripes": "___SStripes_1ycra_gg_",
|
|
26
|
+
"--fill": "--fill_1ycra",
|
|
27
|
+
"__SStripesPatternPath": "___SStripesPatternPath_1ycra_gg_"
|
|
28
28
|
})
|
|
29
29
|
);
|
|
30
30
|
const side2direction = {
|
package/lib/esm/ScatterPlot.mjs
CHANGED
|
@@ -13,19 +13,19 @@ const style = (
|
|
|
13
13
|
/*__reshadow_css_start__*/
|
|
14
14
|
(sstyled.insert(
|
|
15
15
|
/*__inner_css_start__*/
|
|
16
|
-
".
|
|
16
|
+
".___SScatterPlot_1kxs7_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .01 140));transition-property:cx,cy;transition-duration:var(--duration_1kxs7);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_1kxs7_gg_:hover{opacity:.8}}.___SScatterPlot_1kxs7_gg_.__color_1kxs7_gg_{fill:var(--color_1kxs7)}.___SScatterPlot_1kxs7_gg_.__pattern_1kxs7_gg_.__color_1kxs7_gg_{fill:var(--pattern_1kxs7);stroke:var(--color_1kxs7);stroke-width:1px}.___SScatterPlot_1kxs7_gg_.__transparent_1kxs7_gg_{opacity:.3}.___SValue_1kxs7_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50,10px);stroke:var(--intergalactic-chart-palette-order-9,oklch(.53 .157 279.2))}.___SValue_1kxs7_gg_.__color_1kxs7_gg_{stroke:var(--color_1kxs7)}.___SValue_1kxs7_gg_.__transparent_1kxs7_gg_{opacity:.3}",
|
|
17
17
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
18
|
+
"1kxs7_gg_"
|
|
19
19
|
), /*__reshadow_css_end__*/
|
|
20
20
|
{
|
|
21
|
-
"__SScatterPlot": "
|
|
22
|
-
"_color": "
|
|
23
|
-
"--color": "--
|
|
24
|
-
"_pattern": "
|
|
25
|
-
"--pattern": "--
|
|
26
|
-
"_transparent": "
|
|
27
|
-
"__SValue": "
|
|
28
|
-
"--duration": "--
|
|
21
|
+
"__SScatterPlot": "___SScatterPlot_1kxs7_gg_",
|
|
22
|
+
"_color": "__color_1kxs7_gg_",
|
|
23
|
+
"--color": "--color_1kxs7",
|
|
24
|
+
"_pattern": "__pattern_1kxs7_gg_",
|
|
25
|
+
"--pattern": "--pattern_1kxs7",
|
|
26
|
+
"_transparent": "__transparent_1kxs7_gg_",
|
|
27
|
+
"__SValue": "___SValue_1kxs7_gg_",
|
|
28
|
+
"--duration": "--duration_1kxs7"
|
|
29
29
|
})
|
|
30
30
|
);
|
|
31
31
|
class ScatterPlotRoot extends Component {
|
package/lib/esm/Tooltip.mjs
CHANGED
|
@@ -12,19 +12,22 @@ const style = (
|
|
|
12
12
|
/*__reshadow_css_start__*/
|
|
13
13
|
(sstyled.insert(
|
|
14
14
|
/*__inner_css_start__*/
|
|
15
|
-
|
|
15
|
+
'.___STooltip_oee7t_gg_{font-size:var(--intergalactic-fs-100,12px);line-height:var(--intergalactic-lh-100,1.3334);font-feature-settings:"tnum";font-variant-numeric:tabular-nums;position:relative;color:var(--intergalactic-text-primary-invert,oklch(.999 .001 180/.949));background-color:var(--intergalactic-tooltip-bg-invert,oklch(.23 .01 140));border-radius:var(--intergalactic-popper-rounded,6px);border:1px solid var(--intergalactic-tooltip-border-invert,oklch(.4 .004 140));box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 #00151012);padding:var(--intergalactic-spacing-content-padding-medium,12px)}@media (color-gamut:p3){.___STooltip_oee7t_gg_{box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 oklch(.176 .033 175.7/.07))}}.___STitle_oee7t_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.997 .004 165.9/.684));margin-bottom:var(--intergalactic-spacing-content-gap-large,8px)}.___SDotGroup_oee7t_gg_{display:flex;align-items:center}.___SDot_oee7t_gg_{margin-right:var(--intergalactic-spacing-content-gap-large,8px)}.___SDotCircle_oee7t_gg_.__color_oee7t_gg_.__lightness_oee7t_gg_{background-color:var(--color_oee7t);width:10px;height:10px;border-radius:50%;box-shadow:0 0 0 1px oklch(from var(--color_oee7t) calc(l + var(--lightness_oee7t)) c h)}.___SFooter_oee7t_gg_{background:var(--intergalactic-bg-secondary-invert,oklch(.969 .057 140/.118));color:var(--intergalactic-text-secondary-invert,oklch(.997 .004 165.9/.684));padding:var(--intergalactic-spacing-content-padding-xsmall,4px) var(--intergalactic-spacing-content-padding-medium,12px);border-radius:0 0 var(--intergalactic-rounded-medium,6px) var(--intergalactic-rounded-medium,6px);margin:var(--intergalactic-spacing-content-gap-xlarge,12px) calc(var(--intergalactic-spacing-content-gap-xlarge, 12px)*-1) calc(var(--intergalactic-spacing-content-gap-xlarge, 12px)*-1)}.___SDotPattern_oee7t_gg_{stroke-width:1px;stroke:oklch(from var(--intergalactic-chart-grid-border,#fff) l c h/.5)}',
|
|
16
16
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
17
|
+
"oee7t_gg_"
|
|
18
18
|
), /*__reshadow_css_end__*/
|
|
19
19
|
{
|
|
20
|
-
"__STooltip": "
|
|
21
|
-
"__STitle": "
|
|
22
|
-
"__SDotGroup": "
|
|
23
|
-
"__SDot": "
|
|
24
|
-
"__SDotCircle": "
|
|
25
|
-
"_color": "
|
|
26
|
-
"
|
|
27
|
-
"
|
|
20
|
+
"__STooltip": "___STooltip_oee7t_gg_",
|
|
21
|
+
"__STitle": "___STitle_oee7t_gg_",
|
|
22
|
+
"__SDotGroup": "___SDotGroup_oee7t_gg_",
|
|
23
|
+
"__SDot": "___SDot_oee7t_gg_",
|
|
24
|
+
"__SDotCircle": "___SDotCircle_oee7t_gg_",
|
|
25
|
+
"_color": "__color_oee7t_gg_",
|
|
26
|
+
"_lightness": "__lightness_oee7t_gg_",
|
|
27
|
+
"--color": "--color_oee7t",
|
|
28
|
+
"--lightness": "--lightness_oee7t",
|
|
29
|
+
"__SFooter": "___SFooter_oee7t_gg_",
|
|
30
|
+
"__SDotPattern": "___SDotPattern_oee7t_gg_"
|
|
28
31
|
})
|
|
29
32
|
);
|
|
30
33
|
const TooltipDotRenderContext = /* @__PURE__ */ React.createContext({
|
|
@@ -207,6 +210,10 @@ function Title(props) {
|
|
|
207
210
|
}));
|
|
208
211
|
}
|
|
209
212
|
Title.style = style;
|
|
213
|
+
const CHART_PALETTE_ORDER_TO_LIGHTNESS = {
|
|
214
|
+
"chart-palette-order-1": 0.35,
|
|
215
|
+
"DEFAULT": 0.15
|
|
216
|
+
};
|
|
210
217
|
function Dot(props) {
|
|
211
218
|
var _ref4 = arguments[0], _ref8;
|
|
212
219
|
const {
|
|
@@ -226,16 +233,18 @@ function Dot(props) {
|
|
|
226
233
|
const SDotGroup = Box;
|
|
227
234
|
const SDot = Box;
|
|
228
235
|
const SDotCircle = Box;
|
|
236
|
+
const SDotPattern = PatternSymbol;
|
|
229
237
|
return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(SDotGroup, _ref8.cn("SDotGroup", {
|
|
230
238
|
...assignProps({
|
|
231
239
|
"use:color": void 0,
|
|
232
240
|
"__excludeProps": ["data", "scale"]
|
|
233
241
|
}, _ref4)
|
|
234
|
-
}), patterns ? /* @__PURE__ */ React.createElement(SDot, _ref8.cn("SDot", {}), /* @__PURE__ */ React.createElement(
|
|
242
|
+
}), patterns ? /* @__PURE__ */ React.createElement(SDot, _ref8.cn("SDot", {}), /* @__PURE__ */ React.createElement(SDotPattern, _ref8.cn("SDotPattern", {
|
|
235
243
|
"color": resolveColor(color ?? defaultColor),
|
|
236
244
|
"patternKey": color ?? defaultColor
|
|
237
245
|
}))) : /* @__PURE__ */ React.createElement(SDot, _ref8.cn("SDot", {}), /* @__PURE__ */ React.createElement(SDotCircle, _ref8.cn("SDotCircle", {
|
|
238
|
-
"color": resolveColor(color ?? defaultColor)
|
|
246
|
+
"color": resolveColor(color ?? defaultColor),
|
|
247
|
+
"lightness": CHART_PALETTE_ORDER_TO_LIGHTNESS[color ?? defaultColor] ?? CHART_PALETTE_ORDER_TO_LIGHTNESS.DEFAULT
|
|
239
248
|
}))), /* @__PURE__ */ React.createElement(Children, _ref8.cn("Children", {})));
|
|
240
249
|
}
|
|
241
250
|
Dot.style = style;
|