@semcore/d3-chart 18.0.0-prerelease.6 → 18.1.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.
Files changed (133) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/lib/cjs/Area.js +12 -12
  3. package/lib/cjs/Axis.js +15 -15
  4. package/lib/cjs/Bar.js +16 -16
  5. package/lib/cjs/Bubble.js +14 -14
  6. package/lib/cjs/CompactHorizontalBar.js +16 -16
  7. package/lib/cjs/Donut.js +13 -11
  8. package/lib/cjs/Donut.js.map +1 -1
  9. package/lib/cjs/Dots.js +12 -12
  10. package/lib/cjs/HorizontalBar.js +16 -16
  11. package/lib/cjs/Hover.js +15 -17
  12. package/lib/cjs/Hover.js.map +1 -1
  13. package/lib/cjs/Line.js +9 -9
  14. package/lib/cjs/Pattern.js +6 -6
  15. package/lib/cjs/Plot.js +2 -2
  16. package/lib/cjs/Radar.js +19 -19
  17. package/lib/cjs/RadialTree.js +12 -12
  18. package/lib/cjs/Reference.js +148 -55
  19. package/lib/cjs/Reference.js.map +1 -1
  20. package/lib/cjs/ScatterPlot.js +9 -9
  21. package/lib/cjs/Tooltip.js +12 -12
  22. package/lib/cjs/Venn.js +9 -9
  23. package/lib/cjs/a11y/PlotA11yModule.js +2 -2
  24. package/lib/cjs/a11y/PlotA11yView.js +2 -2
  25. package/lib/cjs/component/Chart/AbstractChart.js +16 -13
  26. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  27. package/lib/cjs/component/Chart/CigaretteChart.js +1 -1
  28. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  29. package/lib/cjs/component/Chart/LineChart.js +25 -0
  30. package/lib/cjs/component/Chart/LineChart.js.map +1 -1
  31. package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
  32. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +22 -14
  33. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  34. package/lib/cjs/component/ChartLegend/LegendFlex/legend-flex.shadow.css +12 -0
  35. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +19 -17
  36. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  37. package/lib/cjs/component/ChartLegend/LegendItem/legend-item.shadow.css +12 -0
  38. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +11 -11
  39. package/lib/cjs/style/abstract-chart.shadow.css +2 -2
  40. package/lib/cjs/style/area.shadow.css +1 -1
  41. package/lib/cjs/style/donut.shadow.css +1 -1
  42. package/lib/cjs/style/line.shadow.css +2 -2
  43. package/lib/cjs/style/plot.shadow.css +4 -0
  44. package/lib/cjs/style/reference.shadow.css +7 -10
  45. package/lib/cjs/types/Reference.d.js.map +1 -1
  46. package/lib/es6/Area.js +12 -12
  47. package/lib/es6/Axis.js +15 -15
  48. package/lib/es6/Bar.js +16 -16
  49. package/lib/es6/Bubble.js +14 -14
  50. package/lib/es6/CompactHorizontalBar.js +16 -16
  51. package/lib/es6/Donut.js +13 -11
  52. package/lib/es6/Donut.js.map +1 -1
  53. package/lib/es6/Dots.js +12 -12
  54. package/lib/es6/HorizontalBar.js +16 -16
  55. package/lib/es6/Hover.js +15 -17
  56. package/lib/es6/Hover.js.map +1 -1
  57. package/lib/es6/Line.js +9 -9
  58. package/lib/es6/Pattern.js +6 -6
  59. package/lib/es6/Plot.js +2 -2
  60. package/lib/es6/Radar.js +19 -19
  61. package/lib/es6/RadialTree.js +12 -12
  62. package/lib/es6/Reference.js +148 -55
  63. package/lib/es6/Reference.js.map +1 -1
  64. package/lib/es6/ScatterPlot.js +9 -9
  65. package/lib/es6/Tooltip.js +12 -12
  66. package/lib/es6/Venn.js +9 -9
  67. package/lib/es6/a11y/PlotA11yModule.js +2 -2
  68. package/lib/es6/a11y/PlotA11yView.js +2 -2
  69. package/lib/es6/component/Chart/AbstractChart.js +16 -13
  70. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  71. package/lib/es6/component/Chart/CigaretteChart.js +1 -1
  72. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  73. package/lib/es6/component/Chart/LineChart.js +26 -1
  74. package/lib/es6/component/Chart/LineChart.js.map +1 -1
  75. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  76. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +22 -14
  77. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  78. package/lib/es6/component/ChartLegend/LegendFlex/legend-flex.shadow.css +12 -0
  79. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +19 -17
  80. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  81. package/lib/es6/component/ChartLegend/LegendItem/legend-item.shadow.css +12 -0
  82. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +11 -11
  83. package/lib/es6/style/abstract-chart.shadow.css +2 -2
  84. package/lib/es6/style/area.shadow.css +1 -1
  85. package/lib/es6/style/donut.shadow.css +1 -1
  86. package/lib/es6/style/line.shadow.css +2 -2
  87. package/lib/es6/style/plot.shadow.css +4 -0
  88. package/lib/es6/style/reference.shadow.css +7 -10
  89. package/lib/es6/types/Reference.d.js.map +1 -1
  90. package/lib/esm/Area.mjs +13 -13
  91. package/lib/esm/Axis.mjs +16 -16
  92. package/lib/esm/Bar.mjs +17 -17
  93. package/lib/esm/Bubble.mjs +15 -15
  94. package/lib/esm/CompactHorizontalBar.mjs +17 -17
  95. package/lib/esm/Donut.mjs +14 -12
  96. package/lib/esm/Dots.mjs +13 -13
  97. package/lib/esm/HorizontalBar.mjs +17 -17
  98. package/lib/esm/Hover.mjs +16 -18
  99. package/lib/esm/Line.mjs +10 -10
  100. package/lib/esm/Pattern.mjs +7 -7
  101. package/lib/esm/Plot.mjs +3 -3
  102. package/lib/esm/Radar.mjs +20 -20
  103. package/lib/esm/RadialTree.mjs +13 -13
  104. package/lib/esm/Reference.mjs +145 -56
  105. package/lib/esm/ScatterPlot.mjs +10 -10
  106. package/lib/esm/Tooltip.mjs +13 -13
  107. package/lib/esm/Venn.mjs +10 -10
  108. package/lib/esm/a11y/PlotA11yModule.mjs +3 -3
  109. package/lib/esm/a11y/PlotA11yView.mjs +3 -3
  110. package/lib/esm/component/Chart/AbstractChart.mjs +17 -14
  111. package/lib/esm/component/Chart/CigaretteChart.mjs +1 -1
  112. package/lib/esm/component/Chart/LineChart.mjs +26 -0
  113. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +23 -15
  114. package/lib/esm/component/ChartLegend/LegendFlex/legend-flex.shadow.css +12 -0
  115. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +20 -18
  116. package/lib/esm/component/ChartLegend/LegendItem/legend-item.shadow.css +12 -0
  117. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +12 -12
  118. package/lib/esm/style/abstract-chart.shadow.css +2 -2
  119. package/lib/esm/style/area.shadow.css +1 -1
  120. package/lib/esm/style/donut.shadow.css +1 -1
  121. package/lib/esm/style/line.shadow.css +2 -2
  122. package/lib/esm/style/plot.shadow.css +4 -0
  123. package/lib/esm/style/reference.shadow.css +7 -10
  124. package/lib/types/Reference.d.ts +21 -4
  125. package/lib/types/component/Chart/AbstractChart.d.ts +1 -0
  126. package/lib/types/component/Chart/AbstractChart.d.ts.map +1 -1
  127. package/lib/types/component/Chart/LineChart.d.ts.map +1 -1
  128. package/lib/types/component/Chart/LineChart.type.d.ts +36 -0
  129. package/lib/types/component/Chart/LineChart.type.d.ts.map +1 -1
  130. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts.map +1 -1
  131. package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts.map +1 -1
  132. package/package.json +17 -16
  133. package/vite.config.ts +1 -0
