vccs 0.0.1 → 0.1.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/LICENSE +21 -0
- package/dist/animation/Animate.d.ts +72 -0
- package/dist/cartesian/GraphicalItemClipPath.d.ts +31 -0
- package/dist/cartesian/area/ActivePoints.d.ts +77 -0
- package/dist/cartesian/area/Area.d.ts +17 -0
- package/dist/cartesian/area/ClipRect.d.ts +1 -0
- package/dist/cartesian/area/RenderArea.d.ts +16 -0
- package/dist/cartesian/area/__stories__/config.d.ts +31 -0
- package/dist/cartesian/area/hooks/useArea.d.ts +27 -0
- package/dist/cartesian/area/index.d.ts +2 -0
- package/dist/cartesian/area/type.d.ts +173 -0
- package/dist/cartesian/area/utils.d.ts +19 -0
- package/dist/cartesian/axis/XAxis.d.ts +189 -0
- package/dist/cartesian/axis/YAxis.d.ts +192 -0
- package/dist/cartesian/axis/index.d.ts +2 -0
- package/dist/cartesian/axis/type.d.ts +57 -0
- package/dist/cartesian/bar/Bar.d.ts +2 -0
- package/dist/cartesian/bar/components/BarBackground.d.ts +1 -0
- package/dist/cartesian/bar/components/BarRectangles.d.ts +1 -0
- package/dist/cartesian/bar/hooks/useBar.d.ts +23 -0
- package/dist/cartesian/bar/index.d.ts +1 -0
- package/dist/cartesian/bar/type.d.ts +166 -0
- package/dist/cartesian/bar/utils.d.ts +31 -0
- package/dist/cartesian/brush/Brush.d.ts +2 -0
- package/dist/cartesian/brush/components/Background.d.ts +15 -0
- package/dist/cartesian/brush/components/BrushText.d.ts +27 -0
- package/dist/cartesian/brush/components/Panorama.d.ts +65 -0
- package/dist/cartesian/brush/components/Slide.d.ts +20 -0
- package/dist/cartesian/brush/components/Traveller.d.ts +13 -0
- package/dist/cartesian/brush/components/TravellerLayer.d.ts +22 -0
- package/dist/cartesian/brush/hooks/useBrushHandlers.d.ts +25 -0
- package/dist/cartesian/brush/hooks/useBrushSetting.d.ts +6 -0
- package/dist/cartesian/brush/hooks/useBrushState.d.ts +29 -0
- package/dist/cartesian/brush/index.d.ts +2 -0
- package/dist/cartesian/brush/type.d.ts +103 -0
- package/dist/cartesian/brush/utils.d.ts +15 -0
- package/dist/cartesian/cartesian-axis/CartesianAxis.d.ts +209 -0
- package/dist/cartesian/cartesian-axis/const.d.ts +24 -0
- package/dist/cartesian/cartesian-axis/index.d.ts +1 -0
- package/dist/cartesian/cartesian-axis/use-axis-line.d.ts +7 -0
- package/dist/cartesian/cartesian-grid/Background.d.ts +18 -0
- package/dist/cartesian/cartesian-grid/CartesianGrid.d.ts +75 -0
- package/dist/cartesian/cartesian-grid/HorizontalGridLines.d.ts +37 -0
- package/dist/cartesian/cartesian-grid/HorizontalStripes.d.ts +20 -0
- package/dist/cartesian/cartesian-grid/VerticalGridLines.d.ts +26 -0
- package/dist/cartesian/cartesian-grid/VerticalStripes.d.ts +20 -0
- package/dist/cartesian/cartesian-grid/const.d.ts +6 -0
- package/dist/cartesian/cartesian-grid/index.d.ts +1 -0
- package/dist/cartesian/cartesian-grid/type.d.ts +145 -0
- package/dist/cartesian/cartesian-grid/utils.d.ts +5 -0
- package/dist/cartesian/error-bar/ErrorBar.d.ts +68 -0
- package/dist/cartesian/error-bar/ErrorBarContext.d.ts +27 -0
- package/dist/cartesian/error-bar/index.d.ts +2 -0
- package/dist/cartesian/funnel/index.d.ts +0 -0
- package/dist/cartesian/funnel/type.d.ts +37 -0
- package/dist/cartesian/funnel/utils.d.ts +12 -0
- package/dist/cartesian/index.d.ts +11 -0
- package/dist/cartesian/line/ActivePoints.d.ts +77 -0
- package/dist/cartesian/line/Line.d.ts +87 -0
- package/dist/cartesian/line/StaticLine.d.ts +16 -0
- package/dist/cartesian/line/hooks/useLine.d.ts +28 -0
- package/dist/cartesian/line/index.d.ts +3 -0
- package/dist/cartesian/line/type.d.ts +180 -0
- package/dist/cartesian/line/utils.d.ts +13 -0
- package/dist/cartesian/reference-area/ReferenceArea.d.ts +191 -0
- package/dist/cartesian/reference-area/index.d.ts +1 -0
- package/dist/cartesian/reference-line/ReferenceLine.d.ts +139 -0
- package/dist/cartesian/reference-line/index.d.ts +1 -0
- package/dist/cartesian/scatter/Scatter.d.ts +165 -0
- package/dist/cartesian/scatter/hooks/useScatter.d.ts +18 -0
- package/dist/cartesian/scatter/index.d.ts +1 -0
- package/dist/cartesian/type.d.ts +21 -0
- package/dist/cartesian/useNeedsClip.d.ts +6 -0
- package/dist/cartesian/utils/get-ticks.d.ts +16 -0
- package/dist/cartesian/z-axis/ZAxis.d.ts +81 -0
- package/dist/cartesian/z-axis/index.d.ts +1 -0
- package/dist/chart/AreaChart.d.ts +1 -0
- package/dist/chart/BarChart.d.ts +1 -0
- package/dist/chart/ComposedChart.d.ts +1 -0
- package/dist/chart/LegendPortalContext.d.ts +3 -0
- package/dist/chart/LineChart.d.ts +1 -0
- package/dist/chart/PieChart.d.ts +1 -0
- package/dist/chart/RadarChart.d.ts +1 -0
- package/dist/chart/RadialBarChart.d.ts +1 -0
- package/dist/chart/RechartsWrapper.d.ts +99 -0
- package/dist/chart/ScatterChart.d.ts +1 -0
- package/dist/chart/Surface.d.ts +40 -0
- package/dist/chart/TooltipPortalContext.d.ts +2 -0
- package/dist/chart/const.d.ts +6 -0
- package/dist/chart/generateCategoricalChart.d.ts +118 -0
- package/dist/chart/index.d.ts +8 -0
- package/dist/chart/provideClipPathId.d.ts +12 -0
- package/dist/components/Cell.d.ts +18 -0
- package/dist/components/DefaultLegendContent.d.ts +18 -0
- package/dist/components/Text.d.ts +149 -0
- package/dist/components/Tooltip.d.ts +250 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/label/Label.d.ts +81 -0
- package/dist/components/label/LabelList.d.ts +63 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/types.d.ts +88 -0
- package/dist/components/label/utils.d.ts +24 -0
- package/dist/components/legend/Legend.d.ts +4 -0
- package/dist/components/legend/LegendSymbol.d.ts +27 -0
- package/dist/components/legend/hooks/useLegend.d.ts +19 -0
- package/dist/components/legend/hooks/useLegendContent.d.ts +36 -0
- package/dist/components/legend/index.d.ts +2 -0
- package/dist/components/legend/type.d.ts +54 -0
- package/dist/components/legend/utils.d.ts +18 -0
- package/dist/components/types.d.ts +9 -0
- package/dist/components/utils.d.ts +4 -0
- package/dist/container/ClipPath.d.ts +12 -0
- package/dist/container/Layer.d.ts +2 -0
- package/dist/container/ResponsiveContainer.d.ts +50 -0
- package/dist/container/RootSurface.d.ts +17 -0
- package/dist/container/Surface.d.ts +25 -0
- package/dist/container/index.d.ts +1 -0
- package/dist/container/useSizeContext.d.ts +11 -0
- package/dist/context/ChartDataContextProvider.d.ts +17 -0
- package/dist/context/PanoramaContextProvider.d.ts +22 -0
- package/dist/context/accessibilityContext.d.ts +1 -0
- package/dist/context/cartesianLabelListContext.d.ts +3 -0
- package/dist/context/chartLayoutContext.d.ts +8 -0
- package/dist/context/cursorLayerContext.d.ts +2 -0
- package/dist/context/graphicalLayerContext.d.ts +2 -0
- package/dist/context/labelLayerContext.d.ts +2 -0
- package/dist/context/polarLabelViewBoxContext.d.ts +4 -0
- package/dist/context/useTooltipAxis.d.ts +2 -0
- package/dist/es/animation/Animate.mjs +63 -0
- package/dist/es/cartesian/GraphicalItemClipPath.mjs +36 -0
- package/dist/es/cartesian/area/ActivePoints.mjs +74 -0
- package/dist/es/cartesian/area/Area.mjs +41 -0
- package/dist/es/cartesian/area/ClipRect.mjs +104 -0
- package/dist/es/cartesian/area/RenderArea.mjs +151 -0
- package/dist/es/cartesian/area/hooks/useArea.mjs +57 -0
- package/dist/es/cartesian/area/type.mjs +136 -0
- package/dist/es/cartesian/area/utils.mjs +59 -0
- package/dist/es/cartesian/axis/XAxis.mjs +189 -0
- package/dist/es/cartesian/axis/YAxis.mjs +181 -0
- package/dist/es/cartesian/bar/Bar.mjs +89 -0
- package/dist/es/cartesian/bar/components/BarBackground.mjs +29 -0
- package/dist/es/cartesian/bar/components/BarRectangles.mjs +106 -0
- package/dist/es/cartesian/bar/hooks/useBar.mjs +41 -0
- package/dist/es/cartesian/bar/type.mjs +131 -0
- package/dist/es/cartesian/bar/utils.mjs +84 -0
- package/dist/es/cartesian/cartesian-axis/CartesianAxis.mjs +246 -0
- package/dist/es/cartesian/cartesian-grid/Background.mjs +30 -0
- package/dist/es/cartesian/cartesian-grid/CartesianGrid.mjs +155 -0
- package/dist/es/cartesian/cartesian-grid/HorizontalGridLines.mjs +49 -0
- package/dist/es/cartesian/cartesian-grid/HorizontalStripes.mjs +43 -0
- package/dist/es/cartesian/cartesian-grid/VerticalGridLines.mjs +44 -0
- package/dist/es/cartesian/cartesian-grid/VerticalStripes.mjs +43 -0
- package/dist/es/cartesian/cartesian-grid/const.mjs +29 -0
- package/dist/es/cartesian/cartesian-grid/utils.mjs +17 -0
- package/dist/es/cartesian/error-bar/ErrorBar.mjs +115 -0
- package/dist/es/cartesian/error-bar/ErrorBarContext.mjs +19 -0
- package/dist/es/cartesian/line/ActivePoints.mjs +75 -0
- package/dist/es/cartesian/line/Line.mjs +46 -0
- package/dist/es/cartesian/line/StaticLine.mjs +148 -0
- package/dist/es/cartesian/line/hooks/useLine.mjs +53 -0
- package/dist/es/cartesian/line/type.mjs +112 -0
- package/dist/es/cartesian/line/utils.mjs +33 -0
- package/dist/es/cartesian/reference-area/ReferenceArea.mjs +146 -0
- package/dist/es/cartesian/reference-line/ReferenceLine.mjs +143 -0
- package/dist/es/cartesian/scatter/Scatter.mjs +252 -0
- package/dist/es/cartesian/scatter/hooks/useScatter.mjs +19 -0
- package/dist/es/cartesian/useNeedsClip.mjs +14 -0
- package/dist/es/cartesian/utils/get-ticks.mjs +83 -0
- package/dist/es/cartesian/z-axis/ZAxis.mjs +70 -0
- package/dist/es/chart/AreaChart.mjs +9 -0
- package/dist/es/chart/BarChart.mjs +10 -0
- package/dist/es/chart/ComposedChart.mjs +10 -0
- package/dist/es/chart/LegendPortalContext.mjs +5 -0
- package/dist/es/chart/LineChart.mjs +10 -0
- package/dist/es/chart/PieChart.mjs +16 -0
- package/dist/es/chart/RadarChart.mjs +16 -0
- package/dist/es/chart/RadialBarChart.mjs +16 -0
- package/dist/es/chart/RechartsWrapper.mjs +137 -0
- package/dist/es/chart/ScatterChart.mjs +10 -0
- package/dist/es/chart/Surface.mjs +5 -0
- package/dist/es/chart/Surface.vue_vue_type_script_setup_true_lang.mjs +66 -0
- package/dist/es/chart/TooltipPortalContext.mjs +5 -0
- package/dist/es/chart/const.mjs +7 -0
- package/dist/es/chart/generateCategoricalChart.mjs +166 -0
- package/dist/es/chart/provideClipPathId.mjs +10 -0
- package/dist/es/components/Cell.mjs +11 -0
- package/dist/es/components/Text.mjs +5 -0
- package/dist/es/components/Text.vue_vue_type_script_setup_true_lang.mjs +154 -0
- package/dist/es/components/Tooltip.mjs +388 -0
- package/dist/es/components/label/Label.mjs +36 -0
- package/dist/es/components/label/LabelList.mjs +49 -0
- package/dist/es/components/label/types.mjs +35 -0
- package/dist/es/components/label/utils.mjs +233 -0
- package/dist/es/components/legend/Legend.mjs +82 -0
- package/dist/es/components/legend/LegendSymbol.mjs +60 -0
- package/dist/es/components/legend/hooks/useLegend.mjs +52 -0
- package/dist/es/components/legend/hooks/useLegendContent.mjs +47 -0
- package/dist/es/components/legend/type.mjs +41 -0
- package/dist/es/components/legend/utils.mjs +17 -0
- package/dist/es/components/utils.mjs +31 -0
- package/dist/es/container/ClipPath.mjs +25 -0
- package/dist/es/container/Layer.mjs +12 -0
- package/dist/es/container/ResponsiveContainer.mjs +5 -0
- package/dist/es/container/ResponsiveContainer.vue_vue_type_script_setup_true_lang.mjs +112 -0
- package/dist/es/container/Surface.mjs +58 -0
- package/dist/es/container/useSizeContext.mjs +5 -0
- package/dist/es/context/ChartDataContextProvider.mjs +21 -0
- package/dist/es/context/PanoramaContextProvider.mjs +19 -0
- package/dist/es/context/accessibilityContext.mjs +5 -0
- package/dist/es/context/cartesianLabelListContext.mjs +5 -0
- package/dist/es/context/chartLayoutContext.mjs +46 -0
- package/dist/es/context/cursorLayerContext.mjs +5 -0
- package/dist/es/context/graphicalLayerContext.mjs +5 -0
- package/dist/es/context/labelLayerContext.mjs +5 -0
- package/dist/es/context/polarLabelViewBoxContext.mjs +8 -0
- package/dist/es/context/useTooltipAxis.mjs +15 -0
- package/dist/es/events/useChartSynchronisation.mjs +88 -0
- package/dist/es/hooks/useSetupGraphicalItem.mjs +57 -0
- package/dist/es/index.mjs +42 -0
- package/dist/es/polar/pie/Pie.mjs +145 -0
- package/dist/es/polar/pie/type.mjs +97 -0
- package/dist/es/polar/radar/PolarAngleAxis.mjs +161 -0
- package/dist/es/polar/radar/PolarGrid.mjs +102 -0
- package/dist/es/polar/radar/PolarRadiusAxis.mjs +137 -0
- package/dist/es/polar/radar/Radar.mjs +248 -0
- package/dist/es/polar/radial-bar/RadialBar.mjs +176 -0
- package/dist/es/polar/radial-bar/type.mjs +97 -0
- package/dist/es/shape/Cross.mjs +15 -0
- package/dist/es/shape/Curve.mjs +60 -0
- package/dist/es/shape/Dot.mjs +23 -0
- package/dist/es/shape/Rectangle.mjs +68 -0
- package/dist/es/shape/Sector.mjs +128 -0
- package/dist/es/shape/Symbols.mjs +41 -0
- package/dist/es/state/ReportChartProps.mjs +63 -0
- package/dist/es/state/ReportMainChartProps.mjs +41 -0
- package/dist/es/state/ReportPolarOptions.mjs +55 -0
- package/dist/es/state/SetGraphicalItem.mjs +34 -0
- package/dist/es/state/SetLegendPayload.mjs +16 -0
- package/dist/es/state/SetTooltipEntrySettings.mjs +17 -0
- package/dist/es/state/brushSlice.mjs +22 -0
- package/dist/es/state/cartesianAxisSlice.mjs +33 -0
- package/dist/es/state/chartDataSlice.mjs +28 -0
- package/dist/es/state/externalEventsMiddleware.mjs +20 -0
- package/dist/es/state/graphicalItemsSlice.mjs +43 -0
- package/dist/es/state/hooks.mjs +5 -0
- package/dist/es/state/keyboardEventsMiddleware.mjs +55 -0
- package/dist/es/state/layoutSlice.mjs +33 -0
- package/dist/es/state/legendSlice.mjs +35 -0
- package/dist/es/state/mouseEventsMiddleware.mjs +34 -0
- package/dist/es/state/optionsSlice.mjs +22 -0
- package/dist/es/state/polarAxisSlice.mjs +26 -0
- package/dist/es/state/polarOptionsSlice.mjs +11 -0
- package/dist/es/state/reduxDevtoolsJsonStringifyReplacer.mjs +6 -0
- package/dist/es/state/referenceElementsSlice.mjs +34 -0
- package/dist/es/state/rootPropsSlice.mjs +21 -0
- package/dist/es/state/selectors/areaSelectors.mjs +67 -0
- package/dist/es/state/selectors/axisSelectors.mjs +693 -0
- package/dist/es/state/selectors/barSelectors.mjs +178 -0
- package/dist/es/state/selectors/brushSelectors.mjs +17 -0
- package/dist/es/state/selectors/combiners/combineActiveLabel.mjs +8 -0
- package/dist/es/state/selectors/combiners/combineActiveTooltipIndex.mjs +34 -0
- package/dist/es/state/selectors/combiners/combineAxisRangeWithReverse.mjs +6 -0
- package/dist/es/state/selectors/combiners/combineCoordinateForDefaultIndex.mjs +19 -0
- package/dist/es/state/selectors/combiners/combineTooltipInteractionState.mjs +32 -0
- package/dist/es/state/selectors/combiners/combineTooltipPayloadConfigurations.mjs +9 -0
- package/dist/es/state/selectors/common.mjs +4 -0
- package/dist/es/state/selectors/containerSelectors.mjs +4 -0
- package/dist/es/state/selectors/dataSelectors.mjs +16 -0
- package/dist/es/state/selectors/legendSelectors.mjs +9 -0
- package/dist/es/state/selectors/lineSelectors.mjs +57 -0
- package/dist/es/state/selectors/pickAxisId.mjs +4 -0
- package/dist/es/state/selectors/pickAxisType.mjs +4 -0
- package/dist/es/state/selectors/pieSelectors.mjs +97 -0
- package/dist/es/state/selectors/polarAxisSelectors.mjs +148 -0
- package/dist/es/state/selectors/polarGridSelectors.mjs +17 -0
- package/dist/es/state/selectors/polarScaleSelectors.mjs +52 -0
- package/dist/es/state/selectors/polarSelectors.mjs +64 -0
- package/dist/es/state/selectors/radarSelectors.mjs +113 -0
- package/dist/es/state/selectors/radialBarSelectors.mjs +212 -0
- package/dist/es/state/selectors/rootPropsSelectors.mjs +8 -0
- package/dist/es/state/selectors/scatterSelectors.mjs +118 -0
- package/dist/es/state/selectors/selectActivePropsFromChartPointer.mjs +18 -0
- package/dist/es/state/selectors/selectAllAxes.mjs +5 -0
- package/dist/es/state/selectors/selectChartOffset.mjs +60 -0
- package/dist/es/state/selectors/selectChartOffsetInternal.mjs +55 -0
- package/dist/es/state/selectors/selectTooltipEventType.mjs +21 -0
- package/dist/es/state/selectors/selectTooltipPayloadSearcher.mjs +6 -0
- package/dist/es/state/selectors/selectTooltipSettings.mjs +4 -0
- package/dist/es/state/selectors/selectTooltipState.mjs +4 -0
- package/dist/es/state/selectors/selectors.mjs +85 -0
- package/dist/es/state/selectors/tooltipSelectors.mjs +220 -0
- package/dist/es/state/selectors/touchSelectors.mjs +16 -0
- package/dist/es/state/store.mjs +55 -0
- package/dist/es/state/tooltipSlice.mjs +75 -0
- package/dist/es/state/touchEventsMiddleware.mjs +38 -0
- package/dist/es/state/utils/useReportScale.mjs +16 -0
- package/dist/es/synchronisation/syncSelectors.mjs +6 -0
- package/dist/es/synchronisation/useChartSynchronisation.mjs +24 -0
- package/dist/es/types/event.mjs +4 -0
- package/dist/es/utils/ReduceCSSCalc.mjs +82 -0
- package/dist/es/utils/VueUtils.mjs +18 -0
- package/dist/es/utils/attrs.mjs +52 -0
- package/dist/es/utils/cartesian.mjs +22 -0
- package/dist/es/utils/chart.mjs +265 -0
- package/dist/es/utils/const.mjs +4 -0
- package/dist/es/utils/createContext.mjs +12 -0
- package/dist/es/utils/data-utils.mjs +12 -0
- package/dist/es/utils/data.mjs +27 -0
- package/dist/es/utils/events.mjs +5 -0
- package/dist/es/utils/getLinearRegression.mjs +17 -0
- package/dist/es/utils/grid.mjs +8 -0
- package/dist/es/utils/isDomainSpecifiedByUser.mjs +65 -0
- package/dist/es/utils/legend.mjs +18 -0
- package/dist/es/utils/log.mjs +11 -0
- package/dist/es/utils/payload/getUniqPayload.mjs +7 -0
- package/dist/es/utils/polar.mjs +52 -0
- package/dist/es/utils/props.mjs +14 -0
- package/dist/es/utils/resolveDefaultProps.mjs +7 -0
- package/dist/es/utils/scale/getNiceTickValues.mjs +59 -0
- package/dist/es/utils/scale/utils/arithmetic.mjs +24 -0
- package/dist/es/utils/scale/utils/utils.mjs +34 -0
- package/dist/es/utils/style.mjs +19 -0
- package/dist/es/utils/tick.mjs +31 -0
- package/dist/es/utils/tooltip/translate.mjs +59 -0
- package/dist/es/utils/validate.mjs +31 -0
- package/dist/events/useChartSynchronisation.d.ts +8 -0
- package/dist/hooks/useSetupGraphicalItem.d.ts +7 -0
- package/dist/index.d.ts +6 -0
- package/dist/polar/index.d.ts +3 -0
- package/dist/polar/pie/Pie.d.ts +2 -0
- package/dist/polar/pie/index.d.ts +2 -0
- package/dist/polar/pie/type.d.ts +88 -0
- package/dist/polar/radar/PolarAngleAxis.d.ts +145 -0
- package/dist/polar/radar/PolarGrid.d.ts +77 -0
- package/dist/polar/radar/PolarRadiusAxis.d.ts +125 -0
- package/dist/polar/radar/Radar.d.ts +160 -0
- package/dist/polar/radar/index.d.ts +4 -0
- package/dist/polar/radial-bar/RadialBar.d.ts +2 -0
- package/dist/polar/radial-bar/index.d.ts +2 -0
- package/dist/polar/radial-bar/type.d.ts +96 -0
- package/dist/shape/Cross.d.ts +10 -0
- package/dist/shape/Curve.d.ts +42 -0
- package/dist/shape/Dot.d.ts +18 -0
- package/dist/shape/Rectangle.d.ts +33 -0
- package/dist/shape/Sector.d.ts +48 -0
- package/dist/shape/Symbols.d.ts +15 -0
- package/dist/shape/index.d.ts +8 -0
- package/dist/shape/types.d.ts +20 -0
- package/dist/state/ReportBar.d.ts +1 -0
- package/dist/state/ReportChartProps.d.ts +88 -0
- package/dist/state/ReportMainChartProps.d.ts +37 -0
- package/dist/state/ReportPolarOptions.d.ts +59 -0
- package/dist/state/SetGraphicalItem.d.ts +9 -0
- package/dist/state/SetLegendPayload.d.ts +3 -0
- package/dist/state/SetTooltipEntrySettings.d.ts +8 -0
- package/dist/state/brushSlice.d.ts +18 -0
- package/dist/state/cartesianAxisSlice.d.ts +88 -0
- package/dist/state/chartDataSlice.d.ts +44 -0
- package/dist/state/externalEventsMiddleware.d.ts +17 -0
- package/dist/state/graphicalItemsSlice.d.ts +108 -0
- package/dist/state/hooks.d.ts +54 -0
- package/dist/state/keyboardEventsMiddleware.d.ts +3 -0
- package/dist/state/layoutSlice.d.ts +15 -0
- package/dist/state/legendSlice.d.ts +26 -0
- package/dist/state/mouseEventsMiddleware.d.ts +5 -0
- package/dist/state/optionsSlice.d.ts +27 -0
- package/dist/state/polarAxisSlice.d.ts +10 -0
- package/dist/state/polarOptionsSlice.d.ts +10 -0
- package/dist/state/reduxDevtoolsJsonStringifyReplacer.d.ts +1 -0
- package/dist/state/referenceElementsSlice.d.ts +40 -0
- package/dist/state/rootPropsSlice.d.ts +26 -0
- package/dist/state/selectors/areaSelectors.d.ts +24 -0
- package/dist/state/selectors/axisSelectors.d.ts +1828 -0
- package/dist/state/selectors/barSelectors.d.ts +944 -0
- package/dist/state/selectors/brushSelectors.d.ts +10 -0
- package/dist/state/selectors/combiners/combineActiveLabel.d.ts +3 -0
- package/dist/state/selectors/combiners/combineActiveTooltipIndex.d.ts +5 -0
- package/dist/state/selectors/combiners/combineAxisRangeWithReverse.d.ts +3 -0
- package/dist/state/selectors/combiners/combineCoordinateForDefaultIndex.d.ts +3 -0
- package/dist/state/selectors/combiners/combineTooltipInteractionState.d.ts +3 -0
- package/dist/state/selectors/combiners/combineTooltipPayloadConfigurations.d.ts +3 -0
- package/dist/state/selectors/common.d.ts +2 -0
- package/dist/state/selectors/containerSelectors.d.ts +6 -0
- package/dist/state/selectors/dataSelectors.d.ts +23 -0
- package/dist/state/selectors/funnelSelectors.d.ts +69 -0
- package/dist/state/selectors/legendSelectors.d.ts +7 -0
- package/dist/state/selectors/lineSelectors.d.ts +123 -0
- package/dist/state/selectors/pickAxisId.d.ts +3 -0
- package/dist/state/selectors/pickAxisType.d.ts +2 -0
- package/dist/state/selectors/pieSelectors.d.ts +55 -0
- package/dist/state/selectors/polarAxisSelectors.d.ts +49 -0
- package/dist/state/selectors/polarGridSelectors.d.ts +118 -0
- package/dist/state/selectors/polarScaleSelectors.d.ts +9 -0
- package/dist/state/selectors/polarSelectors.d.ts +70 -0
- package/dist/state/selectors/radarSelectors.d.ts +76 -0
- package/dist/state/selectors/radialBarSelectors.d.ts +61 -0
- package/dist/state/selectors/rootPropsSelectors.d.ts +11 -0
- package/dist/state/selectors/scatterSelectors.d.ts +21 -0
- package/dist/state/selectors/selectActivePropsFromChartPointer.d.ts +382 -0
- package/dist/state/selectors/selectAllAxes.d.ts +4 -0
- package/dist/state/selectors/selectChartOffset.d.ts +116 -0
- package/dist/state/selectors/selectChartOffsetInternal.d.ts +9 -0
- package/dist/state/selectors/selectTooltipEventType.d.ts +8 -0
- package/dist/state/selectors/selectTooltipPayloadSearcher.d.ts +3 -0
- package/dist/state/selectors/selectTooltipSettings.d.ts +3 -0
- package/dist/state/selectors/selectTooltipState.d.ts +3 -0
- package/dist/state/selectors/selectors.d.ts +184 -0
- package/dist/state/selectors/tooltipSelectors.d.ts +581 -0
- package/dist/state/selectors/touchSelectors.d.ts +4 -0
- package/dist/state/store.d.ts +74 -0
- package/dist/state/tooltipSlice.d.ts +204 -0
- package/dist/state/touchEventsMiddleware.d.ts +2 -0
- package/dist/state/utils/useReportScale.d.ts +1 -0
- package/dist/synchronisation/syncSelectors.d.ts +3 -0
- package/dist/synchronisation/useChartSynchronisation.d.ts +11 -0
- package/dist/types/area.d.ts +8 -0
- package/dist/types/axis.d.ts +127 -0
- package/dist/types/bar.d.ts +51 -0
- package/dist/types/categorical.d.ts +36 -0
- package/dist/types/common.d.ts +129 -0
- package/dist/types/event.d.ts +16 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/legend.d.ts +1 -0
- package/dist/types/offset.d.ts +8 -0
- package/dist/types/radar.d.ts +28 -0
- package/dist/types/scale.d.ts +11 -0
- package/dist/types/tick.d.ts +55 -0
- package/dist/types/tooltip.d.ts +33 -0
- package/dist/utils/ReduceCSSCalc.d.ts +2 -0
- package/dist/utils/VueUtils.d.ts +11 -0
- package/dist/utils/attrs.d.ts +46 -0
- package/dist/utils/cartesian.d.ts +20 -0
- package/dist/utils/chart.d.ts +99 -0
- package/dist/utils/const.d.ts +30 -0
- package/dist/utils/context.d.ts +8 -0
- package/dist/utils/createContext.d.ts +8 -0
- package/dist/utils/data-utils.d.ts +4 -0
- package/dist/utils/data.d.ts +13 -0
- package/dist/utils/events.d.ts +12 -0
- package/dist/utils/getLinearRegression.d.ts +15 -0
- package/dist/utils/getRelativeCoordinate.d.ts +11 -0
- package/dist/utils/grid.d.ts +37 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/isDomainSpecifiedByUser.d.ts +47 -0
- package/dist/utils/legend.d.ts +3 -0
- package/dist/utils/log.d.ts +1 -0
- package/dist/utils/payload/getUniqPayload.d.ts +4 -0
- package/dist/utils/polar.d.ts +21 -0
- package/dist/utils/props.d.ts +15 -0
- package/dist/utils/resolveDefaultProps.d.ts +52 -0
- package/dist/utils/scale/getNiceTickValues.d.ts +61 -0
- package/dist/utils/scale/utils/arithmetic.d.ts +50 -0
- package/dist/utils/scale/utils/utils.d.ts +9 -0
- package/dist/utils/style.d.ts +12 -0
- package/dist/utils/tick.d.ts +19 -0
- package/dist/utils/tooltip/translate.d.ts +47 -0
- package/dist/utils/types.d.ts +14 -0
- package/dist/utils/validate.d.ts +25 -0
- package/package.json +27 -10
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { selectChartHeight as e, selectChartWidth as t, selectMargin as n } from "./containerSelectors.mjs";
|
|
2
|
+
import { selectAllXAxes as r, selectAllYAxes as i } from "./selectAllAxes.mjs";
|
|
3
|
+
import { selectLegendSettings as a, selectLegendSize as o } from "./legendSelectors.mjs";
|
|
4
|
+
import { appendOffsetOfLegend as s } from "../../utils/legend.mjs";
|
|
5
|
+
import { selectBrushHeight as c } from "./selectChartOffset.mjs";
|
|
6
|
+
import { get as l } from "es-toolkit/compat";
|
|
7
|
+
import { createSelector as u } from "@reduxjs/toolkit";
|
|
8
|
+
//#region src/state/selectors/selectChartOffsetInternal.ts
|
|
9
|
+
var d = u([
|
|
10
|
+
t,
|
|
11
|
+
e,
|
|
12
|
+
n,
|
|
13
|
+
c,
|
|
14
|
+
r,
|
|
15
|
+
i,
|
|
16
|
+
a,
|
|
17
|
+
o
|
|
18
|
+
], (e, t, n, r, i, a, o, c) => {
|
|
19
|
+
let u = a.reduce((e, t) => {
|
|
20
|
+
let { orientation: n } = t;
|
|
21
|
+
if (!t.mirror && !t.hide) {
|
|
22
|
+
let r = typeof t.width == "number" ? t.width : 60;
|
|
23
|
+
return {
|
|
24
|
+
...e,
|
|
25
|
+
[n]: e[n] + r
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return e;
|
|
29
|
+
}, {
|
|
30
|
+
left: n.left || 0,
|
|
31
|
+
right: n.right || 0
|
|
32
|
+
}), d = {
|
|
33
|
+
...i.reduce((e, t) => {
|
|
34
|
+
let { orientation: n } = t;
|
|
35
|
+
return !t.mirror && !t.hide ? {
|
|
36
|
+
...e,
|
|
37
|
+
[n]: l(e, `${n}`) + t.height
|
|
38
|
+
} : e;
|
|
39
|
+
}, {
|
|
40
|
+
top: n.top || 0,
|
|
41
|
+
bottom: n.bottom || 0
|
|
42
|
+
}),
|
|
43
|
+
...u
|
|
44
|
+
}, f = d.bottom;
|
|
45
|
+
d.bottom += r, d = s(d, o, c);
|
|
46
|
+
let p = e - d.left - d.right, m = t - d.top - d.bottom;
|
|
47
|
+
return {
|
|
48
|
+
brushBottom: f,
|
|
49
|
+
...d,
|
|
50
|
+
width: Math.max(p, 0),
|
|
51
|
+
height: Math.max(m, 0)
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
//#endregion
|
|
55
|
+
export { d as selectChartOffsetInternal };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useAppSelector as e } from "../hooks.mjs";
|
|
2
|
+
//#region src/state/selectors/selectTooltipEventType.ts
|
|
3
|
+
function t(e) {
|
|
4
|
+
return e.options.defaultTooltipEventType;
|
|
5
|
+
}
|
|
6
|
+
function n(e) {
|
|
7
|
+
return e.options.validateTooltipEventTypes;
|
|
8
|
+
}
|
|
9
|
+
function r(e, t, n) {
|
|
10
|
+
if (e == null) return t;
|
|
11
|
+
let r = e ? "axis" : "item";
|
|
12
|
+
return n == null ? t : n.includes(r) ? r : t;
|
|
13
|
+
}
|
|
14
|
+
function i(e, i) {
|
|
15
|
+
return r(i, t(e), n(e));
|
|
16
|
+
}
|
|
17
|
+
function a(t) {
|
|
18
|
+
return e((e) => i(e, t));
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { r as combineTooltipEventType, t as selectDefaultTooltipEventType, i as selectTooltipEventType, n as selectValidateTooltipEventTypes, a as useTooltipEventType };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { selectChartDataWithIndexes as e } from "./dataSelectors.mjs";
|
|
2
|
+
import { selectChartHeight as t, selectChartWidth as n } from "./containerSelectors.mjs";
|
|
3
|
+
import { selectChartOffset as r } from "./selectChartOffset.mjs";
|
|
4
|
+
import { selectChartName as i } from "./rootPropsSelectors.mjs";
|
|
5
|
+
import { selectChartLayout as a } from "./common.mjs";
|
|
6
|
+
import { calculateActiveTickIndex as o, calculateTooltipPos as s, getActiveCoordinate as c, inRange as l } from "../../utils/chart.mjs";
|
|
7
|
+
import { combineActiveLabel as u } from "./combiners/combineActiveLabel.mjs";
|
|
8
|
+
import { combineTooltipInteractionState as d } from "./combiners/combineTooltipInteractionState.mjs";
|
|
9
|
+
import { combineActiveTooltipIndex as f } from "./combiners/combineActiveTooltipIndex.mjs";
|
|
10
|
+
import { combineCoordinateForDefaultIndex as p } from "./combiners/combineCoordinateForDefaultIndex.mjs";
|
|
11
|
+
import { combineTooltipPayloadConfigurations as m } from "./combiners/combineTooltipPayloadConfigurations.mjs";
|
|
12
|
+
import { selectTooltipPayloadSearcher as h } from "./selectTooltipPayloadSearcher.mjs";
|
|
13
|
+
import { selectTooltipState as g } from "./selectTooltipState.mjs";
|
|
14
|
+
import { combineTooltipPayload as _, selectTooltipAxis as v, selectTooltipAxisDomain as y, selectTooltipAxisTicks as b, selectTooltipDisplayedData as x } from "./tooltipSelectors.mjs";
|
|
15
|
+
import { useAppSelector as S } from "../hooks.mjs";
|
|
16
|
+
import { createSelector as C } from "@reduxjs/toolkit";
|
|
17
|
+
import { sortBy as w } from "lodash-es";
|
|
18
|
+
//#region src/state/selectors/selectors.ts
|
|
19
|
+
function T() {
|
|
20
|
+
return S(i);
|
|
21
|
+
}
|
|
22
|
+
function E(e, t) {
|
|
23
|
+
return t;
|
|
24
|
+
}
|
|
25
|
+
function D(e, t, n) {
|
|
26
|
+
return n;
|
|
27
|
+
}
|
|
28
|
+
function O(e, t, n, r) {
|
|
29
|
+
return r;
|
|
30
|
+
}
|
|
31
|
+
var k = C(b, (e) => w(e, (e) => e.coordinate)), A = C([
|
|
32
|
+
g,
|
|
33
|
+
E,
|
|
34
|
+
D,
|
|
35
|
+
O
|
|
36
|
+
], d), j = C([
|
|
37
|
+
A,
|
|
38
|
+
x,
|
|
39
|
+
C([v], (e) => e?.dataKey),
|
|
40
|
+
y
|
|
41
|
+
], f);
|
|
42
|
+
function M(e, t, n) {
|
|
43
|
+
let r = g(e);
|
|
44
|
+
return t === "axis" ? n === "hover" ? r.axisInteraction.hover.dataKey : r.axisInteraction.click.dataKey : n === "hover" ? r.itemInteraction.hover.dataKey : r.itemInteraction.click.dataKey;
|
|
45
|
+
}
|
|
46
|
+
var N = C([
|
|
47
|
+
g,
|
|
48
|
+
E,
|
|
49
|
+
D,
|
|
50
|
+
O
|
|
51
|
+
], m), P = C([
|
|
52
|
+
n,
|
|
53
|
+
t,
|
|
54
|
+
a,
|
|
55
|
+
r,
|
|
56
|
+
b,
|
|
57
|
+
O,
|
|
58
|
+
N,
|
|
59
|
+
h
|
|
60
|
+
], p), F = C([A, P], (e, t) => e.coordinate ?? t), I = C(b, j, u), L = C([
|
|
61
|
+
N,
|
|
62
|
+
j,
|
|
63
|
+
e,
|
|
64
|
+
v,
|
|
65
|
+
I,
|
|
66
|
+
h,
|
|
67
|
+
E
|
|
68
|
+
], _), R = C([A], (e) => ({
|
|
69
|
+
isActive: e.active,
|
|
70
|
+
activeIndex: e.index
|
|
71
|
+
}));
|
|
72
|
+
function z(e, t, n, r, i, a, u, d) {
|
|
73
|
+
if (!e || !t || !r || !i || !a) return;
|
|
74
|
+
let f = l(e.chartX, e.chartY, t, n, d);
|
|
75
|
+
if (!f) return;
|
|
76
|
+
let p = s(f, t);
|
|
77
|
+
if (p == null) return;
|
|
78
|
+
let m = o(p, u, a, r, i), h = c(t, a, m, f);
|
|
79
|
+
return {
|
|
80
|
+
activeIndex: String(m),
|
|
81
|
+
activeCoordinate: h
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
export { z as combineActiveProps, F as selectActiveCoordinate, I as selectActiveLabel, P as selectCoordinateForDefaultIndex, R as selectIsTooltipActive, k as selectOrderedTooltipTicks, M as selectTooltipDataKey, L as selectTooltipPayload, T as useChartName };
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { isCategoricalAxis as e } from "../../utils/validate.mjs";
|
|
2
|
+
import { selectChartDataWithIndexes as t } from "./dataSelectors.mjs";
|
|
3
|
+
import { selectChartHeight as n, selectChartWidth as r } from "./containerSelectors.mjs";
|
|
4
|
+
import { selectChartOffset as i } from "./selectChartOffset.mjs";
|
|
5
|
+
import { selectChartName as a, selectStackOffsetType as o } from "./rootPropsSelectors.mjs";
|
|
6
|
+
import { combineAxisRangeWithReverse as s } from "./combiners/combineAxisRangeWithReverse.mjs";
|
|
7
|
+
import { findEntryInArray as c, mathSign as l } from "../../utils/data.mjs";
|
|
8
|
+
import { selectChartLayout as u } from "./common.mjs";
|
|
9
|
+
import { getTooltipEntry as d, getValueByDataKey as f } from "../../utils/chart.mjs";
|
|
10
|
+
import { combineAppliedNumericalValuesIncludingErrorValues as p, combineAppliedValues as m, combineAreasDomain as h, combineAxisDomain as g, combineAxisDomainWithNiceTicks as _, combineCategoricalDomain as v, combineDisplayedData as y, combineDomainOfStackGroups as ee, combineDotsDomain as te, combineDuplicateDomain as ne, combineGraphicalItemsData as re, combineGraphicalItemsSettings as ie, combineLinesDomain as ae, combineNiceTicks as b, combineNumericalDomain as x, combineRealScaleType as S, combineScaleFunction as oe, combineStackGroups as se, filterGraphicalNotStackedItems as ce, filterReferenceElements as C, getDomainDefinition as le, itemAxisPredicate as ue, mergeDomains as de, selectAxisRange as fe, selectAxisSettings as pe, selectHasBar as me, selectReferenceAreas as he, selectReferenceDots as ge, selectReferenceLines as _e } from "./axisSelectors.mjs";
|
|
11
|
+
import { combineTooltipEventType as ve, selectDefaultTooltipEventType as ye, selectValidateTooltipEventTypes as be } from "./selectTooltipEventType.mjs";
|
|
12
|
+
import { combineActiveLabel as w } from "./combiners/combineActiveLabel.mjs";
|
|
13
|
+
import { selectTooltipSettings as T } from "./selectTooltipSettings.mjs";
|
|
14
|
+
import { combineTooltipInteractionState as E } from "./combiners/combineTooltipInteractionState.mjs";
|
|
15
|
+
import { combineActiveTooltipIndex as D } from "./combiners/combineActiveTooltipIndex.mjs";
|
|
16
|
+
import { combineCoordinateForDefaultIndex as O } from "./combiners/combineCoordinateForDefaultIndex.mjs";
|
|
17
|
+
import { combineTooltipPayloadConfigurations as k } from "./combiners/combineTooltipPayloadConfigurations.mjs";
|
|
18
|
+
import { selectTooltipPayloadSearcher as A } from "./selectTooltipPayloadSearcher.mjs";
|
|
19
|
+
import { selectTooltipState as j } from "./selectTooltipState.mjs";
|
|
20
|
+
import { createSelector as M } from "@reduxjs/toolkit";
|
|
21
|
+
//#region src/state/selectors/tooltipSelectors.ts
|
|
22
|
+
function N(e, t, n) {
|
|
23
|
+
return Array.isArray(e) && e && t + n !== 0 ? e.slice(t, n + 1) : e;
|
|
24
|
+
}
|
|
25
|
+
function xe(e, t) {
|
|
26
|
+
return e ?? t;
|
|
27
|
+
}
|
|
28
|
+
function P(e, t, n, r, i, a, o) {
|
|
29
|
+
if (t == null || a == null) return;
|
|
30
|
+
let { chartData: s, computedData: l, dataStartIndex: u, dataEndIndex: p } = n;
|
|
31
|
+
return e.reduce((e, { dataDefinedOnItem: n, settings: m }) => {
|
|
32
|
+
let h = N(xe(n, s), u, p), g = m?.dataKey ?? r?.dataKey, _ = m?.nameKey, v;
|
|
33
|
+
return r?.dataKey && !r?.allowDuplicatedCategory && Array.isArray(h) && i != null && o === "axis" && (v = c(h, r.dataKey, i)), v ??= a(h, t, l, _), Array.isArray(v) ? v.forEach((t) => {
|
|
34
|
+
let n = {
|
|
35
|
+
...m,
|
|
36
|
+
name: t.name,
|
|
37
|
+
unit: t.unit,
|
|
38
|
+
color: void 0,
|
|
39
|
+
fill: void 0
|
|
40
|
+
};
|
|
41
|
+
e.push(d({
|
|
42
|
+
tooltipEntrySettings: n,
|
|
43
|
+
dataKey: t.dataKey,
|
|
44
|
+
payload: t.payload,
|
|
45
|
+
value: f(t.payload, t.dataKey),
|
|
46
|
+
name: t.name
|
|
47
|
+
}));
|
|
48
|
+
}) : e.push(d({
|
|
49
|
+
tooltipEntrySettings: m,
|
|
50
|
+
dataKey: g,
|
|
51
|
+
payload: v,
|
|
52
|
+
value: f(v, g),
|
|
53
|
+
name: f(v, _) ?? m?.name
|
|
54
|
+
})), e;
|
|
55
|
+
}, []);
|
|
56
|
+
}
|
|
57
|
+
function F(e) {
|
|
58
|
+
let t = u(e);
|
|
59
|
+
return t === "horizontal" ? "xAxis" : t === "vertical" ? "yAxis" : t === "centric" ? "angleAxis" : "radiusAxis";
|
|
60
|
+
}
|
|
61
|
+
var I = (e) => e.tooltip.settings.axisId;
|
|
62
|
+
function L(e) {
|
|
63
|
+
return pe(e, F(e), I(e));
|
|
64
|
+
}
|
|
65
|
+
var R = M([
|
|
66
|
+
L,
|
|
67
|
+
me,
|
|
68
|
+
a
|
|
69
|
+
], S), z = M([
|
|
70
|
+
M([(e) => e.graphicalItems.cartesianItems, (e) => e.graphicalItems.polarItems], (e, t) => [...e, ...t]),
|
|
71
|
+
L,
|
|
72
|
+
M([F, I], ue)
|
|
73
|
+
], ie), B = M([M([z], re), t], y), V = M([
|
|
74
|
+
B,
|
|
75
|
+
L,
|
|
76
|
+
z
|
|
77
|
+
], m), Se = M([L], le), Ce = M([
|
|
78
|
+
M([
|
|
79
|
+
B,
|
|
80
|
+
z,
|
|
81
|
+
o
|
|
82
|
+
], se),
|
|
83
|
+
t,
|
|
84
|
+
F
|
|
85
|
+
], ee), we = M([
|
|
86
|
+
B,
|
|
87
|
+
L,
|
|
88
|
+
M([z], ce),
|
|
89
|
+
F
|
|
90
|
+
], p), Te = M([M([
|
|
91
|
+
ge,
|
|
92
|
+
F,
|
|
93
|
+
I
|
|
94
|
+
], C), F], te), Ee = M([M([
|
|
95
|
+
he,
|
|
96
|
+
F,
|
|
97
|
+
I
|
|
98
|
+
], C), F], h), H = M([
|
|
99
|
+
L,
|
|
100
|
+
u,
|
|
101
|
+
B,
|
|
102
|
+
V,
|
|
103
|
+
o,
|
|
104
|
+
F,
|
|
105
|
+
M([
|
|
106
|
+
L,
|
|
107
|
+
Se,
|
|
108
|
+
Ce,
|
|
109
|
+
we,
|
|
110
|
+
M([
|
|
111
|
+
Te,
|
|
112
|
+
M([M([
|
|
113
|
+
_e,
|
|
114
|
+
F,
|
|
115
|
+
I
|
|
116
|
+
], C), F], ae),
|
|
117
|
+
Ee
|
|
118
|
+
], de)
|
|
119
|
+
], x)
|
|
120
|
+
], g), De = M([
|
|
121
|
+
L,
|
|
122
|
+
H,
|
|
123
|
+
M([
|
|
124
|
+
H,
|
|
125
|
+
L,
|
|
126
|
+
R
|
|
127
|
+
], b),
|
|
128
|
+
F
|
|
129
|
+
], _);
|
|
130
|
+
function U(e) {
|
|
131
|
+
return fe(e, F(e), I(e), !1);
|
|
132
|
+
}
|
|
133
|
+
var W = M([L, U], s), G = M([
|
|
134
|
+
L,
|
|
135
|
+
R,
|
|
136
|
+
De,
|
|
137
|
+
W
|
|
138
|
+
], oe), Oe = M([
|
|
139
|
+
u,
|
|
140
|
+
V,
|
|
141
|
+
L,
|
|
142
|
+
F
|
|
143
|
+
], ne), ke = M([
|
|
144
|
+
u,
|
|
145
|
+
V,
|
|
146
|
+
L,
|
|
147
|
+
F
|
|
148
|
+
], v);
|
|
149
|
+
function Ae(t, n, r, i, a, o, s, c) {
|
|
150
|
+
if (!n) return null;
|
|
151
|
+
let { type: u } = n, d = e(t, c);
|
|
152
|
+
if (!i) return null;
|
|
153
|
+
let f = r === "scaleBand" && i.bandwidth ? i.bandwidth() / 2 : 2, p = u === "category" && i.bandwidth ? i.bandwidth() / f : 0;
|
|
154
|
+
return p = c === "angleAxis" && a != null && a?.length >= 2 ? l(a[0] - a[1]) * 2 * p : p, d && s ? s.map((e, t) => ({
|
|
155
|
+
coordinate: i(e) + p,
|
|
156
|
+
value: e,
|
|
157
|
+
index: t,
|
|
158
|
+
offset: p
|
|
159
|
+
})) : i.domain().map((e, t) => ({
|
|
160
|
+
coordinate: i(e) + p,
|
|
161
|
+
value: o ? o[e] : e,
|
|
162
|
+
index: t,
|
|
163
|
+
offset: p
|
|
164
|
+
}));
|
|
165
|
+
}
|
|
166
|
+
var K = M([
|
|
167
|
+
u,
|
|
168
|
+
L,
|
|
169
|
+
R,
|
|
170
|
+
G,
|
|
171
|
+
U,
|
|
172
|
+
Oe,
|
|
173
|
+
ke,
|
|
174
|
+
F
|
|
175
|
+
], Ae), q = M([
|
|
176
|
+
ye,
|
|
177
|
+
be,
|
|
178
|
+
T
|
|
179
|
+
], (e, t, n) => ve(n.shared, e, t)), J = (e) => e.tooltip.settings.trigger, Y = (e) => e.tooltip.settings.defaultIndex, X = M([
|
|
180
|
+
j,
|
|
181
|
+
q,
|
|
182
|
+
J,
|
|
183
|
+
Y
|
|
184
|
+
], E), Z = M([
|
|
185
|
+
X,
|
|
186
|
+
B,
|
|
187
|
+
M([L], (e) => e?.dataKey),
|
|
188
|
+
H
|
|
189
|
+
], D), Q = M([K, Z], w), je = M([X], (e) => {
|
|
190
|
+
if (e) return e.dataKey;
|
|
191
|
+
}), $ = M([
|
|
192
|
+
j,
|
|
193
|
+
q,
|
|
194
|
+
J,
|
|
195
|
+
Y
|
|
196
|
+
], k), Me = M([X, M([
|
|
197
|
+
r,
|
|
198
|
+
n,
|
|
199
|
+
u,
|
|
200
|
+
i,
|
|
201
|
+
K,
|
|
202
|
+
Y,
|
|
203
|
+
$,
|
|
204
|
+
A
|
|
205
|
+
], O)], (e, t) => e.coordinate ?? t), Ne = M([X], (e) => e.active);
|
|
206
|
+
M([M([
|
|
207
|
+
$,
|
|
208
|
+
Z,
|
|
209
|
+
t,
|
|
210
|
+
L,
|
|
211
|
+
Q,
|
|
212
|
+
A,
|
|
213
|
+
q
|
|
214
|
+
], P)], (e) => {
|
|
215
|
+
if (e == null) return;
|
|
216
|
+
let t = e.map((e) => e.payload).filter((e) => e != null);
|
|
217
|
+
return Array.from(new Set(t));
|
|
218
|
+
});
|
|
219
|
+
//#endregion
|
|
220
|
+
export { P as combineTooltipPayload, Q as selectActiveLabel, Me as selectActiveTooltipCoordinate, je as selectActiveTooltipDataKey, Z as selectActiveTooltipIndex, Ne as selectIsTooltipActive, L as selectTooltipAxis, H as selectTooltipAxisDomain, W as selectTooltipAxisRangeWithReverse, G as selectTooltipAxisScale, K as selectTooltipAxisTicks, F as selectTooltipAxisType, B as selectTooltipDisplayedData };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { selectTooltipPayloadSearcher as e } from "./selectTooltipPayloadSearcher.mjs";
|
|
2
|
+
import { selectTooltipState as t } from "./selectTooltipState.mjs";
|
|
3
|
+
import { createSelector as n } from "@reduxjs/toolkit";
|
|
4
|
+
var r = n([
|
|
5
|
+
n([t], (e) => e.tooltipItemPayloads),
|
|
6
|
+
e,
|
|
7
|
+
(e, t, n) => t,
|
|
8
|
+
(e, t, n) => n
|
|
9
|
+
], (e, t, n, r) => {
|
|
10
|
+
let i = e.find((e) => e.settings.dataKey === r);
|
|
11
|
+
if (i == null) return;
|
|
12
|
+
let { positions: a } = i;
|
|
13
|
+
if (a != null) return t?.(a, n);
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { r as selectTooltipCoordinate };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { tooltipReducer as e } from "./tooltipSlice.mjs";
|
|
2
|
+
import { graphicalItemsReducer as t } from "./graphicalItemsSlice.mjs";
|
|
3
|
+
import { legendReducer as n } from "./legendSlice.mjs";
|
|
4
|
+
import { cartesianAxisReducer as r } from "./cartesianAxisSlice.mjs";
|
|
5
|
+
import { referenceElementsReducer as i } from "./referenceElementsSlice.mjs";
|
|
6
|
+
import { optionsReducer as a } from "./optionsSlice.mjs";
|
|
7
|
+
import { chartDataReducer as o } from "./chartDataSlice.mjs";
|
|
8
|
+
import { chartLayoutReducer as s } from "./layoutSlice.mjs";
|
|
9
|
+
import { mouseClickMiddleware as c, mouseMoveMiddleware as l } from "./mouseEventsMiddleware.mjs";
|
|
10
|
+
import { reduxDevtoolsJsonStringifyReplacer as u } from "./reduxDevtoolsJsonStringifyReplacer.mjs";
|
|
11
|
+
import { brushReducer as d } from "./brushSlice.mjs";
|
|
12
|
+
import { rootPropsReducer as f } from "./rootPropsSlice.mjs";
|
|
13
|
+
import { polarAxisReducer as p } from "./polarAxisSlice.mjs";
|
|
14
|
+
import { polarOptionsReducer as m } from "./polarOptionsSlice.mjs";
|
|
15
|
+
import { keyboardEventsMiddleware as h } from "./keyboardEventsMiddleware.mjs";
|
|
16
|
+
import { externalEventsMiddleware as g } from "./externalEventsMiddleware.mjs";
|
|
17
|
+
import { touchEventMiddleware as _ } from "./touchEventsMiddleware.mjs";
|
|
18
|
+
import { combineReducers as v, configureStore as y } from "@reduxjs/toolkit";
|
|
19
|
+
//#region src/state/store.ts
|
|
20
|
+
var b = v({
|
|
21
|
+
brush: d,
|
|
22
|
+
cartesianAxis: r,
|
|
23
|
+
chartData: o,
|
|
24
|
+
graphicalItems: t,
|
|
25
|
+
layout: s,
|
|
26
|
+
legend: n,
|
|
27
|
+
options: a,
|
|
28
|
+
polarAxis: p,
|
|
29
|
+
polarOptions: m,
|
|
30
|
+
referenceElements: i,
|
|
31
|
+
rootProps: f,
|
|
32
|
+
tooltip: e
|
|
33
|
+
});
|
|
34
|
+
function x(e, t = "Chart") {
|
|
35
|
+
return y({
|
|
36
|
+
reducer: b,
|
|
37
|
+
preloadedState: e,
|
|
38
|
+
middleware: (e) => e({
|
|
39
|
+
serializableCheck: !1,
|
|
40
|
+
immutableCheck: !1
|
|
41
|
+
}).concat([
|
|
42
|
+
c.middleware,
|
|
43
|
+
l.middleware,
|
|
44
|
+
h.middleware,
|
|
45
|
+
g,
|
|
46
|
+
_.middleware
|
|
47
|
+
]),
|
|
48
|
+
devTools: {
|
|
49
|
+
serialize: { replacer: u },
|
|
50
|
+
name: `v-charts-${t}`
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { x as createRechartsStore };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { createSlice as e, current as t } from "@reduxjs/toolkit";
|
|
2
|
+
import { castDraft as n } from "immer";
|
|
3
|
+
//#region src/state/tooltipSlice.ts
|
|
4
|
+
var r = {
|
|
5
|
+
active: !1,
|
|
6
|
+
index: null,
|
|
7
|
+
dataKey: void 0,
|
|
8
|
+
coordinate: void 0
|
|
9
|
+
}, i = e({
|
|
10
|
+
name: "tooltip",
|
|
11
|
+
initialState: {
|
|
12
|
+
itemInteraction: {
|
|
13
|
+
click: r,
|
|
14
|
+
hover: r
|
|
15
|
+
},
|
|
16
|
+
axisInteraction: {
|
|
17
|
+
click: r,
|
|
18
|
+
hover: r
|
|
19
|
+
},
|
|
20
|
+
keyboardInteraction: r,
|
|
21
|
+
syncInteraction: {
|
|
22
|
+
active: !1,
|
|
23
|
+
index: null,
|
|
24
|
+
dataKey: void 0,
|
|
25
|
+
label: void 0,
|
|
26
|
+
coordinate: void 0
|
|
27
|
+
},
|
|
28
|
+
tooltipItemPayloads: [],
|
|
29
|
+
settings: {
|
|
30
|
+
shared: void 0,
|
|
31
|
+
trigger: "hover",
|
|
32
|
+
axisId: 0,
|
|
33
|
+
active: !1,
|
|
34
|
+
defaultIndex: void 0
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
reducers: {
|
|
38
|
+
addTooltipEntrySettings(e, t) {
|
|
39
|
+
e.tooltipItemPayloads.push(n(t.payload));
|
|
40
|
+
},
|
|
41
|
+
removeTooltipEntrySettings(e, r) {
|
|
42
|
+
let i = t(e).tooltipItemPayloads.indexOf(n(r.payload));
|
|
43
|
+
i > -1 && e.tooltipItemPayloads.splice(i, 1);
|
|
44
|
+
},
|
|
45
|
+
setTooltipSettingsState(e, t) {
|
|
46
|
+
e.settings = t.payload;
|
|
47
|
+
},
|
|
48
|
+
setActiveMouseOverItemIndex(e, t) {
|
|
49
|
+
e.syncInteraction.active = !1, e.keyboardInteraction.active = !1, e.itemInteraction.hover.active = !0, e.itemInteraction.hover.index = t.payload.activeIndex, e.itemInteraction.hover.dataKey = t.payload.activeDataKey, e.itemInteraction.hover.coordinate = t.payload.activeCoordinate;
|
|
50
|
+
},
|
|
51
|
+
mouseLeaveChart(e) {
|
|
52
|
+
e.itemInteraction.hover.active = !1, e.axisInteraction.hover.active = !1;
|
|
53
|
+
},
|
|
54
|
+
mouseLeaveItem(e) {
|
|
55
|
+
e.itemInteraction.hover.active = !1;
|
|
56
|
+
},
|
|
57
|
+
setActiveClickItemIndex(e, t) {
|
|
58
|
+
e.syncInteraction.active = !1, e.itemInteraction.click.active = !0, e.keyboardInteraction.active = !1, e.itemInteraction.click.index = t.payload.activeIndex, e.itemInteraction.click.dataKey = t.payload.activeDataKey, e.itemInteraction.click.coordinate = t.payload.activeCoordinate;
|
|
59
|
+
},
|
|
60
|
+
setMouseOverAxisIndex(e, t) {
|
|
61
|
+
e.syncInteraction.active = !1, e.axisInteraction.hover.active = !0, e.keyboardInteraction.active = !1, e.axisInteraction.hover.index = t.payload.activeIndex, e.axisInteraction.hover.dataKey = t.payload.activeDataKey, e.axisInteraction.hover.coordinate = t.payload.activeCoordinate;
|
|
62
|
+
},
|
|
63
|
+
setMouseClickAxisIndex(e, t) {
|
|
64
|
+
e.syncInteraction.active = !1, e.keyboardInteraction.active = !1, e.axisInteraction.click.active = !0, e.axisInteraction.click.index = t.payload.activeIndex, e.axisInteraction.click.dataKey = t.payload.activeDataKey, e.axisInteraction.click.coordinate = t.payload.activeCoordinate;
|
|
65
|
+
},
|
|
66
|
+
setSyncInteraction(e, t) {
|
|
67
|
+
e.syncInteraction = t.payload;
|
|
68
|
+
},
|
|
69
|
+
setKeyboardInteraction(e, t) {
|
|
70
|
+
e.keyboardInteraction.active = t.payload.active, e.keyboardInteraction.index = t.payload.activeIndex, e.keyboardInteraction.coordinate = t.payload.activeCoordinate, e.keyboardInteraction.dataKey = t.payload.activeDataKey;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}), { addTooltipEntrySettings: a, removeTooltipEntrySettings: o, setTooltipSettingsState: s, setActiveMouseOverItemIndex: c, mouseLeaveItem: l, mouseLeaveChart: u, setActiveClickItemIndex: d, setMouseOverAxisIndex: f, setMouseClickAxisIndex: p, setSyncInteraction: m, setKeyboardInteraction: h } = i.actions, g = i.reducer;
|
|
74
|
+
//#endregion
|
|
75
|
+
export { a as addTooltipEntrySettings, u as mouseLeaveChart, l as mouseLeaveItem, r as noInteraction, o as removeTooltipEntrySettings, d as setActiveClickItemIndex, c as setActiveMouseOverItemIndex, h as setKeyboardInteraction, p as setMouseClickAxisIndex, f as setMouseOverAxisIndex, m as setSyncInteraction, s as setTooltipSettingsState, g as tooltipReducer };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getChartPointer as e } from "../utils/chart.mjs";
|
|
2
|
+
import { selectTooltipEventType as t } from "./selectors/selectTooltipEventType.mjs";
|
|
3
|
+
import { setActiveMouseOverItemIndex as n, setMouseOverAxisIndex as r } from "./tooltipSlice.mjs";
|
|
4
|
+
import { DATA_ITEM_DATAKEY_ATTRIBUTE_NAME as i, DATA_ITEM_INDEX_ATTRIBUTE_NAME as a } from "../utils/const.mjs";
|
|
5
|
+
import { selectActivePropsFromChartPointer as o } from "./selectors/selectActivePropsFromChartPointer.mjs";
|
|
6
|
+
import { selectTooltipCoordinate as s } from "./selectors/touchSelectors.mjs";
|
|
7
|
+
import { createAction as c, createListenerMiddleware as l } from "@reduxjs/toolkit";
|
|
8
|
+
//#region src/state/touchEventsMiddleware.ts
|
|
9
|
+
var u = c("touchMove"), d = l();
|
|
10
|
+
d.startListening({
|
|
11
|
+
actionCreator: u,
|
|
12
|
+
effect: (c, l) => {
|
|
13
|
+
let u = c.payload, d = l.getState(), f = t(d, d.tooltip.settings.shared);
|
|
14
|
+
if (f === "axis") {
|
|
15
|
+
let t = o(d, e({
|
|
16
|
+
clientX: u.touches[0].clientX,
|
|
17
|
+
clientY: u.touches[0].clientY,
|
|
18
|
+
currentTarget: u.target
|
|
19
|
+
}));
|
|
20
|
+
t?.activeIndex != null && l.dispatch(r({
|
|
21
|
+
activeIndex: t.activeIndex,
|
|
22
|
+
activeDataKey: void 0,
|
|
23
|
+
activeCoordinate: t.activeCoordinate
|
|
24
|
+
}));
|
|
25
|
+
} else if (f === "item") {
|
|
26
|
+
let e = u.touches[0], t = document.elementFromPoint(e.clientX, e.clientY);
|
|
27
|
+
if (!t || !t.getAttribute) return;
|
|
28
|
+
let r = t.getAttribute(a), o = t.getAttribute(i), c = s(l.getState(), r, o);
|
|
29
|
+
l.dispatch(n({
|
|
30
|
+
activeDataKey: o,
|
|
31
|
+
activeIndex: r,
|
|
32
|
+
activeCoordinate: c
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
//#endregion
|
|
38
|
+
export { u as touchEventAction, d as touchEventMiddleware };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isWellBehavedNumber as e } from "../../utils/validate.mjs";
|
|
2
|
+
import { selectContainerScale as t } from "../selectors/containerSelectors.mjs";
|
|
3
|
+
import { useAppDispatch as n, useAppSelector as r } from "../hooks.mjs";
|
|
4
|
+
import { setScale as i } from "../layoutSlice.mjs";
|
|
5
|
+
import { ref as a, watch as o } from "vue";
|
|
6
|
+
//#region src/state/utils/useReportScale.ts
|
|
7
|
+
function s() {
|
|
8
|
+
let s = n(), c = a(null), l = r(t);
|
|
9
|
+
return o([c, l], () => {
|
|
10
|
+
if (c.value == null) return;
|
|
11
|
+
let t = c.value.getBoundingClientRect().width / c.value.offsetWidth;
|
|
12
|
+
e(t) && t !== l.value && s(i(t));
|
|
13
|
+
}), c;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { s as useReportScale };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { selectEventEmitter as e, selectSyncId as t } from "../state/selectors/rootPropsSelectors.mjs";
|
|
2
|
+
import { setSyncInteraction as n } from "../state/tooltipSlice.mjs";
|
|
3
|
+
import { useAppSelector as r } from "../state/hooks.mjs";
|
|
4
|
+
import { selectTooltipDataKey as i } from "../state/selectors/selectors.mjs";
|
|
5
|
+
import { TOOLTIP_SYNC_EVENT as a, eventCenter as o } from "../utils/events.mjs";
|
|
6
|
+
import { selectSynchronisedTooltipState as s } from "./syncSelectors.mjs";
|
|
7
|
+
import { computed as c, watchEffect as l } from "vue";
|
|
8
|
+
//#region src/synchronisation/useChartSynchronisation.tsx
|
|
9
|
+
function u({ tooltipEventType: u, trigger: d, activeCoordinate: f, activeLabel: p, activeIndex: m, isTooltipActive: h }) {
|
|
10
|
+
let g = r((e) => i(e, u.value, d)), _ = r(e), v = r(t), y = r(s), b = c(() => y.value?.active);
|
|
11
|
+
l(() => {
|
|
12
|
+
if (b.value || v.value == null || _.value == null) return;
|
|
13
|
+
let e = n({
|
|
14
|
+
active: h.value,
|
|
15
|
+
coordinate: f.value,
|
|
16
|
+
dataKey: g.value,
|
|
17
|
+
index: m.value,
|
|
18
|
+
label: typeof p.value == "number" ? String(p.value) : p.value
|
|
19
|
+
});
|
|
20
|
+
o.emit(a, v.value, e, _.value);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { u as useTooltipChartSynchronisation };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/types/event.ts
|
|
2
|
+
var e = /* @__PURE__ */ "dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture".split(".");
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as EventKeys };
|