@ledgerhq/lumen-ui-react 0.1.56 → 0.1.57
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/ai-rules/RULES.md +5 -4
- package/dist/lib/Components/visualization/Axis/XAxis/XAxis.d.ts +3 -0
- package/dist/lib/Components/visualization/Axis/XAxis/XAxis.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/XAxis/XAxis.js +85 -0
- package/dist/lib/Components/visualization/Axis/XAxis/index.d.ts +3 -0
- package/dist/lib/Components/visualization/Axis/XAxis/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/XAxis/types.d.ts +9 -0
- package/dist/lib/Components/visualization/Axis/XAxis/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/YAxis/YAxis.d.ts +3 -0
- package/dist/lib/Components/visualization/Axis/YAxis/YAxis.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/YAxis/YAxis.js +85 -0
- package/dist/lib/Components/visualization/Axis/YAxis/index.d.ts +3 -0
- package/dist/lib/Components/visualization/Axis/YAxis/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/YAxis/types.d.ts +14 -0
- package/dist/lib/Components/visualization/Axis/YAxis/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/index.d.ts +2 -0
- package/dist/lib/Components/visualization/Axis/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/types.d.ts +80 -0
- package/dist/lib/Components/visualization/Axis/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/CartesianChart.d.ts +3 -0
- package/dist/lib/Components/visualization/CartesianChart/CartesianChart.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/CartesianChart.js +107 -0
- package/dist/lib/Components/visualization/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.d.ts +11 -0
- package/dist/lib/Components/visualization/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.js +21 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/RevealAnimationProvider.d.ts +3 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/RevealAnimationProvider.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/RevealAnimationProvider.js +41 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/context.d.ts +15 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/context.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/context.js +10 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/index.d.ts +3 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/types.d.ts +57 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/utils.d.ts +35 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/utils.js +69 -0
- package/dist/lib/Components/visualization/CartesianChart/context/cartesianChartContext.d.ts +8 -0
- package/dist/lib/Components/visualization/CartesianChart/context/cartesianChartContext.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/context/cartesianChartContext.js +9 -0
- package/dist/lib/Components/visualization/CartesianChart/context/index.d.ts +3 -0
- package/dist/lib/Components/visualization/CartesianChart/context/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/context/useBuildChartContext.d.ts +25 -0
- package/dist/lib/Components/visualization/CartesianChart/context/useBuildChartContext.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/context/useBuildChartContext.js +61 -0
- package/dist/lib/Components/visualization/CartesianChart/hooks/useShimmerAnimation.d.ts +18 -0
- package/dist/lib/Components/visualization/CartesianChart/hooks/useShimmerAnimation.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/hooks/useShimmerAnimation.js +15 -0
- package/dist/lib/Components/visualization/CartesianChart/index.d.ts +4 -0
- package/dist/lib/Components/visualization/CartesianChart/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/types.d.ts +127 -0
- package/dist/lib/Components/visualization/CartesianChart/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/utils.d.ts +5 -0
- package/dist/lib/Components/visualization/CartesianChart/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/utils.js +24 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChart.d.ts +3 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChart.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChart.js +90 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartAnimatedCenter.d.ts +10 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartAnimatedCenter.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartAnimatedCenter.js +61 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartCenter.d.ts +9 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartCenter.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartCenter.js +20 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartDescription.d.ts +3 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartDescription.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartDescription.js +49 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartTitle.d.ts +3 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartTitle.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartTitle.js +55 -0
- package/dist/lib/Components/visualization/DonutChart/DonutRing.d.ts +12 -0
- package/dist/lib/Components/visualization/DonutChart/DonutRing.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/DonutRing.js +110 -0
- package/dist/lib/Components/visualization/DonutChart/RevealAnimation.d.ts +7 -0
- package/dist/lib/Components/visualization/DonutChart/RevealAnimation.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/RevealAnimation.js +28 -0
- package/dist/lib/Components/visualization/DonutChart/donutSizeContext.d.ts +18 -0
- package/dist/lib/Components/visualization/DonutChart/donutSizeContext.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/donutSizeContext.js +6 -0
- package/dist/lib/Components/visualization/DonutChart/hooks/useContrastSafeSeries.d.ts +12 -0
- package/dist/lib/Components/visualization/DonutChart/hooks/useContrastSafeSeries.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/hooks/useContrastSafeSeries.js +13 -0
- package/dist/lib/Components/visualization/DonutChart/hooks/useDonutLoadingAnimation.d.ts +8 -0
- package/dist/lib/Components/visualization/DonutChart/hooks/useDonutLoadingAnimation.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/hooks/useDonutLoadingAnimation.js +16 -0
- package/dist/lib/Components/visualization/DonutChart/index.d.ts +7 -0
- package/dist/lib/Components/visualization/DonutChart/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/types.d.ts +172 -0
- package/dist/lib/Components/visualization/DonutChart/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/index.d.ts +3 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/useDonutSeries.d.ts +10 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/useDonutSeries.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/useDonutSeries.js +16 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/utils.d.ts +9 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/utils.js +46 -0
- package/dist/lib/Components/visualization/DonutChart/utils.d.ts +37 -0
- package/dist/lib/Components/visualization/DonutChart/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/utils.js +83 -0
- package/dist/lib/Components/visualization/Legend/Legend.d.ts +3 -0
- package/dist/lib/Components/visualization/Legend/Legend.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Legend/Legend.js +23 -0
- package/dist/lib/Components/visualization/Legend/LegendItem.d.ts +7 -0
- package/dist/lib/Components/visualization/Legend/LegendItem.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Legend/LegendItem.js +19 -0
- package/dist/lib/Components/visualization/Legend/index.d.ts +3 -0
- package/dist/lib/Components/visualization/Legend/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Legend/types.d.ts +32 -0
- package/dist/lib/Components/visualization/Legend/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Line/Line.d.ts +3 -0
- package/dist/lib/Components/visualization/Line/Line.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Line/Line.js +82 -0
- package/dist/lib/Components/visualization/Line/index.d.ts +3 -0
- package/dist/lib/Components/visualization/Line/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Line/types.d.ts +45 -0
- package/dist/lib/Components/visualization/Line/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Line/utils.d.ts +28 -0
- package/dist/lib/Components/visualization/Line/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Line/utils.js +34 -0
- package/dist/lib/Components/visualization/LineChart/LineChart.d.ts +3 -0
- package/dist/lib/Components/visualization/LineChart/LineChart.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/LineChart.js +181 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/LineChartEmptyState.d.ts +9 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/LineChartEmptyState.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/LineChartEmptyState.js +51 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/index.d.ts +3 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/types.d.ts +3 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/utils.d.ts +8 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/utils.js +8 -0
- package/dist/lib/Components/visualization/LineChart/index.d.ts +3 -0
- package/dist/lib/Components/visualization/LineChart/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/types.d.ts +82 -0
- package/dist/lib/Components/visualization/LineChart/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/utils.d.ts +56 -0
- package/dist/lib/Components/visualization/LineChart/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/utils.js +57 -0
- package/dist/lib/Components/visualization/Point/Point.d.ts +4 -0
- package/dist/lib/Components/visualization/Point/Point.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/Point.js +122 -0
- package/dist/lib/Components/visualization/Point/index.d.ts +3 -0
- package/dist/lib/Components/visualization/Point/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/pointContext/MagneticPointsProvider.d.ts +7 -0
- package/dist/lib/Components/visualization/Point/pointContext/MagneticPointsProvider.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/pointContext/MagneticPointsProvider.js +22 -0
- package/dist/lib/Components/visualization/Point/pointContext/index.d.ts +3 -0
- package/dist/lib/Components/visualization/Point/pointContext/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/pointContext/magneticPointsContext.d.ts +30 -0
- package/dist/lib/Components/visualization/Point/pointContext/magneticPointsContext.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/pointContext/magneticPointsContext.js +14 -0
- package/dist/lib/Components/visualization/Point/types.d.ts +110 -0
- package/dist/lib/Components/visualization/Point/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/usePointGeometry.d.ts +33 -0
- package/dist/lib/Components/visualization/Point/usePointGeometry.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/usePointGeometry.js +30 -0
- package/dist/lib/Components/visualization/Point/utils.d.ts +51 -0
- package/dist/lib/Components/visualization/Point/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/utils.js +54 -0
- package/dist/lib/Components/visualization/ReferenceLine/ReferenceLine.d.ts +3 -0
- package/dist/lib/Components/visualization/ReferenceLine/ReferenceLine.d.ts.map +1 -0
- package/dist/lib/Components/visualization/ReferenceLine/ReferenceLine.js +42 -0
- package/dist/lib/Components/visualization/ReferenceLine/index.d.ts +3 -0
- package/dist/lib/Components/visualization/ReferenceLine/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/ReferenceLine/types.d.ts +74 -0
- package/dist/lib/Components/visualization/ReferenceLine/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/ReferenceLine/useReferenceLineGeometry.d.ts +21 -0
- package/dist/lib/Components/visualization/ReferenceLine/useReferenceLineGeometry.d.ts.map +1 -0
- package/dist/lib/Components/visualization/ReferenceLine/useReferenceLineGeometry.js +49 -0
- package/dist/lib/Components/visualization/ReferenceLine/utils.d.ts +50 -0
- package/dist/lib/Components/visualization/ReferenceLine/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/ReferenceLine/utils.js +66 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/ChartTooltipItem.d.ts +9 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/ChartTooltipItem.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/ChartTooltipItem.js +50 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/DefaultScrubberTooltip.d.ts +12 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/DefaultScrubberTooltip.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/DefaultScrubberTooltip.js +82 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/utils.d.ts +58 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/utils.js +80 -0
- package/dist/lib/Components/visualization/Scrubber/Scrubber.d.ts +29 -0
- package/dist/lib/Components/visualization/Scrubber/Scrubber.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/Scrubber.js +114 -0
- package/dist/lib/Components/visualization/Scrubber/ScrubberProvider.d.ts +3 -0
- package/dist/lib/Components/visualization/Scrubber/ScrubberProvider.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/ScrubberProvider.js +154 -0
- package/dist/lib/Components/visualization/Scrubber/context/index.d.ts +2 -0
- package/dist/lib/Components/visualization/Scrubber/context/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/context/scrubberContext.d.ts +8 -0
- package/dist/lib/Components/visualization/Scrubber/context/scrubberContext.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/context/scrubberContext.js +9 -0
- package/dist/lib/Components/visualization/Scrubber/index.d.ts +4 -0
- package/dist/lib/Components/visualization/Scrubber/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/types.d.ts +130 -0
- package/dist/lib/Components/visualization/Scrubber/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/useScrubberGeometry.d.ts +29 -0
- package/dist/lib/Components/visualization/Scrubber/useScrubberGeometry.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/useScrubberGeometry.js +37 -0
- package/dist/lib/Components/visualization/Scrubber/utils.d.ts +79 -0
- package/dist/lib/Components/visualization/Scrubber/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/utils.js +104 -0
- package/dist/lib/Components/visualization/config.d.ts +162 -0
- package/dist/lib/Components/visualization/config.d.ts.map +1 -0
- package/dist/lib/Components/visualization/config.js +156 -0
- package/dist/lib/Components/visualization/index.d.ts +8 -0
- package/dist/lib/Components/visualization/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/index.js +27 -0
- package/dist/lib/Components/visualization/utils/domain/domain.d.ts +18 -0
- package/dist/lib/Components/visualization/utils/domain/domain.d.ts.map +1 -0
- package/dist/lib/Components/visualization/utils/domain/domain.js +35 -0
- package/dist/lib/Components/visualization/utils/index.d.ts +2 -0
- package/dist/lib/Components/visualization/utils/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/utils/numbers.d.ts +13 -0
- package/dist/lib/Components/visualization/utils/numbers.d.ts.map +1 -0
- package/dist/lib/Components/visualization/utils/numbers.js +5 -0
- package/dist/lib/Components/visualization/utils/scales/scales.d.ts +47 -0
- package/dist/lib/Components/visualization/utils/scales/scales.d.ts.map +1 -0
- package/dist/lib/Components/visualization/utils/scales/scales.js +32 -0
- package/dist/lib/Components/visualization/utils/ticks/ticks.d.ts +35 -0
- package/dist/lib/Components/visualization/utils/ticks/ticks.d.ts.map +1 -0
- package/dist/lib/Components/visualization/utils/ticks/ticks.js +23 -0
- package/dist/lib/Components/visualization/utils/types.d.ts +63 -0
- package/dist/lib/Components/visualization/utils/types.d.ts.map +1 -0
- package/dist/libs/design-core/dist/lib/colorContrast/colorContrast.js +15 -0
- package/dist/libs/design-core/dist/lib/colorContrast/hexToHsl.js +14 -0
- package/dist/libs/design-core/dist/lib/colorContrast/hslToHex.js +10 -0
- package/dist/libs/design-core/dist/lib/themes/js/primitives/primitive.colors.js +15 -0
- package/dist/libs/utils-shared/dist/index.js +115 -113
- package/dist/package.json +11 -3
- package/package.json +12 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/DonutChart/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/DonutChart/useDonutSeries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DonutSegment, DonutSeriesOptions, DonutSeriesResult } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Prepares a raw series for the ring: sorts by value descending and folds the
|
|
4
|
+
* long tail into a single aggregate segment.
|
|
5
|
+
*
|
|
6
|
+
* The result is memoized on `segments` identity, so hoist or memoize the array
|
|
7
|
+
* you pass in if you rely on a stable `segments` reference downstream.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useDonutSeries: (segments: DonutSegment[], options: DonutSeriesOptions) => DonutSeriesResult;
|
|
10
|
+
//# sourceMappingURL=useDonutSeries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDonutSeries.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/DonutChart/useDonutSeries/useDonutSeries.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAIlB;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GACzB,UAAU,YAAY,EAAE,EACxB,SAAS,kBAAkB,KAC1B,iBAeF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useMemo as u } from "react";
|
|
2
|
+
import { prepareDonutSeries as i } from "./utils.js";
|
|
3
|
+
const l = (o, p) => {
|
|
4
|
+
const { groupBelowShare: e, maxSegments: r, other: s } = p, { id: t, label: m, color: n } = s;
|
|
5
|
+
return u(
|
|
6
|
+
() => i(o, {
|
|
7
|
+
groupBelowShare: e,
|
|
8
|
+
maxSegments: r,
|
|
9
|
+
other: { id: t, label: m, color: n }
|
|
10
|
+
}),
|
|
11
|
+
[o, e, r, t, m, n]
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
l as useDonutSeries
|
|
16
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DonutSegment, DonutSeriesOptions, DonutSeriesResult } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Sorts a raw series by value descending and folds its long tail into a single
|
|
4
|
+
* aggregate segment. Pure counterpart of `useDonutSeries`. The aggregate keeps
|
|
5
|
+
* its color unset unless `other.color` is given, so the ring paints it with the
|
|
6
|
+
* neutral default like any colorless segment.
|
|
7
|
+
*/
|
|
8
|
+
export declare const prepareDonutSeries: (segments: DonutSegment[], options: DonutSeriesOptions) => DonutSeriesResult;
|
|
9
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/DonutChart/useDonutSeries/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AA4ClB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,UAAU,YAAY,EAAE,EACxB,SAAS,kBAAkB,KAC1B,iBAsCF,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { chartConfig as g } from "../../config.js";
|
|
2
|
+
const {
|
|
3
|
+
maxSegments: d,
|
|
4
|
+
otherId: x,
|
|
5
|
+
minGroupedSegments: S,
|
|
6
|
+
minKeptSegments: f
|
|
7
|
+
} = g.donut.series, p = (t) => t.reduce((n, s) => n + Math.max(s.value, 0), 0), v = (t, n, s) => {
|
|
8
|
+
const a = p(t), r = n > 0 && a > 0 ? n * a : 0, e = r > 0 ? t.findIndex((o) => Math.max(o.value, 0) < r) : -1;
|
|
9
|
+
return Math.max(
|
|
10
|
+
f,
|
|
11
|
+
Math.min(
|
|
12
|
+
s,
|
|
13
|
+
e === -1 ? t.length : e
|
|
14
|
+
)
|
|
15
|
+
);
|
|
16
|
+
}, I = (t, n) => {
|
|
17
|
+
const {
|
|
18
|
+
groupBelowShare: s = 0,
|
|
19
|
+
maxSegments: a = d,
|
|
20
|
+
other: r
|
|
21
|
+
} = n, e = [...t].sort((m, c) => c.value - m.value);
|
|
22
|
+
if (a <= 0)
|
|
23
|
+
return { segments: e, others: [] };
|
|
24
|
+
const o = v(e, s, a), l = e.slice(o);
|
|
25
|
+
if (l.length < S)
|
|
26
|
+
return { segments: e, others: [] };
|
|
27
|
+
const { id: u = x, label: i, color: h } = r;
|
|
28
|
+
return {
|
|
29
|
+
segments: [
|
|
30
|
+
...e.slice(0, o),
|
|
31
|
+
{
|
|
32
|
+
id: u,
|
|
33
|
+
label: i,
|
|
34
|
+
color: h,
|
|
35
|
+
value: l.reduce(
|
|
36
|
+
(m, c) => m + Math.max(c.value, 0),
|
|
37
|
+
0
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
others: l
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
I as prepareDonutSeries
|
|
46
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DonutGeometry, DonutPlaceholderSegment, DonutRingSegment, DonutSegment, DonutSize } from './types';
|
|
2
|
+
export declare const DONUT_GEOMETRY: Readonly<Record<DonutSize, DonutGeometry>>;
|
|
3
|
+
export declare const resolveSegmentColor: (segment: DonutSegment) => string;
|
|
4
|
+
export declare const getDonutViewBox: (geometry: DonutGeometry) => string;
|
|
5
|
+
export declare const getCenterContentInset: (size: DonutSize) => number;
|
|
6
|
+
/** Max width (px) for center content, inner diameter minus inset on both sides. */
|
|
7
|
+
export declare const getCenterMaxWidth: (size: DonutSize) => number;
|
|
8
|
+
/** Round a percent to at most 1 decimal. */
|
|
9
|
+
export declare const roundPercent: (percent: number) => number;
|
|
10
|
+
/**
|
|
11
|
+
* Display-ready percent, e.g. `7%`, `7.3%` or `<0.1%`. Rounding here keeps
|
|
12
|
+
* float artifacts — `7 / 100 * 100` is `7.000000000000001` — out of labels
|
|
13
|
+
* while leaving the exact `percent` intact for consumers who compute with it.
|
|
14
|
+
*/
|
|
15
|
+
export declare const formatPercentLabel: (percent: number) => string;
|
|
16
|
+
/** Percent (0–100) of the total per segment. Negatives count as 0; a zero total yields all zeros. */
|
|
17
|
+
export declare const getSegmentPercents: (series: DonutSegment[]) => number[];
|
|
18
|
+
/**
|
|
19
|
+
* Drawing weights summing to 1, none below `minShare`, so a value too small to
|
|
20
|
+
* see still gets a visible sliver. The room comes out of the segments above the
|
|
21
|
+
* minimum, which shrinks them and can push another under it — hence the loop.
|
|
22
|
+
*/
|
|
23
|
+
export declare const applyMinSegmentShare: (values: number[], minShare: number) => number[];
|
|
24
|
+
/**
|
|
25
|
+
* One ring segment per drawable series entry, in series order, clockwise from
|
|
26
|
+
* 12 o'clock. Zero and negative segments are dropped so they don't emit
|
|
27
|
+
* degenerate paths; percents are still computed against the full series total,
|
|
28
|
+
* and what survives is drawn at `minSegmentArc` or wider.
|
|
29
|
+
*/
|
|
30
|
+
export declare const buildRingSegments: (series: DonutSegment[], geometry: DonutGeometry) => DonutRingSegment[];
|
|
31
|
+
/**
|
|
32
|
+
* Fixed placeholder segments shared by the empty ring and the loading wave: a
|
|
33
|
+
* full ring (values sum to 100) of unequal segments separated only by the
|
|
34
|
+
* same small `padAngle` gaps as real segments — no missing segment.
|
|
35
|
+
*/
|
|
36
|
+
export declare const buildPlaceholderSegments: (geometry: DonutGeometry) => DonutPlaceholderSegment[];
|
|
37
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/DonutChart/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,aAAa,EACb,uBAAuB,EACvB,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACV,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,CAC9C,CAAC;AAEzB,eAAO,MAAM,mBAAmB,GAAI,SAAS,YAAY,KAAG,MACJ,CAAC;AAEzD,eAAO,MAAM,eAAe,GAAI,UAAU,aAAa,KAAG,MAIzD,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,MAAM,SAAS,KAAG,MACZ,CAAC;AAE7C,mFAAmF;AACnF,eAAO,MAAM,iBAAiB,GAAI,MAAM,SAAS,KAAG,MACoB,CAAC;AAEzE,4CAA4C;AAC5C,eAAO,MAAM,YAAY,GAAI,SAAS,MAAM,KAAG,MAChB,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,KAAG,MAMpD,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY,EAAE,KAAG,MAAM,EAMjE,CAAC;AAeF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,QAAQ,MAAM,EAAE,EAChB,UAAU,MAAM,KACf,MAAM,EAuBR,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,YAAY,EAAE,EACtB,UAAU,aAAa,KACtB,gBAAgB,EAkDlB,CAAC;AAiBF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,aAAa,KACtB,uBAAuB,EA6BzB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { pie as h, arc as p } from "d3-shape";
|
|
2
|
+
import { chartConfig as u } from "../config.js";
|
|
3
|
+
const f = u.donut.size, R = (n) => n.color ?? u.donut.defaultSegmentColor, P = (n) => {
|
|
4
|
+
const { box: e, hoverOffset: a } = n, r = e + 2 * a;
|
|
5
|
+
return `-${a} -${a} ${r} ${r}`;
|
|
6
|
+
}, m = (n) => u.donut.centerContentInset[n], I = (n) => f[n].innerRadius * 2 - 2 * m(n), A = (n) => Math.round(n * 10) / 10, w = (n) => {
|
|
7
|
+
const e = A(n);
|
|
8
|
+
return e === 0 && n > 0 ? "<0.1%" : `${e}%`;
|
|
9
|
+
}, M = (n) => {
|
|
10
|
+
const e = n.reduce((a, r) => a + Math.max(r.value, 0), 0);
|
|
11
|
+
return e <= 0 ? n.map(() => 0) : n.map((a) => Math.max(a.value, 0) / e * 100);
|
|
12
|
+
}, S = (n, e) => {
|
|
13
|
+
const a = (n.innerRadius + n.outerRadius) / 2, r = 2 * Math.PI - e * n.padAngle;
|
|
14
|
+
return r <= 0 ? 0 : n.minSegmentArc / a / r;
|
|
15
|
+
}, b = (n, e) => {
|
|
16
|
+
const a = n.reduce((o, s) => o + s, 0);
|
|
17
|
+
if (a <= 0)
|
|
18
|
+
return n.map(() => 0);
|
|
19
|
+
const r = Math.min(e, 1 / n.length);
|
|
20
|
+
let l = n.map((o) => o / a);
|
|
21
|
+
for (; l.some((o) => o < r); ) {
|
|
22
|
+
const o = l.map((t) => Math.max(t, r)), s = o.filter((t) => t > r), i = (1 - (o.length - s.length) * r) / s.reduce((t, c) => t + c, 0);
|
|
23
|
+
l = o.map(
|
|
24
|
+
(t) => t > r ? t * i : t
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
return l;
|
|
28
|
+
}, L = (n, e) => {
|
|
29
|
+
const a = M(n), r = n.map((t, c) => ({ segment: t, percent: a[c] })).filter((t) => t.percent > 0);
|
|
30
|
+
if (r.length === 0)
|
|
31
|
+
return [];
|
|
32
|
+
const l = b(
|
|
33
|
+
r.map((t) => t.percent),
|
|
34
|
+
S(e, r.length)
|
|
35
|
+
), o = r.map((t, c) => ({
|
|
36
|
+
...t,
|
|
37
|
+
weight: l[c]
|
|
38
|
+
})), s = h().value((t) => t.weight).sort(null).sortValues(null).padAngle(e.padAngle), d = p().innerRadius(e.innerRadius).outerRadius(e.outerRadius).cornerRadius(e.cornerRadius), i = r.length > 1;
|
|
39
|
+
return s(o).map((t) => {
|
|
40
|
+
const c = (t.startAngle + t.endAngle) / 2;
|
|
41
|
+
return {
|
|
42
|
+
id: t.data.segment.id,
|
|
43
|
+
path: d(g(t)) ?? "",
|
|
44
|
+
color: R(t.data.segment),
|
|
45
|
+
percent: t.data.percent,
|
|
46
|
+
midAngle: c,
|
|
47
|
+
hoverEnabled: i,
|
|
48
|
+
hoverTranslate: i ? {
|
|
49
|
+
x: Math.sin(c) * e.hoverOffset,
|
|
50
|
+
y: -Math.cos(c) * e.hoverOffset
|
|
51
|
+
} : { x: 0, y: 0 }
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
}, v = 1e-9, g = (n) => {
|
|
55
|
+
const e = n.endAngle - n.startAngle;
|
|
56
|
+
return e < Math.PI && Math.PI - e < v ? { ...n, endAngle: n.startAngle + Math.PI } : n;
|
|
57
|
+
}, O = (n) => {
|
|
58
|
+
const { segmentValues: e } = u.donut.placeholder, a = e.map((o, s) => ({
|
|
59
|
+
id: `placeholder-${s}`,
|
|
60
|
+
value: o
|
|
61
|
+
})), r = h().value((o) => o.value).sort(null).sortValues(null).padAngle(n.padAngle), l = p().innerRadius(n.innerRadius).outerRadius(n.outerRadius).cornerRadius(n.cornerRadius);
|
|
62
|
+
return r(a).map((o) => {
|
|
63
|
+
const s = (o.startAngle + o.endAngle) / 2;
|
|
64
|
+
return {
|
|
65
|
+
id: o.data.id,
|
|
66
|
+
path: l(g(o)) ?? "",
|
|
67
|
+
midAngle: s
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
f as DONUT_GEOMETRY,
|
|
73
|
+
b as applyMinSegmentShare,
|
|
74
|
+
O as buildPlaceholderSegments,
|
|
75
|
+
L as buildRingSegments,
|
|
76
|
+
w as formatPercentLabel,
|
|
77
|
+
m as getCenterContentInset,
|
|
78
|
+
I as getCenterMaxWidth,
|
|
79
|
+
P as getDonutViewBox,
|
|
80
|
+
M as getSegmentPercents,
|
|
81
|
+
R as resolveSegmentColor,
|
|
82
|
+
A as roundPercent
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/Legend/Legend.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,SAAoB,EACpB,SAAS,GACV,EAAE,WAAW,kDAkBb"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as t } from "../../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { LegendItem as m } from "./LegendItem.js";
|
|
4
|
+
function i({
|
|
5
|
+
series: e,
|
|
6
|
+
ariaLabel: a = "Legend",
|
|
7
|
+
className: l
|
|
8
|
+
}) {
|
|
9
|
+
return e.length === 0 ? null : /* @__PURE__ */ r(
|
|
10
|
+
"ul",
|
|
11
|
+
{
|
|
12
|
+
"aria-label": a,
|
|
13
|
+
className: t(
|
|
14
|
+
"m-0 flex list-none flex-wrap gap-x-16 gap-y-6 p-0",
|
|
15
|
+
l
|
|
16
|
+
),
|
|
17
|
+
children: e.map((n) => /* @__PURE__ */ r(m, { item: n }, n.id))
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
i as Legend
|
|
23
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LegendItem as LegendItemData } from './types';
|
|
2
|
+
type LegendItemProps = {
|
|
3
|
+
item: LegendItemData;
|
|
4
|
+
};
|
|
5
|
+
export declare const LegendItem: ({ item }: LegendItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=LegendItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendItem.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/Legend/LegendItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,SAAS,CAAC;AAE5D,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,cAAc,CAAC;CACtB,CAAC;AAGF,eAAO,MAAM,UAAU,GAAI,UAAU,eAAe,4CAcnD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsxs as a, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { cssVar as r } from "../../../../libs/design-core/dist/lib/cssVar/cssVar.js";
|
|
3
|
+
const l = ({ item: e }) => /* @__PURE__ */ a("li", { className: "inline-flex min-w-0 items-center gap-8", children: [
|
|
4
|
+
/* @__PURE__ */ s(
|
|
5
|
+
"span",
|
|
6
|
+
{
|
|
7
|
+
"aria-hidden": "true",
|
|
8
|
+
"data-testid": "legend-swatch",
|
|
9
|
+
className: "size-8 shrink-0 rounded-full",
|
|
10
|
+
style: {
|
|
11
|
+
backgroundColor: e.color ?? r("var(--background-muted-strong)")
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
),
|
|
15
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 truncate body-3 text-base", children: e.label ?? e.id })
|
|
16
|
+
] });
|
|
17
|
+
export {
|
|
18
|
+
l as LegendItem
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/Legend/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type LegendItem = {
|
|
2
|
+
/**
|
|
3
|
+
* Stable identifier for the series or segment.
|
|
4
|
+
*/
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* Human-readable label.
|
|
8
|
+
* Falls back to `id` when omitted.
|
|
9
|
+
*/
|
|
10
|
+
label?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Swatch color.
|
|
13
|
+
* Falls back to the neutral default when omitted.
|
|
14
|
+
*/
|
|
15
|
+
color?: string;
|
|
16
|
+
};
|
|
17
|
+
export type LegendProps = {
|
|
18
|
+
/**
|
|
19
|
+
* Series or segments to display in the legend.
|
|
20
|
+
*/
|
|
21
|
+
series: LegendItem[];
|
|
22
|
+
/**
|
|
23
|
+
* Accessible label for the legend group.
|
|
24
|
+
* @default 'Legend'
|
|
25
|
+
*/
|
|
26
|
+
ariaLabel?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Additional custom CSS classes to apply to the root list.
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/Legend/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/Line/Line.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAKzC,eAAO,MAAM,IAAI,iDA8Ff,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsxs as c, jsx as o, Fragment as j } from "react/jsx-runtime";
|
|
2
|
+
import { memo as N, useId as O, useMemo as d } from "react";
|
|
3
|
+
import { chartConfig as b } from "../config.js";
|
|
4
|
+
import { isNumericScale as A } from "../utils/scales/scales.js";
|
|
5
|
+
import { toScaledPoints as G, buildLinePath as I, buildAreaPath as M } from "./utils.js";
|
|
6
|
+
import { useCartesianChartContext as T } from "../CartesianChart/context/cartesianChartContext.js";
|
|
7
|
+
import { usePathReveal as W } from "../CartesianChart/RevealAnimation/context.js";
|
|
8
|
+
const { color: X, strokeWidth: D, line: F } = b, J = N(function({
|
|
9
|
+
seriesId: g,
|
|
10
|
+
stroke: x,
|
|
11
|
+
showArea: i = !1,
|
|
12
|
+
areaType: Y = "gradient",
|
|
13
|
+
curve: C,
|
|
14
|
+
connectNulls: k
|
|
15
|
+
}) {
|
|
16
|
+
const { getXScale: y, getYScale: P, getXAxisConfig: S, drawingArea: s, seriesMap: v } = T(), L = W(), l = y(), n = P(), p = S(), f = O(), t = v.get(g), r = (x ?? t?.stroke) || X.stroke, a = C ?? t?.curve, u = k ?? t?.connectNulls ?? !1, e = d(
|
|
17
|
+
() => t?.data && l && n && A(n) ? G(
|
|
18
|
+
t.data,
|
|
19
|
+
l,
|
|
20
|
+
n,
|
|
21
|
+
p?.data,
|
|
22
|
+
u
|
|
23
|
+
) : null,
|
|
24
|
+
[t, l, n, p, u]
|
|
25
|
+
), m = d(
|
|
26
|
+
() => e ? I(e, a) : null,
|
|
27
|
+
[e, a]
|
|
28
|
+
), h = d(
|
|
29
|
+
() => i && e && s ? M(e, s, a) : null,
|
|
30
|
+
[i, e, s, a]
|
|
31
|
+
);
|
|
32
|
+
return m ? /* @__PURE__ */ c("g", { clipPath: L, children: [
|
|
33
|
+
i && h && r && /* @__PURE__ */ c(j, { children: [
|
|
34
|
+
/* @__PURE__ */ o("defs", { children: /* @__PURE__ */ c(
|
|
35
|
+
"linearGradient",
|
|
36
|
+
{
|
|
37
|
+
"data-testid": "line-gradient",
|
|
38
|
+
id: f,
|
|
39
|
+
x1: "0",
|
|
40
|
+
y1: "0",
|
|
41
|
+
x2: "0",
|
|
42
|
+
y2: "1",
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ o(
|
|
45
|
+
"stop",
|
|
46
|
+
{
|
|
47
|
+
offset: "0%",
|
|
48
|
+
stopColor: r,
|
|
49
|
+
stopOpacity: F.areaGradientOpacity
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ o("stop", { offset: "100%", stopColor: r, stopOpacity: 0 })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
) }),
|
|
56
|
+
/* @__PURE__ */ o(
|
|
57
|
+
"path",
|
|
58
|
+
{
|
|
59
|
+
"data-testid": "line-area",
|
|
60
|
+
d: h,
|
|
61
|
+
fill: `url(#${f})`,
|
|
62
|
+
stroke: "none"
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ o(
|
|
67
|
+
"path",
|
|
68
|
+
{
|
|
69
|
+
"data-testid": "line-path",
|
|
70
|
+
d: m,
|
|
71
|
+
fill: "none",
|
|
72
|
+
stroke: r,
|
|
73
|
+
strokeWidth: D.line,
|
|
74
|
+
strokeLinecap: "round",
|
|
75
|
+
strokeLinejoin: "round"
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
] }) : null;
|
|
79
|
+
});
|
|
80
|
+
export {
|
|
81
|
+
J as Line
|
|
82
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/Line/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CurveType } from '../utils/types';
|
|
2
|
+
export type { CurveType };
|
|
3
|
+
/**
|
|
4
|
+
* Rendering options shared by `Line` (per-line) and `LineChart` (applied to
|
|
5
|
+
* every line). Owned here so both types stay in sync.
|
|
6
|
+
*/
|
|
7
|
+
export type LineRenderOptions = {
|
|
8
|
+
/**
|
|
9
|
+
* Whether to render a filled area under the line.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
showArea?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Area fill style.
|
|
15
|
+
* When `'gradient'`, renders a vertical gradient from the stroke color to transparent.
|
|
16
|
+
* @default 'gradient'
|
|
17
|
+
*/
|
|
18
|
+
areaType?: 'gradient';
|
|
19
|
+
};
|
|
20
|
+
export type LineProps = LineRenderOptions & {
|
|
21
|
+
/**
|
|
22
|
+
* The ID of the series to render.
|
|
23
|
+
* Must match a `Series.id` provided to the parent chart.
|
|
24
|
+
*/
|
|
25
|
+
seriesId: string;
|
|
26
|
+
/**
|
|
27
|
+
* Override color for the line stroke.
|
|
28
|
+
* When omitted, falls back to the `stroke` defined on the series.
|
|
29
|
+
*/
|
|
30
|
+
stroke?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Override interpolation used to draw the line between data points.
|
|
33
|
+
* When omitted, falls back to the `curve` defined on the series.
|
|
34
|
+
* @default 'bump'
|
|
35
|
+
*/
|
|
36
|
+
curve?: CurveType;
|
|
37
|
+
/**
|
|
38
|
+
* When true, skips null values and draws a continuous line across gaps.
|
|
39
|
+
* When false, null values create gaps in the line.
|
|
40
|
+
* When omitted, falls back to the `connectNulls` defined on the series.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
connectNulls?: boolean;
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/Line/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,iBAAiB,GAAG;IAC1C;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ChartScaleFunction, CurveType, DrawingArea, NumericScale } from '../utils/types';
|
|
2
|
+
type Point = [x: number, y: number | null];
|
|
3
|
+
/**
|
|
4
|
+
* Project series data into scaled [x, y] pixel coordinates.
|
|
5
|
+
*
|
|
6
|
+
* When `xData` contains numeric values, those values are fed into the scale
|
|
7
|
+
* instead of the array index so the points honour a numeric X domain.
|
|
8
|
+
*
|
|
9
|
+
* When `xData` is provided, iteration is capped at `xData.length` so a series
|
|
10
|
+
* with more points than the axis has labels does not overflow past the right
|
|
11
|
+
* edge of the chart. The axis is treated as authoritative for the X domain.
|
|
12
|
+
*
|
|
13
|
+
* Null values (and other non-finite numbers) are handled according to `connectNulls`:
|
|
14
|
+
* - `false` (default): kept as `[x, null]` holes so the line/area break into
|
|
15
|
+
* gaps via the generators' `.defined()` check.
|
|
16
|
+
* - `true`: skipped entirely so the line is drawn continuously across gaps.
|
|
17
|
+
*/
|
|
18
|
+
export declare const toScaledPoints: (data: (number | null)[], xScale: ChartScaleFunction, yScale: NumericScale, xData?: readonly (string | number)[], connectNulls?: boolean) => Point[] | null;
|
|
19
|
+
/**
|
|
20
|
+
* Build the SVG `d` attribute for the line stroke.
|
|
21
|
+
*/
|
|
22
|
+
export declare const buildLinePath: (points: Point[], curve?: CurveType) => string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Build the SVG `d` attribute for the filled area beneath the line.
|
|
25
|
+
*/
|
|
26
|
+
export declare const buildAreaPath: (points: Point[], drawingArea: DrawingArea, curve?: CurveType) => string | null;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/Line/utils.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,YAAY,EACb,MAAM,gBAAgB,CAAC;AAExB,KAAK,KAAK,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;AAoB3C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,EACvB,QAAQ,kBAAkB,EAC1B,QAAQ,YAAY,EACpB,QAAQ,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EACpC,sBAAoB,KACnB,KAAK,EAAE,GAAG,IA4BZ,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,KAAK,EAAE,EACf,QAAQ,SAAS,KAChB,MAAM,GAAG,IAQX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,KAAK,EAAE,EACf,aAAa,WAAW,EACxB,QAAQ,SAAS,KAChB,MAAM,GAAG,IAWX,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { line as y, curveStepBefore as d, curveStepAfter as C, curveStep as g, curveNatural as F, curveMonotoneX as a, curveLinear as A, curveBumpX as B, area as E } from "d3-shape";
|
|
2
|
+
import { isFiniteNumber as L } from "../utils/numbers.js";
|
|
3
|
+
import { isCategoricalScale as P } from "../utils/scales/scales.js";
|
|
4
|
+
const m = {
|
|
5
|
+
bump: B,
|
|
6
|
+
linear: A,
|
|
7
|
+
monotone: a,
|
|
8
|
+
natural: F,
|
|
9
|
+
step: g,
|
|
10
|
+
stepAfter: C,
|
|
11
|
+
stepBefore: d
|
|
12
|
+
}, h = "bump", v = (e = h) => m[e] ?? m[h], V = (e, t, n, o, r = !1) => {
|
|
13
|
+
const i = [], b = o ? Math.min(e.length, o.length) : e.length;
|
|
14
|
+
let l = 0;
|
|
15
|
+
for (let u = 0; u < b; u++) {
|
|
16
|
+
const c = e[u], s = L(c);
|
|
17
|
+
if (!s && r) continue;
|
|
18
|
+
const p = o && typeof o[u] == "number" ? o[u] : u, f = P(t) ? (t(p) ?? 0) + t.bandwidth() / 2 : t(p);
|
|
19
|
+
if (!s) {
|
|
20
|
+
i.push([f, null]);
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
i.push([f, n(c)]), l++;
|
|
24
|
+
}
|
|
25
|
+
return l >= 2 ? i : null;
|
|
26
|
+
}, I = (e, t) => y().defined((n) => n[1] !== null).x((n) => n[0]).y((n) => n[1]).curve(v(t))(e) ?? null, M = (e, t, n) => {
|
|
27
|
+
const o = t.y + t.height;
|
|
28
|
+
return E().defined((r) => r[1] !== null).x((r) => r[0]).y0(o).y1((r) => r[1]).curve(v(n))(e) ?? null;
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
M as buildAreaPath,
|
|
32
|
+
I as buildLinePath,
|
|
33
|
+
V as toScaledPoints
|
|
34
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { LineChartProps } from './types';
|
|
2
|
+
export declare function LineChart({ series: seriesProp, showArea, areaType, connectNulls, showXAxis, showYAxis, xAxis, yAxis, width, height, inset, enableScrubbing, onScrubberPositionChange, animate, magnetRadius, loading, emptyLabel, enableColorContrast, children, }: LineChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=LineChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/LineChart/LineChart.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,SAAS,CAAC;AA+GjB,wBAAgB,SAAS,CAAC,EACxB,MAAM,EAAE,UAAU,EAClB,QAAgB,EAChB,QAAqB,EACrB,YAAY,EACZ,SAAiB,EACjB,SAAiB,EACjB,KAAK,EACL,KAAK,EACL,KAAc,EACd,MAAuC,EACvC,KAAK,EACL,eAAe,EACf,wBAAwB,EACxB,OAAO,EACP,YAAY,EACZ,OAAe,EACf,UAAgD,EAChD,mBAA2B,EAC3B,QAAQ,GACT,EAAE,cAAc,2CAuFhB"}
|