solid-recharts 0.1.0 → 0.2.1
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/LICENSE +24 -0
- package/package.json +10 -7
- package/src/cartesian/Area.tsx +40 -55
- package/src/cartesian/Bar.tsx +66 -58
- package/src/cartesian/BarStack.tsx +5 -2
- package/src/cartesian/Brush.tsx +1 -1
- package/src/cartesian/Funnel.tsx +15 -19
- package/src/cartesian/Line.tsx +34 -51
- package/src/cartesian/LineDrawShape.tsx +8 -6
- package/src/cartesian/ReferenceArea.tsx +25 -35
- package/src/cartesian/ReferenceDot.tsx +24 -34
- package/src/cartesian/ReferenceLine.tsx +25 -34
- package/src/cartesian/Scatter.tsx +25 -37
- package/src/cartesian/XAxis.tsx +54 -67
- package/src/cartesian/YAxis.tsx +53 -66
- package/src/cartesian/ZAxis.tsx +27 -40
- package/src/chart/SunburstChart.tsx +1 -1
- package/src/component/ActivePoints.tsx +0 -9
- package/src/component/Customized.tsx +1 -1
- package/src/component/Dots.tsx +7 -3
- package/src/context/ErrorBarContext.tsx +15 -24
- package/src/polar/Pie.tsx +36 -48
- package/src/polar/PolarAngleAxis.tsx +41 -50
- package/src/polar/PolarRadiusAxis.tsx +40 -48
- package/src/polar/Radar.tsx +22 -34
- package/src/polar/RadialBar.tsx +21 -39
- package/src/shape/Curve.tsx +1 -1
- package/src/shape/Symbols.tsx +1 -1
- package/src/state/RechartsReduxContext.tsx +1 -1
- package/src/state/SetLegendPayload.ts +19 -27
- package/src/state/SetTooltipEntrySettings.tsx +9 -26
- package/src/state/cartesianAxisSlice.ts +40 -60
- package/src/state/createCollectionActions.ts +51 -0
- package/src/state/createSelector.ts +97 -0
- package/src/state/externalEventsMiddleware.ts +2 -11
- package/src/state/graphicalItemsSlice.ts +27 -40
- package/src/state/isEventThrottled.ts +12 -0
- package/src/state/keyboardEventsMiddleware.ts +2 -8
- package/src/state/layoutSlice.ts +8 -4
- package/src/state/legendSlice.ts +24 -26
- package/src/state/mouseEventsMiddleware.ts +2 -13
- package/src/state/patched.ts +19 -0
- package/src/state/referenceElementsSlice.ts +40 -31
- package/src/state/registerInStore.ts +68 -0
- package/src/state/selectors/areaSelectors.ts +13 -36
- package/src/state/selectors/arrayEqualityCheck.ts +32 -7
- package/src/state/selectors/axisSelectors.ts +215 -169
- package/src/state/selectors/barSelectors.ts +8 -36
- package/src/state/selectors/combiners/combineConfiguredScale.ts +1 -1
- package/src/state/selectors/combiners/combineRealScaleType.ts +1 -1
- package/src/state/selectors/dataSelectors.ts +35 -16
- package/src/state/selectors/numberDomainEqualityCheck.ts +16 -8
- package/src/state/selectors/selectAxisForGraphicalItem.ts +52 -0
- package/src/state/store.ts +0 -1
- package/src/state/tooltipSlice.ts +93 -64
- package/src/util/ActiveShapeUtils.tsx +0 -7
- package/src/util/BarUtils.tsx +27 -22
- package/src/util/ChartUtils.ts +69 -25
- package/src/util/propsAreEqual.ts +3 -33
- package/src/util/stacks/stackTypes.ts +1 -1
- package/src/util/types.ts +2 -2
- package/test/animation/CSSTransitionAnimate.timing.spec.tsx +1 -1
- package/test/animation/JavascriptAnimate.spec.tsx +1 -1
- package/test/animation/legacyAnimationLengthChange.spec.tsx +1 -1
- package/test/cartesian/Area.animation.spec.tsx +1 -1
- package/test/cartesian/Area.range.spec.tsx +1 -1
- package/test/cartesian/Area.spec.tsx +1 -1
- package/test/cartesian/Area.stacked.render.spec.tsx +1 -1
- package/test/cartesian/Area.typed.spec.tsx +1 -1
- package/test/cartesian/Axis.integration.spec.tsx +1 -1
- package/test/cartesian/Bar/Bar.csstransition.spec.tsx +1 -1
- package/test/cartesian/Bar/Bar.spec.tsx +1 -1
- package/test/cartesian/Bar/Bar.typed.spec.tsx +1 -1
- package/test/cartesian/Bar.animation.spec.tsx +1 -1
- package/test/cartesian/Bar.stackDomain.spec.tsx +1 -1
- package/test/cartesian/Bar.stacked.render.spec.tsx +1 -1
- package/test/cartesian/Bar.zeroDimensionFiltering.spec.tsx +1 -1
- package/test/cartesian/Brush.keyboard.spec.tsx +1 -1
- package/test/cartesian/Brush.panorama.spec.tsx +1 -1
- package/test/cartesian/Brush.props.spec.tsx +1 -1
- package/test/cartesian/Brush.render.spec.tsx +1 -1
- package/test/cartesian/Brush.spec.tsx +1 -1
- package/test/cartesian/Brush.stacked.spec.tsx +1 -1
- package/test/cartesian/CartesianAxis.render.spec.tsx +1 -1
- package/test/cartesian/CartesianAxis.spec.tsx +2 -2
- package/test/cartesian/CartesianGrid.render.spec.tsx +1 -1
- package/test/cartesian/CartesianGrid.spec.tsx +1 -1
- package/test/cartesian/ErrorBar.render.spec.tsx +1 -1
- package/test/cartesian/ErrorBar.spec.tsx +1 -1
- package/test/cartesian/Funnel.animation.spec.tsx +1 -1
- package/test/cartesian/Funnel.spec.tsx +1 -1
- package/test/cartesian/Funnel.typed.spec.tsx +1 -1
- package/test/cartesian/GraphicalItemClipPath.scale-behavior.spec.tsx +2 -2
- package/test/cartesian/Line.animation.spec.tsx +1 -1
- package/test/cartesian/Line.sparseAnimationPath.spec.tsx +1 -1
- package/test/cartesian/Line.spec.tsx +1 -1
- package/test/cartesian/Line.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceArea.render.spec.tsx +1 -1
- package/test/cartesian/ReferenceArea.spec.tsx +1 -1
- package/test/cartesian/ReferenceArea.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceDot.render.spec.tsx +1 -1
- package/test/cartesian/ReferenceDot.spec.tsx +1 -1
- package/test/cartesian/ReferenceDot.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/ReferenceLine.panorama.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/ReferenceLine.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/ReferenceLine.typed.spec.tsx +1 -1
- package/test/cartesian/ReferenceLine/getEndPoints.spec.ts +1 -1
- package/test/cartesian/ReferenceLine.render.spec.tsx +1 -1
- package/test/cartesian/Scatter.animation.spec.tsx +1 -1
- package/test/cartesian/Scatter.render.spec.tsx +1 -1
- package/test/cartesian/Scatter.spec.tsx +1 -1
- package/test/cartesian/Scatter.typed.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.barSize.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.brush.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.categorydomain.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.datatypes.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.hide.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.multiaxis.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.numberdomain.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.padding.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.padding_clip.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.state.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.tick.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.timescale.spec.tsx +2 -2
- package/test/cartesian/XAxis/XAxis.typed.spec.tsx +1 -1
- package/test/cartesian/XAxis/XAxis.vertical.spec.tsx +1 -1
- package/test/cartesian/XAxis.tickFormatter.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.7362.derivedDomain.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.interval-zero.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.label.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.tick.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.tickFormatter.spec.tsx +1 -1
- package/test/cartesian/YAxis/YAxis.typed.spec.tsx +1 -1
- package/test/cartesian/ZAxis.spec.tsx +1 -1
- package/test/cartesian/ZAxis.typed.spec.tsx +1 -1
- package/test/cartesian/axisLineAndStroke.spec.tsx +1 -1
- package/test/cartesian/miscFeatureGaps.spec.tsx +1 -1
- package/test/chart/AccessibilityLayer.spec.tsx +1 -1
- package/test/chart/AccessibilityScans.spec.tsx +2 -2
- package/test/chart/AreaChart.spec.tsx +1 -1
- package/test/chart/AreaChart.typed.spec.tsx +1 -1
- package/test/chart/BarChart.spec.tsx +1 -1
- package/test/chart/BarChart.typed.spec.tsx +1 -1
- package/test/chart/CategoricalChart.spec.tsx +1 -1
- package/test/chart/ComposedChart.spec.tsx +1 -1
- package/test/chart/ComposedChart.typed.spec.tsx +1 -1
- package/test/chart/FunnelChart.spec.tsx +1 -1
- package/test/chart/FunnelChart.typed.spec.tsx +1 -1
- package/test/chart/LineChart.smoke.spec.tsx +1 -1
- package/test/chart/LineChart.spec.tsx +1 -1
- package/test/chart/LineChart.typed.spec.tsx +1 -1
- package/test/chart/NicheChartTooltip.spec.tsx +1 -1
- package/test/chart/PieChart.spec.tsx +1 -1
- package/test/chart/PieChart.typed.spec.tsx +1 -1
- package/test/chart/RadarChart.spec.tsx +1 -1
- package/test/chart/RadarChart.typed.spec.tsx +1 -1
- package/test/chart/RadialBarChart.spec.tsx +1 -1
- package/test/chart/RadialBarChart.typed.spec.tsx +1 -1
- package/test/chart/RechartsWrapper.spec.tsx +1 -1
- package/test/chart/Sankey.content.spec.tsx +1 -1
- package/test/chart/Sankey.spec.tsx +1 -1
- package/test/chart/ScatterChart.spec.tsx +1 -1
- package/test/chart/ScatterChart.typed.spec.tsx +1 -1
- package/test/chart/SunburstChart.spec.tsx +1 -1
- package/test/chart/Treemap.animation.spec.tsx +1 -1
- package/test/chart/Treemap.spec.tsx +1 -1
- package/test/chart/chartEvents.spec.tsx +1 -1
- package/test/chart/responsive.spec.tsx +1 -1
- package/test/component/Cell.render.spec.tsx +1 -1
- package/test/component/Cell.spec.tsx +1 -1
- package/test/component/Cursor.spec.tsx +1 -1
- package/test/component/DefaultTooltipContent.spec.tsx +1 -1
- package/test/component/Label.render.spec.tsx +1 -1
- package/test/component/Label.spec.tsx +1 -1
- package/test/component/LabelList.spec.tsx +1 -1
- package/test/component/Legend.itemSorter.spec.tsx +1 -1
- package/test/component/Legend.render.spec.tsx +1 -1
- package/test/component/Legend.spec.tsx +1 -1
- package/test/component/ResponsiveContainer.spec.tsx +1 -1
- package/test/component/ResponsiveContainerDataTest.spec.tsx +1 -1
- package/test/component/Text.spec.tsx +1 -1
- package/test/component/Tooltip/ActiveDot.spec.tsx +1 -1
- package/test/component/Tooltip/tooltipEventType.spec.tsx +1 -1
- package/test/component/Tooltip/tooltipTestHelpers.tsx +1 -1
- package/test/component/Tooltip.defaultIndex.spec.tsx +1 -1
- package/test/component/Tooltip.hover.spec.tsx +1 -1
- package/test/component/Tooltip.item.spec.tsx +1 -1
- package/test/component/Tooltip.keyboard.spec.tsx +1 -1
- package/test/component/Tooltip.payload.spec.tsx +1 -1
- package/test/component/Tooltip.touch.spec.tsx +1 -1
- package/test/component/Tooltip.visibility.spec.tsx +1 -1
- package/test/component/TooltipBoundingBox.spec.tsx +2 -2
- package/test/container/ClipPath.spec.tsx +1 -1
- package/test/context/chartLayoutContext.spec.tsx +1 -1
- package/test/helper/createSelectorTestCase.tsx +1 -1
- package/test/helper/mockAxes.ts +1 -1
- package/test/helper/selectorTestHelpers.tsx +1 -1
- package/test/hooks/useActiveTooltipDataPoints.spec.tsx +1 -1
- package/test/hooks/useOffset.spec.tsx +1 -1
- package/test/hooks/useTooltipStateHooks.spec.tsx +1 -1
- package/test/polar/Pie/Pie-TwoLevelPieChart.spec.tsx +1 -1
- package/test/polar/Pie/Pie.spec.tsx +1 -1
- package/test/polar/Pie/Pie.typed.spec.tsx +1 -1
- package/test/polar/Pie.animation.spec.tsx +1 -1
- package/test/polar/PieWithLegend.animation.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis/PolarAngleAxis.events.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis/PolarAngleAxis.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis/PolarAngleAxis.typed.spec.tsx +1 -1
- package/test/polar/PolarAngleAxis.render.spec.tsx +1 -1
- package/test/polar/PolarGrid.render.spec.tsx +1 -1
- package/test/polar/PolarGrid.spec.tsx +1 -1
- package/test/polar/PolarLegendPerRow.render.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.events.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.render.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.spec.tsx +1 -1
- package/test/polar/PolarRadiusAxis.typed.spec.tsx +1 -1
- package/test/polar/PolarTooltipLegend.render.spec.tsx +1 -1
- package/test/polar/Radar.animation.spec.tsx +1 -1
- package/test/polar/Radar.render.spec.tsx +1 -1
- package/test/polar/Radar.spec.tsx +1 -1
- package/test/polar/Radar.typed.spec.tsx +1 -1
- package/test/polar/RadialBar/RadialBar.spec.tsx +1 -1
- package/test/polar/RadialBar/RadialBar.typed.spec.tsx +1 -1
- package/test/polar/RadialBar.animation.spec.tsx +1 -1
- package/test/polar/RadialBar.render.spec.tsx +1 -1
- package/test/polar/RadialBar.stacked.spec.tsx +1 -1
- package/test/setup.ts +1 -1
- package/test/shape/ActiveShape.spec.tsx +1 -1
- package/test/shape/Cross.spec.tsx +1 -1
- package/test/shape/Curve.spec.tsx +2 -2
- package/test/shape/Curve.typed.spec.tsx +1 -1
- package/test/shape/Dot.spec.tsx +1 -1
- package/test/shape/Polygon.spec.tsx +1 -1
- package/test/shape/Rectangle.animation.spec.tsx +1 -1
- package/test/shape/Rectangle.spec.tsx +1 -1
- package/test/shape/Sector.spec.tsx +1 -1
- package/test/shape/Symbols.spec.tsx +1 -1
- package/test/shape/Trapezoid.spec.tsx +1 -1
- package/test/state/createCollectionActions.spec.ts +87 -0
- package/test/state/createSelector.spec.ts +158 -0
- package/test/state/hooks.spec.tsx +1 -1
- package/test/state/registerInStore.spec.tsx +101 -0
- package/test/state/selectors/axisSelectors.spec.tsx +1 -1
- package/test/state/selectors/combiners/combineConfiguredScale.spec.ts +1 -1
- package/test/state/selectors/combiners/combineRealScaleType.spec.ts +1 -1
- package/test/state/selectors/dataSelectors.spec.tsx +1 -1
- package/test/state/selectors/legendSelectors.spec.tsx +1 -1
- package/test/state/selectors/radarSelectors.spec.tsx +1 -1
- package/test/state/selectors/selectActiveTooltipIndex.spec.tsx +1 -1
- package/test/state/selectors/selectDisplayedData.spec.tsx +1 -1
- package/test/state/selectors/selectStackGroups.spec.tsx +1 -1
- package/test/state/selectors/selectorMemoization.spec.tsx +136 -0
- package/test/state/selectors/selectors.spec.tsx +1 -1
- package/test/util/CartesianUtils/CartesianUtils.spec.ts +1 -1
- package/test/util/ChartUtils/ChartUtils.spec.ts +1 -1
- package/test/util/ChartUtils/getCateCoordinateOfLine.spec.ts +14 -0
- package/test/util/ChartUtils/getStackedData.spec.ts +1 -1
- package/test/util/ChartUtils/truncateByDomain.spec.ts +1 -1
- package/test/util/DomUtils.spec.tsx +1 -1
- package/test/util/FunnelUtils.spec.tsx +1 -1
- package/test/util/scale/createCategoricalInverse.spec.ts +1 -1
- package/test/util/useElementOffset.spec.tsx +1 -1
- package/test/util/usePrefersReducedMotion.spec.ts +1 -1
- package/test/util/useUniqueId.spec.ts +1 -1
- package/test/zIndex/AllZIndexPortals.spec.tsx +1 -1
- package/test/zIndex/DynamicZIndex.spec.tsx +1 -1
- package/test/zIndex/ZIndexLayer.portalOwner.spec.tsx +1 -1
- package/test/zIndex/componentZIndex.spec.tsx +1 -1
- package/test/zIndex/multiChartZIndexIsolation.spec.tsx +1 -1
- package/test-results/.last-run.json +4 -0
- package/NEXT_SESSION_PROMPT.md +0 -114
- package/src/state/reduxDevtoolsJsonStringifyReplacer.ts +0 -15
- package/src/util/axisPropsAreEqual.ts +0 -42
- package/src/util/resolveDefaultProps.tsx +0 -8
- package/src/util/typedDataKey.ts +0 -8
- package/test/helper/render.ts +0 -7
- package/test/state/reduxDevtoolsJsonStringifyReplacer.spec.ts +0 -25
- package/test/util/axisPropsAreEqual.spec.ts +0 -93
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Show, createSignal, flush } from "solid-js";
|
|
2
2
|
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
3
|
-
import { fireEvent, render } from "
|
|
3
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
4
4
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
5
5
|
import { BarChart } from "../../src";
|
|
6
6
|
import { RechartsWrapper } from "../../src/chart/RechartsWrapper";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
4
|
import { flush } from "solid-js";
|
|
5
5
|
import { Sankey } from "../../src";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
|
|
8
8
|
const data = {
|
|
9
9
|
nodes: [{ name: "A" }, { name: "B" }, { name: "C" }, { name: "D" }],
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// before the layout computes.
|
|
5
5
|
import { describe, expect, it, vi } from "vitest";
|
|
6
6
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
7
|
-
import { render, fireEvent } from "
|
|
7
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
8
8
|
import { Sankey, Tooltip, XAxis, YAxis } from "../../src";
|
|
9
9
|
import { computeData, sankeyPayloadSearcher } from "../../src/chart/Sankey";
|
|
10
10
|
import type { SankeyLinkProps, SankeyNodeProps } from "../../src";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import { expectScatterPoints, expectScatterPointsUnordered } from "../helper/expectScatterPoints";
|
|
22
22
|
import { expectXAxisTicks, expectYAxisTicks } from "../helper/expectAxisTicks";
|
|
23
23
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
24
|
-
import { fireEvent, render } from "
|
|
24
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
25
25
|
import { boxPlotData, PageData } from "../_data";
|
|
26
26
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
27
27
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { Scatter, ScatterChart } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/chart/ScatterChart.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// size is reported via an effect (ReportChartSize) before the arcs compute.
|
|
5
5
|
import { describe, expect, it, vi } from "vitest";
|
|
6
6
|
import { createEffect, flush } from "solid-js";
|
|
7
|
-
import { render, fireEvent } from "
|
|
7
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
8
8
|
import { SunburstChart } from "../../src";
|
|
9
9
|
import type { SunburstData } from "../../src";
|
|
10
10
|
import { useChartHeight, useChartWidth, useViewBox } from "../../src/context/chartLayoutContext";
|
|
@@ -6,7 +6,7 @@ import { describe, expect, it } from "vitest";
|
|
|
6
6
|
import { flush } from "solid-js";
|
|
7
7
|
import { Treemap } from "../../src";
|
|
8
8
|
import { exampleTreemapData } from "../_data";
|
|
9
|
-
import { render } from "
|
|
9
|
+
import { render } from "@solidjs/testing-library";
|
|
10
10
|
|
|
11
11
|
function depthLayers(container: Element): Element[] {
|
|
12
12
|
return Array.from(container.querySelectorAll(".recharts-treemap-depth-1"));
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// chart size is reported via an effect before the layout computes.
|
|
5
5
|
import { describe, expect, it, vi } from "vitest";
|
|
6
6
|
import { createEffect, flush } from "solid-js";
|
|
7
|
-
import { render, fireEvent, screen } from "
|
|
7
|
+
import { render, fireEvent, screen } from "@solidjs/testing-library";
|
|
8
8
|
import { Tooltip, Treemap, XAxis, YAxis } from "../../src";
|
|
9
9
|
import { getTooltip, showTooltip } from "../component/Tooltip/tooltipTestHelpers";
|
|
10
10
|
import { treemapNodeChartMouseHoverTooltipSelector } from "../component/Tooltip/tooltipMouseHoverSelectors";
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
// RechartsWrapper.handleClick now flush()es between dispatchMouseClick and the
|
|
28
28
|
// external-handler dispatch.
|
|
29
29
|
import { describe, it, expect, vi, beforeEach, type Mock } from "vitest";
|
|
30
|
-
import { fireEvent, render } from "
|
|
30
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
31
31
|
import {
|
|
32
32
|
BarChartCase,
|
|
33
33
|
ComposedChartCase,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
2
|
import { flush } from "solid-js";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
5
5
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
6
6
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// and `flush()` because the items register via effects and compute from the store.
|
|
7
7
|
import { describe, expect, it } from "vitest";
|
|
8
8
|
import { flush } from "solid-js";
|
|
9
|
-
import { render } from "
|
|
9
|
+
import { render } from "@solidjs/testing-library";
|
|
10
10
|
import {
|
|
11
11
|
BarChart,
|
|
12
12
|
Bar,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Ported from recharts 3.8.1 test/component/Cell.spec.tsx.
|
|
2
2
|
// Harness changes only: render from the local Solid shim, no React import,
|
|
3
3
|
// render takes a thunk. The assertion is byte-identical to recharts.
|
|
4
|
-
import { render } from "
|
|
4
|
+
import { render } from "@solidjs/testing-library";
|
|
5
5
|
import { Cell } from "../../src";
|
|
6
6
|
|
|
7
7
|
describe("<Cell />", () => {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// Solid port is `boolean | Record<string, unknown>`, with no element form.
|
|
10
10
|
import { describe, expect, it } from "vitest";
|
|
11
11
|
import { flush } from "solid-js";
|
|
12
|
-
import { render } from "
|
|
12
|
+
import { render } from "@solidjs/testing-library";
|
|
13
13
|
import {
|
|
14
14
|
Cursor,
|
|
15
15
|
CursorInternal,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// per-data-point labels for graphical items (via LabelList + its context).
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
import { BarChart, Bar, LineChart, Line, XAxis, YAxis, ReferenceLine } from "../../src";
|
|
8
8
|
|
|
9
9
|
const data = [
|
|
@@ -7,7 +7,7 @@ import { Label, Line, LineChart, PieChart, ReferenceLine, Surface } from "../../
|
|
|
7
7
|
import type { Props as LabelProps } from "../../src/component/Label";
|
|
8
8
|
import { DefaultZIndexes } from "../../src/zIndex/DefaultZIndexes";
|
|
9
9
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
10
|
-
import { render, screen } from "
|
|
10
|
+
import { render, screen } from "@solidjs/testing-library";
|
|
11
11
|
import { AnimationControllerProvider } from "../../src/animation/useAnimationController";
|
|
12
12
|
import { MockControllerAnimationManager as MockProgressAnimationManager } from "../animation/mockControllerAnimationManager";
|
|
13
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Ported from recharts 3.8.1 test/component/LabelList.spec.tsx (commit 7a23854).
|
|
2
2
|
import { flush } from "solid-js";
|
|
3
3
|
import { Bar, BarChart, LabelList, Scatter, ScatterChart, XAxis, YAxis, ZAxis } from "../../src";
|
|
4
|
-
import { render } from "
|
|
4
|
+
import { render } from "@solidjs/testing-library";
|
|
5
5
|
import { expectLabels } from "../helper/expectLabel";
|
|
6
6
|
import { expectScatterPoints } from "../helper/expectScatterPoints";
|
|
7
7
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { beforeEach, describe, expect, it, test, vi } from "vitest";
|
|
13
13
|
import { createSignal, flush, For } from "solid-js";
|
|
14
14
|
import type { JSX } from "@solidjs/web";
|
|
15
|
-
import { render } from "
|
|
15
|
+
import { render } from "@solidjs/testing-library";
|
|
16
16
|
import {
|
|
17
17
|
Area,
|
|
18
18
|
AreaChart,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// the portal. itemSorter defaults to "value" → alphabetical by label.
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
|
-
import { render } from "
|
|
6
|
+
import { render } from "@solidjs/testing-library";
|
|
7
7
|
import { Area, AreaChart, Bar, BarChart, Legend, Line, LineChart } from "../../src";
|
|
8
8
|
import { numericalData, PageData } from "../_data";
|
|
9
9
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// supported by the port (see reclassifiedBlocked) and are omitted.
|
|
11
11
|
import { createEffect, createSignal, flush, Show } from "solid-js";
|
|
12
12
|
import { describe, expect, it, test, vi } from "vitest";
|
|
13
|
-
import { fireEvent, render, screen } from "
|
|
13
|
+
import { fireEvent, render, screen } from "@solidjs/testing-library";
|
|
14
14
|
import {
|
|
15
15
|
Area,
|
|
16
16
|
AreaChart,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
2
2
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
3
|
-
import { render, screen } from "
|
|
3
|
+
import { render, screen } from "@solidjs/testing-library";
|
|
4
4
|
import { ResponsiveContainer, useResponsiveContainerContext } from "../../src";
|
|
5
5
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
6
6
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, test } from "vitest";
|
|
2
|
-
import { render } from "
|
|
2
|
+
import { render } from "@solidjs/testing-library";
|
|
3
3
|
import { ResponsiveContainer, BarChart, Bar } from "../../src";
|
|
4
4
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { vi } from "vitest";
|
|
2
|
-
import { render, screen } from "
|
|
2
|
+
import { render, screen } from "@solidjs/testing-library";
|
|
3
3
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
4
4
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
5
5
|
import { Surface, Text } from "../../src";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
2
2
|
import { flush } from "solid-js";
|
|
3
3
|
import type { JSX } from "@solidjs/web";
|
|
4
|
-
import { fireEvent, render } from "
|
|
4
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
5
5
|
import { PageData } from "../../_data";
|
|
6
6
|
import { getTooltip, hideTooltip, showTooltip } from "./tooltipTestHelpers";
|
|
7
7
|
import {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { expect, vi } from "vitest";
|
|
2
2
|
import { flush } from "solid-js";
|
|
3
|
-
import { fireEvent } from "
|
|
3
|
+
import { fireEvent } from "@solidjs/testing-library";
|
|
4
4
|
import { assertNotNull } from "../../helper/assertNotNull";
|
|
5
5
|
import type { Coordinate } from "../../../src/util/types";
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// through microtask-batched effects, and the portal target attaches via a ref.
|
|
9
9
|
import { describe, expect, it } from "vitest";
|
|
10
10
|
import { flush } from "solid-js";
|
|
11
|
-
import { render } from "
|
|
11
|
+
import { render } from "@solidjs/testing-library";
|
|
12
12
|
import { LineChart, Line, XAxis, Tooltip } from "../../src";
|
|
13
13
|
import { PageData } from "../_data";
|
|
14
14
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// places index 2 ("Page C") at x = 164; a mousemove there selects it.
|
|
10
10
|
import { describe, expect, it, vi } from "vitest";
|
|
11
11
|
import { flush } from "solid-js";
|
|
12
|
-
import { render, fireEvent } from "
|
|
12
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
13
13
|
import { LineChart, Line, XAxis, Tooltip } from "../../src";
|
|
14
14
|
import { PageData } from "../_data";
|
|
15
15
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// (filter by graphicalItemId) + the index-based payload searcher.
|
|
6
6
|
import { describe, expect, it } from "vitest";
|
|
7
7
|
import { flush } from "solid-js";
|
|
8
|
-
import { render, fireEvent } from "
|
|
8
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
9
9
|
import { BarChart, Bar, Tooltip } from "../../src";
|
|
10
10
|
import { PageData } from "../_data";
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// interaction → the same payload pipeline).
|
|
6
6
|
import { describe, expect, it } from "vitest";
|
|
7
7
|
import { flush } from "solid-js";
|
|
8
|
-
import { render, fireEvent } from "
|
|
8
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
9
9
|
import { LineChart, Line, XAxis, Tooltip } from "../../src";
|
|
10
10
|
import { PageData } from "../_data";
|
|
11
11
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { beforeEach, describe, expect, it } from "vitest";
|
|
8
8
|
import { flush } from "solid-js";
|
|
9
9
|
import type { JSX } from "@solidjs/web";
|
|
10
|
-
import { render, fireEvent } from "
|
|
10
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
11
11
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
12
12
|
import {
|
|
13
13
|
Area,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// selectActivePropsFromChartPointer → setMouseOverAxisIndex.
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
|
-
import { render, fireEvent } from "
|
|
6
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
7
7
|
import { LineChart, Line, XAxis, Tooltip } from "../../src";
|
|
8
8
|
import { PageData } from "../_data";
|
|
9
9
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { createSignal, flush, Show } from "solid-js";
|
|
7
7
|
import type { JSX } from "@solidjs/web";
|
|
8
8
|
import { beforeEach, describe, expect, it, test, vi } from "vitest";
|
|
9
|
-
import { fireEvent, getByText, render } from "
|
|
9
|
+
import { fireEvent, getByText, render } from "@solidjs/testing-library";
|
|
10
10
|
import {
|
|
11
11
|
Area,
|
|
12
12
|
AreaChart,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Ported from recharts 3.8.1 test/component/TooltipBoundingBox.spec.tsx.
|
|
2
2
|
// Harness adaptations: React render -> Solid render(() => <…/>) + flush();
|
|
3
|
-
// @testing-library/react ->
|
|
3
|
+
// @testing-library/react -> @solidjs/testing-library;
|
|
4
4
|
// userEvent.keyboard('{Escape}') -> fireEvent.keyDown(document, { key: 'Escape' }).
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
6
|
import { describe, it, expect } from "vitest";
|
|
7
|
-
import { render, screen, fireEvent } from "
|
|
7
|
+
import { render, screen, fireEvent } from "@solidjs/testing-library";
|
|
8
8
|
import { TooltipBoundingBox } from "../../src/component/TooltipBoundingBox";
|
|
9
9
|
import type { TooltipBoundingBoxProps } from "../../src/component/TooltipBoundingBox";
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "../../src";
|
|
18
18
|
import { PageData } from "../_data";
|
|
19
19
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
20
|
-
import { render } from "
|
|
20
|
+
import { render } from "@solidjs/testing-library";
|
|
21
21
|
|
|
22
22
|
function selectAllClipPaths(container: Element | null): NodeListOf<SVGRectElement> {
|
|
23
23
|
assertNotNull(container);
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import { Brush, ComposedChart, Legend, PieChart, XAxis, YAxis } from "../../src";
|
|
23
23
|
import { useClipPathId } from "../../src/container/ClipPathProvider";
|
|
24
24
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
25
|
-
import { render } from "
|
|
25
|
+
import { render } from "@solidjs/testing-library";
|
|
26
26
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
27
27
|
import { emptyOffset } from "../helper/offsetHelpers";
|
|
28
28
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { createEffect, createSignal, flush } from "solid-js";
|
|
10
10
|
import type { JSX } from "@solidjs/web";
|
|
11
11
|
import { vi, type Mock } from "vitest";
|
|
12
|
-
import { render } from "
|
|
12
|
+
import { render } from "@solidjs/testing-library";
|
|
13
13
|
import { useAppSelector, useAppStore } from "../../src/state/hooks";
|
|
14
14
|
import type { RechartsRootState } from "../../src/state/store";
|
|
15
15
|
|
package/test/helper/mockAxes.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
12
12
|
import { createRechartsStore } from "../../src/state/store";
|
|
13
13
|
import type { RechartsRootState } from "../../src/state/store";
|
|
14
14
|
import { useAppSelector } from "../../src/state/hooks";
|
|
15
|
-
import { render } from "
|
|
15
|
+
import { render } from "@solidjs/testing-library";
|
|
16
16
|
import { flush, type Accessor } from "solid-js";
|
|
17
17
|
|
|
18
18
|
type Selector<T> = (state: RechartsRootState) => T;
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from "../component/Tooltip/tooltipMouseHoverSelectors";
|
|
29
29
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
30
30
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
31
|
-
import { render } from "
|
|
31
|
+
import { render } from "@solidjs/testing-library";
|
|
32
32
|
|
|
33
33
|
describe("useActiveTooltipDataPoints", () => {
|
|
34
34
|
beforeEach(() => {
|
|
@@ -7,7 +7,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
7
7
|
import { Brush, ComposedChart, Legend, Line, LineChart, Tooltip, XAxis, YAxis } from "../../src";
|
|
8
8
|
import { useActiveTooltipDataPoints, useOffset, usePlotArea } from "../../src/hooks";
|
|
9
9
|
import { createSelectorTestCase } from "../helper/createSelectorTestCase";
|
|
10
|
-
import { render } from "
|
|
10
|
+
import { render } from "@solidjs/testing-library";
|
|
11
11
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
12
12
|
import { pageData } from "../_data";
|
|
13
13
|
import { showTooltip } from "../component/Tooltip/tooltipTestHelpers";
|
|
@@ -18,7 +18,7 @@ import { hideTooltip, showTooltip } from "../component/Tooltip/tooltipTestHelper
|
|
|
18
18
|
import { areaChartMouseHoverTooltipSelector } from "../component/Tooltip/tooltipMouseHoverSelectors";
|
|
19
19
|
import { mockGetBoundingClientRect } from "../helper/mockGetBoundingClientRect";
|
|
20
20
|
import { expectLastCalledWith } from "../helper/expectLastCalledWith";
|
|
21
|
-
import { render } from "
|
|
21
|
+
import { render } from "@solidjs/testing-library";
|
|
22
22
|
|
|
23
23
|
describe("public tooltip-state hooks", () => {
|
|
24
24
|
beforeEach(() => {
|
|
@@ -8,7 +8,7 @@ import { describe, expect, it } from "vitest";
|
|
|
8
8
|
import { flush } from "solid-js";
|
|
9
9
|
import { Pie, PieChart, Sector } from "../../../src";
|
|
10
10
|
import type { PieSectorShapeProps } from "../../../src/polar/Pie";
|
|
11
|
-
import { render, fireEvent } from "
|
|
11
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
12
12
|
|
|
13
13
|
const data1 = [
|
|
14
14
|
{ name: "Group A", value: 400 },
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
PieSectorShapeProps,
|
|
8
8
|
} from "../../../src/polar/Pie";
|
|
9
9
|
import { PageData } from "../../_data";
|
|
10
|
-
import { render, fireEvent } from "
|
|
10
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
11
11
|
import { expectPieSectors } from "../../helper/expectPieSectors";
|
|
12
12
|
import { expectTooltipPayload } from "../../component/Tooltip/tooltipTestHelpers";
|
|
13
13
|
import { assertNotNull } from "../../helper/assertNotNull";
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// (matching recharts 3.9 Pie.animation.spec).
|
|
12
12
|
import { describe, expect, it, vi } from "vitest";
|
|
13
13
|
import { createSignal, flush, Show } from "solid-js";
|
|
14
|
-
import { render, fireEvent } from "
|
|
14
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
15
15
|
import { PieChart, Pie } from "../../src";
|
|
16
16
|
import { expectPieSectors } from "../helper/expectPieSectors";
|
|
17
17
|
import { AnimationControllerProvider } from "../../src/animation/useAnimationController";
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// SYNCHRONOUSLY in its constructor (on first render), not lazily on the first tick.
|
|
13
13
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
14
14
|
import { flush } from "solid-js";
|
|
15
|
-
import { render } from "
|
|
15
|
+
import { render } from "@solidjs/testing-library";
|
|
16
16
|
import { PieChart, Pie, Legend } from "../../src";
|
|
17
17
|
import { AnimationControllerProvider } from "../../src/animation/useAnimationController";
|
|
18
18
|
import { MockControllerAnimationManager as MockProgressAnimationManager } from "../animation/mockControllerAnimationManager";
|
|
@@ -6,7 +6,7 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
6
6
|
import { flush } from "solid-js";
|
|
7
7
|
import { PolarAngleAxis, PolarRadiusAxis, RadarChart } from "../../../src";
|
|
8
8
|
import type { TickItem } from "../../../src/util/types";
|
|
9
|
-
import { fireEvent, render } from "
|
|
9
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
10
10
|
import { assertNotNull } from "../../helper/assertNotNull";
|
|
11
11
|
|
|
12
12
|
describe("PolarAngleAxis events", () => {
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import { expectLastCalledWithScale } from "../../helper/expectScale";
|
|
33
33
|
import { createSelectorTestCase } from "../../helper/createSelectorTestCase";
|
|
34
34
|
import { expectLastCalledWith } from "../../helper/expectLastCalledWith";
|
|
35
|
-
import { render } from "
|
|
35
|
+
import { render } from "@solidjs/testing-library";
|
|
36
36
|
import type { PolarAngleTickContentProps } from "../../../src/polar/PolarAngleAxis";
|
|
37
37
|
|
|
38
38
|
/*
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getRelativeCoordinate,
|
|
7
7
|
type TickItem,
|
|
8
8
|
} from "../../../src";
|
|
9
|
-
import { render } from "
|
|
9
|
+
import { render } from "@solidjs/testing-library";
|
|
10
10
|
|
|
11
11
|
// Ported from recharts 3.8.1 test/polar/PolarAngleAxis/PolarAngleAxis.typed.spec.tsx.
|
|
12
12
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// come online with Radar (which provides the item domain).
|
|
11
11
|
import { describe, expect, it } from "vitest";
|
|
12
12
|
import { flush } from "solid-js";
|
|
13
|
-
import { render } from "
|
|
13
|
+
import { render } from "@solidjs/testing-library";
|
|
14
14
|
import { RadarChart, PolarAngleAxis } from "../../src";
|
|
15
15
|
|
|
16
16
|
const data = [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// geometry comes online with the full spec.
|
|
9
9
|
import { describe, expect, it } from "vitest";
|
|
10
10
|
import { flush } from "solid-js";
|
|
11
|
-
import { render } from "
|
|
11
|
+
import { render } from "@solidjs/testing-library";
|
|
12
12
|
import { RadarChart, Radar, PolarGrid } from "../../src";
|
|
13
13
|
|
|
14
14
|
const exampleRadarData = [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// - `flush()` drains Solid's microtask-batched store writes before DOM assertions.
|
|
14
14
|
import { describe, expect, it, test } from "vitest";
|
|
15
15
|
import { flush } from "solid-js";
|
|
16
|
-
import { render } from "
|
|
16
|
+
import { render } from "@solidjs/testing-library";
|
|
17
17
|
import { exampleRadarData, pageData } from "../_data";
|
|
18
18
|
import {
|
|
19
19
|
PolarAngleAxis,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// `flush()` because legend payload registers via effects/selectors.
|
|
5
5
|
import { describe, expect, it } from "vitest";
|
|
6
6
|
import { flush } from "solid-js";
|
|
7
|
-
import { render } from "
|
|
7
|
+
import { render } from "@solidjs/testing-library";
|
|
8
8
|
import { PieChart, Pie, RadialBarChart, RadialBar, Legend, Cell } from "../../src";
|
|
9
9
|
|
|
10
10
|
const pieData = [
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { describe, expect, it, vi } from "vitest";
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
6
|
import { PolarAngleAxis, PolarRadiusAxis, RadarChart } from "../../src";
|
|
7
|
-
import { fireEvent, render } from "
|
|
7
|
+
import { fireEvent, render } from "@solidjs/testing-library";
|
|
8
8
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
9
9
|
|
|
10
10
|
describe("PolarRadiusAxis events", () => {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// axis line). Exact nice-tick geometry comes online with Radar + the full spec.
|
|
9
9
|
import { describe, expect, it } from "vitest";
|
|
10
10
|
import { flush } from "solid-js";
|
|
11
|
-
import { render } from "
|
|
11
|
+
import { render } from "@solidjs/testing-library";
|
|
12
12
|
import { RadarChart, PolarRadiusAxis } from "../../src";
|
|
13
13
|
|
|
14
14
|
const data = [
|
|
@@ -4,7 +4,7 @@ import { PolarRadiusAxis, Radar, RadarChart, RadialBar, RadialBarChart } from ".
|
|
|
4
4
|
import type { PolarRadiusTickContentProps } from "../../src/polar/PolarRadiusAxis";
|
|
5
5
|
import type { LabelContentType } from "../../src/component/Label";
|
|
6
6
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
7
|
-
import { render } from "
|
|
7
|
+
import { render } from "@solidjs/testing-library";
|
|
8
8
|
import {
|
|
9
9
|
implicitRadiusAxis,
|
|
10
10
|
selectRadiusAxis,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it } from "vitest";
|
|
2
2
|
import { PolarRadiusAxis, RadialBar, RadialBarChart, getRelativeCoordinate } from "../../src";
|
|
3
|
-
import { render } from "
|
|
3
|
+
import { render } from "@solidjs/testing-library";
|
|
4
4
|
|
|
5
5
|
// Ported from recharts 3.8.1 test/polar/PolarRadiusAxis.typed.spec.tsx.
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// `flush()` because registration + sectors compute via effects/selectors.
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { flush } from "solid-js";
|
|
6
|
-
import { render, fireEvent } from "
|
|
6
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
7
7
|
import {
|
|
8
8
|
PieChart,
|
|
9
9
|
Pie,
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
// tween state resets and the entrance animation re-runs from the center.
|
|
27
27
|
import { describe, expect, it, vi } from "vitest";
|
|
28
28
|
import { createSignal, flush } from "solid-js";
|
|
29
|
-
import { render, fireEvent } from "
|
|
29
|
+
import { render, fireEvent } from "@solidjs/testing-library";
|
|
30
30
|
import { assertNotNull } from "../helper/assertNotNull";
|
|
31
31
|
import { AnimationControllerProvider } from "../../src/animation/useAnimationController";
|
|
32
32
|
import type { AnimationController } from "../../src";
|