@semcore/d3-chart 18.1.0 → 18.2.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 +37 -0
- package/lib/cjs/Area.js +12 -12
- package/lib/cjs/Axis.js +15 -15
- package/lib/cjs/Bar.js +206 -21
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +85 -38
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +16 -16
- package/lib/cjs/Donut.js +65 -152
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +13 -13
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +32 -25
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +64 -153
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +9 -9
- package/lib/cjs/Pattern.js +267 -273
- package/lib/cjs/Pattern.js.map +1 -1
- package/lib/cjs/Plot.js +4 -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 +31 -29
- package/lib/cjs/Reference.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +9 -9
- package/lib/cjs/StackBar.js +7 -2
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/Tooltip.js +14 -13
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +9 -9
- package/lib/cjs/a11y/DataAccessibilityTable.js +1 -1
- package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/lib/cjs/component/Chart/AbstractChart.js +28 -21
- 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/BarChart.js +51 -0
- 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 +104 -20
- package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.js +27 -3
- 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/LineChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/ScoreBar/ScoreBarChart.js +165 -0
- package/lib/cjs/component/Chart/ScoreBar/ScoreBarChart.js.map +1 -0
- package/lib/cjs/component/Chart/ScoreBar/ScoreBarChart.type.js +2 -0
- package/lib/cjs/component/Chart/ScoreBar/ScoreBarChart.type.js.map +1 -0
- package/lib/cjs/component/Chart/ScoreBar/ScoreBarItem.js +147 -0
- package/lib/cjs/component/Chart/ScoreBar/ScoreBarItem.js.map +1 -0
- package/lib/cjs/component/Chart/ScoreBar/ScoreBarItem.type.js +2 -0
- package/lib/cjs/component/Chart/ScoreBar/ScoreBarItem.type.js.map +1 -0
- package/lib/cjs/component/Chart/ScoreBar/scoreBarChart.shadow.css +130 -0
- package/lib/cjs/component/Chart/ScoreDonutChart.js +196 -0
- package/lib/cjs/component/Chart/ScoreDonutChart.js.map +1 -0
- package/lib/cjs/component/Chart/ScoreDonutChart.type.js +2 -0
- package/lib/cjs/component/Chart/ScoreDonutChart.type.js.map +1 -0
- package/lib/cjs/component/Chart/index.js +8 -1
- package/lib/cjs/component/Chart/index.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +7 -7
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +18 -21
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/legend-item.shadow.css +7 -4
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +11 -11
- package/lib/cjs/component/Hover/HoverLine.js +144 -0
- package/lib/cjs/component/Hover/HoverLine.js.map +1 -0
- package/lib/cjs/component/Hover/HoverLine.type.js +2 -0
- package/lib/cjs/component/Hover/HoverLine.type.js.map +1 -0
- package/lib/cjs/component/Hover/HoveredTick.js +77 -0
- package/lib/cjs/component/Hover/HoveredTick.js.map +1 -0
- package/lib/cjs/component/Hover/hover.shadow.css +4 -0
- package/lib/cjs/component/Hover/hoveredTick.shadow.css +34 -0
- package/lib/cjs/style/area.shadow.css +5 -4
- package/lib/cjs/style/bar.shadow.css +1 -1
- package/lib/cjs/style/bubble.shadow.css +29 -24
- package/lib/cjs/style/donut.shadow.css +7 -9
- package/lib/cjs/style/dot.shadow.css +1 -1
- package/lib/cjs/style/hover.shadow.css +0 -40
- package/lib/cjs/style/line.shadow.css +1 -1
- package/lib/cjs/style/radar.shadow.css +2 -2
- package/lib/cjs/style/radial-tree.shadow.css +4 -4
- package/lib/cjs/style/scatterplot.shadow.css +2 -2
- package/lib/cjs/style/venn.shadow.css +3 -3
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +2 -0
- package/lib/cjs/translations/__intergalactic-dynamic-locales.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/Donut.d.js.map +1 -1
- package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Plot.d.js.map +1 -1
- package/lib/cjs/types/index.d.js +24 -0
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js +78 -30
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/Area.js +12 -12
- package/lib/es6/Axis.js +15 -15
- package/lib/es6/Bar.js +207 -22
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +86 -39
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +16 -16
- package/lib/es6/Donut.js +65 -152
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +13 -13
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/HorizontalBar.js +32 -25
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +64 -153
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +9 -9
- package/lib/es6/Pattern.js +266 -272
- package/lib/es6/Pattern.js.map +1 -1
- package/lib/es6/Plot.js +4 -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 +31 -29
- package/lib/es6/Reference.js.map +1 -1
- package/lib/es6/ScatterPlot.js +9 -9
- package/lib/es6/StackBar.js +7 -2
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/Tooltip.js +14 -13
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +9 -9
- package/lib/es6/a11y/DataAccessibilityTable.js +1 -1
- package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +2 -2
- package/lib/es6/component/Chart/AbstractChart.js +29 -22
- 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/BarChart.js +51 -1
- 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 +105 -21
- package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.js +27 -3
- 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/LineChart.type.js.map +1 -1
- package/lib/es6/component/Chart/ScoreBar/ScoreBarChart.js +161 -0
- package/lib/es6/component/Chart/ScoreBar/ScoreBarChart.js.map +1 -0
- package/lib/es6/component/Chart/ScoreBar/ScoreBarChart.type.js +2 -0
- package/lib/es6/component/Chart/ScoreBar/ScoreBarChart.type.js.map +1 -0
- package/lib/es6/component/Chart/ScoreBar/ScoreBarItem.js +141 -0
- package/lib/es6/component/Chart/ScoreBar/ScoreBarItem.js.map +1 -0
- package/lib/es6/component/Chart/ScoreBar/ScoreBarItem.type.js +2 -0
- package/lib/es6/component/Chart/ScoreBar/ScoreBarItem.type.js.map +1 -0
- package/lib/es6/component/Chart/ScoreBar/scoreBarChart.shadow.css +130 -0
- package/lib/es6/component/Chart/ScoreDonutChart.js +189 -0
- package/lib/es6/component/Chart/ScoreDonutChart.js.map +1 -0
- package/lib/es6/component/Chart/ScoreDonutChart.type.js +2 -0
- package/lib/es6/component/Chart/ScoreDonutChart.type.js.map +1 -0
- package/lib/es6/component/Chart/index.js +8 -1
- package/lib/es6/component/Chart/index.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +7 -7
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +24 -26
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/legend-item.shadow.css +7 -4
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +11 -11
- package/lib/es6/component/Hover/HoverLine.js +138 -0
- package/lib/es6/component/Hover/HoverLine.js.map +1 -0
- package/lib/es6/component/Hover/HoverLine.type.js +2 -0
- package/lib/es6/component/Hover/HoverLine.type.js.map +1 -0
- package/lib/es6/component/Hover/HoveredTick.js +71 -0
- package/lib/es6/component/Hover/HoveredTick.js.map +1 -0
- package/lib/es6/component/Hover/hover.shadow.css +4 -0
- package/lib/es6/component/Hover/hoveredTick.shadow.css +34 -0
- package/lib/es6/style/area.shadow.css +5 -4
- package/lib/es6/style/bar.shadow.css +1 -1
- package/lib/es6/style/bubble.shadow.css +29 -24
- package/lib/es6/style/donut.shadow.css +7 -9
- package/lib/es6/style/dot.shadow.css +1 -1
- package/lib/es6/style/hover.shadow.css +0 -40
- package/lib/es6/style/line.shadow.css +1 -1
- package/lib/es6/style/radar.shadow.css +2 -2
- package/lib/es6/style/radial-tree.shadow.css +4 -4
- package/lib/es6/style/scatterplot.shadow.css +2 -2
- package/lib/es6/style/venn.shadow.css +3 -3
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -0
- package/lib/es6/translations/__intergalactic-dynamic-locales.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/Donut.d.js.map +1 -1
- package/lib/es6/types/HorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Plot.d.js.map +1 -1
- package/lib/es6/types/index.d.js +2 -0
- package/lib/es6/types/index.d.js.map +1 -1
- package/lib/es6/utils.js +71 -28
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/Area.mjs +13 -13
- package/lib/esm/Axis.mjs +16 -16
- package/lib/esm/Bar.mjs +205 -22
- package/lib/esm/Bubble.mjs +87 -40
- package/lib/esm/CompactHorizontalBar.mjs +17 -17
- package/lib/esm/Donut.mjs +66 -151
- package/lib/esm/Dots.mjs +14 -14
- package/lib/esm/HorizontalBar.mjs +33 -26
- package/lib/esm/Hover.mjs +65 -154
- package/lib/esm/Line.mjs +10 -10
- package/lib/esm/Pattern.mjs +268 -273
- package/lib/esm/Plot.mjs +5 -5
- package/lib/esm/Radar.mjs +20 -20
- package/lib/esm/RadialTree.mjs +13 -13
- package/lib/esm/Reference.mjs +33 -30
- package/lib/esm/ScatterPlot.mjs +10 -10
- package/lib/esm/StackBar.mjs +7 -2
- package/lib/esm/Tooltip.mjs +15 -14
- package/lib/esm/Venn.mjs +10 -10
- package/lib/esm/a11y/DataAccessibilityTable.mjs +1 -1
- package/lib/esm/a11y/PlotA11yModule.mjs +3 -3
- package/lib/esm/a11y/PlotA11yView.mjs +3 -3
- package/lib/esm/component/Chart/AbstractChart.mjs +30 -23
- package/lib/esm/component/Chart/BarChart.mjs +49 -0
- package/lib/esm/component/Chart/BubbleChart.mjs +104 -20
- package/lib/esm/component/Chart/DonutChart.mjs +27 -3
- package/lib/esm/component/Chart/ScoreBar/ScoreBarChart.mjs +160 -0
- package/lib/esm/component/Chart/ScoreBar/ScoreBarItem.mjs +149 -0
- package/lib/esm/component/Chart/ScoreBar/scoreBarChart.shadow.css +130 -0
- package/lib/esm/component/Chart/ScoreDonutChart.mjs +186 -0
- package/lib/esm/component/Chart/index.mjs +8 -1
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +8 -8
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +19 -22
- package/lib/esm/component/ChartLegend/LegendItem/legend-item.shadow.css +7 -4
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +12 -12
- package/lib/esm/component/Hover/HoverLine.mjs +146 -0
- package/lib/esm/component/Hover/HoveredTick.mjs +79 -0
- package/lib/esm/component/Hover/hover.shadow.css +4 -0
- package/lib/esm/component/Hover/hoveredTick.shadow.css +34 -0
- package/lib/esm/style/area.shadow.css +5 -4
- package/lib/esm/style/bar.shadow.css +1 -1
- package/lib/esm/style/bubble.shadow.css +29 -24
- package/lib/esm/style/donut.shadow.css +7 -9
- package/lib/esm/style/dot.shadow.css +1 -1
- package/lib/esm/style/hover.shadow.css +0 -40
- package/lib/esm/style/line.shadow.css +1 -1
- package/lib/esm/style/radar.shadow.css +2 -2
- package/lib/esm/style/radial-tree.shadow.css +4 -4
- package/lib/esm/style/scatterplot.shadow.css +2 -2
- package/lib/esm/style/venn.shadow.css +3 -3
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -0
- package/lib/esm/translations/de.json.mjs +12 -0
- package/lib/esm/utils.mjs +75 -28
- package/lib/types/Bar.d.ts +3 -0
- package/lib/types/Bubble.d.ts +4 -1
- package/lib/types/Donut.d.ts +0 -4
- package/lib/types/HorizontalBar.d.ts +3 -0
- package/lib/types/Pattern.d.ts +10 -8
- package/lib/types/Pattern.d.ts.map +1 -1
- package/lib/types/Plot.d.ts +6 -1
- package/lib/types/component/Chart/AbstractChart.d.ts +15 -1
- package/lib/types/component/Chart/AbstractChart.d.ts.map +1 -1
- package/lib/types/component/Chart/AbstractChart.type.d.ts +28 -0
- package/lib/types/component/Chart/AbstractChart.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 +9 -1
- 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/DonutChart.d.ts.map +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +5 -2
- package/lib/types/component/Chart/DonutChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +2 -30
- package/lib/types/component/Chart/LineChart.type.d.ts.map +1 -1
- package/lib/types/component/Chart/ScoreBar/ScoreBarChart.d.ts +8 -0
- package/lib/types/component/Chart/ScoreBar/ScoreBarChart.d.ts.map +1 -0
- package/lib/types/component/Chart/ScoreBar/ScoreBarChart.type.d.ts +80 -0
- package/lib/types/component/Chart/ScoreBar/ScoreBarChart.type.d.ts.map +1 -0
- package/lib/types/component/Chart/ScoreBar/ScoreBarItem.d.ts +3 -0
- package/lib/types/component/Chart/ScoreBar/ScoreBarItem.d.ts.map +1 -0
- package/lib/types/component/Chart/ScoreBar/ScoreBarItem.type.d.ts +20 -0
- package/lib/types/component/Chart/ScoreBar/ScoreBarItem.type.d.ts.map +1 -0
- package/lib/types/component/Chart/ScoreDonutChart.d.ts +8 -0
- package/lib/types/component/Chart/ScoreDonutChart.d.ts.map +1 -0
- package/lib/types/component/Chart/ScoreDonutChart.type.d.ts +40 -0
- package/lib/types/component/Chart/ScoreDonutChart.type.d.ts.map +1 -0
- package/lib/types/component/Chart/index.d.ts +5 -0
- package/lib/types/component/Chart/index.d.ts.map +1 -1
- package/lib/types/component/Hover/HoverLine.d.ts +2 -0
- package/lib/types/component/Hover/HoverLine.d.ts.map +1 -0
- package/lib/types/component/Hover/HoverLine.type.d.ts +17 -0
- package/lib/types/component/Hover/HoverLine.type.d.ts.map +1 -0
- package/lib/types/component/Hover/HoveredTick.d.ts +21 -0
- package/lib/types/component/Hover/HoveredTick.d.ts.map +1 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +5 -0
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts.map +1 -1
- package/lib/types/utils.d.ts +11 -2
- package/lib/types/utils.d.ts.map +1 -1
- package/package.json +9 -10
package/lib/esm/Plot.mjs
CHANGED
|
@@ -15,12 +15,12 @@ const style = (
|
|
|
15
15
|
/*__reshadow_css_start__*/
|
|
16
16
|
(sstyled.insert(
|
|
17
17
|
/*__inner_css_start__*/
|
|
18
|
-
".
|
|
18
|
+
".___SPlot_dwrv9_gg_{overflow:hidden}.___SPlot_dwrv9_gg_:focus{outline:none}.___SPlot_dwrv9_gg_:active{outline:0;-webkit-text-decoration:none;text-decoration:none}foreignObject[data-aria-only]{pointer-events:none}.___SPlot_dwrv9_gg_:has([data-tick-content] :focus-visible) foreignObject[data-hovered-tick]{visibility:hidden}.___SPlot_dwrv9_gg_:has(foreignObject[data-aria-only]:focus-within){outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.23 .009 245));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)}",
|
|
19
19
|
/*__inner_css_end__*/
|
|
20
|
-
"
|
|
20
|
+
"dwrv9_gg_"
|
|
21
21
|
), /*__reshadow_css_end__*/
|
|
22
22
|
{
|
|
23
|
-
"__SPlot": "
|
|
23
|
+
"__SPlot": "___SPlot_dwrv9_gg_"
|
|
24
24
|
})
|
|
25
25
|
);
|
|
26
26
|
class PlotRoot extends Component {
|
|
@@ -28,8 +28,8 @@ class PlotRoot extends Component {
|
|
|
28
28
|
super(props);
|
|
29
29
|
_defineProperty(this, "plotId", uniqueId());
|
|
30
30
|
_defineProperty(this, "rootRef", /* @__PURE__ */ React.createRef());
|
|
31
|
-
_defineProperty(this, "dataStructureHints", this.props.dataHints
|
|
32
|
-
_defineProperty(this, "dataHintsHandler", makeDataHintsHandlers(this.dataStructureHints));
|
|
31
|
+
_defineProperty(this, "dataStructureHints", this.props.dataHints ?? makeDataHintsContainer());
|
|
32
|
+
_defineProperty(this, "dataHintsHandler", this.props.dataHintsHandlers ?? makeDataHintsHandlers(this.dataStructureHints));
|
|
33
33
|
_defineProperty(this, "handlerMouseMove", (e) => {
|
|
34
34
|
const {
|
|
35
35
|
scale
|
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_e3cip_gg_,.___SAxisTick_e3cip_gg_,.___SAxis_e3cip_gg_{stroke:var(--intergalactic-chart-grid-line,oklch(.7 .021 242));stroke-width:1;fill:#0000}.___SAxisLine_e3cip_gg_,.___SAxisTick_e3cip_gg_{stroke-dasharray:2}.___SAxisLine_e3cip_gg_.__active_e3cip_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .011 234.9))}.___SAxisLabel_e3cip_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_e3cip_gg_.__xDirection_e3cip_gg_{text-anchor:var(--xDirection_e3cip)}.___SAxisLabel_e3cip_gg_.__yDirection_e3cip_gg_{dominant-baseline:var(--yDirection_e3cip)}.___SPolygon_e3cip_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));opacity:.2}.___SPolygon_e3cip_gg_.__color_e3cip_gg_{fill:var(--color_e3cip)}.___SPolygon_e3cip_gg_.__pattern_e3cip_gg_.__color_e3cip_gg_{fill:var(--pattern_e3cip);stroke:var(--color_e3cip);stroke-width:1px}.___SPolygonDot_e3cip_gg_{stroke-width:2px;stroke:var(--intergalactic-chart-grid-border,#fff);r:6px;fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245))}.___SPolygonDot_e3cip_gg_.__transparent_e3cip_gg_{opacity:var(--intergalactic-chart-transparent-opacity,.3)}.___SPolygonDot_e3cip_gg_.__color_e3cip_gg_{fill:var(--color_e3cip)}.___SPolygonLine_e3cip_gg_{stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));stroke-width:3;fill:#0000}.___SPolygonLine_e3cip_gg_.__transparent_e3cip_gg_{opacity:var(--intergalactic-chart-transparent-opacity,.3)}.___SPolygonLine_e3cip_gg_.__color_e3cip_gg_{stroke:var(--color_e3cip)}.___SPieRect_e3cip_gg_{outline:none;fill:var(--intergalactic-chart-grid-bar-hover,oklch(.375 .09 242.7/.05))}",
|
|
20
20
|
/*__inner_css_end__*/
|
|
21
|
-
"
|
|
21
|
+
"e3cip_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_e3cip_gg_",
|
|
25
|
+
"__SAxisLine": "___SAxisLine_e3cip_gg_",
|
|
26
|
+
"__SAxisTick": "___SAxisTick_e3cip_gg_",
|
|
27
|
+
"_active": "__active_e3cip_gg_",
|
|
28
|
+
"__SAxisLabel": "___SAxisLabel_e3cip_gg_",
|
|
29
|
+
"_xDirection": "__xDirection_e3cip_gg_",
|
|
30
|
+
"--xDirection": "--xDirection_e3cip",
|
|
31
|
+
"_yDirection": "__yDirection_e3cip_gg_",
|
|
32
|
+
"--yDirection": "--yDirection_e3cip",
|
|
33
|
+
"__SPolygon": "___SPolygon_e3cip_gg_",
|
|
34
|
+
"_color": "__color_e3cip_gg_",
|
|
35
|
+
"--color": "--color_e3cip",
|
|
36
|
+
"_pattern": "__pattern_e3cip_gg_",
|
|
37
|
+
"--pattern": "--pattern_e3cip",
|
|
38
|
+
"__SPolygonDot": "___SPolygonDot_e3cip_gg_",
|
|
39
|
+
"_transparent": "__transparent_e3cip_gg_",
|
|
40
|
+
"__SPolygonLine": "___SPolygonLine_e3cip_gg_",
|
|
41
|
+
"__SPieRect": "___SPieRect_e3cip_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_92v1v_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info,oklch(.23 .009 245))}.___SLine_92v1v_gg_{stroke:var(--intergalactic-text-large-info,oklch(.23 .009 245))}.___SLine_92v1v_gg_.__stroke_92v1v_gg_{stroke:var(--stroke_92v1v)}.___SLine_92v1v_gg_.__transparent_92v1v_gg_{opacity:var(--intergalactic-chart-transparent-opacity,.3)}.___SCap_92v1v_gg_{transition:r .1s}.___SCap_92v1v_gg_.__pattern_92v1v_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:1px}.___SCap_92v1v_gg_.__transparent_92v1v_gg_,.___SIcon_92v1v_gg_.__transparent_92v1v_gg_{opacity:var(--intergalactic-chart-transparent-opacity,.3)}.___SLabel_92v1v_gg_{fill:var(--color_92v1v)}.___SLabel_92v1v_gg_.__transparent_92v1v_gg_{opacity:var(--intergalactic-chart-transparent-opacity,.3)}@media (hover:hover){.___SRadian_92v1v_gg_:hover .___SLabel_92v1v_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_92v1v_gg_{transition:none}}",
|
|
18
18
|
/*__inner_css_end__*/
|
|
19
|
-
"
|
|
19
|
+
"92v1v_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_92v1v_gg_",
|
|
23
|
+
"__SLine": "___SLine_92v1v_gg_",
|
|
24
|
+
"_stroke": "__stroke_92v1v_gg_",
|
|
25
|
+
"--stroke": "--stroke_92v1v",
|
|
26
|
+
"_transparent": "__transparent_92v1v_gg_",
|
|
27
|
+
"__SCap": "___SCap_92v1v_gg_",
|
|
28
|
+
"_pattern": "__pattern_92v1v_gg_",
|
|
29
|
+
"__SIcon": "___SIcon_92v1v_gg_",
|
|
30
|
+
"__SLabel": "___SLabel_92v1v_gg_",
|
|
31
|
+
"--color": "--color_92v1v",
|
|
32
|
+
"__SLineCap": "___SLineCap_92v1v_gg_"
|
|
33
33
|
})
|
|
34
34
|
);
|
|
35
35
|
const baseAngle = -Math.PI / 2;
|
package/lib/esm/Reference.mjs
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import { sstyled, Component } from "@semcore/core";
|
|
3
4
|
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
4
5
|
import React from "react";
|
|
5
6
|
import { SvgElement } from "./component/SvgElement.mjs";
|
|
6
7
|
import createElement from "./createElement.mjs";
|
|
7
|
-
import { scaleOfBandwidth } from "./utils.mjs";
|
|
8
|
+
import { scaleOfBandwidth, getVerticalPathFromRect } from "./utils.mjs";
|
|
8
9
|
/*!__reshadow-styles__:"./style/reference.shadow.css"*/
|
|
9
10
|
const style = (
|
|
10
11
|
/*__reshadow_css_start__*/
|
|
11
12
|
(sstyled.insert(
|
|
12
13
|
/*__inner_css_start__*/
|
|
13
|
-
".
|
|
14
|
+
".___SReferenceLine_supm2_gg_{fill:none;stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .011 234.9))}.___STitle_supm2_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-chart-grid-text-label,#00132466)}.___STitle_supm2_gg_._position_top_supm2_gg_{dominant-baseline:hanging}.___STitle_supm2_gg_._position_bottom_supm2_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_supm2_gg_._position_left_supm2_gg_,.___STitle_supm2_gg_._position_right_supm2_gg_{transform:rotate(-90deg);dominant-baseline:middle;text-anchor:middle}.___SSubTitle_supm2_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-chart-grid-text-label-accent,#000408e6);font-weight:700}@media (color-gamut:p3){.___SSubTitle_supm2_gg_{fill:var(--intergalactic-chart-grid-text-label-accent,oklch(.102 .021 230.9/.9))}}.___SBackground_supm2_gg_{fill:var(--intergalactic-chart-grid-period-bg,oklch(.96 .005 232.5))}",
|
|
14
15
|
/*__inner_css_end__*/
|
|
15
|
-
"
|
|
16
|
+
"supm2_gg_"
|
|
16
17
|
), /*__reshadow_css_end__*/
|
|
17
18
|
{
|
|
18
|
-
"__SReferenceLine": "
|
|
19
|
-
"__STitle": "
|
|
20
|
-
"_position_top": "
|
|
21
|
-
"_position_bottom": "
|
|
22
|
-
"_position_right": "
|
|
23
|
-
"_position_left": "
|
|
24
|
-
"__SSubTitle": "
|
|
25
|
-
"__SBackground": "
|
|
19
|
+
"__SReferenceLine": "___SReferenceLine_supm2_gg_",
|
|
20
|
+
"__STitle": "___STitle_supm2_gg_",
|
|
21
|
+
"_position_top": "_position_top_supm2_gg_",
|
|
22
|
+
"_position_bottom": "_position_bottom_supm2_gg_",
|
|
23
|
+
"_position_right": "_position_right_supm2_gg_",
|
|
24
|
+
"_position_left": "_position_left_supm2_gg_",
|
|
25
|
+
"__SSubTitle": "___SSubTitle_supm2_gg_",
|
|
26
|
+
"__SBackground": "___SBackground_supm2_gg_"
|
|
26
27
|
})
|
|
27
28
|
);
|
|
28
29
|
const STROKE_WIDTH = 1;
|
|
@@ -192,7 +193,7 @@ class ReferenceLineRoot extends Component {
|
|
|
192
193
|
"y2": "100%"
|
|
193
194
|
}), getColorByUse("neutral", resolveColor))), /* @__PURE__ */ React.createElement(SArea, _ref.cn("SArea", {
|
|
194
195
|
"tag": "path",
|
|
195
|
-
"d":
|
|
196
|
+
"d": getVerticalPathFromRect({
|
|
196
197
|
x: line.x1 - area / 2,
|
|
197
198
|
y: line.y2,
|
|
198
199
|
width: area,
|
|
@@ -309,32 +310,18 @@ function getColorByUse(use, resolveColor) {
|
|
|
309
310
|
}
|
|
310
311
|
}
|
|
311
312
|
}
|
|
312
|
-
function
|
|
313
|
-
x,
|
|
314
|
-
y,
|
|
315
|
-
width,
|
|
316
|
-
height
|
|
317
|
-
}) {
|
|
318
|
-
const r = 12;
|
|
319
|
-
const path = `M ${x},${y + r} Q ${x},${y} ${x + r},${y} H ${x + width - r} Q ${x + width},${y} ${x + width},${y + r} V ${y + height} H ${x} Z`;
|
|
320
|
-
return path;
|
|
321
|
-
}
|
|
322
|
-
function Stripes(props) {
|
|
313
|
+
function Area(props) {
|
|
323
314
|
var _ref3;
|
|
324
315
|
const {
|
|
325
316
|
Element: SStripes,
|
|
326
317
|
styles,
|
|
327
|
-
scale,
|
|
328
|
-
position = "left",
|
|
329
|
-
value,
|
|
330
|
-
endValue,
|
|
331
318
|
uid,
|
|
332
319
|
use = "neutral",
|
|
333
320
|
title,
|
|
334
321
|
subTitle,
|
|
335
|
-
resolveColor
|
|
322
|
+
resolveColor,
|
|
323
|
+
positionProps
|
|
336
324
|
} = props;
|
|
337
|
-
const positionProps = rectDirection2props[side2direction[position]](scale, value, endValue);
|
|
338
325
|
const patternId = `${uid}-pattern`;
|
|
339
326
|
const STitle = SvgElement;
|
|
340
327
|
const SSubTitle = SvgElement;
|
|
@@ -348,7 +335,7 @@ function Stripes(props) {
|
|
|
348
335
|
"y2": "100%"
|
|
349
336
|
}), getColorByUse(use, resolveColor))), /* @__PURE__ */ React.createElement(SStripes, _ref3.cn("SStripes", {
|
|
350
337
|
"render": "path",
|
|
351
|
-
"d":
|
|
338
|
+
"d": getVerticalPathFromRect(positionProps),
|
|
352
339
|
"childrenPosition": "inside",
|
|
353
340
|
"fill": `url(#${patternId})`
|
|
354
341
|
})), title && /* @__PURE__ */ React.createElement(STitle, _ref3.cn("STitle", {
|
|
@@ -365,6 +352,20 @@ function Stripes(props) {
|
|
|
365
352
|
"y": textY + 26
|
|
366
353
|
}), subTitle));
|
|
367
354
|
}
|
|
355
|
+
Area.style = style;
|
|
356
|
+
Area.enhance = [uniqueIDEnhancement()];
|
|
357
|
+
function Stripes(props) {
|
|
358
|
+
const {
|
|
359
|
+
scale,
|
|
360
|
+
position = "left",
|
|
361
|
+
value,
|
|
362
|
+
endValue
|
|
363
|
+
} = props;
|
|
364
|
+
const positionProps = rectDirection2props[side2direction[position]](scale, value, endValue);
|
|
365
|
+
return /* @__PURE__ */ React.createElement(ReferenceArea, _extends({}, props, {
|
|
366
|
+
positionProps
|
|
367
|
+
}));
|
|
368
|
+
}
|
|
368
369
|
Stripes.style = style;
|
|
369
370
|
Stripes.enhance = [uniqueIDEnhancement()];
|
|
370
371
|
const ReferenceLine = createElement(ReferenceLineRoot, {
|
|
@@ -372,9 +373,11 @@ const ReferenceLine = createElement(ReferenceLineRoot, {
|
|
|
372
373
|
Background: Stripes,
|
|
373
374
|
Stripes
|
|
374
375
|
});
|
|
376
|
+
const ReferenceArea = createElement(Area);
|
|
375
377
|
const ReferenceBackground = createElement(Stripes);
|
|
376
378
|
const ReferenceStripes = createElement(Stripes);
|
|
377
379
|
export {
|
|
380
|
+
ReferenceArea,
|
|
378
381
|
ReferenceBackground,
|
|
379
382
|
ReferenceLine,
|
|
380
383
|
ReferenceStripes
|
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_gd92g_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));transition-property:cx,cy;transition-duration:var(--duration_gd92g);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_gd92g_gg_:hover{opacity:.8}}.___SScatterPlot_gd92g_gg_.__color_gd92g_gg_{fill:var(--color_gd92g)}.___SScatterPlot_gd92g_gg_.__pattern_gd92g_gg_.__color_gd92g_gg_{fill:var(--pattern_gd92g);stroke:var(--color_gd92g);stroke-width:1px}.___SScatterPlot_gd92g_gg_.__transparent_gd92g_gg_{opacity:var(--intergalactic-chart-transparent-opacity,.3)}.___SValue_gd92g_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50,10px);stroke:var(--intergalactic-chart-palette-order-9,oklch(.53 .157 279.2))}.___SValue_gd92g_gg_.__color_gd92g_gg_{stroke:var(--color_gd92g)}.___SValue_gd92g_gg_.__transparent_gd92g_gg_{opacity:var(--intergalactic-chart-transparent-opacity,.3)}",
|
|
17
17
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
18
|
+
"gd92g_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_gd92g_gg_",
|
|
22
|
+
"_color": "__color_gd92g_gg_",
|
|
23
|
+
"--color": "--color_gd92g",
|
|
24
|
+
"_pattern": "__pattern_gd92g_gg_",
|
|
25
|
+
"--pattern": "--pattern_gd92g",
|
|
26
|
+
"_transparent": "__transparent_gd92g_gg_",
|
|
27
|
+
"__SValue": "___SValue_gd92g_gg_",
|
|
28
|
+
"--duration": "--duration_gd92g"
|
|
29
29
|
})
|
|
30
30
|
);
|
|
31
31
|
class ScatterPlotRoot extends Component {
|
package/lib/esm/StackBar.mjs
CHANGED
|
@@ -94,7 +94,7 @@ class StackBarRoot extends Component {
|
|
|
94
94
|
} = this.asProps;
|
|
95
95
|
const [xScale] = scale;
|
|
96
96
|
const seriesIndex = this.series.findIndex((s) => s.key === x);
|
|
97
|
-
const series = this.series[seriesIndex];
|
|
97
|
+
const series = this.series[seriesIndex] ?? [];
|
|
98
98
|
this.offsetBars[seriesIndex] = this.offsetBars[seriesIndex] ?? [];
|
|
99
99
|
const data = series.map((s) => ({
|
|
100
100
|
...s.data,
|
|
@@ -108,12 +108,17 @@ class StackBarRoot extends Component {
|
|
|
108
108
|
this.offsetBars[seriesIndex][i] = Number(d[x] - (d[XY0] ?? 0)) === 0 ? 0 : absWidth >= wMin ? 0 : d[x] > 0 ? -wMin : wMin;
|
|
109
109
|
return [offset, 0];
|
|
110
110
|
};
|
|
111
|
+
const rBar = series.map((s, i) => {
|
|
112
|
+
return this.series.slice(seriesIndex + 1).some((bar) => {
|
|
113
|
+
return bar[i][0] !== bar[i][1];
|
|
114
|
+
}) ? [s[0] === 0 ? r : 0, 0] : [s[0] === 0 ? r : 0, r];
|
|
115
|
+
});
|
|
111
116
|
return {
|
|
112
117
|
data,
|
|
113
118
|
wMin,
|
|
114
119
|
x0: XY0,
|
|
115
120
|
y,
|
|
116
|
-
r:
|
|
121
|
+
r: rBar,
|
|
117
122
|
groupKey: y,
|
|
118
123
|
offset: calcOffset,
|
|
119
124
|
maxBarSize,
|
package/lib/esm/Tooltip.mjs
CHANGED
|
@@ -12,22 +12,22 @@ const style = (
|
|
|
12
12
|
/*__reshadow_css_start__*/
|
|
13
13
|
(sstyled.insert(
|
|
14
14
|
/*__inner_css_start__*/
|
|
15
|
-
'.
|
|
15
|
+
'.___STooltip_b6dkn_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(.991 .005 232.5/.959));background-color:var(--intergalactic-tooltip-bg-invert,oklch(.23 .009 245));border-radius:var(--intergalactic-popper-rounded,6px);border:1px solid var(--intergalactic-tooltip-border-invert,oklch(.4 .015 245));box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 oklch(.324 .077 242.1/.079));padding:var(--intergalactic-spacing-3x,12px)}.___STitle_b6dkn_gg_{color:var(--intergalactic-text-secondary-invert,#e1f2ffb9);margin-bottom:var(--intergalactic-spacing-2x,8px)}@media (color-gamut:p3){.___STitle_b6dkn_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___SDotGroup_b6dkn_gg_{display:flex;align-items:center}.___SDot_b6dkn_gg_{margin-right:var(--intergalactic-spacing-2x,8px)}.___SDotCircle_b6dkn_gg_.__color_b6dkn_gg_.__lightness_b6dkn_gg_{background-color:var(--color_b6dkn);width:10px;height:10px;border-radius:50%;box-shadow:0 0 0 1px oklch(from var(--color_b6dkn) calc(l + var(--lightness_b6dkn)) c h)}.___SFooter_b6dkn_gg_{background:var(--intergalactic-bg-secondary-invert,oklch(.907 .048 245.2/.129));color:var(--intergalactic-text-secondary-invert,#e1f2ffb9);padding:var(--intergalactic-spacing-1x,4px) var(--intergalactic-spacing-3x,12px);border-radius:0 0 var(--intergalactic-rounded-medium,6px) var(--intergalactic-rounded-medium,6px);margin:var(--intergalactic-spacing-3x,12px) calc(var(--intergalactic-spacing-3x, 12px)*-1) calc(var(--intergalactic-spacing-3x, 12px)*-1)}@media (color-gamut:p3){.___SFooter_b6dkn_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___SDotPattern_b6dkn_gg_{stroke-width:1px;stroke:oklch(from var(--intergalactic-chart-grid-border,#fff) l c h/.5)}',
|
|
16
16
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
17
|
+
"b6dkn_gg_"
|
|
18
18
|
), /*__reshadow_css_end__*/
|
|
19
19
|
{
|
|
20
|
-
"__STooltip": "
|
|
21
|
-
"__STitle": "
|
|
22
|
-
"__SDotGroup": "
|
|
23
|
-
"__SDot": "
|
|
24
|
-
"__SDotCircle": "
|
|
25
|
-
"_color": "
|
|
26
|
-
"_lightness": "
|
|
27
|
-
"--color": "--
|
|
28
|
-
"--lightness": "--
|
|
29
|
-
"__SFooter": "
|
|
30
|
-
"__SDotPattern": "
|
|
20
|
+
"__STooltip": "___STooltip_b6dkn_gg_",
|
|
21
|
+
"__STitle": "___STitle_b6dkn_gg_",
|
|
22
|
+
"__SDotGroup": "___SDotGroup_b6dkn_gg_",
|
|
23
|
+
"__SDot": "___SDot_b6dkn_gg_",
|
|
24
|
+
"__SDotCircle": "___SDotCircle_b6dkn_gg_",
|
|
25
|
+
"_color": "__color_b6dkn_gg_",
|
|
26
|
+
"_lightness": "__lightness_b6dkn_gg_",
|
|
27
|
+
"--color": "--color_b6dkn",
|
|
28
|
+
"--lightness": "--lightness_b6dkn",
|
|
29
|
+
"__SFooter": "___SFooter_b6dkn_gg_",
|
|
30
|
+
"__SDotPattern": "___SDotPattern_b6dkn_gg_"
|
|
31
31
|
})
|
|
32
32
|
);
|
|
33
33
|
const TooltipDotRenderContext = /* @__PURE__ */ React.createContext({
|
|
@@ -243,7 +243,8 @@ function Dot(props) {
|
|
|
243
243
|
}, _ref4)
|
|
244
244
|
}), patterns ? /* @__PURE__ */ React.createElement(SDot, _ref8.cn("SDot", {}), /* @__PURE__ */ React.createElement(SDotPattern, _ref8.cn("SDotPattern", {
|
|
245
245
|
"color": resolveColor(color ?? defaultColor),
|
|
246
|
-
"patternKey": color ?? defaultColor
|
|
246
|
+
"patternKey": color ?? defaultColor,
|
|
247
|
+
"patterns": patterns
|
|
247
248
|
}))) : /* @__PURE__ */ React.createElement(SDot, _ref8.cn("SDot", {}), /* @__PURE__ */ React.createElement(SDotCircle, _ref8.cn("SDotCircle", {
|
|
248
249
|
"color": resolveColor(color ?? defaultColor),
|
|
249
250
|
"lightness": CHART_PALETTE_ORDER_TO_LIGHTNESS[color ?? defaultColor] ?? CHART_PALETTE_ORDER_TO_LIGHTNESS.DEFAULT
|
package/lib/esm/Venn.mjs
CHANGED
|
@@ -16,19 +16,19 @@ const style = (
|
|
|
16
16
|
/*__reshadow_css_start__*/
|
|
17
17
|
(sstyled.insert(
|
|
18
18
|
/*__inner_css_start__*/
|
|
19
|
-
".
|
|
19
|
+
".___SCircle_16e4w_gg_{fill:var(--intergalactic-chart-palette-order-2,oklch(.58 .168 278.2));stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_16e4w);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_16e4w_gg_:hover{fill-opacity:.7}}.___SCircle_16e4w_gg_.__color_16e4w_gg_{fill:var(--color_16e4w)}.___SCircle_16e4w_gg_.__pattern_16e4w_gg_.__color_16e4w_gg_{fill:var(--pattern_16e4w);fill-opacity:.7;stroke:var(--color_16e4w);stroke-width:1px}@media (hover:hover){.___SCircle_16e4w_gg_.__pattern_16e4w_gg_.__color_16e4w_gg_:hover{fill-opacity:.85}}.___SCircle_16e4w_gg_.__transparent_16e4w_gg_{opacity:var(--intergalactic-chart-transparent-opacity,.3)}.___SIntersection_16e4w_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:0}@media (hover:hover){.___SIntersection_16e4w_gg_:hover{fill-opacity:.1}}.___SIntersection_16e4w_gg_.__transparent_16e4w_gg_{opacity:var(--intergalactic-chart-transparent-opacity,.3)}",
|
|
20
20
|
/*__inner_css_end__*/
|
|
21
|
-
"
|
|
21
|
+
"16e4w_gg_"
|
|
22
22
|
), /*__reshadow_css_end__*/
|
|
23
23
|
{
|
|
24
|
-
"__SCircle": "
|
|
25
|
-
"_color": "
|
|
26
|
-
"--color": "--
|
|
27
|
-
"_transparent": "
|
|
28
|
-
"__SIntersection": "
|
|
29
|
-
"--duration": "--
|
|
30
|
-
"_pattern": "
|
|
31
|
-
"--pattern": "--
|
|
24
|
+
"__SCircle": "___SCircle_16e4w_gg_",
|
|
25
|
+
"_color": "__color_16e4w_gg_",
|
|
26
|
+
"--color": "--color_16e4w",
|
|
27
|
+
"_transparent": "__transparent_16e4w_gg_",
|
|
28
|
+
"__SIntersection": "___SIntersection_16e4w_gg_",
|
|
29
|
+
"--duration": "--duration_16e4w",
|
|
30
|
+
"_pattern": "__pattern_16e4w_gg_",
|
|
31
|
+
"--pattern": "--pattern_16e4w"
|
|
32
32
|
})
|
|
33
33
|
);
|
|
34
34
|
class VennRoot extends Component {
|
|
@@ -14,7 +14,7 @@ const DataAccessibilityTable = ({
|
|
|
14
14
|
fromHints.push(...hints.fields.horizontalAxes);
|
|
15
15
|
fromHints.push(...hints.fields.valueAxes);
|
|
16
16
|
fromHints.push(...config.additionalFields);
|
|
17
|
-
fromHints.push(...
|
|
17
|
+
fromHints.push(...Array.from(hints.fields.values));
|
|
18
18
|
fromHints = [...new Set(fromHints)].filter((key) => key in data[0]);
|
|
19
19
|
if (fromHints.length === 0) {
|
|
20
20
|
data.forEach((row) => fromHints.push(...Object.keys(row)));
|
|
@@ -10,12 +10,12 @@ const styles = (
|
|
|
10
10
|
/*__reshadow_css_start__*/
|
|
11
11
|
(sstyled.insert(
|
|
12
12
|
/*__inner_css_start__*/
|
|
13
|
-
".
|
|
13
|
+
".___SPlotA11yModule_j79c9_gg_{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}",
|
|
14
14
|
/*__inner_css_end__*/
|
|
15
|
-
"
|
|
15
|
+
"j79c9_gg_"
|
|
16
16
|
), /*__reshadow_css_end__*/
|
|
17
17
|
{
|
|
18
|
-
"__SPlotA11yModule": "
|
|
18
|
+
"__SPlotA11yModule": "___SPlotA11yModule_j79c9_gg_"
|
|
19
19
|
})
|
|
20
20
|
);
|
|
21
21
|
function PlotA11yModule(props) {
|
|
@@ -13,12 +13,12 @@ const styles = (
|
|
|
13
13
|
/*__reshadow_css_start__*/
|
|
14
14
|
(sstyled.insert(
|
|
15
15
|
/*__inner_css_start__*/
|
|
16
|
-
".
|
|
16
|
+
".___SPlotA11yView_19qkf_gg_{position:relative;display:block;background-color:var(--intergalactic-bg-primary-neutral,oklch(1 0 0));color:var(--intergalactic-text-primary,oklch(.23 .009 245));border:3px solid var(--intergalactic-border-primary,oklch(.277 .066 242.6/.18));font-size:var(--intergalactic-fs-50,10px);z-index:var(--intergalactic-z-index-overlay,500);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_19qkf_gg_ a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x,8px);display:block}.___SPlotA11yView_19qkf_gg_ :is(table,td,th){border:1px solid var(--intergalactic-border-primary,oklch(.277 .066 242.6/.18))}",
|
|
17
17
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
18
|
+
"19qkf_gg_"
|
|
19
19
|
), /*__reshadow_css_end__*/
|
|
20
20
|
{
|
|
21
|
-
"__SPlotA11yView": "
|
|
21
|
+
"__SPlotA11yView": "___SPlotA11yView_19qkf_gg_"
|
|
22
22
|
})
|
|
23
23
|
);
|
|
24
24
|
function PlotA11yView({
|
|
@@ -13,7 +13,7 @@ import DiffUp from "@semcore/icon/DiffUp/m";
|
|
|
13
13
|
import { Text } from "@semcore/typography";
|
|
14
14
|
import React, { Fragment } from "react";
|
|
15
15
|
import "../../index.mjs";
|
|
16
|
-
import { makeDataHintsContainer } from "../../a11y/hints.mjs";
|
|
16
|
+
import { makeDataHintsContainer, makeDataHintsHandlers } from "../../a11y/hints.mjs";
|
|
17
17
|
import { interpolateValue } from "../../utils.mjs";
|
|
18
18
|
import "../ChartLegend/index.mjs";
|
|
19
19
|
import { LegendTable } from "../ChartLegend/LegendTable/LegendTable.mjs";
|
|
@@ -25,22 +25,22 @@ const style = (
|
|
|
25
25
|
/*__reshadow_css_start__*/
|
|
26
26
|
(sstyled.insert(
|
|
27
27
|
/*__inner_css_start__*/
|
|
28
|
-
".
|
|
28
|
+
".___SChart_1enyx_gg_{width:100%;height:100%;min-width:0;min-height:0}.___STooltipChildrenWrapper_1enyx_gg_{display:grid;grid-gap:var(--intergalactic-spacing-2x,8px);gap:var(--intergalactic-spacing-2x,8px);align-items:center}.___STooltipChildrenWrapper_1enyx_gg_._columnsCount_2_1enyx_gg_{grid-template-columns:auto minmax(28px,max-content)}.___STooltipChildrenWrapper_1enyx_gg_._columnsCount_2_1enyx_gg_ .___STooltipDivider_1enyx_gg_{grid-column:span 2}.___STooltipChildrenWrapper_1enyx_gg_._columnsCount_3_1enyx_gg_{grid-template-columns:auto minmax(28px,max-content) minmax(28px,max-content)}.___STooltipChildrenWrapper_1enyx_gg_._columnsCount_3_1enyx_gg_ .___STooltipDivider_1enyx_gg_{grid-column:span 3}.___STooltipDeltaWrapper_1enyx_gg_{gap:var(--intergalactic-spacing-05x,2px);justify-content:flex-end}.___STooltipDeltaWrapper_1enyx_gg_._trend_upward_1enyx_gg_{color:var(--intergalactic-chart-data-success,#00c89d)}@media (color-gamut:p3){.___STooltipDeltaWrapper_1enyx_gg_._trend_upward_1enyx_gg_{color:var(--intergalactic-chart-data-success,oklch(.74 .17 170))}}.___STooltipDeltaWrapper_1enyx_gg_._trend_downward_1enyx_gg_{color:var(--intergalactic-chart-data-critical,#ff7d7d)}@media (color-gamut:p3){.___STooltipDeltaWrapper_1enyx_gg_._trend_downward_1enyx_gg_{color:var(--intergalactic-chart-data-critical,oklch(.74 .19 22))}}.___STooltipDeltaWrapper_1enyx_gg_._trend_stable_1enyx_gg_{color:var(--intergalactic-text-secondary-invert,#e1f2ffb9)}@media (color-gamut:p3){.___STooltipDeltaWrapper_1enyx_gg_._trend_stable_1enyx_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___STooltipDeltaWrapper_1enyx_gg_._deltaPercentGrowthColor_bad_1enyx_gg_._trend_upward_1enyx_gg_{color:var(--intergalactic-chart-data-critical,#ff7d7d)}@media (color-gamut:p3){.___STooltipDeltaWrapper_1enyx_gg_._deltaPercentGrowthColor_bad_1enyx_gg_._trend_upward_1enyx_gg_{color:var(--intergalactic-chart-data-critical,oklch(.74 .19 22))}}.___STooltipDeltaWrapper_1enyx_gg_._deltaPercentGrowthColor_bad_1enyx_gg_._trend_downward_1enyx_gg_{color:var(--intergalactic-chart-data-success,#00c89d)}@media (color-gamut:p3){.___STooltipDeltaWrapper_1enyx_gg_._deltaPercentGrowthColor_bad_1enyx_gg_._trend_downward_1enyx_gg_{color:var(--intergalactic-chart-data-success,oklch(.74 .17 170))}}.___STooltipDeltaWrapper_1enyx_gg_ .___STooltipDeltaIcon_1enyx_gg_{align-self:center}",
|
|
29
29
|
/*__inner_css_end__*/
|
|
30
|
-
"
|
|
30
|
+
"1enyx_gg_"
|
|
31
31
|
), /*__reshadow_css_end__*/
|
|
32
32
|
{
|
|
33
|
-
"__SChart": "
|
|
34
|
-
"__STooltipChildrenWrapper": "
|
|
35
|
-
"_columnsCount_2": "
|
|
36
|
-
"__STooltipDivider": "
|
|
37
|
-
"_columnsCount_3": "
|
|
38
|
-
"__STooltipDeltaWrapper": "
|
|
39
|
-
"_trend_upward": "
|
|
40
|
-
"_trend_downward": "
|
|
41
|
-
"_trend_stable": "
|
|
42
|
-
"_deltaPercentGrowthColor_bad": "
|
|
43
|
-
"__STooltipDeltaIcon": "
|
|
33
|
+
"__SChart": "___SChart_1enyx_gg_",
|
|
34
|
+
"__STooltipChildrenWrapper": "___STooltipChildrenWrapper_1enyx_gg_",
|
|
35
|
+
"_columnsCount_2": "_columnsCount_2_1enyx_gg_",
|
|
36
|
+
"__STooltipDivider": "___STooltipDivider_1enyx_gg_",
|
|
37
|
+
"_columnsCount_3": "_columnsCount_3_1enyx_gg_",
|
|
38
|
+
"__STooltipDeltaWrapper": "___STooltipDeltaWrapper_1enyx_gg_",
|
|
39
|
+
"_trend_upward": "_trend_upward_1enyx_gg_",
|
|
40
|
+
"_trend_downward": "_trend_downward_1enyx_gg_",
|
|
41
|
+
"_trend_stable": "_trend_stable_1enyx_gg_",
|
|
42
|
+
"_deltaPercentGrowthColor_bad": "_deltaPercentGrowthColor_bad_1enyx_gg_",
|
|
43
|
+
"__STooltipDeltaIcon": "___STooltipDeltaIcon_1enyx_gg_"
|
|
44
44
|
})
|
|
45
45
|
);
|
|
46
46
|
const NOT_A_VALUE = "n/a";
|
|
@@ -49,6 +49,7 @@ class AbstractChart extends Component {
|
|
|
49
49
|
super(props);
|
|
50
50
|
_defineProperty(this, "plotPadding", 10);
|
|
51
51
|
_defineProperty(this, "dataHints", makeDataHintsContainer());
|
|
52
|
+
_defineProperty(this, "dataHintsHandlers", makeDataHintsHandlers(this.dataHints));
|
|
52
53
|
_defineProperty(this, "chartRef", /* @__PURE__ */ React.createRef());
|
|
53
54
|
_defineProperty(this, "legendRef", /* @__PURE__ */ React.createRef());
|
|
54
55
|
_defineProperty(this, "observer", void 0);
|
|
@@ -61,6 +62,7 @@ class AbstractChart extends Component {
|
|
|
61
62
|
this.handleMouseEnter = this.handleMouseEnter.bind(this);
|
|
62
63
|
this.handleMouseLeave = this.handleMouseLeave.bind(this);
|
|
63
64
|
this.resolveColor = this.resolveColor.bind(this);
|
|
65
|
+
this.valueFormatter = this.valueFormatter.bind(this);
|
|
64
66
|
this.tooltipValueFormatter = this.tooltipValueFormatter.bind(this);
|
|
65
67
|
this.handleWithTrendChange = this.handleWithTrendChange.bind(this);
|
|
66
68
|
this.state = {
|
|
@@ -72,7 +74,9 @@ class AbstractChart extends Component {
|
|
|
72
74
|
};
|
|
73
75
|
}
|
|
74
76
|
componentDidMount() {
|
|
75
|
-
|
|
77
|
+
if (this.chartRef.current) {
|
|
78
|
+
this.observer?.observe(this.chartRef.current);
|
|
79
|
+
}
|
|
76
80
|
}
|
|
77
81
|
componentDidUpdate(prevProps) {
|
|
78
82
|
if (prevProps.data !== this.props.data || prevProps.legendProps !== this.props.legendProps) {
|
|
@@ -311,7 +315,7 @@ class AbstractChart extends Component {
|
|
|
311
315
|
resolveColor(id, index) {
|
|
312
316
|
return this.props.colorMap?.[id] ?? `chart-palette-order-${index + 1}`;
|
|
313
317
|
}
|
|
314
|
-
|
|
318
|
+
valueFormatter(value) {
|
|
315
319
|
const {
|
|
316
320
|
locale
|
|
317
321
|
} = this.asProps;
|
|
@@ -343,14 +347,14 @@ class AbstractChart extends Component {
|
|
|
343
347
|
tooltipValueFormatter
|
|
344
348
|
} = this.asProps;
|
|
345
349
|
if (tooltipValueFormatter) return tooltipValueFormatter(value);
|
|
346
|
-
return this.
|
|
350
|
+
return this.valueFormatter(value);
|
|
347
351
|
}
|
|
348
352
|
tooltipTitleFormatter(value) {
|
|
349
353
|
const {
|
|
350
354
|
tooltipTitleFormatter
|
|
351
355
|
} = this.asProps;
|
|
352
356
|
if (tooltipTitleFormatter) return tooltipTitleFormatter(value);
|
|
353
|
-
return this.
|
|
357
|
+
return this.valueFormatter(value);
|
|
354
358
|
}
|
|
355
359
|
defaultLegendProps() {
|
|
356
360
|
return {
|
|
@@ -459,10 +463,10 @@ class AbstractChart extends Component {
|
|
|
459
463
|
}
|
|
460
464
|
getPercentDelta(key, index, data) {
|
|
461
465
|
const {
|
|
462
|
-
getPercentDelta:
|
|
466
|
+
getPercentDelta: customGetPercentDelta
|
|
463
467
|
} = this.asProps;
|
|
464
|
-
if (
|
|
465
|
-
const customDelta =
|
|
468
|
+
if (customGetPercentDelta) {
|
|
469
|
+
const customDelta = customGetPercentDelta(key, index, data);
|
|
466
470
|
if (customDelta === null) return null;
|
|
467
471
|
return customDelta;
|
|
468
472
|
}
|
|
@@ -573,12 +577,14 @@ class AbstractChart extends Component {
|
|
|
573
577
|
renderReference() {
|
|
574
578
|
return null;
|
|
575
579
|
}
|
|
580
|
+
get data() {
|
|
581
|
+
return this.asProps.data;
|
|
582
|
+
}
|
|
576
583
|
render() {
|
|
577
584
|
var _ref = this.asProps, _ref5;
|
|
578
585
|
const SChart = Flex;
|
|
579
586
|
const {
|
|
580
587
|
styles,
|
|
581
|
-
data,
|
|
582
588
|
patterns,
|
|
583
589
|
a11yAltTextConfig,
|
|
584
590
|
duration,
|
|
@@ -601,11 +607,12 @@ class AbstractChart extends Component {
|
|
|
601
607
|
"ref": this.chartRef
|
|
602
608
|
}, _ref)
|
|
603
609
|
}), this.renderLegend(), /* @__PURE__ */ React.createElement(Plot, _ref5.cn("Plot", {
|
|
604
|
-
"data": data,
|
|
610
|
+
"data": this.data,
|
|
605
611
|
"scale": [this.xScale, this.yScale],
|
|
606
612
|
"width": plotWidth,
|
|
607
613
|
"height": plotHeight,
|
|
608
614
|
"dataHints": this.dataHints,
|
|
615
|
+
"dataHintsHandlers": this.dataHintsHandlers,
|
|
609
616
|
"a11yAltTextConfig": a11yAltTextConfig,
|
|
610
617
|
"patterns": patterns,
|
|
611
618
|
"duration": duration,
|