package/lib/esm/Hover.mjs CHANGED
@@ -14,17 +14,17 @@ const style = (
14
14
  /*__reshadow_css_start__*/
15
15
  (sstyled.insert(
16
16
  /*__inner_css_start__*/
17
- '.___SHoverLine_zj7nr_gg_,.___SHoverLine_zj7nr_gg_:focus-visible{outline:none;stroke:var(--intergalactic-chart-grid-x-axis,oklch(.88 .011 234.9))}.___SHoverRect_zj7nr_gg_,.___SHoverRect_zj7nr_gg_:focus-visible{outline:none;fill:var(--intergalactic-chart-grid-bar-hover,oklch(.375 .09 242.7/.05))}.___SHoveredTickWrapper_zj7nr_gg_{font-size:var(--intergalactic-fs-100,12px);font-feature-settings:"tnum";font-variant-numeric:tabular-nums;line-height:var(--intergalactic-lh-100,1.3334);color:var(--intergalactic-chart-grid-text-label,#00132466);text-align:center}.___SHoveredTickWrapper_zj7nr_gg_[data-is-first=true]{text-align:left}.___SHoveredTickWrapper_zj7nr_gg_[data-is-last=true]{text-align:right}.___SHoveredTickWrapper_zj7nr_gg_._position_top_zj7nr_gg_ .___SHoveredTickContent_zj7nr_gg_{align-content:end}.___SHoveredTickWrapper_zj7nr_gg_ .___SHoveredTickContent_zj7nr_gg_{height:100%}.___SHoveredTickWrapper_zj7nr_gg_ .___SHoveredTick_zj7nr_gg_{display:inline-block;padding:3px 12px;border-radius:6px;background-color:var(--intergalactic-chart-x-axis-accent-tick,oklch(.96 .005 232.5))}',
17
+ '.___SHoverLine_1tzev_gg_,.___SHoverLine_1tzev_gg_:focus-visible{outline:none;stroke:var(--intergalactic-chart-grid-x-axis,oklch(.88 .011 234.9))}.___SHoverRect_1tzev_gg_,.___SHoverRect_1tzev_gg_:focus-visible{outline:none;fill:var(--intergalactic-chart-grid-bar-hover,oklch(.375 .09 242.7/.05))}.___SHoveredTickWrapper_1tzev_gg_{font-size:var(--intergalactic-fs-100,12px);font-feature-settings:"tnum";font-variant-numeric:tabular-nums;line-height:var(--intergalactic-lh-100,1.3334);color:var(--intergalactic-chart-grid-text-label,#00132466);text-align:center}.___SHoveredTickWrapper_1tzev_gg_[data-is-first=true]{text-align:left}.___SHoveredTickWrapper_1tzev_gg_[data-is-last=true]{text-align:right}.___SHoveredTickWrapper_1tzev_gg_._position_top_1tzev_gg_ .___SHoveredTickContent_1tzev_gg_{align-content:end}.___SHoveredTickWrapper_1tzev_gg_ .___SHoveredTickContent_1tzev_gg_{height:100%}.___SHoveredTickWrapper_1tzev_gg_ .___SHoveredTick_1tzev_gg_{display:inline-block;padding:3px 12px;border-radius:6px;background-color:var(--intergalactic-chart-x-axis-accent-tick,oklch(.96 .005 232.5))}',
18
18
  /*__inner_css_end__*/
19
- "zj7nr_gg_"
19
+ "1tzev_gg_"
20
20
  ), /*__reshadow_css_end__*/
21
21
  {
22
- "__SHoverLine": "___SHoverLine_zj7nr_gg_",
23
- "__SHoverRect": "___SHoverRect_zj7nr_gg_",
24
- "__SHoveredTickWrapper": "___SHoveredTickWrapper_zj7nr_gg_",
25
- "_position_top": "_position_top_zj7nr_gg_",
26
- "__SHoveredTickContent": "___SHoveredTickContent_zj7nr_gg_",
27
- "__SHoveredTick": "___SHoveredTick_zj7nr_gg_"
22
+ "__SHoverLine": "___SHoverLine_1tzev_gg_",
23
+ "__SHoverRect": "___SHoverRect_1tzev_gg_",
24
+ "__SHoveredTickWrapper": "___SHoveredTickWrapper_1tzev_gg_",
25
+ "_position_top": "_position_top_1tzev_gg_",
26
+ "__SHoveredTickContent": "___SHoveredTickContent_1tzev_gg_",
27
+ "__SHoveredTick": "___SHoveredTick_1tzev_gg_"
28
28
  })
29
29
  );
30
30
  const STROKE_WIDTH = 1;
@@ -294,18 +294,15 @@ function HoveredTick(props) {
294
294
  size,
295
295
  position
296
296
  } = props;
297
- const contentRef = React.useRef(null);
298
- const [interactive, setInteractive] = React.useState(false);
299
297
  const formattedValue = tickFormatter(value);
298
+ const contentRef = React.useRef(null);
299
+ const isRendered = size?.width !== void 0 && size?.height !== void 0 && position !== null;
300
300
  const isMightBeInteractive = formattedValue !== null && typeof formattedValue === "object";
