vccs 0.1.0 → 0.3.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/README.md +151 -0
- package/dist/animation/Animate.d.ts +1 -1
- package/dist/cartesian/area/type.d.ts +3 -3
- package/dist/cartesian/bar/type.d.ts +1 -13
- package/dist/cartesian/brush/components/Slide.d.ts +1 -1
- package/dist/cartesian/brush/components/TravellerLayer.d.ts +1 -1
- package/dist/cartesian/brush/type.d.ts +2 -1
- package/dist/cartesian/cartesian-axis/CartesianAxis.d.ts +2 -1
- package/dist/cartesian/funnel/Funnel.d.ts +2 -0
- package/dist/cartesian/funnel/index.d.ts +2 -0
- package/dist/cartesian/funnel/type.d.ts +74 -6
- package/dist/cartesian/index.d.ts +2 -0
- package/dist/cartesian/line/Line.d.ts +7 -13
- package/dist/cartesian/line/type.d.ts +4 -17
- package/dist/cartesian/reference-area/ReferenceArea.d.ts +16 -16
- package/dist/cartesian/reference-dot/ReferenceDot.d.ts +143 -0
- package/dist/cartesian/reference-dot/index.d.ts +2 -0
- package/dist/cartesian/reference-line/ReferenceLine.d.ts +8 -8
- package/dist/cartesian/scatter/Scatter.d.ts +1 -1
- package/dist/chart/FunnelChart.d.ts +1 -0
- package/dist/chart/RechartsWrapper.d.ts +7 -3
- package/dist/chart/Surface.d.ts +2 -1
- package/dist/chart/Treemap.d.ts +237 -0
- package/dist/chart/generateCategoricalChart.d.ts +2 -1
- package/dist/chart/index.d.ts +2 -0
- package/dist/chart/treemapUtils.d.ts +22 -0
- package/dist/components/Customized.d.ts +23 -0
- package/dist/components/Text.d.ts +4 -4
- package/dist/components/Tooltip.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/label/Label.d.ts +3 -3
- package/dist/components/label/types.d.ts +1 -1
- package/dist/container/Surface.d.ts +3 -2
- package/dist/es/animation/Animate.mjs +48 -22
- package/dist/es/cartesian/GraphicalItemClipPath.mjs +16 -15
- package/dist/es/cartesian/area/ActivePoints.mjs +44 -40
- package/dist/es/cartesian/area/Area.mjs +42 -31
- package/dist/es/cartesian/area/ClipRect.mjs +79 -58
- package/dist/es/cartesian/area/RenderArea.mjs +142 -108
- package/dist/es/cartesian/area/hooks/useArea.mjs +71 -47
- package/dist/es/cartesian/area/type.mjs +13 -15
- package/dist/es/cartesian/area/utils.mjs +69 -49
- package/dist/es/cartesian/axis/XAxis.mjs +87 -73
- package/dist/es/cartesian/axis/YAxis.mjs +67 -56
- package/dist/es/cartesian/bar/Bar.mjs +78 -71
- package/dist/es/cartesian/bar/components/BarBackground.mjs +22 -19
- package/dist/es/cartesian/bar/components/BarRectangles.mjs +117 -80
- package/dist/es/cartesian/bar/hooks/useBar.mjs +49 -37
- package/dist/es/cartesian/bar/type.mjs +11 -25
- package/dist/es/cartesian/bar/utils.mjs +97 -70
- package/dist/es/cartesian/cartesian-axis/CartesianAxis.mjs +165 -115
- package/dist/es/cartesian/cartesian-grid/Background.mjs +19 -16
- package/dist/es/cartesian/cartesian-grid/CartesianGrid.mjs +116 -97
- package/dist/es/cartesian/cartesian-grid/HorizontalGridLines.mjs +24 -23
- package/dist/es/cartesian/cartesian-grid/HorizontalStripes.mjs +24 -24
- package/dist/es/cartesian/cartesian-grid/VerticalGridLines.mjs +23 -22
- package/dist/es/cartesian/cartesian-grid/VerticalStripes.mjs +24 -24
- package/dist/es/cartesian/cartesian-grid/const.mjs +317 -10
- package/dist/es/cartesian/cartesian-grid/utils.mjs +18 -13
- package/dist/es/cartesian/error-bar/ErrorBar.mjs +111 -83
- package/dist/es/cartesian/error-bar/ErrorBarContext.mjs +13 -12
- package/dist/es/cartesian/funnel/Funnel.mjs +162 -0
- package/dist/es/cartesian/funnel/type.mjs +78 -0
- package/dist/es/cartesian/funnel/utils.mjs +102 -0
- package/dist/es/cartesian/line/ActivePoints.mjs +45 -41
- package/dist/es/cartesian/line/Line.mjs +41 -37
- package/dist/es/cartesian/line/StaticLine.mjs +191 -122
- package/dist/es/cartesian/line/hooks/useLine.mjs +60 -44
- package/dist/es/cartesian/line/type.mjs +13 -18
- package/dist/es/cartesian/line/utils.mjs +27 -26
- package/dist/es/cartesian/reference-area/ReferenceArea.mjs +79 -78
- package/dist/es/cartesian/reference-dot/ReferenceDot.mjs +134 -0
- package/dist/es/cartesian/reference-line/ReferenceLine.mjs +93 -84
- package/dist/es/cartesian/scatter/Scatter.mjs +168 -140
- package/dist/es/cartesian/scatter/hooks/useScatter.mjs +18 -14
- package/dist/es/cartesian/useNeedsClip.mjs +18 -9
- package/dist/es/cartesian/utils/get-ticks.mjs +103 -68
- package/dist/es/cartesian/z-axis/ZAxis.mjs +30 -28
- package/dist/es/chart/AreaChart.mjs +5 -5
- package/dist/es/chart/BarChart.mjs +5 -5
- package/dist/es/chart/ComposedChart.mjs +5 -5
- package/dist/es/chart/FunnelChart.mjs +11 -0
- package/dist/es/chart/LegendPortalContext.mjs +3 -3
- package/dist/es/chart/LineChart.mjs +5 -5
- package/dist/es/chart/PieChart.mjs +5 -5
- package/dist/es/chart/RadarChart.mjs +5 -5
- package/dist/es/chart/RadialBarChart.mjs +5 -5
- package/dist/es/chart/RechartsWrapper.mjs +113 -89
- package/dist/es/chart/ScatterChart.mjs +5 -5
- package/dist/es/chart/Surface.mjs +3 -3
- package/dist/es/chart/Surface.vue_vue_type_script_setup_true_lang.mjs +51 -45
- package/dist/es/chart/TooltipPortalContext.mjs +3 -3
- package/dist/es/chart/Treemap.mjs +379 -0
- package/dist/es/chart/const.mjs +2 -2
- package/dist/es/chart/generateCategoricalChart.mjs +99 -89
- package/dist/es/chart/provideClipPathId.mjs +12 -7
- package/dist/es/chart/treemapUtils.mjs +32 -0
- package/dist/es/components/Cell.mjs +16 -4
- package/dist/es/components/Customized.mjs +43 -0
- package/dist/es/components/Text.mjs +3 -3
- package/dist/es/components/Text.vue_vue_type_script_setup_true_lang.mjs +106 -69
- package/dist/es/components/Tooltip.mjs +274 -199
- package/dist/es/components/label/Label.mjs +30 -26
- package/dist/es/components/label/LabelList.mjs +45 -39
- package/dist/es/components/label/types.mjs +10 -6
- package/dist/es/components/label/utils.mjs +194 -162
- package/dist/es/components/legend/Legend.mjs +82 -71
- package/dist/es/components/legend/LegendSymbol.mjs +40 -38
- package/dist/es/components/legend/hooks/useLegend.mjs +71 -46
- package/dist/es/components/legend/hooks/useLegendContent.mjs +52 -31
- package/dist/es/components/legend/type.mjs +2 -2
- package/dist/es/components/legend/utils.mjs +19 -11
- package/dist/es/components/utils.mjs +35 -22
- package/dist/es/container/ClipPath.mjs +14 -14
- package/dist/es/container/Layer.mjs +9 -7
- package/dist/es/container/ResponsiveContainer.mjs +3 -3
- package/dist/es/container/ResponsiveContainer.vue_vue_type_script_setup_true_lang.mjs +109 -77
- package/dist/es/container/Surface.mjs +25 -23
- package/dist/es/container/useSizeContext.mjs +3 -3
- package/dist/es/context/ChartDataContextProvider.mjs +19 -13
- package/dist/es/context/PanoramaContextProvider.mjs +15 -10
- package/dist/es/context/accessibilityContext.mjs +3 -3
- package/dist/es/context/cartesianLabelListContext.mjs +3 -3
- package/dist/es/context/chartLayoutContext.mjs +33 -30
- package/dist/es/context/cursorLayerContext.mjs +3 -3
- package/dist/es/context/graphicalLayerContext.mjs +3 -3
- package/dist/es/context/labelLayerContext.mjs +3 -3
- package/dist/es/context/polarLabelViewBoxContext.mjs +5 -5
- package/dist/es/context/useTooltipAxis.mjs +14 -12
- package/dist/es/events/useChartSynchronisation.mjs +91 -66
- package/dist/es/hooks/publicHooks.mjs +207 -0
- package/dist/es/hooks/useIsAnimating.mjs +28 -0
- package/dist/es/hooks/useSetupGraphicalItem.mjs +52 -43
- package/dist/es/index.mjs +54 -42
- package/dist/es/polar/pie/Pie.mjs +131 -115
- package/dist/es/polar/pie/type.mjs +8 -10
- package/dist/es/polar/radar/PolarAngleAxis.mjs +103 -84
- package/dist/es/polar/radar/PolarGrid.mjs +72 -59
- package/dist/es/polar/radar/PolarRadiusAxis.mjs +90 -65
- package/dist/es/polar/radar/Radar.mjs +181 -145
- package/dist/es/polar/radial-bar/RadialBar.mjs +161 -140
- package/dist/es/polar/radial-bar/type.mjs +9 -9
- package/dist/es/shape/Cross.mjs +11 -10
- package/dist/es/shape/Curve.mjs +71 -44
- package/dist/es/shape/Dot.mjs +12 -11
- package/dist/es/shape/Polygon.mjs +19 -0
- package/dist/es/shape/Rectangle.mjs +41 -30
- package/dist/es/shape/Sector.mjs +105 -79
- package/dist/es/shape/Symbols.mjs +45 -34
- package/dist/es/shape/Trapezoid.mjs +50 -0
- package/dist/es/state/ReportChartProps.mjs +23 -24
- package/dist/es/state/ReportMainChartProps.mjs +26 -21
- package/dist/es/state/ReportPolarOptions.mjs +23 -22
- package/dist/es/state/SetGraphicalItem.mjs +42 -27
- package/dist/es/state/SetLegendPayload.mjs +17 -13
- package/dist/es/state/SetTooltipEntrySettings.mjs +14 -12
- package/dist/es/state/brushSlice.mjs +12 -8
- package/dist/es/state/cartesianAxisSlice.mjs +23 -17
- package/dist/es/state/chartDataSlice.mjs +18 -13
- package/dist/es/state/externalEventsMiddleware.mjs +25 -15
- package/dist/es/state/graphicalItemsSlice.mjs +29 -25
- package/dist/es/state/hooks.mjs +24 -3
- package/dist/es/state/keyboardEventsMiddleware.mjs +50 -42
- package/dist/es/state/layoutSlice.mjs +18 -12
- package/dist/es/state/legendSlice.mjs +19 -14
- package/dist/es/state/mouseEventsMiddleware.mjs +31 -24
- package/dist/es/state/optionsSlice.mjs +14 -11
- package/dist/es/state/polarAxisSlice.mjs +15 -13
- package/dist/es/state/polarOptionsSlice.mjs +8 -6
- package/dist/es/state/reduxDevtoolsJsonStringifyReplacer.mjs +5 -3
- package/dist/es/state/referenceElementsSlice.mjs +21 -19
- package/dist/es/state/rootPropsSlice.mjs +20 -9
- package/dist/es/state/selectors/areaSelectors.mjs +65 -55
- package/dist/es/state/selectors/axisSelectors.mjs +784 -569
- package/dist/es/state/selectors/barSelectors.mjs +225 -162
- package/dist/es/state/selectors/brushSelectors.mjs +15 -14
- package/dist/es/state/selectors/combiners/combineActiveLabel.mjs +6 -5
- package/dist/es/state/selectors/combiners/combineActiveTooltipIndex.mjs +36 -27
- package/dist/es/state/selectors/combiners/combineAxisRangeWithReverse.mjs +5 -3
- package/dist/es/state/selectors/combiners/combineCoordinateForDefaultIndex.mjs +13 -11
- package/dist/es/state/selectors/combiners/combineTooltipInteractionState.mjs +26 -21
- package/dist/es/state/selectors/combiners/combineTooltipPayloadConfigurations.mjs +10 -6
- package/dist/es/state/selectors/common.mjs +2 -2
- package/dist/es/state/selectors/containerSelectors.mjs +5 -2
- package/dist/es/state/selectors/dataSelectors.mjs +28 -9
- package/dist/es/state/selectors/funnelSelectors.mjs +38 -0
- package/dist/es/state/selectors/legendSelectors.mjs +7 -6
- package/dist/es/state/selectors/lineSelectors.mjs +54 -47
- package/dist/es/state/selectors/pickAxisId.mjs +2 -2
- package/dist/es/state/selectors/pickAxisType.mjs +2 -2
- package/dist/es/state/selectors/pieSelectors.mjs +116 -81
- package/dist/es/state/selectors/polarAxisSelectors.mjs +113 -94
- package/dist/es/state/selectors/polarGridSelectors.mjs +13 -11
- package/dist/es/state/selectors/polarScaleSelectors.mjs +49 -46
- package/dist/es/state/selectors/polarSelectors.mjs +79 -62
- package/dist/es/state/selectors/radarSelectors.mjs +111 -91
- package/dist/es/state/selectors/radialBarSelectors.mjs +230 -183
- package/dist/es/state/selectors/rootPropsSelectors.mjs +11 -5
- package/dist/es/state/selectors/scatterSelectors.mjs +111 -95
- package/dist/es/state/selectors/selectActivePropsFromChartPointer.mjs +19 -17
- package/dist/es/state/selectors/selectAllAxes.mjs +8 -3
- package/dist/es/state/selectors/selectChartOffset.mjs +59 -50
- package/dist/es/state/selectors/selectChartOffsetInternal.mjs +55 -44
- package/dist/es/state/selectors/selectTooltipEventType.mjs +15 -14
- package/dist/es/state/selectors/selectTooltipPayloadSearcher.mjs +3 -3
- package/dist/es/state/selectors/selectTooltipSettings.mjs +2 -2
- package/dist/es/state/selectors/selectTooltipState.mjs +2 -2
- package/dist/es/state/selectors/selectors.mjs +94 -75
- package/dist/es/state/selectors/tooltipSelectors.mjs +253 -204
- package/dist/es/state/selectors/touchSelectors.mjs +17 -14
- package/dist/es/state/store.mjs +46 -46
- package/dist/es/state/tooltipSlice.mjs +64 -37
- package/dist/es/state/touchEventsMiddleware.mjs +35 -29
- package/dist/es/state/utils/useReportScale.mjs +16 -13
- package/dist/es/synchronisation/syncSelectors.mjs +3 -3
- package/dist/es/synchronisation/useChartSynchronisation.mjs +33 -19
- package/dist/es/types/common.mjs +12 -0
- package/dist/es/types/event.mjs +164 -2
- package/dist/es/utils/ReduceCSSCalc.mjs +81 -49
- package/dist/es/utils/VueUtils.mjs +35 -14
- package/dist/es/utils/attrs.mjs +43 -26
- package/dist/es/utils/cartesian.mjs +47 -15
- package/dist/es/utils/cell.mjs +28 -0
- package/dist/es/utils/chart.mjs +298 -197
- package/dist/es/utils/const.mjs +30 -2
- package/dist/es/utils/createCategoricalInverse.mjs +46 -0
- package/dist/es/utils/createContext.mjs +28 -9
- package/dist/es/utils/data-utils.mjs +9 -8
- package/dist/es/utils/data.mjs +35 -21
- package/dist/es/utils/events.mjs +5 -3
- package/dist/es/utils/getLinearRegression.mjs +28 -11
- package/dist/es/utils/grid.mjs +20 -5
- package/dist/es/utils/isDomainSpecifiedByUser.mjs +105 -54
- package/dist/es/utils/legend.mjs +13 -12
- package/dist/es/utils/log.mjs +10 -7
- package/dist/es/utils/payload/getUniqPayload.mjs +6 -4
- package/dist/es/utils/polar.mjs +37 -30
- package/dist/es/utils/props.mjs +16 -10
- package/dist/es/utils/resolveDefaultProps.mjs +23 -4
- package/dist/es/utils/scale/getNiceTickValues.mjs +127 -49
- package/dist/es/utils/scale/utils/arithmetic.mjs +49 -19
- package/dist/es/utils/scale/utils/utils.mjs +43 -24
- package/dist/es/utils/scale.mjs +46 -0
- package/dist/es/utils/style.mjs +24 -13
- package/dist/es/utils/tick.mjs +34 -23
- package/dist/es/utils/tooltip/translate.mjs +63 -49
- package/dist/es/utils/validate.mjs +40 -29
- package/dist/hooks/publicHooks.d.ts +143 -0
- package/dist/hooks/useIsAnimating.d.ts +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/polar/pie/type.d.ts +2 -2
- package/dist/polar/radar/Radar.d.ts +4 -4
- package/dist/shape/Curve.d.ts +2 -1
- package/dist/shape/Polygon.d.ts +9 -0
- package/dist/shape/Rectangle.d.ts +0 -4
- package/dist/shape/Sector.d.ts +2 -2
- package/dist/shape/Symbols.d.ts +2 -1
- package/dist/shape/Trapezoid.d.ts +30 -0
- package/dist/shape/index.d.ts +2 -0
- package/dist/shape/types.d.ts +4 -5
- package/dist/state/ReportChartProps.d.ts +3 -3
- package/dist/state/graphicalItemsSlice.d.ts +1 -1
- package/dist/state/rootPropsSlice.d.ts +2 -2
- package/dist/state/selectors/axisSelectors.d.ts +5 -0
- package/dist/types/axis.d.ts +2 -2
- package/dist/types/bar.d.ts +2 -6
- package/dist/types/categorical.d.ts +2 -2
- package/dist/types/common.d.ts +7 -1
- package/dist/types/tooltip.d.ts +2 -2
- package/dist/utils/cell.d.ts +11 -0
- package/dist/utils/createCategoricalInverse.d.ts +16 -0
- package/dist/utils/scale.d.ts +23 -0
- package/package.json +2 -1
|
@@ -1,47 +1,55 @@
|
|
|
1
|
-
import { selectEventEmitter
|
|
2
|
-
import { setSyncInteraction
|
|
3
|
-
import { selectTooltipAxisTicks
|
|
4
|
-
import { useAppDispatch
|
|
5
|
-
import { useChartLayout
|
|
6
|
-
import { createEventEmitter
|
|
7
|
-
import { setDataStartEndIndexes
|
|
8
|
-
import { BRUSH_SYNC_EVENT
|
|
9
|
-
import { onMounted
|
|
1
|
+
import { selectEventEmitter, selectSyncId, selectSyncMethod } from "../state/selectors/rootPropsSelectors.mjs";
|
|
2
|
+
import { setSyncInteraction } from "../state/tooltipSlice.mjs";
|
|
3
|
+
import { selectTooltipAxisTicks } from "../state/selectors/tooltipSelectors.mjs";
|
|
4
|
+
import { useAppDispatch, useAppSelector } from "../state/hooks.mjs";
|
|
5
|
+
import { useChartLayout, useViewBox } from "../context/chartLayoutContext.mjs";
|
|
6
|
+
import { createEventEmitter } from "../state/optionsSlice.mjs";
|
|
7
|
+
import { setDataStartEndIndexes } from "../state/chartDataSlice.mjs";
|
|
8
|
+
import { BRUSH_SYNC_EVENT, TOOLTIP_SYNC_EVENT, eventCenter } from "../utils/events.mjs";
|
|
9
|
+
import { onMounted, watch } from "vue";
|
|
10
10
|
//#region src/events/useChartSynchronisation.tsx
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
function useTooltipSyncEventsListener() {
|
|
12
|
+
const mySyncId = useAppSelector(selectSyncId);
|
|
13
|
+
const myEventEmitter = useAppSelector(selectEventEmitter);
|
|
14
|
+
const dispatch = useAppDispatch();
|
|
15
|
+
const syncMethod = useAppSelector(selectSyncMethod);
|
|
16
|
+
const tooltipTicks = useAppSelector(selectTooltipAxisTicks);
|
|
17
|
+
const layout = useChartLayout();
|
|
18
|
+
const viewBox = useViewBox();
|
|
19
|
+
watch([
|
|
20
|
+
useAppSelector((state) => state.rootProps.class),
|
|
21
|
+
myEventEmitter,
|
|
22
|
+
mySyncId,
|
|
23
|
+
syncMethod,
|
|
24
|
+
tooltipTicks,
|
|
25
|
+
layout,
|
|
26
|
+
viewBox
|
|
27
|
+
], (v, o, onCleanup) => {
|
|
28
|
+
if (mySyncId.value == null) return;
|
|
29
|
+
const listener = (incomingSyncId, action, emitter) => {
|
|
30
|
+
if (myEventEmitter.value === emitter) return;
|
|
31
|
+
if (mySyncId.value !== incomingSyncId) return;
|
|
32
|
+
if (syncMethod.value === "index") {
|
|
33
|
+
dispatch(action);
|
|
27
34
|
return;
|
|
28
35
|
}
|
|
29
|
-
if (
|
|
30
|
-
let
|
|
31
|
-
if (typeof
|
|
32
|
-
|
|
33
|
-
activeTooltipIndex:
|
|
34
|
-
isTooltipActive:
|
|
35
|
-
activeIndex:
|
|
36
|
-
activeLabel:
|
|
37
|
-
activeDataKey:
|
|
38
|
-
activeCoordinate:
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
if (tooltipTicks.value == null) return;
|
|
37
|
+
let activeTick;
|
|
38
|
+
if (typeof syncMethod.value === "function") {
|
|
39
|
+
const syncMethodParam = {
|
|
40
|
+
activeTooltipIndex: action.payload.index == null ? void 0 : Number(action.payload.index),
|
|
41
|
+
isTooltipActive: action.payload.active,
|
|
42
|
+
activeIndex: action.payload.index == null ? void 0 : Number(action.payload.index),
|
|
43
|
+
activeLabel: action.payload.label,
|
|
44
|
+
activeDataKey: action.payload.dataKey,
|
|
45
|
+
activeCoordinate: action.payload.coordinate
|
|
46
|
+
};
|
|
47
|
+
const activeTooltipIndex = syncMethod.value(tooltipTicks.value, syncMethodParam);
|
|
48
|
+
activeTick = tooltipTicks.value[activeTooltipIndex];
|
|
49
|
+
} else if (syncMethod.value === "value") activeTick = tooltipTicks.value.find((tick) => String(tick.value) === action.payload.label);
|
|
50
|
+
if (activeTick == null || action.payload.active === false) {
|
|
51
|
+
dispatch(setSyncInteraction({
|
|
52
|
+
active: false,
|
|
45
53
|
coordinate: void 0,
|
|
46
54
|
dataKey: void 0,
|
|
47
55
|
index: null,
|
|
@@ -49,40 +57,57 @@ function g() {
|
|
|
49
57
|
}));
|
|
50
58
|
return;
|
|
51
59
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
60
|
+
const { x, y } = action.payload.coordinate;
|
|
61
|
+
const validateChartX = Math.min(x, viewBox.value?.x + viewBox.value?.width);
|
|
62
|
+
const validateChartY = Math.min(y, viewBox.value?.y + viewBox.value?.height);
|
|
63
|
+
const activeCoordinate = {
|
|
64
|
+
x: layout.value === "horizontal" ? activeTick.coordinate : validateChartX,
|
|
65
|
+
y: layout.value === "horizontal" ? validateChartY : activeTick.coordinate
|
|
55
66
|
};
|
|
56
|
-
|
|
57
|
-
active:
|
|
58
|
-
coordinate:
|
|
59
|
-
dataKey:
|
|
60
|
-
index: String(
|
|
61
|
-
label:
|
|
67
|
+
dispatch(setSyncInteraction({
|
|
68
|
+
active: action.payload.active,
|
|
69
|
+
coordinate: activeCoordinate,
|
|
70
|
+
dataKey: action.payload.dataKey,
|
|
71
|
+
index: String(activeTick.index),
|
|
72
|
+
label: action.payload.label
|
|
62
73
|
}));
|
|
63
74
|
};
|
|
64
|
-
|
|
65
|
-
|
|
75
|
+
eventCenter.on(TOOLTIP_SYNC_EVENT, listener);
|
|
76
|
+
onCleanup(() => {
|
|
77
|
+
eventCenter.off(TOOLTIP_SYNC_EVENT, listener);
|
|
66
78
|
});
|
|
67
79
|
});
|
|
68
80
|
}
|
|
69
|
-
function
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
81
|
+
function useBrushSyncEventsListener() {
|
|
82
|
+
const mySyncId = useAppSelector(selectSyncId);
|
|
83
|
+
const myEventEmitter = useAppSelector(selectEventEmitter);
|
|
84
|
+
const dispatch = useAppDispatch();
|
|
85
|
+
watch([mySyncId, myEventEmitter], (v, o, onCleanup) => {
|
|
86
|
+
if (mySyncId == null) return;
|
|
87
|
+
const listener = (incomingSyncId, action, emitter) => {
|
|
88
|
+
if (myEventEmitter.value === emitter) return;
|
|
89
|
+
if (mySyncId.value === incomingSyncId) dispatch(setDataStartEndIndexes(action));
|
|
75
90
|
};
|
|
76
|
-
|
|
77
|
-
|
|
91
|
+
eventCenter.on(BRUSH_SYNC_EVENT, listener);
|
|
92
|
+
onCleanup(() => {
|
|
93
|
+
eventCenter.off(BRUSH_SYNC_EVENT, listener);
|
|
78
94
|
});
|
|
79
95
|
});
|
|
80
96
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Will receive synchronisation events from other charts.
|
|
99
|
+
*
|
|
100
|
+
* Reads syncMethod from state and decides how to synchronise the tooltip based on that.
|
|
101
|
+
*
|
|
102
|
+
* @returns void
|
|
103
|
+
*/
|
|
104
|
+
function useSynchronisedEventsFromOtherCharts() {
|
|
105
|
+
const dispatch = useAppDispatch();
|
|
106
|
+
onMounted(() => {
|
|
107
|
+
dispatch(createEventEmitter());
|
|
108
|
+
});
|
|
109
|
+
useTooltipSyncEventsListener();
|
|
110
|
+
useBrushSyncEventsListener();
|
|
86
111
|
}
|
|
87
112
|
//#endregion
|
|
88
|
-
export {
|
|
113
|
+
export { useSynchronisedEventsFromOtherCharts };
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { selectAxisDomain, selectAxisInverseDataSnapScale, selectAxisInverseScale, selectAxisInverseTickSnapScale, selectAxisScale, selectTicksOfAxis } from "../state/selectors/axisSelectors.mjs";
|
|
2
|
+
import { selectActiveLabel, selectActiveTooltipCoordinate, selectIsTooltipActive } from "../state/selectors/tooltipSelectors.mjs";
|
|
3
|
+
import { useAppSelector } from "../state/hooks.mjs";
|
|
4
|
+
import { useOffset } from "../context/chartLayoutContext.mjs";
|
|
5
|
+
import { computed } from "vue";
|
|
6
|
+
//#region src/hooks/publicHooks.ts
|
|
7
|
+
/**
|
|
8
|
+
* Returns whether the tooltip is currently active (visible).
|
|
9
|
+
*
|
|
10
|
+
* Must be used inside a chart component tree (where the Redux store is provided).
|
|
11
|
+
*
|
|
12
|
+
* @returns A reactive boolean indicating tooltip active state
|
|
13
|
+
*/
|
|
14
|
+
function useIsTooltipActive() {
|
|
15
|
+
return useAppSelector(selectIsTooltipActive);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Returns the current coordinate of the active tooltip.
|
|
19
|
+
*
|
|
20
|
+
* Must be used inside a chart component tree (where the Redux store is provided).
|
|
21
|
+
*
|
|
22
|
+
* @returns A reactive Coordinate ({ x, y }) or undefined when no tooltip is active
|
|
23
|
+
*/
|
|
24
|
+
function useActiveTooltipCoordinate() {
|
|
25
|
+
return useAppSelector(selectActiveTooltipCoordinate);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Returns the label of the currently active tooltip (the value from the axis dataKey at the hovered index).
|
|
29
|
+
*
|
|
30
|
+
* Must be used inside a chart component tree (where the Redux store is provided).
|
|
31
|
+
*
|
|
32
|
+
* @returns A reactive string label or undefined when no tooltip is active
|
|
33
|
+
*/
|
|
34
|
+
function useActiveTooltipLabel() {
|
|
35
|
+
return useAppSelector(selectActiveLabel);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Returns the plot area rectangle { x, y, width, height }.
|
|
39
|
+
* This is the area inside all axes, legend, and brush — where graphical items render.
|
|
40
|
+
*
|
|
41
|
+
* Must be used inside a chart component tree (where the Redux store is provided).
|
|
42
|
+
*
|
|
43
|
+
* @returns A reactive object with x, y, width, height or undefined if offset is not yet available
|
|
44
|
+
*/
|
|
45
|
+
function usePlotArea() {
|
|
46
|
+
const offset = useOffset();
|
|
47
|
+
return computed(() => {
|
|
48
|
+
const o = offset.value;
|
|
49
|
+
if (o == null) return void 0;
|
|
50
|
+
return {
|
|
51
|
+
x: o.left,
|
|
52
|
+
y: o.top,
|
|
53
|
+
width: o.width,
|
|
54
|
+
height: o.height
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Returns the computed domain of an X axis.
|
|
60
|
+
*
|
|
61
|
+
* @param axisId - The axis ID (defaults to 0)
|
|
62
|
+
* @returns A reactive domain (categorical or numerical) or undefined
|
|
63
|
+
*/
|
|
64
|
+
function useXAxisDomain(axisId = 0) {
|
|
65
|
+
return useAppSelector((state) => selectAxisDomain(state, "xAxis", axisId, false));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Returns the computed domain of a Y axis.
|
|
69
|
+
*
|
|
70
|
+
* @param axisId - The axis ID (defaults to 0)
|
|
71
|
+
* @returns A reactive domain (categorical or numerical) or undefined
|
|
72
|
+
*/
|
|
73
|
+
function useYAxisDomain(axisId = 0) {
|
|
74
|
+
return useAppSelector((state) => selectAxisDomain(state, "yAxis", axisId, false));
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Returns the computed tick items of an X axis.
|
|
78
|
+
*
|
|
79
|
+
* @param axisId - The axis ID (defaults to 0)
|
|
80
|
+
* @returns A reactive array of TickItem or undefined
|
|
81
|
+
*/
|
|
82
|
+
function useXAxisTicks(axisId = 0) {
|
|
83
|
+
return useAppSelector((state) => selectTicksOfAxis(state, "xAxis", axisId, false));
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Returns the computed tick items of a Y axis.
|
|
87
|
+
*
|
|
88
|
+
* @param axisId - The axis ID (defaults to 0)
|
|
89
|
+
* @returns A reactive array of TickItem or undefined
|
|
90
|
+
*/
|
|
91
|
+
function useYAxisTicks(axisId = 0) {
|
|
92
|
+
return useAppSelector((state) => selectTicksOfAxis(state, "yAxis", axisId, false));
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Returns the scale function for an X axis, mapping data values to pixel coordinates.
|
|
96
|
+
*
|
|
97
|
+
* @param axisId - The axis ID (defaults to 0)
|
|
98
|
+
* @returns A reactive ScaleFunction or undefined if the axis is not yet initialized
|
|
99
|
+
*/
|
|
100
|
+
function useXAxisScale(axisId = 0) {
|
|
101
|
+
const scale = useAppSelector((state) => selectAxisScale(state, "xAxis", axisId, false));
|
|
102
|
+
return computed(() => {
|
|
103
|
+
const s = scale.value;
|
|
104
|
+
if (s == null) return void 0;
|
|
105
|
+
return (value) => {
|
|
106
|
+
const result = s(value);
|
|
107
|
+
return typeof result === "number" ? result : void 0;
|
|
108
|
+
};
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Returns the scale function for a Y axis, mapping data values to pixel coordinates.
|
|
113
|
+
*
|
|
114
|
+
* @param axisId - The axis ID (defaults to 0)
|
|
115
|
+
* @returns A reactive ScaleFunction or undefined if the axis is not yet initialized
|
|
116
|
+
*/
|
|
117
|
+
function useYAxisScale(axisId = 0) {
|
|
118
|
+
const scale = useAppSelector((state) => selectAxisScale(state, "yAxis", axisId, false));
|
|
119
|
+
return computed(() => {
|
|
120
|
+
const s = scale.value;
|
|
121
|
+
if (s == null) return void 0;
|
|
122
|
+
return (value) => {
|
|
123
|
+
const result = s(value);
|
|
124
|
+
return typeof result === "number" ? result : void 0;
|
|
125
|
+
};
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Returns the inverse scale function for an X axis, mapping pixel coordinates back to data values.
|
|
130
|
+
*
|
|
131
|
+
* @param axisId - The axis ID (defaults to 0)
|
|
132
|
+
* @returns A reactive InverseScaleFunction or undefined
|
|
133
|
+
*/
|
|
134
|
+
function useXAxisInverseScale(axisId = 0) {
|
|
135
|
+
return useAppSelector((state) => selectAxisInverseScale(state, "xAxis", axisId, false));
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Returns the inverse scale function for a Y axis, mapping pixel coordinates back to data values.
|
|
139
|
+
*
|
|
140
|
+
* @param axisId - The axis ID (defaults to 0)
|
|
141
|
+
* @returns A reactive InverseScaleFunction or undefined
|
|
142
|
+
*/
|
|
143
|
+
function useYAxisInverseScale(axisId = 0) {
|
|
144
|
+
return useAppSelector((state) => selectAxisInverseScale(state, "yAxis", axisId, false));
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Returns the inverse scale function for an X axis that snaps to the nearest data point.
|
|
148
|
+
*
|
|
149
|
+
* @param axisId - The axis ID (defaults to 0)
|
|
150
|
+
* @returns A reactive InverseScaleFunction or undefined
|
|
151
|
+
*/
|
|
152
|
+
function useXAxisInverseDataSnapScale(axisId = 0) {
|
|
153
|
+
return useAppSelector((state) => selectAxisInverseDataSnapScale(state, "xAxis", axisId, false));
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Returns the inverse scale function for a Y axis that snaps to the nearest data point.
|
|
157
|
+
*
|
|
158
|
+
* @param axisId - The axis ID (defaults to 0)
|
|
159
|
+
* @returns A reactive InverseScaleFunction or undefined
|
|
160
|
+
*/
|
|
161
|
+
function useYAxisInverseDataSnapScale(axisId = 0) {
|
|
162
|
+
return useAppSelector((state) => selectAxisInverseDataSnapScale(state, "yAxis", axisId, false));
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Returns the inverse scale function for an X axis that snaps to the nearest tick.
|
|
166
|
+
*
|
|
167
|
+
* @param axisId - The axis ID (defaults to 0)
|
|
168
|
+
* @returns A reactive InverseScaleFunction or undefined
|
|
169
|
+
*/
|
|
170
|
+
function useXAxisInverseTickSnapScale(axisId = 0) {
|
|
171
|
+
return useAppSelector((state) => selectAxisInverseTickSnapScale(state, "xAxis", axisId, false));
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Returns the inverse scale function for a Y axis that snaps to the nearest tick.
|
|
175
|
+
*
|
|
176
|
+
* @param axisId - The axis ID (defaults to 0)
|
|
177
|
+
* @returns A reactive InverseScaleFunction or undefined
|
|
178
|
+
*/
|
|
179
|
+
function useYAxisInverseTickSnapScale(axisId = 0) {
|
|
180
|
+
return useAppSelector((state) => selectAxisInverseTickSnapScale(state, "yAxis", axisId, false));
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Convenience hook that maps a data point to pixel coordinates using both X and Y axis scales.
|
|
184
|
+
*
|
|
185
|
+
* @param dataPoint - An object with x and y data values
|
|
186
|
+
* @param xAxisId - The X axis ID (defaults to 0)
|
|
187
|
+
* @param yAxisId - The Y axis ID (defaults to 0)
|
|
188
|
+
* @returns A reactive Coordinate ({ x, y }) or undefined if either scale is unavailable
|
|
189
|
+
*/
|
|
190
|
+
function useCartesianScale(dataPoint, xAxisId = 0, yAxisId = 0) {
|
|
191
|
+
const xScale = useXAxisScale(xAxisId);
|
|
192
|
+
const yScale = useYAxisScale(yAxisId);
|
|
193
|
+
return computed(() => {
|
|
194
|
+
const xFn = xScale.value;
|
|
195
|
+
const yFn = yScale.value;
|
|
196
|
+
if (xFn == null || yFn == null) return void 0;
|
|
197
|
+
const pixelX = xFn(dataPoint.x);
|
|
198
|
+
const pixelY = yFn(dataPoint.y);
|
|
199
|
+
if (pixelX == null || pixelY == null) return void 0;
|
|
200
|
+
return {
|
|
201
|
+
x: pixelX,
|
|
202
|
+
y: pixelY
|
|
203
|
+
};
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
//#endregion
|
|
207
|
+
export { useActiveTooltipCoordinate, useActiveTooltipLabel, useCartesianScale, useIsTooltipActive, usePlotArea, useXAxisDomain, useXAxisInverseDataSnapScale, useXAxisInverseScale, useXAxisInverseTickSnapScale, useXAxisScale, useXAxisTicks, useYAxisDomain, useYAxisInverseDataSnapScale, useYAxisInverseScale, useYAxisInverseTickSnapScale, useYAxisScale, useYAxisTicks };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { computed, ref, watch } from "vue";
|
|
2
|
+
//#region src/hooks/useIsAnimating.ts
|
|
3
|
+
/**
|
|
4
|
+
* Tracks whether a component is currently animating.
|
|
5
|
+
*
|
|
6
|
+
* When `isAnimationActive` is `false`, always returns `false` regardless of
|
|
7
|
+
* internal state — this ensures `isAnimationActive={false}` immediately
|
|
8
|
+
* disables all animation-gated rendering (e.g. deferred LabelList).
|
|
9
|
+
*
|
|
10
|
+
* When `isAnimationActive` is `true`, starts as `true` and can be set to
|
|
11
|
+
* `false` via the returned ref (typically on animation end).
|
|
12
|
+
*
|
|
13
|
+
* Re-entering `isAnimationActive=true` resets internal state to `true`.
|
|
14
|
+
*/
|
|
15
|
+
function useIsAnimating(isAnimationActive) {
|
|
16
|
+
const internal = ref(isAnimationActive());
|
|
17
|
+
watch(isAnimationActive, (active) => {
|
|
18
|
+
if (active) internal.value = true;
|
|
19
|
+
});
|
|
20
|
+
return computed({
|
|
21
|
+
get: () => isAnimationActive() && internal.value,
|
|
22
|
+
set: (val) => {
|
|
23
|
+
internal.value = val;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { useIsAnimating };
|
|
@@ -1,57 +1,66 @@
|
|
|
1
|
-
import { useIsPanorama
|
|
2
|
-
import { getTooltipNameProp
|
|
3
|
-
import { SetCartesianGraphicalItem
|
|
4
|
-
import { SetLegendPayload
|
|
5
|
-
import { SetTooltipEntrySettings
|
|
6
|
-
import { computed
|
|
1
|
+
import { useIsPanorama } from "../context/PanoramaContextProvider.mjs";
|
|
2
|
+
import { getTooltipNameProp } from "../utils/chart.mjs";
|
|
3
|
+
import { SetCartesianGraphicalItem } from "../state/SetGraphicalItem.mjs";
|
|
4
|
+
import { SetLegendPayload } from "../state/SetLegendPayload.mjs";
|
|
5
|
+
import { SetTooltipEntrySettings } from "../state/SetTooltipEntrySettings.mjs";
|
|
6
|
+
import { computed, useAttrs } from "vue";
|
|
7
7
|
//#region src/hooks/useSetupGraphicalItem.ts
|
|
8
|
-
function
|
|
9
|
-
return
|
|
8
|
+
function getLegendItemColor(stroke, fill) {
|
|
9
|
+
return stroke && stroke !== "none" ? stroke : fill;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
11
|
+
function getItemColor(type, stroke, fill) {
|
|
12
|
+
if (type === "bar") return fill;
|
|
13
|
+
return getLegendItemColor(stroke, fill);
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
15
|
+
function useSetupGraphicalItem(props, type, options) {
|
|
16
|
+
const attrs = useAttrs();
|
|
17
|
+
const isPanorama = useIsPanorama();
|
|
18
|
+
const legendPayload = computed(() => {
|
|
19
|
+
return [{
|
|
20
|
+
inactive: props.hide,
|
|
21
|
+
dataKey: props.dataKey,
|
|
22
|
+
type: props.legendType,
|
|
23
|
+
color: getItemColor(type, attrs.stroke ?? props.stroke, attrs.fill ?? props.fill),
|
|
24
|
+
value: getTooltipNameProp(props.name, props.dataKey),
|
|
25
|
+
payload: { ...props }
|
|
26
|
+
}];
|
|
27
|
+
});
|
|
28
|
+
SetCartesianGraphicalItem(computed(() => {
|
|
29
|
+
return {
|
|
30
|
+
...props,
|
|
31
|
+
isPanorama,
|
|
32
|
+
type,
|
|
33
|
+
errorBars: options?.errorBars?.value
|
|
34
|
+
};
|
|
35
|
+
}));
|
|
36
|
+
SetLegendPayload(legendPayload);
|
|
37
|
+
if (!options?.skipTooltip) SetTooltipEntrySettings({
|
|
38
|
+
fn: getTooltipEntrySettings,
|
|
39
|
+
args: computed(() => ({
|
|
40
|
+
...props,
|
|
41
|
+
...attrs,
|
|
42
|
+
_itemType: type
|
|
34
43
|
}))
|
|
35
44
|
});
|
|
36
45
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
46
|
+
function getTooltipEntrySettings(props) {
|
|
47
|
+
const { dataKey, data, stroke, fill, name, hide, unit, _itemType } = props;
|
|
39
48
|
return {
|
|
40
|
-
dataDefinedOnItem:
|
|
49
|
+
dataDefinedOnItem: data,
|
|
41
50
|
positions: void 0,
|
|
42
51
|
settings: {
|
|
43
|
-
stroke
|
|
44
|
-
strokeWidth:
|
|
45
|
-
fill
|
|
46
|
-
dataKey
|
|
52
|
+
stroke,
|
|
53
|
+
strokeWidth: props["stroke-width"],
|
|
54
|
+
fill,
|
|
55
|
+
dataKey,
|
|
47
56
|
nameKey: void 0,
|
|
48
|
-
name:
|
|
49
|
-
hide
|
|
50
|
-
type:
|
|
51
|
-
color:
|
|
52
|
-
unit
|
|
57
|
+
name: getTooltipNameProp(name, dataKey),
|
|
58
|
+
hide,
|
|
59
|
+
type: props.tooltipType,
|
|
60
|
+
color: getItemColor(_itemType, stroke, fill),
|
|
61
|
+
unit
|
|
53
62
|
}
|
|
54
63
|
};
|
|
55
64
|
}
|
|
56
65
|
//#endregion
|
|
57
|
-
export {
|
|
66
|
+
export { useSetupGraphicalItem };
|
package/dist/es/index.mjs
CHANGED
|
@@ -1,42 +1,54 @@
|
|
|
1
|
-
import { Curve
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import
|
|
40
|
-
import {
|
|
41
|
-
import
|
|
42
|
-
|
|
1
|
+
import { Curve, CurveVueProps, getPath } from "./shape/Curve.mjs";
|
|
2
|
+
import { useActiveTooltipDataPoints } from "./state/hooks.mjs";
|
|
3
|
+
import { useChartHeight, useChartWidth, useMargin, useOffset } from "./context/chartLayoutContext.mjs";
|
|
4
|
+
import { Dot } from "./shape/Dot.mjs";
|
|
5
|
+
import Text_default from "./components/Text.mjs";
|
|
6
|
+
import { Label } from "./components/label/Label.mjs";
|
|
7
|
+
import { LabelList } from "./components/label/LabelList.mjs";
|
|
8
|
+
import { Area } from "./cartesian/area/Area.mjs";
|
|
9
|
+
import { CartesianAxis } from "./cartesian/cartesian-axis/CartesianAxis.mjs";
|
|
10
|
+
import { XAxis } from "./cartesian/axis/XAxis.mjs";
|
|
11
|
+
import { YAxis } from "./cartesian/axis/YAxis.mjs";
|
|
12
|
+
import { Rectangle } from "./shape/Rectangle.mjs";
|
|
13
|
+
import { createErrorBarRegistry, provideErrorBarContext, provideErrorBarRegistry, useErrorBarContext, useErrorBarRegistry } from "./cartesian/error-bar/ErrorBarContext.mjs";
|
|
14
|
+
import { Cell } from "./components/Cell.mjs";
|
|
15
|
+
import { Bar } from "./cartesian/bar/Bar.mjs";
|
|
16
|
+
import { CartesianGrid } from "./cartesian/cartesian-grid/CartesianGrid.mjs";
|
|
17
|
+
import { ErrorBar, ErrorBarVueProps } from "./cartesian/error-bar/ErrorBar.mjs";
|
|
18
|
+
import { LineContextKey, provideLineContext, useLine, useLineContext } from "./cartesian/line/hooks/useLine.mjs";
|
|
19
|
+
import { Line } from "./cartesian/line/Line.mjs";
|
|
20
|
+
import { ReferenceArea } from "./cartesian/reference-area/ReferenceArea.mjs";
|
|
21
|
+
import { ReferenceDot } from "./cartesian/reference-dot/ReferenceDot.mjs";
|
|
22
|
+
import { ReferenceLine } from "./cartesian/reference-line/ReferenceLine.mjs";
|
|
23
|
+
import { Symbols } from "./shape/Symbols.mjs";
|
|
24
|
+
import { Scatter } from "./cartesian/scatter/Scatter.mjs";
|
|
25
|
+
import { ZAxis } from "./cartesian/z-axis/ZAxis.mjs";
|
|
26
|
+
import { Trapezoid } from "./shape/Trapezoid.mjs";
|
|
27
|
+
import { FunnelVueProps } from "./cartesian/funnel/type.mjs";
|
|
28
|
+
import { Funnel } from "./cartesian/funnel/Funnel.mjs";
|
|
29
|
+
import { AreaChart } from "./chart/AreaChart.mjs";
|
|
30
|
+
import { BarChart } from "./chart/BarChart.mjs";
|
|
31
|
+
import { ComposedChart } from "./chart/ComposedChart.mjs";
|
|
32
|
+
import { LineChart } from "./chart/LineChart.mjs";
|
|
33
|
+
import { PieChart } from "./chart/PieChart.mjs";
|
|
34
|
+
import { RadarChart } from "./chart/RadarChart.mjs";
|
|
35
|
+
import { ScatterChart } from "./chart/ScatterChart.mjs";
|
|
36
|
+
import { RadialBarChart } from "./chart/RadialBarChart.mjs";
|
|
37
|
+
import { FunnelChart } from "./chart/FunnelChart.mjs";
|
|
38
|
+
import { Treemap, TreemapVueProps, treemapPayloadSearcher } from "./chart/Treemap.mjs";
|
|
39
|
+
import ResponsiveContainer_default from "./container/ResponsiveContainer.mjs";
|
|
40
|
+
import { Customized } from "./components/Customized.mjs";
|
|
41
|
+
import Legend_default from "./components/legend/Legend.mjs";
|
|
42
|
+
import { Cross } from "./shape/Cross.mjs";
|
|
43
|
+
import { Sector } from "./shape/Sector.mjs";
|
|
44
|
+
import Tooltip, { getUniqPayload } from "./components/Tooltip.mjs";
|
|
45
|
+
import { PieVueProps } from "./polar/pie/type.mjs";
|
|
46
|
+
import { Pie } from "./polar/pie/Pie.mjs";
|
|
47
|
+
import { Radar } from "./polar/radar/Radar.mjs";
|
|
48
|
+
import { PolarGrid } from "./polar/radar/PolarGrid.mjs";
|
|
49
|
+
import { PolarAngleAxis } from "./polar/radar/PolarAngleAxis.mjs";
|
|
50
|
+
import { PolarRadiusAxis } from "./polar/radar/PolarRadiusAxis.mjs";
|
|
51
|
+
import { RadialBar } from "./polar/radial-bar/RadialBar.mjs";
|
|
52
|
+
import { Polygon } from "./shape/Polygon.mjs";
|
|
53
|
+
import { useActiveTooltipCoordinate, useActiveTooltipLabel, useCartesianScale, useIsTooltipActive, usePlotArea, useXAxisDomain, useXAxisInverseDataSnapScale, useXAxisInverseScale, useXAxisInverseTickSnapScale, useXAxisScale, useXAxisTicks, useYAxisDomain, useYAxisInverseDataSnapScale, useYAxisInverseScale, useYAxisInverseTickSnapScale, useYAxisScale, useYAxisTicks } from "./hooks/publicHooks.mjs";
|
|
54
|
+
export { Area, AreaChart, Bar, BarChart, CartesianAxis, CartesianGrid, Cell, ComposedChart, Cross, Curve, CurveVueProps, Customized, Dot, ErrorBar, ErrorBarVueProps, Funnel, FunnelChart, FunnelVueProps, Label, LabelList, Legend_default as Legend, Line, LineChart, LineContextKey, Pie, PieChart, PieVueProps, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Polygon, Radar, RadarChart, RadialBar, RadialBarChart, Rectangle, ReferenceArea, ReferenceDot, ReferenceLine, ResponsiveContainer_default as ResponsiveContainer, Scatter, ScatterChart, Sector, Symbols, Text_default as Text, Tooltip, Trapezoid, Treemap, TreemapVueProps, XAxis, YAxis, ZAxis, createErrorBarRegistry, getPath, getUniqPayload, provideErrorBarContext, provideErrorBarRegistry, provideLineContext, treemapPayloadSearcher, useActiveTooltipCoordinate, useActiveTooltipDataPoints, useActiveTooltipLabel, useCartesianScale, useChartHeight, useChartWidth, useErrorBarContext, useErrorBarRegistry, useIsTooltipActive, useLine, useLineContext, useMargin, useOffset, usePlotArea, useXAxisDomain, useXAxisInverseDataSnapScale, useXAxisInverseScale, useXAxisInverseTickSnapScale, useXAxisScale, useXAxisTicks, useYAxisDomain, useYAxisInverseDataSnapScale, useYAxisInverseScale, useYAxisInverseTickSnapScale, useYAxisScale, useYAxisTicks };
|