@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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { sstyled } from "@semcore/core";
|
|
2
|
+
import { getFocusableIn } from "@semcore/core/lib/utils/focus-lock/getFocusableIn";
|
|
3
|
+
import useEnhancedEffect from "@semcore/core/lib/utils/use/useEnhancedEffect";
|
|
4
|
+
import React from "react";
|
|
5
|
+
/*!__reshadow-styles__:"./hoveredTick.shadow.css"*/
|
|
6
|
+
const styles = (
|
|
7
|
+
/*__reshadow_css_start__*/
|
|
8
|
+
(sstyled.insert(
|
|
9
|
+
/*__inner_css_start__*/
|
|
10
|
+
'.___SHoveredTickWrapper_1xgb9_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_1xgb9_gg_[data-is-first=true]{text-align:left}.___SHoveredTickWrapper_1xgb9_gg_[data-is-last=true]{text-align:right}.___SHoveredTickWrapper_1xgb9_gg_._position_top_1xgb9_gg_ .___SHoveredTickContent_1xgb9_gg_{align-content:end}.___SHoveredTickWrapper_1xgb9_gg_ .___SHoveredTickContent_1xgb9_gg_{height:100%}.___SHoveredTickWrapper_1xgb9_gg_ .___SHoveredTick_1xgb9_gg_{display:inline-block;padding:3px 12px;border-radius:6px;background-color:var(--intergalactic-chart-x-axis-accent-tick,oklch(.96 .005 232.5))}',
|
|
11
|
+
/*__inner_css_end__*/
|
|
12
|
+
"1xgb9_gg_"
|
|
13
|
+
), /*__reshadow_css_end__*/
|
|
14
|
+
{
|
|
15
|
+
"__SHoveredTickWrapper": "___SHoveredTickWrapper_1xgb9_gg_",
|
|
16
|
+
"_position_top": "_position_top_1xgb9_gg_",
|
|
17
|
+
"__SHoveredTickContent": "___SHoveredTickContent_1xgb9_gg_",
|
|
18
|
+
"__SHoveredTick": "___SHoveredTick_1xgb9_gg_"
|
|
19
|
+
})
|
|
20
|
+
);
|
|
21
|
+
const HOVERED_TICK_MARGIN_Y = 8;
|
|
22
|
+
const HOVERED_TICK_PADDING_Y = 3;
|
|
23
|
+
const HOVERED_TICK_PADDING_X = 12;
|
|
24
|
+
function HoveredTick(props) {
|
|
25
|
+
var _ref;
|
|
26
|
+
const {
|
|
27
|
+
tickFormatter,
|
|
28
|
+
value,
|
|
29
|
+
isFirstTick = false,
|
|
30
|
+
isLastTick = false,
|
|
31
|
+
x,
|
|
32
|
+
yRange,
|
|
33
|
+
y,
|
|
34
|
+
size,
|
|
35
|
+
position
|
|
36
|
+
} = props;
|
|
37
|
+
const formattedValue = tickFormatter(value);
|
|
38
|
+
const contentRef = React.useRef(null);
|
|
39
|
+
const isRendered = size?.width !== void 0 && size?.height !== void 0 && position !== null;
|
|
40
|
+
const isMightBeInteractive = formattedValue !== null && typeof formattedValue === "object";
|
|
41
|
+
useEnhancedEffect(() => {
|
|
42
|
+
if (!isRendered || !isMightBeInteractive || !contentRef.current) return;
|
|
43
|
+
getFocusableIn(contentRef.current).forEach((node) => node.setAttribute("tabindex", "-1"));
|
|
44
|
+
}, [value, isRendered, isMightBeInteractive]);
|
|
45
|
+
if (!isRendered) return null;
|
|
46
|
+
const {
|
|
47
|
+
width,
|
|
48
|
+
height
|
|
49
|
+
} = size;
|
|
50
|
+
const SHoveredTickWrapper = "foreignObject";
|
|
51
|
+
const SHoveredTickContent = "div";
|
|
52
|
+
const SHoveredTick = "span";
|
|
53
|
+
const w = width + HOVERED_TICK_PADDING_X * 2;
|
|
54
|
+
let tickX;
|
|
55
|
+
let tickY;
|
|
56
|
+
if (x !== void 0) {
|
|
57
|
+
tickX = isFirstTick ? x : isLastTick ? x - w : x - w / 2;
|
|
58
|
+
tickY = position === "top" ? yRange[1] - height - HOVERED_TICK_MARGIN_Y + HOVERED_TICK_PADDING_Y : yRange[0] + HOVERED_TICK_MARGIN_Y - HOVERED_TICK_PADDING_Y;
|
|
59
|
+
} else {
|
|
60
|
+
tickX = 0 - HOVERED_TICK_PADDING_X;
|
|
61
|
+
tickY = isFirstTick ? y : isLastTick ? y - height : y - height / 2;
|
|
62
|
+
}
|
|
63
|
+
return _ref = sstyled(styles), /* @__PURE__ */ React.createElement(SHoveredTickWrapper, _ref.cn("SHoveredTickWrapper", {
|
|
64
|
+
"x": tickX,
|
|
65
|
+
"y": tickY,
|
|
66
|
+
"width": w,
|
|
67
|
+
"height": height,
|
|
68
|
+
"data-is-first": isFirstTick,
|
|
69
|
+
"data-is-last": isLastTick,
|
|
70
|
+
"data-hovered-tick": true,
|
|
71
|
+
"aria-hidden": "true",
|
|
72
|
+
"position": position
|
|
73
|
+
}), /* @__PURE__ */ React.createElement(SHoveredTickContent, _ref.cn("SHoveredTickContent", {
|
|
74
|
+
"ref": contentRef
|
|
75
|
+
}), /* @__PURE__ */ React.createElement(SHoveredTick, _ref.cn("SHoveredTick", {}), formattedValue)));
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
HoveredTick
|
|
79
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
SHoveredTickWrapper {
|
|
2
|
+
font-size: var(--intergalactic-fs-100, 12px);
|
|
3
|
+
font-variant-numeric: tabular-nums;
|
|
4
|
+
line-height: var(--intergalactic-lh-100, 1.3334);
|
|
5
|
+
color: var(--intergalactic-chart-grid-text-label, oklch(from oklch(0.182 0.045 244.8 / 0.593) l c h / 0.4));
|
|
6
|
+
|
|
7
|
+
text-align: center;
|
|
8
|
+
|
|
9
|
+
&[data-is-first='true'] {
|
|
10
|
+
text-align: start;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&[data-is-last='true'] {
|
|
14
|
+
text-align: end;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&[position='top'] {
|
|
18
|
+
SHoveredTickContent {
|
|
19
|
+
align-content: end;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* FF fix */
|
|
24
|
+
SHoveredTickContent {
|
|
25
|
+
height: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
SHoveredTick {
|
|
29
|
+
display: inline-block;
|
|
30
|
+
padding: 3px 12px;
|
|
31
|
+
border-radius: 6px;
|
|
32
|
+
background-color: var(--intergalactic-chart-x-axis-accent-tick, oklch(0.96 0.005 232.5));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
SArea {
|
|
2
2
|
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
3
3
|
fill-opacity: 0.1;
|
|
4
|
+
stroke: none;
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
SArea[withGradient] {
|
|
@@ -13,17 +14,17 @@ SArea[color] {
|
|
|
13
14
|
|
|
14
15
|
SArea[pattern] {
|
|
15
16
|
fill: var(--pattern);
|
|
16
|
-
fill-opacity: 0.
|
|
17
|
+
fill-opacity: 0.8;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
SArea[transparent] {
|
|
20
|
-
opacity: 0.3;
|
|
21
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
SAreaLine {
|
|
24
25
|
stroke: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
25
26
|
stroke-width: 2;
|
|
26
|
-
fill:
|
|
27
|
+
fill: none;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
SAreaLine[color] {
|
|
@@ -31,7 +32,7 @@ SAreaLine[color] {
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
SAreaLine[transparent] {
|
|
34
|
-
opacity: 0.3;
|
|
35
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
SArea,
|
|
@@ -1,52 +1,57 @@
|
|
|
1
1
|
SBubble {
|
|
2
|
-
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
3
2
|
stroke: var(--intergalactic-chart-grid-border, #ffffff);
|
|
4
3
|
stroke-width: 2px;
|
|
5
4
|
transition-property: cx, cy;
|
|
6
5
|
transition-duration: var(--duration);
|
|
7
6
|
transition-timing-function: ease-in-out;
|
|
8
|
-
opacity: 0.5;
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
fill-opacity: 0.1;
|
|
9
|
+
|
|
10
|
+
&[withPatterns] {
|
|
11
|
+
fill-opacity: 0.5;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
SGroup[visible='false'] {
|
|
16
16
|
display: none;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
SGroup[hovered], SGroup:hover {
|
|
20
|
+
& > SBubble {
|
|
21
|
+
fill-opacity: 0.3;
|
|
22
|
+
|
|
23
|
+
&[withPatterns] {
|
|
24
|
+
fill-opacity: 1;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
& > SCenterHover {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
filter: var(--intergalactic-box-shadow-chart-elevated, drop-shadow(0px 0px 2px oklch(from oklch(0.23 0.009 245) l c h / 0.165)) drop-shadow(0px 1px 2px oklch(from oklch(0.23 0.009 245) l c h / 0.165)));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
19
34
|
SBubble[clickable] {
|
|
20
35
|
cursor: pointer;
|
|
21
36
|
}
|
|
22
37
|
|
|
23
38
|
SBubble[color] {
|
|
24
|
-
fill: var(--color);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
SBubble[pattern][color] {
|
|
28
|
-
fill: var(--pattern);
|
|
29
39
|
stroke: var(--color);
|
|
30
|
-
stroke-width: 1px;
|
|
31
40
|
}
|
|
32
41
|
|
|
33
|
-
SBubble[
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
SCenter {
|
|
38
|
-
text-anchor: middle;
|
|
39
|
-
/* disable-tokens-validator */
|
|
40
|
-
font-size: calc(var(--intergalactic-fs-100, 12px) - 1px);
|
|
41
|
-
stroke: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
42
|
+
SBubble[pattern] {
|
|
43
|
+
fill: var(--pattern);
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
SCenter[color] {
|
|
45
47
|
stroke: var(--color);
|
|
48
|
+
stroke-width: 1px;
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
opacity: 0
|
|
51
|
+
SCenterHover {
|
|
52
|
+
opacity: 0;
|
|
53
|
+
stroke: var(--intergalactic-chart-grid-border, #ffffff);
|
|
54
|
+
stroke-width: 3px;
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
SLabel {
|
|
@@ -65,6 +70,6 @@ SLabel[color] {
|
|
|
65
70
|
fill: var(--color);
|
|
66
71
|
}
|
|
67
72
|
|
|
68
|
-
SLabel[transparent] {
|
|
69
|
-
opacity: 0.3;
|
|
73
|
+
SBubble[transparent], SCenter[transparent], SLabel[transparent] {
|
|
74
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
70
75
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
SPie {
|
|
2
2
|
stroke: var(--intergalactic-chart-grid-border, #ffffff);
|
|
3
3
|
fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
|
|
4
|
+
transition: opacity calc(var(--intergalactic-duration-extra-fast, 100) * 1ms) ease-out;
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
SPie[color] {
|
|
@@ -14,7 +15,12 @@ SPie[pattern][color] {
|
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
SPie[transparent] {
|
|
17
|
-
opacity: 0.3;
|
|
18
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
SLabel {
|
|
22
|
+
overflow-wrap: anywhere;
|
|
23
|
+
pointer-events: none;
|
|
18
24
|
}
|
|
19
25
|
|
|
20
26
|
SEmptyData {
|
|
@@ -24,11 +30,3 @@ SEmptyData {
|
|
|
24
30
|
SEmptyData[color] {
|
|
25
31
|
fill: var(--color);
|
|
26
32
|
}
|
|
27
|
-
|
|
28
|
-
SLabel {
|
|
29
|
-
text-anchor: middle;
|
|
30
|
-
vertical-anchor: middle;
|
|
31
|
-
font-size: var(--intergalactic-fs-200, 14px);
|
|
32
|
-
line-height: var(--intergalactic-lh-200, 1.4286);
|
|
33
|
-
|
|
34
|
-
}
|
|
@@ -1,44 +1,4 @@
|
|
|
1
|
-
SHoverLine, SHoverLine:focus-visible {
|
|
2
|
-
outline: none;
|
|
3
|
-
stroke: var(--intergalactic-chart-grid-x-axis, oklch(0.88 0.011 234.9));
|
|
4
|
-
}
|
|
5
|
-
|
|
6
1
|
SHoverRect, SHoverRect:focus-visible {
|
|
7
2
|
outline: none;
|
|
8
3
|
fill: var(--intergalactic-chart-grid-bar-hover, oklch(0.375 0.09 242.7 / 0.05));
|
|
9
4
|
}
|
|
10
|
-
|
|
11
|
-
SHoveredTickWrapper {
|
|
12
|
-
font-size: var(--intergalactic-fs-100, 12px);
|
|
13
|
-
font-variant-numeric: tabular-nums;
|
|
14
|
-
line-height: var(--intergalactic-lh-100, 1.3334);
|
|
15
|
-
color: var(--intergalactic-chart-grid-text-label, oklch(from oklch(0.182 0.045 244.8 / 0.593) l c h / 0.4));
|
|
16
|
-
|
|
17
|
-
text-align: center;
|
|
18
|
-
|
|
19
|
-
&[data-is-first='true'] {
|
|
20
|
-
text-align: start;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&[data-is-last='true'] {
|
|
24
|
-
text-align: end;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&[position='top'] {
|
|
28
|
-
SHoveredTickContent {
|
|
29
|
-
align-content: end;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* FF fix */
|
|
34
|
-
SHoveredTickContent {
|
|
35
|
-
height: 100%;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
SHoveredTick {
|
|
39
|
-
display: inline-block;
|
|
40
|
-
padding: 3px 12px;
|
|
41
|
-
border-radius: 6px;
|
|
42
|
-
background-color: var(--intergalactic-chart-x-axis-accent-tick, oklch(0.96 0.005 232.5));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -53,7 +53,7 @@ SPolygonDot {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
SPolygonDot[transparent] {
|
|
56
|
-
opacity: 0.3;
|
|
56
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
SPolygonDot[color] {
|
|
@@ -67,7 +67,7 @@ SPolygonLine {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
SPolygonLine[transparent] {
|
|
70
|
-
opacity: 0.3;
|
|
70
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
SPolygonLine[color] {
|
|
@@ -12,7 +12,7 @@ SLine[stroke] {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
SLine[transparent] {
|
|
15
|
-
opacity: 0.3;
|
|
15
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
SCap {
|
|
@@ -25,11 +25,11 @@ SCap[pattern] {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
SCap[transparent] {
|
|
28
|
-
opacity: 0.3;
|
|
28
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
SIcon[transparent] {
|
|
32
|
-
opacity: 0.3;
|
|
32
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
SLabel {
|
|
@@ -37,7 +37,7 @@ SLabel {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
SLabel[transparent] {
|
|
40
|
-
opacity: 0.3;
|
|
40
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
SRadian:hover SLabel {
|
|
@@ -21,7 +21,7 @@ SScatterPlot[pattern][color] {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
SScatterPlot[transparent] {
|
|
24
|
-
opacity: 0.3;
|
|
24
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
SValue {
|
|
@@ -35,5 +35,5 @@ SValue[color] {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
SValue[transparent] {
|
|
38
|
-
opacity: 0.3;
|
|
38
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
39
39
|
}
|
|
@@ -28,7 +28,7 @@ SCircle[pattern][color] {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
SCircle[transparent] {
|
|
31
|
-
opacity: 0.3;
|
|
31
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
SIntersection {
|
|
@@ -42,5 +42,5 @@ SIntersection {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
SIntersection[transparent] {
|
|
45
|
-
opacity: 0.3;
|
|
46
|
-
}
|
|
45
|
+
opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
|
|
46
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import de from "./de.json.mjs";
|
|
1
2
|
import en from "./en.json.mjs";
|
|
2
3
|
import es from "./es.json.mjs";
|
|
3
4
|
import fr from "./fr.json.mjs";
|
|
@@ -12,6 +13,7 @@ import tr from "./tr.json.mjs";
|
|
|
12
13
|
import vi from "./vi.json.mjs";
|
|
13
14
|
import zh from "./zh.json.mjs";
|
|
14
15
|
const localizedMessages = {
|
|
16
|
+
de,
|
|
15
17
|
en,
|
|
16
18
|
es,
|
|
17
19
|
fr,
|
package/lib/esm/utils.mjs
CHANGED
|
@@ -20,7 +20,9 @@ const invert = (scale, value) => {
|
|
|
20
20
|
};
|
|
21
21
|
const definedNullData = (x, y) => (plot) => plot[x] !== null && plot[y] !== null;
|
|
22
22
|
const definedData = (x, y) => (plot) => plot[x] !== null && plot[x] !== void 0 && plot[y] !== null && plot[y] !== void 0;
|
|
23
|
-
const scaleOfBandwidth = (scale, value) =>
|
|
23
|
+
const scaleOfBandwidth = (scale, value) => {
|
|
24
|
+
return "bandwidth" in scale ? scale(value) + scale.bandwidth() / 2 : typeof value !== "string" ? scale(value) : 0;
|
|
25
|
+
};
|
|
24
26
|
const minMax = (data, key) => {
|
|
25
27
|
if (typeof key === "string") {
|
|
26
28
|
return extent(data, (d) => d[key]);
|
|
@@ -180,34 +182,45 @@ const getScatterPlotRadius = (valueKey) => {
|
|
|
180
182
|
return valueKey !== void 0 ? 12 : 5.5;
|
|
181
183
|
};
|
|
182
184
|
const calculateBubbleDomain = (data, key, range) => {
|
|
183
|
-
|
|
184
|
-
if (item[key] - item.value < acc.min) {
|
|
185
|
-
acc.min = item[key] - item.value;
|
|
186
|
-
acc.value = item.value;
|
|
187
|
-
}
|
|
188
|
-
return acc;
|
|
189
|
-
}, {
|
|
190
|
-
value: data[0].value,
|
|
191
|
-
min: data[0][key] - data[0].value
|
|
192
|
-
}).value;
|
|
193
|
-
const maxestValue = data.reduce((acc, item) => {
|
|
194
|
-
if (item.value + item[key] > acc.max) {
|
|
195
|
-
acc.max = item.value + item.x;
|
|
196
|
-
acc.value = item.value;
|
|
197
|
-
}
|
|
198
|
-
return acc;
|
|
199
|
-
}, {
|
|
200
|
-
value: data[0].value,
|
|
201
|
-
max: data[0].value + data[0][key]
|
|
202
|
-
}).value;
|
|
203
|
-
let [min, max] = minMax(data, key);
|
|
204
|
-
const pixelRatio = Math.abs(max - min) / Math.abs(range[0] - range[1]);
|
|
185
|
+
if (!data.length) return [0, 1];
|
|
205
186
|
const valueScale = getBubbleChartValueScale(data, "value");
|
|
206
|
-
const
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
187
|
+
const axisLengthPx = Math.abs(range[1] - range[0]);
|
|
188
|
+
const points = data.map((dataItem) => ({
|
|
189
|
+
x: dataItem[key],
|
|
190
|
+
r: valueScale(dataItem.value) + 1
|
|
191
|
+
// stroke-width/2
|
|
192
|
+
}));
|
|
193
|
+
if (points.length === 1) {
|
|
194
|
+
const x = points[0].x;
|
|
195
|
+
return [Math.floor(x - 1), Math.ceil(x + 1)];
|
|
196
|
+
}
|
|
197
|
+
let maxK = 0;
|
|
198
|
+
for (let i = 0; i < points.length; i++) {
|
|
199
|
+
for (let j = 0; j < points.length; j++) {
|
|
200
|
+
if (i === j) continue;
|
|
201
|
+
const dx = points[j].x - points[i].x;
|
|
202
|
+
if (dx <= 0) continue;
|
|
203
|
+
const availablePx = axisLengthPx - points[i].r - points[j].r;
|
|
204
|
+
if (availablePx <= 0) continue;
|
|
205
|
+
const k = dx / availablePx;
|
|
206
|
+
if (k > maxK) {
|
|
207
|
+
maxK = k;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (maxK === 0) {
|
|
212
|
+
const x = points[0].x;
|
|
213
|
+
return [Math.floor(x - 1), Math.ceil(x + 1)];
|
|
214
|
+
}
|
|
215
|
+
let domainMin = Infinity;
|
|
216
|
+
let domainMax = -Infinity;
|
|
217
|
+
for (const point of points) {
|
|
218
|
+
const min = point.x - point.r * maxK;
|
|
219
|
+
const max = point.x + point.r * maxK;
|
|
220
|
+
if (min < domainMin) domainMin = min;
|
|
221
|
+
if (max > domainMax) domainMax = max;
|
|
222
|
+
}
|
|
223
|
+
return [Math.floor(domainMin), Math.ceil(domainMax)];
|
|
211
224
|
};
|
|
212
225
|
const PlotEventEmitter = EventEmitter;
|
|
213
226
|
function getDataOfType(data, type, y) {
|
|
@@ -227,18 +240,52 @@ function getDataOfType(data, type, y) {
|
|
|
227
240
|
});
|
|
228
241
|
return result;
|
|
229
242
|
}
|
|
243
|
+
function getVerticalPathFromRect(data, radius = 6) {
|
|
244
|
+
const {
|
|
245
|
+
x,
|
|
246
|
+
y,
|
|
247
|
+
width,
|
|
248
|
+
height
|
|
249
|
+
} = data;
|
|
250
|
+
const r = radius;
|
|
251
|
+
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`;
|
|
252
|
+
return path;
|
|
253
|
+
}
|
|
254
|
+
function getHorizontalPathFromRect(data, radius = 6) {
|
|
255
|
+
const {
|
|
256
|
+
x,
|
|
257
|
+
y,
|
|
258
|
+
width,
|
|
259
|
+
height
|
|
260
|
+
} = data;
|
|
261
|
+
const r = radius;
|
|
262
|
+
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 - r} Q ${x + width},${y + height} ${x + width - r},${y + height} H ${x + r} Q ${x},${y + height} ${x},${y + height - 6} Z`;
|
|
263
|
+
return path;
|
|
264
|
+
}
|
|
265
|
+
function formatValue(locale, value) {
|
|
266
|
+
if (value instanceof Date) {
|
|
267
|
+
return new Intl.DateTimeFormat(locale ?? "en", {
|
|
268
|
+
day: "numeric",
|
|
269
|
+
month: "short"
|
|
270
|
+
}).format(value);
|
|
271
|
+
}
|
|
272
|
+
return value;
|
|
273
|
+
}
|
|
230
274
|
export {
|
|
231
275
|
PlotEventEmitter,
|
|
232
276
|
calculateBubbleDomain,
|
|
233
277
|
definedData,
|
|
234
278
|
definedNullData,
|
|
235
279
|
eventToPoint,
|
|
280
|
+
formatValue,
|
|
236
281
|
getBubbleChartValueScale,
|
|
237
282
|
getChartDefaultColorName,
|
|
238
283
|
getDataOfType,
|
|
284
|
+
getHorizontalPathFromRect,
|
|
239
285
|
getIndexFromData,
|
|
240
286
|
getNullData,
|
|
241
287
|
getScatterPlotRadius,
|
|
288
|
+
getVerticalPathFromRect,
|
|
242
289
|
interpolateValue,
|
|
243
290
|
invert,
|
|
244
291
|
measureText,
|
package/lib/types/Bar.d.ts
CHANGED
|
@@ -88,6 +88,9 @@ type BackgroundContext = Context & {
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
declare const Bar: IntergalacticD3Component<'rect', BarProps, BarContext> & {
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated. Since the new design was applied, you shouldn't use it anymore for Bar charts.
|
|
93
|
+
*/
|
|
91
94
|
Background: IntergalacticD3Component<'rect', BackgroundProps, BackgroundContext>;
|
|
92
95
|
};
|
|
93
96
|
|
package/lib/types/Bubble.d.ts
CHANGED
|
@@ -26,7 +26,10 @@ export type BubbleProps = Context & {
|
|
|
26
26
|
* @default 500
|
|
27
27
|
*/
|
|
28
28
|
duration?: number;
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Enables element transparency
|
|
31
|
+
* @deprecated You shouldn't use it in the redesign.
|
|
32
|
+
*/
|
|
30
33
|
transparent?: boolean;
|
|
31
34
|
/** Enables charts patterns that enhances charts accessibility */
|
|
32
35
|
patterns?: PatternsConfig;
|
package/lib/types/Donut.d.ts
CHANGED
|
@@ -43,6 +43,9 @@ export type HorizontalBarProps = Context & {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
declare const HorizontalBar: IntergalacticD3Component<'path', HorizontalBarProps, BarContext> & {
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated. Since the new design was applied, you shouldn't use it anymore for Bar charts.
|
|
48
|
+
*/
|
|
46
49
|
Background: IntergalacticD3Component<'rect', BackgroundProps, Context>;
|
|
47
50
|
};
|
|
48
51
|
|