301
301
  useEnhancedEffect(() => {
302
- if (!isMightBeInteractive || !contentRef.current) {
303
- setInteractive(false);
304
- return;
305
- }
306
- setInteractive(getFocusableIn(contentRef.current).length > 0);
307
- });
308
- if (size?.width === void 0 || size?.height === void 0 || position === null) return null;
302
+ if (!isRendered || !isMightBeInteractive || !contentRef.current) return;
303
+ getFocusableIn(contentRef.current).forEach((node) => node.setAttribute("tabindex", "-1"));
304
+ }, [value, isRendered, isMightBeInteractive]);
305
+ if (!isRendered) return null;
309
306
  const {
310
307
  width,
311
308
  height
@@ -324,7 +321,8 @@ function HoveredTick(props) {
324
321
  "data-is-first": isFirstTick,
325
322
  "data-is-last": isLastTick,
326
323
  "position": position,
327
- "aria-hidden": interactive ? void 0 : true
324
+ "data-hovered-tick": true,
325
+ "aria-hidden": "true"
328
326
  }), /* @__PURE__ */ React.createElement(SHoveredTickContent, _ref5.cn("SHoveredTickContent", {
329
327
  "ref": contentRef
330
328
  }), /* @__PURE__ */ React.createElement(SHoveredTick, _ref5.cn("SHoveredTick", {}), formattedValue)));
package/lib/esm/Line.mjs CHANGED
@@ -17,19 +17,19 @@ const style = (
17
17
  /*__reshadow_css_start__*/
18
18
  (sstyled.insert(
19
19
  /*__inner_css_start__*/
20
- ".___SLine_foqqi_gg_{fill:#0000;stroke-width:2;stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));transition-property:d;transition-duration:var(--duration_foqqi);transition-timing-function:ease-in-out}.___SLine_foqqi_gg_.__color_foqqi_gg_{stroke:var(--color_foqqi)}.___SLine_foqqi_gg_.__hide_foqqi_gg_{display:none}.___SLine_foqqi_gg_.__transparent_foqqi_gg_{opacity:.3}.___SNull_foqqi_gg_{fill:#0000;stroke:var(--intergalactic-chart-palette-order-null,oklch(.9 .009 234));stroke-dasharray:4}.___SNull_foqqi_gg_.__hide_foqqi_gg_{display:none}.___SLineArea_foqqi_gg_{transition-property:d;transition-duration:var(--duration_foqqi);transition-timing-function:ease-in-out;opacity:.3;fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245))}.___SLineArea_foqqi_gg_.__color_foqqi_gg_{fill:var(--color_foqqi)}",
20
+ ".___SLine_tx3eh_gg_{fill:#0000;stroke-width:2;stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));transition-property:d;transition-duration:var(--duration_tx3eh);transition-timing-function:ease-in-out}.___SLine_tx3eh_gg_.__color_tx3eh_gg_{stroke:var(--color_tx3eh)}.___SLine_tx3eh_gg_.__hide_tx3eh_gg_{display:none}.___SLine_tx3eh_gg_.__transparent_tx3eh_gg_{opacity:.3}.___SNull_tx3eh_gg_{fill:#0000;stroke:var(--intergalactic-chart-data-null,oklch(.9 .009 234));stroke-dasharray:4}.___SNull_tx3eh_gg_.__hide_tx3eh_gg_{display:none}.___SLineArea_tx3eh_gg_{transition-property:d;transition-duration:var(--duration_tx3eh);transition-timing-function:ease-in-out;opacity:.1;fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245))}.___SLineArea_tx3eh_gg_.__color_tx3eh_gg_{fill:var(--color_tx3eh)}",
21
21
  /*__inner_css_end__*/
22
- "foqqi_gg_"
22
+ "tx3eh_gg_"
23
23
  ), /*__reshadow_css_end__*/
24
24
  {
25
- "__SLine": "___SLine_foqqi_gg_",
26
- "--duration": "--duration_foqqi",
27
- "_color": "__color_foqqi_gg_",
28
- "--color": "--color_foqqi",
29
- "_hide": "__hide_foqqi_gg_",
30
- "_transparent": "__transparent_foqqi_gg_",
31
- "__SNull": "___SNull_foqqi_gg_",
32
- "__SLineArea": "___SLineArea_foqqi_gg_"
25
+ "__SLine": "___SLine_tx3eh_gg_",
26
+ "--duration": "--duration_tx3eh",
27
+ "_color": "__color_tx3eh_gg_",
28
+ "--color": "--color_tx3eh",
29
+ "_hide": "__hide_tx3eh_gg_",
30
+ "_transparent": "__transparent_tx3eh_gg_",
31
+ "__SNull": "___SNull_tx3eh_gg_",
32
+ "__SLineArea": "___SLineArea_tx3eh_gg_"
33
33
  })
34
34
  );
35
35
  class LineRoot extends Component {
@@ -7,16 +7,16 @@ const style = (
7
7
  /*__reshadow_css_start__*/
8
8
  (sstyled.insert(
9
9
  /*__inner_css_start__*/
10
- ".___SLinearGradient_1yi6g_gg_ .___SStopFrom_1yi6g_gg_{stop-color:var(--violet-300_1yi6g,#c08eff)}@media (color-gamut:p3){.___SLinearGradient_1yi6g_gg_ .___SStopFrom_1yi6g_gg_{stop-color:var(--violet-300_1yi6g,oklch(.74 .17 303))}}.___SLinearGradient_1yi6g_gg_ .___SStopTo_1yi6g_gg_{stop-color:var(--green-100_1yi6g,oklch(.9 .11 175))}",
10
+ ".___SLinearGradient_1f31y_gg_ .___SStopFrom_1f31y_gg_{stop-color:var(--violet-300_1f31y,#c08eff)}@media (color-gamut:p3){.___SLinearGradient_1f31y_gg_ .___SStopFrom_1f31y_gg_{stop-color:var(--violet-300_1f31y,oklch(.74 .17 303))}}.___SLinearGradient_1f31y_gg_ .___SStopTo_1f31y_gg_{stop-color:var(--green-100_1f31y,oklch(.9 .11 175))}",
11
11
  /*__inner_css_end__*/
12
- "1yi6g_gg_"
12
+ "1f31y_gg_"
13
13
  ), /*__reshadow_css_end__*/
14
14
  {
15
- "__SLinearGradient": "___SLinearGradient_1yi6g_gg_",
16
- "__SStopFrom": "___SStopFrom_1yi6g_gg_",
17
- "--violet-300": "--violet-300_1yi6g",
18
- "__SStopTo": "___SStopTo_1yi6g_gg_",
19
- "--green-100": "--green-100_1yi6g"
15
+ "__SLinearGradient": "___SLinearGradient_1f31y_gg_",
16
+ "__SStopFrom": "___SStopFrom_1f31y_gg_",
17
+ "--violet-300": "--violet-300_1f31y",
18
+ "__SStopTo": "___SStopTo_1f31y_gg_",
19
+ "--green-100": "--green-100_1f31y"
20
20
  })
21
21
  );
22
22
  const defaultDasharrays = ["4 4", "8 8", "2 4", "4 8", "8 2", "8 4", "12 4", "2 2"];
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
- ".___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,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)}",
18
+ ".___SPlot_sccu4_gg_{overflow:hidden}.___SPlot_sccu4_gg_:focus{outline:none}.___SPlot_sccu4_gg_:active{outline:0;-webkit-text-decoration:none;text-decoration:none}foreignObject[data-aria-only]{pointer-events:none}.___SPlot_sccu4_gg_:has([data-tick-content] :focus-visible) foreignObject[data-hovered-tick]{visibility:hidden}.___SPlot_sccu4_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
- "1f5de_gg_"
20
+ "sccu4_gg_"
21
21
  ), /*__reshadow_css_end__*/
22
22
  {
23
- "__SPlot": "___SPlot_1f5de_gg_"
23
+ "__SPlot": "___SPlot_sccu4_gg_"
24
24
  })
25
25
  );
26
26
  class PlotRoot extends Component {
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
- ".___SAxisLine_1i4jk_gg_,.___SAxisTick_1i4jk_gg_,.___SAxis_1i4jk_gg_{stroke:var(--intergalactic-chart-grid-line,oklch(.7 .021 242));stroke-width:1;fill:#0000}.___SAxisLine_1i4jk_gg_,.___SAxisTick_1i4jk_gg_{stroke-dasharray:2}.___SAxisLine_1i4jk_gg_.__active_1i4jk_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .011 234.9))}.___SAxisLabel_1i4jk_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_1i4jk_gg_.__xDirection_1i4jk_gg_{text-anchor:var(--xDirection_1i4jk)}.___SAxisLabel_1i4jk_gg_.__yDirection_1i4jk_gg_{dominant-baseline:var(--yDirection_1i4jk)}.___SPolygon_1i4jk_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));opacity:.2}.___SPolygon_1i4jk_gg_.__color_1i4jk_gg_{fill:var(--color_1i4jk)}.___SPolygon_1i4jk_gg_.__pattern_1i4jk_gg_.__color_1i4jk_gg_{fill:var(--pattern_1i4jk);stroke:var(--color_1i4jk);stroke-width:1px}.___SPolygonDot_1i4jk_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_1i4jk_gg_.__transparent_1i4jk_gg_{opacity:.3}.___SPolygonDot_1i4jk_gg_.__color_1i4jk_gg_{fill:var(--color_1i4jk)}.___SPolygonLine_1i4jk_gg_{stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));stroke-width:3;fill:#0000}.___SPolygonLine_1i4jk_gg_.__transparent_1i4jk_gg_{opacity:.3}.___SPolygonLine_1i4jk_gg_.__color_1i4jk_gg_{stroke:var(--color_1i4jk)}.___SPieRect_1i4jk_gg_{outline:none;fill:var(--intergalactic-chart-grid-bar-hover,oklch(.375 .09 242.7/.05))}",
19
+ ".___SAxisLine_1twag_gg_,.___SAxisTick_1twag_gg_,.___SAxis_1twag_gg_{stroke:var(--intergalactic-chart-grid-line,oklch(.7 .021 242));stroke-width:1;fill:#0000}.___SAxisLine_1twag_gg_,.___SAxisTick_1twag_gg_{stroke-dasharray:2}.___SAxisLine_1twag_gg_.__active_1twag_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .011 234.9))}.___SAxisLabel_1twag_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_1twag_gg_.__xDirection_1twag_gg_{text-anchor:var(--xDirection_1twag)}.___SAxisLabel_1twag_gg_.__yDirection_1twag_gg_{dominant-baseline:var(--yDirection_1twag)}.___SPolygon_1twag_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));opacity:.2}.___SPolygon_1twag_gg_.__color_1twag_gg_{fill:var(--color_1twag)}.___SPolygon_1twag_gg_.__pattern_1twag_gg_.__color_1twag_gg_{fill:var(--pattern_1twag);stroke:var(--color_1twag);stroke-width:1px}.___SPolygonDot_1twag_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_1twag_gg_.__transparent_1twag_gg_{opacity:.3}.___SPolygonDot_1twag_gg_.__color_1twag_gg_{fill:var(--color_1twag)}.___SPolygonLine_1twag_gg_{stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));stroke-width:3;fill:#0000}.___SPolygonLine_1twag_gg_.__transparent_1twag_gg_{opacity:.3}.___SPolygonLine_1twag_gg_.__color_1twag_gg_{stroke:var(--color_1twag)}.___SPieRect_1twag_gg_{outline:none;fill:var(--intergalactic-chart-grid-bar-hover,oklch(.375 .09 242.7/.05))}",
20
20
  /*__inner_css_end__*/
21
- "1i4jk_gg_"
21
+ "1twag_gg_"
22
22
  ), /*__reshadow_css_end__*/
23
23
  {
24
- "__SAxis": "___SAxis_1i4jk_gg_",
25
- "__SAxisLine": "___SAxisLine_1i4jk_gg_",
26
- "__SAxisTick": "___SAxisTick_1i4jk_gg_",
27
- "_active": "__active_1i4jk_gg_",
28
- "__SAxisLabel": "___SAxisLabel_1i4jk_gg_",
29
- "_xDirection": "__xDirection_1i4jk_gg_",
30
- "--xDirection": "--xDirection_1i4jk",
31
- "_yDirection": "__yDirection_1i4jk_gg_",
32
- "--yDirection": "--yDirection_1i4jk",
33
- "__SPolygon": "___SPolygon_1i4jk_gg_",
34
- "_color": "__color_1i4jk_gg_",
35
- "--color": "--color_1i4jk",
36
- "_pattern": "__pattern_1i4jk_gg_",
37
- "--pattern": "--pattern_1i4jk",
38
- "__SPolygonDot": "___SPolygonDot_1i4jk_gg_",
39
- "_transparent": "__transparent_1i4jk_gg_",
40
- "__SPolygonLine": "___SPolygonLine_1i4jk_gg_",
41
- "__SPieRect": "___SPieRect_1i4jk_gg_"
24
+ "__SAxis": "___SAxis_1twag_gg_",
25
+ "__SAxisLine": "___SAxisLine_1twag_gg_",
26
+ "__SAxisTick": "___SAxisTick_1twag_gg_",
27
+ "_active": "__active_1twag_gg_",
28
+ "__SAxisLabel": "___SAxisLabel_1twag_gg_",
29
+ "_xDirection": "__xDirection_1twag_gg_",
30
+ "--xDirection": "--xDirection_1twag",
31
+ "_yDirection": "__yDirection_1twag_gg_",
32
+ "--yDirection": "--yDirection_1twag",
33
+ "__SPolygon": "___SPolygon_1twag_gg_",
34
+ "_color": "__color_1twag_gg_",
35
+ "--color": "--color_1twag",
36
+ "_pattern": "__pattern_1twag_gg_",
37
+ "--pattern": "--pattern_1twag",
38
+ "__SPolygonDot": "___SPolygonDot_1twag_gg_",
39
+ "_transparent": "__transparent_1twag_gg_",
40
+ "__SPolygonLine": "___SPolygonLine_1twag_gg_",
41
+ "__SPieRect": "___SPieRect_1twag_gg_"
42
42
  })
43
43
  );
44
44
  const clampAngle = (angle) => {
@@ -14,22 +14,22 @@ const style = (
14
14
  /*__reshadow_css_start__*/
15
15
  (sstyled.insert(
16
16
  /*__inner_css_start__*/
17
- ".___SRadian_1u9s6_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info,oklch(.23 .009 245))}.___SLine_1u9s6_gg_{stroke:var(--intergalactic-text-large-info,oklch(.23 .009 245))}.___SLine_1u9s6_gg_.__stroke_1u9s6_gg_{stroke:var(--stroke_1u9s6)}.___SLine_1u9s6_gg_.__transparent_1u9s6_gg_{opacity:.3}.___SCap_1u9s6_gg_{transition:r .1s}.___SCap_1u9s6_gg_.__pattern_1u9s6_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:1px}.___SCap_1u9s6_gg_.__transparent_1u9s6_gg_,.___SIcon_1u9s6_gg_.__transparent_1u9s6_gg_{opacity:.3}.___SLabel_1u9s6_gg_{fill:var(--color_1u9s6)}.___SLabel_1u9s6_gg_.__transparent_1u9s6_gg_{opacity:.3}@media (hover:hover){.___SRadian_1u9s6_gg_:hover .___SLabel_1u9s6_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_1u9s6_gg_{transition:none}}",
17
+ ".___SRadian_lr7wy_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info,oklch(.23 .009 245))}.___SLine_lr7wy_gg_{stroke:var(--intergalactic-text-large-info,oklch(.23 .009 245))}.___SLine_lr7wy_gg_.__stroke_lr7wy_gg_{stroke:var(--stroke_lr7wy)}.___SLine_lr7wy_gg_.__transparent_lr7wy_gg_{opacity:.3}.___SCap_lr7wy_gg_{transition:r .1s}.___SCap_lr7wy_gg_.__pattern_lr7wy_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:1px}.___SCap_lr7wy_gg_.__transparent_lr7wy_gg_,.___SIcon_lr7wy_gg_.__transparent_lr7wy_gg_{opacity:.3}.___SLabel_lr7wy_gg_{fill:var(--color_lr7wy)}.___SLabel_lr7wy_gg_.__transparent_lr7wy_gg_{opacity:.3}@media (hover:hover){.___SRadian_lr7wy_gg_:hover .___SLabel_lr7wy_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_lr7wy_gg_{transition:none}}",
18
18
  /*__inner_css_end__*/
19
- "1u9s6_gg_"
19
+ "lr7wy_gg_"
20
20
  ), /*__reshadow_css_end__*/
21
21
  {
22
- "__SRadian": "___SRadian_1u9s6_gg_",
23
- "__SLine": "___SLine_1u9s6_gg_",
24
- "_stroke": "__stroke_1u9s6_gg_",
25
- "--stroke": "--stroke_1u9s6",
26
- "_transparent": "__transparent_1u9s6_gg_",
27
- "__SCap": "___SCap_1u9s6_gg_",
28
- "_pattern": "__pattern_1u9s6_gg_",
29
- "__SIcon": "___SIcon_1u9s6_gg_",
30
- "__SLabel": "___SLabel_1u9s6_gg_",
31
- "--color": "--color_1u9s6",
32
- "__SLineCap": "___SLineCap_1u9s6_gg_"
22
+ "__SRadian": "___SRadian_lr7wy_gg_",
23
+ "__SLine": "___SLine_lr7wy_gg_",
24
+ "_stroke": "__stroke_lr7wy_gg_",
25
+ "--stroke": "--stroke_lr7wy",
26
+ "_transparent": "__transparent_lr7wy_gg_",
27
+ "__SCap": "___SCap_lr7wy_gg_",
28
+ "_pattern": "__pattern_lr7wy_gg_",
29
+ "__SIcon": "___SIcon_lr7wy_gg_",
30
+ "__SLabel": "___SLabel_lr7wy_gg_",
31
+ "--color": "--color_lr7wy",
32
+ "__SLineCap": "___SLineCap_lr7wy_gg_"
33
33
  })
34
34
  );
35
35
  const baseAngle = -Math.PI / 2;
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { sstyled, Component } from "@semcore/core";
3
3
  import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
4
4
  import React from "react";
5
+ import { SvgElement } from "./component/SvgElement.mjs";
5
6
  import createElement from "./createElement.mjs";
6
7
  import { scaleOfBandwidth } from "./utils.mjs";
7
8
  /*!__reshadow-styles__:"./style/reference.shadow.css"*/
@@ -9,22 +10,19 @@ const style = (
9
10
  /*__reshadow_css_start__*/
10
11
  (sstyled.insert(
11
12
  /*__inner_css_start__*/
12
- ".___SReferenceLine_103dp_gg_{fill:none;stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .011 234.9))}.___STitle_103dp_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-chart-grid-text-label,#00132466);transform-origin:var(--transform-origin_103dp)}.___STitle_103dp_gg_._position_top_103dp_gg_{text-anchor:middle}.___STitle_103dp_gg_._position_bottom_103dp_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_103dp_gg_._position_left_103dp_gg_,.___STitle_103dp_gg_._position_right_103dp_gg_{transform:rotate(-90deg);dominant-baseline:middle;text-anchor:middle}.___SBackground_103dp_gg_{fill:var(--intergalactic-chart-grid-period-bg,oklch(.96 .005 232.5))}.___SStripes_103dp_gg_{fill:var(--fill_103dp)}.___SStripesPatternPath_103dp_gg_{stroke:var(--intergalactic-chart-grid-period-pattern,oklch(.95 .006 232.7));stroke-width:1px}",
13
+ ".___SReferenceLine_1mtsj_gg_{fill:none;stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .011 234.9))}.___STitle_1mtsj_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-chart-grid-text-label,#00132466)}.___STitle_1mtsj_gg_._position_top_1mtsj_gg_{dominant-baseline:hanging}.___STitle_1mtsj_gg_._position_bottom_1mtsj_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_1mtsj_gg_._position_left_1mtsj_gg_,.___STitle_1mtsj_gg_._position_right_1mtsj_gg_{transform:rotate(-90deg);dominant-baseline:middle;text-anchor:middle}.___SSubTitle_1mtsj_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_1mtsj_gg_{fill:var(--intergalactic-chart-grid-text-label-accent,oklch(.102 .021 230.9/.9))}}.___SBackground_1mtsj_gg_{fill:var(--intergalactic-chart-grid-period-bg,oklch(.96 .005 232.5))}",
13
14
  /*__inner_css_end__*/
14
- "103dp_gg_"
15
+ "1mtsj_gg_"
15
16
  ), /*__reshadow_css_end__*/
16
17
  {
17
- "__SReferenceLine": "___SReferenceLine_103dp_gg_",
18
- "__STitle": "___STitle_103dp_gg_",
19
- "--transform-origin": "--transform-origin_103dp",
20
- "_position_top": "_position_top_103dp_gg_",
21
- "_position_bottom": "_position_bottom_103dp_gg_",
22
- "_position_right": "_position_right_103dp_gg_",
23
- "_position_left": "_position_left_103dp_gg_",
24
- "__SBackground": "___SBackground_103dp_gg_",
25
- "__SStripes": "___SStripes_103dp_gg_",
26
- "--fill": "--fill_103dp",
27
- "__SStripesPatternPath": "___SStripesPatternPath_103dp_gg_"
18
+ "__SReferenceLine": "___SReferenceLine_1mtsj_gg_",
19
+ "__STitle": "___STitle_1mtsj_gg_",
20
+ "_position_top": "_position_top_1mtsj_gg_",
21
+ "_position_bottom": "_position_bottom_1mtsj_gg_",
22
+ "_position_right": "_position_right_1mtsj_gg_",
23
+ "_position_left": "_position_left_1mtsj_gg_",
24
+ "__SSubTitle": "___SSubTitle_1mtsj_gg_",
25
+ "__SBackground": "___SBackground_1mtsj_gg_"
28
26
  })
29
27
  );
30
28
  const STROKE_WIDTH = 1;
@@ -165,6 +163,7 @@ class ReferenceLineRoot extends Component {
165
163
  render() {
166
164
  var _ref;
167
165
  const SReferenceLine = this.Element;
166
+ const SArea = SvgElement;
168
167
  const {
169
168
  title,
170
169
  scale,
@@ -172,7 +171,9 @@ class ReferenceLineRoot extends Component {
172
171
  value,
173
172
  color,
174
173
  resolveColor,
175
- styles
174
+ styles,
175
+ uid,
176
+ area
176
177
  } = this.asProps;
177
178
  const positionProps = lineDirection2props[side2direction[position]];
178
179
  const {
@@ -180,7 +181,25 @@ class ReferenceLineRoot extends Component {
180
181
  notchLast,
181
182
  ...line
182
183
  } = positionProps(scale, value);
183
- return _ref = sstyled(styles), /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SReferenceLine, _ref.cn("SReferenceLine", {
184
+ const patternId = `${uid}-pattern`;
185
+ return _ref = sstyled(styles), /* @__PURE__ */ React.createElement(React.Fragment, null, area && /* @__PURE__ */ React.createElement("g", _ref.cn("g", {
186
+ "aria-hidden": true
187
+ }), /* @__PURE__ */ React.createElement("defs", _ref.cn("defs", {}), /* @__PURE__ */ React.createElement("linearGradient", _ref.cn("linearGradient", {
188
+ "id": patternId,
189
+ "x1": "0%",
190
+ "y1": "0%",
191
+ "x2": "0%",
192
+ "y2": "100%"
193
+ }), getColorByUse("neutral", resolveColor))), /* @__PURE__ */ React.createElement(SArea, _ref.cn("SArea", {
194
+ "tag": "path",
195
+ "d": getReferenceAreaPath({
196
+ x: line.x1 - area / 2,
197
+ y: line.y2,
198
+ width: area,
199
+ height: line.y1 - line.y2
200
+ }),
201
+ "fill": `url(#${patternId})`
202
+ }))), /* @__PURE__ */ React.createElement(SReferenceLine, _ref.cn("SReferenceLine", {
184
203
  "render": "g",
185
204
  "__excludeProps": ["data", "scale", "format", "value", "color"],
186
205
  "stroke": resolveColor(color)
@@ -188,7 +207,7 @@ class ReferenceLineRoot extends Component {
188
207
  ...notchFirst
189
208
  })), /* @__PURE__ */ React.createElement("line", _ref.cn("line", {
190
209
  ...line
191
- })), /* @__PURE__ */ React.createElement("line", _ref.cn("line", {
210
+ })), !area && /* @__PURE__ */ React.createElement("line", _ref.cn("line", {
192
211
  ...notchLast
193
212
  }))), title && /* @__PURE__ */ React.createElement(ReferenceLine.Title, null, title));
194
213
  }
@@ -198,6 +217,7 @@ _defineProperty(ReferenceLineRoot, "style", style);
198
217
  _defineProperty(ReferenceLineRoot, "defaultProps", {
199
218
  position: "left"
200
219
  });
220
+ _defineProperty(ReferenceLineRoot, "enhance", [uniqueIDEnhancement()]);
201
221
  function Title(props) {
202
222
  var _ref2;
203
223
  const {
@@ -225,31 +245,82 @@ function Title(props) {
225
245
  "y": y
226
246
  }));
227
247
  }
228
- function Background(props) {
229
- var _ref3;
230
- const {
231
- Element: SBackground,
232
- styles,
233
- scale,
234
- position = "left",
235
- value,
236
- endValue
237
- } = props;
238
- const positionProps = rectDirection2props[side2direction[position]];
239
- return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SBackground, _ref3.cn("SBackground", {
240
- "render": "rect",
241
- "childrenPosition": "inside",
242
- ...positionProps(scale, value, endValue)
243
- }));
248
+ function getColorByUse(use, resolveColor) {
249
+ switch (use) {
250
+ case "bad": {
251
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("stop", {
252
+ offset: "0%",
253
+ stopColor: resolveColor("red-50"),
254
+ stopOpacity: "0.8"
255
+ }), /* @__PURE__ */ React.createElement("stop", {
256
+ offset: "12.68%",
257
+ stopColor: resolveColor("red-50"),
258
+ stopOpacity: "0.5"
259
+ }), /* @__PURE__ */ React.createElement("stop", {
260
+ offset: "87.98%",
261
+ stopColor: resolveColor("red-50"),
262
+ stopOpacity: "0.0"
263
+ }));
264
+ }
265
+ case "good": {
266
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("stop", {
267
+ offset: "0%",
268
+ stopColor: resolveColor("green-50"),
269
+ stopOpacity: "0.8"
270
+ }), /* @__PURE__ */ React.createElement("stop", {
271
+ offset: "12.68%",
272
+ stopColor: resolveColor("green-50"),
273
+ stopOpacity: "0.4"
274
+ }), /* @__PURE__ */ React.createElement("stop", {
275
+ offset: "87.98%",
276
+ stopColor: resolveColor("green-50"),
277
+ stopOpacity: "0.0"
278
+ }));
279
+ }
280
+ case "insight": {
281
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("stop", {
282
+ offset: "0%",
283
+ stopColor: resolveColor("violet-50"),
284
+ stopOpacity: "0.9"
285
+ }), /* @__PURE__ */ React.createElement("stop", {
286
+ offset: "12.68%",
287
+ stopColor: resolveColor("violet-50"),
288
+ stopOpacity: "0.5"
289
+ }), /* @__PURE__ */ React.createElement("stop", {
290
+ offset: "87.98%",
291
+ stopColor: resolveColor("violet-50"),
292
+ stopOpacity: "0.0"
293
+ }));
294
+ }
295
+ default: {
296
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("stop", {
297
+ offset: "0%",
298
+ stopColor: resolveColor("gray-50"),
299
+ stopOpacity: "0.9"
300
+ }), /* @__PURE__ */ React.createElement("stop", {
301
+ offset: "41.83%",
302
+ stopColor: resolveColor("gray-50"),
303
+ stopOpacity: "0.5"
304
+ }), /* @__PURE__ */ React.createElement("stop", {
305
+ offset: "87.98%",
306
+ stopColor: resolveColor("gray-50"),
307
+ stopOpacity: "0.0"
308
+ }));
309
+ }
310
+ }
311
+ }
312
+ function getReferenceAreaPath({
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;
244
321
  }
245
- Background.style = style;
246
- const diagonalGap = 8;
247
- const gap = Math.sqrt(diagonalGap ** 2 + diagonalGap ** 2);
248
- const gap12 = gap * (1 / 2);
249
- const gap32 = gap * (3 / 2);
250
- const path = `M-${gap},-${gap12} L${gap},${gap32} M-${gap12},-${gap} L${gap32},${gap}`;
251
322
  function Stripes(props) {
252
- var _ref4;
323
+ var _ref3;
253
324
  const {
254
325
  Element: SStripes,
255
326
  styles,
@@ -257,33 +328,51 @@ function Stripes(props) {
257
328
  position = "left",
258
329
  value,
259
330
  endValue,
260
- uid
331
+ uid,
332
+ use = "neutral",
333
+ title,
334
+ subTitle,
335
+ resolveColor
261
336
  } = props;
262
- const SStripesPatternPath = "path";
263
- const positionProps = rectDirection2props[side2direction[position]];
337
+ const positionProps = rectDirection2props[side2direction[position]](scale, value, endValue);
264
338
  const patternId = `${uid}-pattern`;
265
- return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement("g", _ref4.cn("g", {}), /* @__PURE__ */ React.createElement(SStripes, _ref4.cn("SStripes", {
266
- "render": "rect",
267
- "childrenPosition": "inside",
268
- "fill": `url(#${patternId})`,
269
- ...positionProps(scale, value, endValue)
270
- })), /* @__PURE__ */ React.createElement("pattern", _ref4.cn("pattern", {
339
+ const STitle = SvgElement;
340
+ const SSubTitle = SvgElement;
341
+ const textX = positionProps.x + 6;
342
+ const textY = positionProps.y + 6;
343
+ return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement("g", _ref3.cn("g", {}), /* @__PURE__ */ React.createElement("defs", _ref3.cn("defs", {}), /* @__PURE__ */ React.createElement("linearGradient", _ref3.cn("linearGradient", {
271
344
  "id": patternId,
272
- "patternUnits": "userSpaceOnUse",
273
- "width": gap,
274
- "height": gap
275
- }), /* @__PURE__ */ React.createElement(SStripesPatternPath, _ref4.cn("SStripesPatternPath", {
276
- "d": path
277
- }))));
345
+ "x1": "0%",
346
+ "y1": "0%",
347
+ "x2": "0%",
348
+ "y2": "100%"
349
+ }), getColorByUse(use, resolveColor))), /* @__PURE__ */ React.createElement(SStripes, _ref3.cn("SStripes", {
350
+ "render": "path",
351
+ "d": getReferenceAreaPath(positionProps),
352
+ "childrenPosition": "inside",
353
+ "fill": `url(#${patternId})`
354
+ })), title && /* @__PURE__ */ React.createElement(STitle, _ref3.cn("STitle", {
355
+ "tag": "text",
356
+ "childrenPosition": "inside",
357
+ "position": "top",
358
+ "x": textX,
359
+ "y": textY
360
+ }), title), subTitle && /* @__PURE__ */ React.createElement(SSubTitle, _ref3.cn("SSubTitle", {
361
+ "tag": "text",
362
+ "childrenPosition": "inside",
363
+ "position": "top",
364
+ "x": textX,
365
+ "y": textY + 26
366
+ }), subTitle));
278
367
  }
279
368
  Stripes.style = style;
280
369
  Stripes.enhance = [uniqueIDEnhancement()];
281
370
  const ReferenceLine = createElement(ReferenceLineRoot, {
282
371
  Title,
283
- Background,
372
+ Background: Stripes,
284
373
  Stripes
285
374
  });
286
- const ReferenceBackground = createElement(Background);
375
+ const ReferenceBackground = createElement(Stripes);
287
376
  const ReferenceStripes = createElement(Stripes);
288
377
  export {
289
378
  ReferenceBackground,
@@ -13,19 +13,19 @@ const style = (
13
13
  /*__reshadow_css_start__*/
14
14
  (sstyled.insert(
15
15
  /*__inner_css_start__*/
16
- ".___SScatterPlot_v4rqi_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));transition-property:cx,cy;transition-duration:var(--duration_v4rqi);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_v4rqi_gg_:hover{opacity:.8}}.___SScatterPlot_v4rqi_gg_.__color_v4rqi_gg_{fill:var(--color_v4rqi)}.___SScatterPlot_v4rqi_gg_.__pattern_v4rqi_gg_.__color_v4rqi_gg_{fill:var(--pattern_v4rqi);stroke:var(--color_v4rqi);stroke-width:1px}.___SScatterPlot_v4rqi_gg_.__transparent_v4rqi_gg_{opacity:.3}.___SValue_v4rqi_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50,10px);stroke:var(--intergalactic-chart-palette-order-9,oklch(.53 .157 279.2))}.___SValue_v4rqi_gg_.__color_v4rqi_gg_{stroke:var(--color_v4rqi)}.___SValue_v4rqi_gg_.__transparent_v4rqi_gg_{opacity:.3}",
16
+ ".___SScatterPlot_hebt_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));transition-property:cx,cy;transition-duration:var(--duration_hebt);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_hebt_gg_:hover{opacity:.8}}.___SScatterPlot_hebt_gg_.__color_hebt_gg_{fill:var(--color_hebt)}.___SScatterPlot_hebt_gg_.__pattern_hebt_gg_.__color_hebt_gg_{fill:var(--pattern_hebt);stroke:var(--color_hebt);stroke-width:1px}.___SScatterPlot_hebt_gg_.__transparent_hebt_gg_{opacity:.3}.___SValue_hebt_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50,10px);stroke:var(--intergalactic-chart-palette-order-9,oklch(.53 .157 279.2))}.___SValue_hebt_gg_.__color_hebt_gg_{stroke:var(--color_hebt)}.___SValue_hebt_gg_.__transparent_hebt_gg_{opacity:.3}",
17
17
  /*__inner_css_end__*/
18
- "v4rqi_gg_"
18
+ "hebt_gg_"
19
19
  ), /*__reshadow_css_end__*/
20
20
  {
21
- "__SScatterPlot": "___SScatterPlot_v4rqi_gg_",
22
- "_color": "__color_v4rqi_gg_",
23
- "--color": "--color_v4rqi",
24
- "_pattern": "__pattern_v4rqi_gg_",
25
- "--pattern": "--pattern_v4rqi",
26
- "_transparent": "__transparent_v4rqi_gg_",
27
- "__SValue": "___SValue_v4rqi_gg_",
28
- "--duration": "--duration_v4rqi"
21
+ "__SScatterPlot": "___SScatterPlot_hebt_gg_",
22
+ "_color": "__color_hebt_gg_",
23
+ "--color": "--color_hebt",
24
+ "_pattern": "__pattern_hebt_gg_",
25
+ "--pattern": "--pattern_hebt",
26
+ "_transparent": "__transparent_hebt_gg_",
27
+ "__SValue": "___SValue_hebt_gg_",
28
+ "--duration": "--duration_hebt"
29
29
  })
30
30
  );
31
31
  class ScatterPlotRoot extends Component {
@@ -12,22 +12,22 @@ const style = (
12
12
  /*__reshadow_css_start__*/
13
13
  (sstyled.insert(
14
14
  /*__inner_css_start__*/
15
- '.___STooltip_1bv2y_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_1bv2y_gg_{color:var(--intergalactic-text-secondary-invert,#e1f2ffb9);margin-bottom:var(--intergalactic-spacing-2x,8px)}@media (color-gamut:p3){.___STitle_1bv2y_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___SDotGroup_1bv2y_gg_{display:flex;align-items:center}.___SDot_1bv2y_gg_{margin-right:var(--intergalactic-spacing-2x,8px)}.___SDotCircle_1bv2y_gg_.__color_1bv2y_gg_.__lightness_1bv2y_gg_{background-color:var(--color_1bv2y);width:10px;height:10px;border-radius:50%;box-shadow:0 0 0 1px oklch(from var(--color_1bv2y) calc(l + var(--lightness_1bv2y)) c h)}.___SFooter_1bv2y_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_1bv2y_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___SDotPattern_1bv2y_gg_{stroke-width:1px;stroke:oklch(from var(--intergalactic-chart-grid-border,#fff) l c h/.5)}',
15
+ '.___STooltip_1dc7v_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_1dc7v_gg_{color:var(--intergalactic-text-secondary-invert,#e1f2ffb9);margin-bottom:var(--intergalactic-spacing-2x,8px)}@media (color-gamut:p3){.___STitle_1dc7v_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___SDotGroup_1dc7v_gg_{display:flex;align-items:center}.___SDot_1dc7v_gg_{margin-right:var(--intergalactic-spacing-2x,8px)}.___SDotCircle_1dc7v_gg_.__color_1dc7v_gg_.__lightness_1dc7v_gg_{background-color:var(--color_1dc7v);width:10px;height:10px;border-radius:50%;box-shadow:0 0 0 1px oklch(from var(--color_1dc7v) calc(l + var(--lightness_1dc7v)) c h)}.___SFooter_1dc7v_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_1dc7v_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___SDotPattern_1dc7v_gg_{stroke-width:1px;stroke:oklch(from var(--intergalactic-chart-grid-border,#fff) l c h/.5)}',
16
16
  /*__inner_css_end__*/
17
- "1bv2y_gg_"
17
+ "1dc7v_gg_"
18
18
  ), /*__reshadow_css_end__*/
19
19
  {
20
- "__STooltip": "___STooltip_1bv2y_gg_",
21
- "__STitle": "___STitle_1bv2y_gg_",
22
- "__SDotGroup": "___SDotGroup_1bv2y_gg_",
23
- "__SDot": "___SDot_1bv2y_gg_",
24
- "__SDotCircle": "___SDotCircle_1bv2y_gg_",
25
- "_color": "__color_1bv2y_gg_",
26
- "_lightness": "__lightness_1bv2y_gg_",
27
- "--color": "--color_1bv2y",
28
- "--lightness": "--lightness_1bv2y",
29
- "__SFooter": "___SFooter_1bv2y_gg_",
30
- "__SDotPattern": "___SDotPattern_1bv2y_gg_"
20
+ "__STooltip": "___STooltip_1dc7v_gg_",
21
+ "__STitle": "___STitle_1dc7v_gg_",
22
+ "__SDotGroup": "___SDotGroup_1dc7v_gg_",
23
+ "__SDot": "___SDot_1dc7v_gg_",
24
+ "__SDotCircle": "___SDotCircle_1dc7v_gg_",
25
+ "_color": "__color_1dc7v_gg_",
26
+ "_lightness": "__lightness_1dc7v_gg_",
27
+ "--color": "--color_1dc7v",
28
+ "--lightness": "--lightness_1dc7v",
29
+ "__SFooter": "___SFooter_1dc7v_gg_",
30
+ "__SDotPattern": "___SDotPattern_1dc7v_gg_"
31
31
  })
32
32
  );
33
33
  const TooltipDotRenderContext = /* @__PURE__ */ React.createContext({