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,154 @@
|
|
|
1
|
+
import { getStringSize as e } from "../utils/attrs.mjs";
|
|
2
|
+
import { reduceCSSCalc as t } from "../utils/ReduceCSSCalc.mjs";
|
|
3
|
+
import { Fragment as n, computed as r, createElementBlock as i, defineComponent as a, normalizeStyle as o, openBlock as s, renderList as c, toDisplayString as l } from "vue";
|
|
4
|
+
//#region src/components/Text.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var u = [
|
|
6
|
+
"x",
|
|
7
|
+
"y",
|
|
8
|
+
"transform",
|
|
9
|
+
"text-anchor",
|
|
10
|
+
"fill"
|
|
11
|
+
], d = ["x", "dy"], f = /* @__PURE__ */ a({
|
|
12
|
+
__name: "Text",
|
|
13
|
+
props: {
|
|
14
|
+
x: {
|
|
15
|
+
type: [Number, String],
|
|
16
|
+
default: 0
|
|
17
|
+
},
|
|
18
|
+
y: {
|
|
19
|
+
type: [Number, String],
|
|
20
|
+
default: 0
|
|
21
|
+
},
|
|
22
|
+
dx: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: void 0
|
|
25
|
+
},
|
|
26
|
+
dy: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: void 0
|
|
29
|
+
},
|
|
30
|
+
lineHeight: {
|
|
31
|
+
type: [Number, String],
|
|
32
|
+
default: "1em"
|
|
33
|
+
},
|
|
34
|
+
capHeight: {
|
|
35
|
+
type: [Number, String],
|
|
36
|
+
default: "0.71em"
|
|
37
|
+
},
|
|
38
|
+
scaleToFit: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
textAnchor: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "start"
|
|
45
|
+
},
|
|
46
|
+
verticalAnchor: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "end"
|
|
49
|
+
},
|
|
50
|
+
fill: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: "#808080"
|
|
53
|
+
},
|
|
54
|
+
angle: {
|
|
55
|
+
type: Number,
|
|
56
|
+
default: 0
|
|
57
|
+
},
|
|
58
|
+
style: {
|
|
59
|
+
type: Object,
|
|
60
|
+
default: () => ({})
|
|
61
|
+
},
|
|
62
|
+
breakAll: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: !1
|
|
65
|
+
},
|
|
66
|
+
maxLines: {
|
|
67
|
+
type: Number,
|
|
68
|
+
default: void 0
|
|
69
|
+
},
|
|
70
|
+
width: {
|
|
71
|
+
type: [Number, String],
|
|
72
|
+
default: void 0
|
|
73
|
+
},
|
|
74
|
+
value: {
|
|
75
|
+
type: [String, Number],
|
|
76
|
+
default: ""
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
setup(a) {
|
|
80
|
+
let f = a, p = /[ \f\n\r\t\v\u2028\u2029]+/;
|
|
81
|
+
function m(t, n, r) {
|
|
82
|
+
let i = [];
|
|
83
|
+
return t != null && (i = n ? t.toString().split("") : t.toString().split(p)), {
|
|
84
|
+
wordsWithComputedWidth: i.map((t) => ({
|
|
85
|
+
word: t,
|
|
86
|
+
width: e(t, r).width
|
|
87
|
+
})),
|
|
88
|
+
spaceWidth: n ? 0 : e("\xA0", r).width
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function h(e, t, n, r, i, a, o, s) {
|
|
92
|
+
let c = typeof e == "number", l = t, u = (e = []) => e.reduce((e, { word: t, width: n }) => {
|
|
93
|
+
let r = e[e.length - 1];
|
|
94
|
+
return r && (o == null || s || r.width + n + a < Number(o)) ? (r.words.push(t), r.width += n + a) : e.push({
|
|
95
|
+
words: [t],
|
|
96
|
+
width: n
|
|
97
|
+
}), e;
|
|
98
|
+
}, []), d = u(i), f = (e) => e.reduce((e, t) => e.width > t.width ? e : t);
|
|
99
|
+
if (!c || s || !(d.length > e || f(d).width > Number(o))) return d;
|
|
100
|
+
let p = (t) => {
|
|
101
|
+
let { wordsWithComputedWidth: i } = m(l.slice(0, t) + "…", r, n), a = u(i);
|
|
102
|
+
return [a.length > e || f(a).width > Number(o), a];
|
|
103
|
+
}, h = 0, g = l.length - 1, _ = 0, v;
|
|
104
|
+
for (; h <= g && _ <= l.length - 1;) {
|
|
105
|
+
let e = Math.floor((h + g) / 2), [t, n] = p(e - 1), [r] = p(e);
|
|
106
|
+
if (!t && !r && (h = e + 1), t && r && (g = e - 1), !t && r) {
|
|
107
|
+
v = n;
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
_++;
|
|
111
|
+
}
|
|
112
|
+
return v || d;
|
|
113
|
+
}
|
|
114
|
+
function g({ width: e, scaleToFit: t, value: n, style: r, breakAll: i, maxLines: a }) {
|
|
115
|
+
if (e || t) {
|
|
116
|
+
let o = m(n, i, r), s = o.wordsWithComputedWidth, c = o.spaceWidth;
|
|
117
|
+
return h(a, n, r, i, s, c, e, t);
|
|
118
|
+
}
|
|
119
|
+
return [{ words: n == null ? [] : n.toString().split(p) }];
|
|
120
|
+
}
|
|
121
|
+
let _ = r(() => g({
|
|
122
|
+
width: f.width,
|
|
123
|
+
scaleToFit: f.scaleToFit,
|
|
124
|
+
value: f.value,
|
|
125
|
+
style: f.style,
|
|
126
|
+
breakAll: f.breakAll,
|
|
127
|
+
maxLines: f.maxLines
|
|
128
|
+
})), v = r(() => Number(f.x) + (typeof f.dx == "number" ? f.dx : 0)), y = r(() => Number(f.y) + (typeof f.dy == "number" ? f.dy : 0)), b = r(() => {
|
|
129
|
+
switch (f.verticalAnchor) {
|
|
130
|
+
case "start": return t(`calc(${f.capHeight})`);
|
|
131
|
+
case "middle": return t(`calc(${(_.value.length - 1) / 2} * -${f.lineHeight} + (${f.capHeight} / 2))`);
|
|
132
|
+
default: return t(`calc(${_.value.length - 1} * -${f.lineHeight})`);
|
|
133
|
+
}
|
|
134
|
+
}), x = r(() => {
|
|
135
|
+
let e = [];
|
|
136
|
+
return f.scaleToFit && _.value[0]?.width && f.width && e.push(`scale(${Number(f.width) / _.value[0].width})`), f.angle && e.push(`rotate(${f.angle}, ${v.value}, ${y.value})`), e.join(" ");
|
|
137
|
+
});
|
|
138
|
+
return (e, t) => (s(), i("text", {
|
|
139
|
+
x: v.value,
|
|
140
|
+
y: y.value,
|
|
141
|
+
transform: x.value || void 0,
|
|
142
|
+
"text-anchor": f.textAnchor,
|
|
143
|
+
fill: f.fill && f.fill.includes("url") ? "#808080" : f.fill,
|
|
144
|
+
class: "v-charts-text",
|
|
145
|
+
style: o(f.style)
|
|
146
|
+
}, [(s(!0), i(n, null, c(_.value, (e, t) => (s(), i("tspan", {
|
|
147
|
+
key: t,
|
|
148
|
+
x: v.value,
|
|
149
|
+
dy: t === 0 ? b.value : f.lineHeight
|
|
150
|
+
}, l(e.words.join(f.breakAll ? "" : " ")), 9, d))), 128))], 12, u));
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
//#endregion
|
|
154
|
+
export { f as default };
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
import { isNumOrStr as e } from "../utils/validate.mjs";
|
|
2
|
+
import { Curve as t } from "../shape/Curve.mjs";
|
|
3
|
+
import { useTooltipEventType as n } from "../state/selectors/selectTooltipEventType.mjs";
|
|
4
|
+
import { setTooltipSettingsState as r } from "../state/tooltipSlice.mjs";
|
|
5
|
+
import { useAppDispatch as i, useAppSelector as a } from "../state/hooks.mjs";
|
|
6
|
+
import { useChartLayout as o, useOffsetInternal as s, useViewBox as c } from "../context/chartLayoutContext.mjs";
|
|
7
|
+
import { selectActiveCoordinate as l, selectActiveLabel as u, selectIsTooltipActive as d, selectTooltipPayload as f, useChartName as p } from "../state/selectors/selectors.mjs";
|
|
8
|
+
import { Rectangle as m } from "../shape/Rectangle.mjs";
|
|
9
|
+
import { useCursorLayerRef as h } from "../context/cursorLayerContext.mjs";
|
|
10
|
+
import { usePortal as g } from "../chart/TooltipPortalContext.mjs";
|
|
11
|
+
import { useAccessibilityLayer as _ } from "../context/accessibilityContext.mjs";
|
|
12
|
+
import { getTooltipTranslate as v } from "../utils/tooltip/translate.mjs";
|
|
13
|
+
import { Cross as y } from "../shape/Cross.mjs";
|
|
14
|
+
import { Sector as b } from "../shape/Sector.mjs";
|
|
15
|
+
import { getCursorPoints as x } from "./utils.mjs";
|
|
16
|
+
import { useTooltipAxisBandSize as S } from "../context/useTooltipAxis.mjs";
|
|
17
|
+
import { useTooltipChartSynchronisation as C } from "../synchronisation/useChartSynchronisation.mjs";
|
|
18
|
+
import { Fragment as w, Teleport as T, computed as E, createVNode as D, defineComponent as O, isVNode as k, reactive as A, ref as j, watch as M, watchEffect as N, watchPostEffect as P } from "vue";
|
|
19
|
+
import { sortBy as F, uniqBy as I } from "es-toolkit/compat";
|
|
20
|
+
import { animate as L } from "motion-v";
|
|
21
|
+
import { useElementBounding as R, useMagicKeys as z, usePreferredReducedMotion as B } from "@vueuse/core";
|
|
22
|
+
//#region src/components/Tooltip.tsx
|
|
23
|
+
function V(e) {
|
|
24
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !k(e);
|
|
25
|
+
}
|
|
26
|
+
function H(e) {
|
|
27
|
+
return e.dataKey;
|
|
28
|
+
}
|
|
29
|
+
function U(e, t, n) {
|
|
30
|
+
return t === !0 ? I(e, n) : typeof t == "function" ? I(e, t) : e;
|
|
31
|
+
}
|
|
32
|
+
function W(t) {
|
|
33
|
+
return Array.isArray(t) && e(t[0]) && e(t[1]) ? t.join(" ~ ") : t;
|
|
34
|
+
}
|
|
35
|
+
var G = /* @__PURE__ */ O({
|
|
36
|
+
name: "DefaultTooltipContent",
|
|
37
|
+
props: {
|
|
38
|
+
label: [String, Number],
|
|
39
|
+
payload: Array,
|
|
40
|
+
active: Boolean,
|
|
41
|
+
separator: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: " : "
|
|
44
|
+
},
|
|
45
|
+
contentStyle: Object,
|
|
46
|
+
labelStyle: Object,
|
|
47
|
+
itemStyle: Object,
|
|
48
|
+
itemSorter: [Function, String],
|
|
49
|
+
formatter: Function
|
|
50
|
+
},
|
|
51
|
+
setup(e) {
|
|
52
|
+
return () => {
|
|
53
|
+
if (!e.active || !e.payload?.length) return null;
|
|
54
|
+
let { contentStyle: t, labelStyle: n, itemStyle: r } = e, i = {
|
|
55
|
+
margin: 0,
|
|
56
|
+
padding: "10px",
|
|
57
|
+
backgroundColor: "#fff",
|
|
58
|
+
border: "1px solid #ccc",
|
|
59
|
+
whiteSpace: "nowrap",
|
|
60
|
+
...t
|
|
61
|
+
}, a = {
|
|
62
|
+
margin: 0,
|
|
63
|
+
...n
|
|
64
|
+
}, { itemSorter: o, payload: s, formatter: c } = e, l = o ? F(s, o) : s;
|
|
65
|
+
return D("div", {
|
|
66
|
+
class: "v-charts-tooltip-content",
|
|
67
|
+
style: i
|
|
68
|
+
}, [e.label && D("div", {
|
|
69
|
+
class: "v-charts-tooltip-label",
|
|
70
|
+
style: a
|
|
71
|
+
}, [e.label]), D("div", { class: "v-charts-tooltip-list" }, [l.map((t, n) => {
|
|
72
|
+
let i = {
|
|
73
|
+
display: "block",
|
|
74
|
+
paddingTop: 4,
|
|
75
|
+
paddingBottom: 4,
|
|
76
|
+
color: t.color || "#000",
|
|
77
|
+
...r
|
|
78
|
+
}, a = t.formatter || c || W, { value: o, name: l } = t, u = o, d = l;
|
|
79
|
+
if (a) {
|
|
80
|
+
let e = a(o, l, t, n, s);
|
|
81
|
+
if (Array.isArray(e)) [u, d] = e;
|
|
82
|
+
else if (e != null) u = e;
|
|
83
|
+
else return null;
|
|
84
|
+
}
|
|
85
|
+
return D("div", {
|
|
86
|
+
key: n,
|
|
87
|
+
class: "v-charts-tooltip-item",
|
|
88
|
+
style: i
|
|
89
|
+
}, [
|
|
90
|
+
D("span", {
|
|
91
|
+
class: "v-charts-tooltip-item-name",
|
|
92
|
+
style: { color: t.color }
|
|
93
|
+
}, [t.name]),
|
|
94
|
+
D("span", { class: "v-charts-tooltip-separator" }, [e.separator]),
|
|
95
|
+
D("span", { class: "v-charts-tooltip-item-value" }, [u]),
|
|
96
|
+
D("span", { class: "v-charts-tooltip-item-unit" }, [t.unit || ""])
|
|
97
|
+
]);
|
|
98
|
+
})])]);
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}), K = /* @__PURE__ */ O({
|
|
102
|
+
name: "TooltipBoundingBox",
|
|
103
|
+
props: {
|
|
104
|
+
allowEscapeViewBox: Object,
|
|
105
|
+
isAnimationActive: Boolean,
|
|
106
|
+
transition: {
|
|
107
|
+
type: Object,
|
|
108
|
+
default: () => ({
|
|
109
|
+
duration: .4,
|
|
110
|
+
ease: "easeOut"
|
|
111
|
+
})
|
|
112
|
+
},
|
|
113
|
+
active: Boolean,
|
|
114
|
+
coordinate: Object,
|
|
115
|
+
hasPayload: Boolean,
|
|
116
|
+
offset: Number,
|
|
117
|
+
position: Object,
|
|
118
|
+
reverseDirection: Object,
|
|
119
|
+
viewBox: Object,
|
|
120
|
+
style: Object
|
|
121
|
+
},
|
|
122
|
+
setup(e, { slots: t }) {
|
|
123
|
+
let n = j(!1), r = A({
|
|
124
|
+
x: 0,
|
|
125
|
+
y: 0
|
|
126
|
+
});
|
|
127
|
+
N(() => {
|
|
128
|
+
(e.coordinate?.x !== r.x || e.coordinate?.y !== r.y) && (n.value = !1);
|
|
129
|
+
}, { flush: "post" });
|
|
130
|
+
let { escape: i } = z();
|
|
131
|
+
M(i, (t) => {
|
|
132
|
+
t && (n.value = !0, r.x = e.coordinate?.x ?? 0, r.y = e.coordinate?.y ?? 0);
|
|
133
|
+
});
|
|
134
|
+
let a = j(), o = R(a, {}), s, c, l = B(), u = E(() => {
|
|
135
|
+
let { allowEscapeViewBox: t, coordinate: n, position: r, reverseDirection: i, viewBox: a } = e, { cssClasses: c, cssProperties: l, transform: u } = v({
|
|
136
|
+
allowEscapeViewBox: t,
|
|
137
|
+
coordinate: n,
|
|
138
|
+
offsetTopLeft: e.offset,
|
|
139
|
+
position: r,
|
|
140
|
+
reverseDirection: i,
|
|
141
|
+
tooltipBox: {
|
|
142
|
+
height: o.height.value,
|
|
143
|
+
width: o.width.value
|
|
144
|
+
},
|
|
145
|
+
useTranslate3d: !1,
|
|
146
|
+
viewBox: a
|
|
147
|
+
});
|
|
148
|
+
return u = !o.height.value && s ? s : u, s = u || s, {
|
|
149
|
+
cssClasses: c,
|
|
150
|
+
cssProperties: l,
|
|
151
|
+
transform: u
|
|
152
|
+
};
|
|
153
|
+
});
|
|
154
|
+
return P((t) => {
|
|
155
|
+
let n = a.value, r = u.value.transform;
|
|
156
|
+
!n || !r?.transform || (e.isAnimationActive && l.value !== "reduce" ? c = L(n, { transform: r.transform }, e.transition) : n.style.transform = r.transform, t(() => {
|
|
157
|
+
c?.stop(), c = void 0;
|
|
158
|
+
}));
|
|
159
|
+
}), () => {
|
|
160
|
+
let { active: r, hasPayload: i, style: o } = e, { cssClasses: s, cssProperties: c } = u.value, l = {
|
|
161
|
+
...c,
|
|
162
|
+
pointerEvents: "none",
|
|
163
|
+
visibility: !n.value && r && i ? "visible" : "hidden",
|
|
164
|
+
position: "absolute",
|
|
165
|
+
top: 0,
|
|
166
|
+
left: 0,
|
|
167
|
+
...o
|
|
168
|
+
};
|
|
169
|
+
return D("div", {
|
|
170
|
+
role: "tooltip",
|
|
171
|
+
"aria-live": "polite",
|
|
172
|
+
tabindex: -1,
|
|
173
|
+
class: s,
|
|
174
|
+
style: l,
|
|
175
|
+
ref: a
|
|
176
|
+
}, [t.default?.()]);
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
}), q = /* @__PURE__ */ O({
|
|
180
|
+
name: "Cursor",
|
|
181
|
+
props: {
|
|
182
|
+
cursor: [Boolean, Object],
|
|
183
|
+
cursorSlot: Function,
|
|
184
|
+
tooltipEventType: String,
|
|
185
|
+
coordinate: Object,
|
|
186
|
+
payload: Array,
|
|
187
|
+
index: String
|
|
188
|
+
},
|
|
189
|
+
setup(e) {
|
|
190
|
+
let n = s(), r = o(), i = p(), a = S(), c = h(null), l = E(() => x(r.value, e.coordinate, n.value));
|
|
191
|
+
return () => {
|
|
192
|
+
if (!e.cursor || !e.coordinate) return null;
|
|
193
|
+
let o = i.value === "ScatterChart";
|
|
194
|
+
if (!o && e.tooltipEventType !== "axis") return null;
|
|
195
|
+
let s = e.cursor, u = typeof s == "object" ? s : {}, d;
|
|
196
|
+
if (o) {
|
|
197
|
+
let { offset: t, ...r } = e.coordinate, { top: i, left: a, width: o, height: s } = n.value, c = {
|
|
198
|
+
stroke: "#ccc",
|
|
199
|
+
fill: "none",
|
|
200
|
+
...r,
|
|
201
|
+
top: i,
|
|
202
|
+
left: a,
|
|
203
|
+
width: o,
|
|
204
|
+
height: s,
|
|
205
|
+
class: "v-charts-tooltip-cursor",
|
|
206
|
+
style: { pointerEvents: "none" },
|
|
207
|
+
...u
|
|
208
|
+
};
|
|
209
|
+
d = e.cursorSlot ? e.cursorSlot(c) : D(y, c, null);
|
|
210
|
+
} else if (i.value === "BarChart") {
|
|
211
|
+
let t = a.value ?? 0, i = t / 2, o = e.coordinate, s = n.value, c = {
|
|
212
|
+
stroke: "none",
|
|
213
|
+
fill: "#ccc",
|
|
214
|
+
x: r.value === "horizontal" ? o.x - i : s.left + .5,
|
|
215
|
+
y: r.value === "horizontal" ? s.top + .5 : o.y - i,
|
|
216
|
+
width: r.value === "horizontal" ? t : s.width - 1,
|
|
217
|
+
height: r.value === "horizontal" ? s.height - 1 : t,
|
|
218
|
+
class: "v-charts-tooltip-cursor",
|
|
219
|
+
style: { pointerEvents: "none" },
|
|
220
|
+
...u
|
|
221
|
+
};
|
|
222
|
+
d = e.cursorSlot ? e.cursorSlot(c) : D(m, c, null);
|
|
223
|
+
} else if (r.value === "radial" && e.coordinate?.cx != null) {
|
|
224
|
+
let t = l.value, n = {
|
|
225
|
+
cx: t.cx,
|
|
226
|
+
cy: t.cy,
|
|
227
|
+
startAngle: t.startAngle,
|
|
228
|
+
endAngle: t.endAngle,
|
|
229
|
+
innerRadius: t.radius,
|
|
230
|
+
outerRadius: t.radius,
|
|
231
|
+
stroke: "#ccc",
|
|
232
|
+
fill: "none",
|
|
233
|
+
class: "v-charts-tooltip-cursor",
|
|
234
|
+
style: { pointerEvents: "none" },
|
|
235
|
+
...u
|
|
236
|
+
};
|
|
237
|
+
d = e.cursorSlot ? e.cursorSlot(n) : D(b, n, null);
|
|
238
|
+
} else {
|
|
239
|
+
let n = {
|
|
240
|
+
stroke: "#ccc",
|
|
241
|
+
class: ["v-charts-tooltip-cursor"],
|
|
242
|
+
layout: r.value,
|
|
243
|
+
points: l.value,
|
|
244
|
+
style: { pointerEvents: "none" },
|
|
245
|
+
...u
|
|
246
|
+
};
|
|
247
|
+
d = e.cursorSlot ? e.cursorSlot(n) : D(t, n, null);
|
|
248
|
+
}
|
|
249
|
+
return c?.value ? D(T, { to: c.value }, V(d) ? d : { default: () => [d] }) : d;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
}), J = /* @__PURE__ */ O({
|
|
253
|
+
name: "Tooltip",
|
|
254
|
+
props: {
|
|
255
|
+
active: {
|
|
256
|
+
type: Boolean,
|
|
257
|
+
default: void 0
|
|
258
|
+
},
|
|
259
|
+
includeHidden: Boolean,
|
|
260
|
+
allowEscapeViewBox: {
|
|
261
|
+
type: Object,
|
|
262
|
+
default: () => ({
|
|
263
|
+
x: !1,
|
|
264
|
+
y: !1
|
|
265
|
+
})
|
|
266
|
+
},
|
|
267
|
+
content: [Object, Function],
|
|
268
|
+
cursor: {
|
|
269
|
+
type: [Boolean, Object],
|
|
270
|
+
default: !0
|
|
271
|
+
},
|
|
272
|
+
filterNull: {
|
|
273
|
+
type: Boolean,
|
|
274
|
+
default: !0
|
|
275
|
+
},
|
|
276
|
+
defaultIndex: [Number, String],
|
|
277
|
+
isAnimationActive: {
|
|
278
|
+
type: Boolean,
|
|
279
|
+
default: !0
|
|
280
|
+
},
|
|
281
|
+
offset: {
|
|
282
|
+
type: Number,
|
|
283
|
+
default: 10
|
|
284
|
+
},
|
|
285
|
+
payloadUniqBy: [Boolean, Function],
|
|
286
|
+
portal: {
|
|
287
|
+
type: Object,
|
|
288
|
+
default: void 0
|
|
289
|
+
},
|
|
290
|
+
position: Object,
|
|
291
|
+
reverseDirection: {
|
|
292
|
+
type: Object,
|
|
293
|
+
default: () => ({
|
|
294
|
+
x: !1,
|
|
295
|
+
y: !1
|
|
296
|
+
})
|
|
297
|
+
},
|
|
298
|
+
shared: {
|
|
299
|
+
type: [Boolean, void 0],
|
|
300
|
+
default: void 0
|
|
301
|
+
},
|
|
302
|
+
trigger: {
|
|
303
|
+
type: String,
|
|
304
|
+
default: "hover"
|
|
305
|
+
},
|
|
306
|
+
style: {
|
|
307
|
+
type: Object,
|
|
308
|
+
default: () => ({})
|
|
309
|
+
},
|
|
310
|
+
axisId: {
|
|
311
|
+
type: [String, Number],
|
|
312
|
+
default: 0
|
|
313
|
+
},
|
|
314
|
+
contentStyle: {
|
|
315
|
+
type: Object,
|
|
316
|
+
default: () => ({})
|
|
317
|
+
},
|
|
318
|
+
itemStyle: {
|
|
319
|
+
type: Object,
|
|
320
|
+
default: () => ({})
|
|
321
|
+
},
|
|
322
|
+
labelStyle: {
|
|
323
|
+
type: Object,
|
|
324
|
+
default: () => ({})
|
|
325
|
+
},
|
|
326
|
+
itemSorter: {
|
|
327
|
+
type: String,
|
|
328
|
+
default: "name"
|
|
329
|
+
},
|
|
330
|
+
separator: {
|
|
331
|
+
type: String,
|
|
332
|
+
default: " : "
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
slots: Object,
|
|
336
|
+
setup(e, { slots: t }) {
|
|
337
|
+
let o = i(), s = E(() => typeof e.defaultIndex == "number" ? String(e.defaultIndex) : e.defaultIndex);
|
|
338
|
+
N(() => {
|
|
339
|
+
o(r({
|
|
340
|
+
shared: e.shared,
|
|
341
|
+
trigger: e.trigger,
|
|
342
|
+
axisId: e.axisId,
|
|
343
|
+
active: e.active,
|
|
344
|
+
defaultIndex: s.value
|
|
345
|
+
}));
|
|
346
|
+
});
|
|
347
|
+
let p = c(), m = _(), h = n(e.shared), v = a((t) => d(t, h.value, e.trigger, s.value)), y = a((t) => f(t, h.value, e.trigger, s.value)), b = a((t) => u(t, h.value, e.trigger, s.value)), x = a((t) => l(t, h.value, e.trigger, s.value)), S = E(() => y.value ?? []), O = g(), k = E(() => e.portal ?? O?.value), A = E(() => e.active ?? v.value?.isActive), j = E(() => h.value === "axis" ? b.value : void 0), M = [], P = E(() => {
|
|
348
|
+
if (!A.value) return M;
|
|
349
|
+
let t = S.value ?? M;
|
|
350
|
+
return e.filterNull && t.length > 0 && (t = U(t.filter((t) => t.value != null && (t.hide !== !0 || e.includeHidden)), e.payloadUniqBy, H)), t;
|
|
351
|
+
}), F = E(() => P.value.length > 0), I = E(() => e.content ? e.content : G), L = E(() => ({
|
|
352
|
+
...e,
|
|
353
|
+
payload: P.value,
|
|
354
|
+
label: j.value,
|
|
355
|
+
active: A.value,
|
|
356
|
+
coordinate: x.value,
|
|
357
|
+
accessibilityLayer: m.value
|
|
358
|
+
})), R = E(() => !!t.content);
|
|
359
|
+
return C({
|
|
360
|
+
tooltipEventType: h,
|
|
361
|
+
trigger: e.trigger,
|
|
362
|
+
activeCoordinate: x,
|
|
363
|
+
activeLabel: j,
|
|
364
|
+
activeIndex: E(() => v.value?.activeIndex),
|
|
365
|
+
isTooltipActive: A
|
|
366
|
+
}), () => k.value ? D(w, null, [D("foreignObject", null, [D(T, { to: k.value }, { default: () => [D(K, {
|
|
367
|
+
allowEscapeViewBox: e.allowEscapeViewBox,
|
|
368
|
+
isAnimationActive: e.isAnimationActive,
|
|
369
|
+
active: A.value,
|
|
370
|
+
coordinate: x.value,
|
|
371
|
+
hasPayload: F.value,
|
|
372
|
+
offset: e.offset,
|
|
373
|
+
position: e.position,
|
|
374
|
+
reverseDirection: e.reverseDirection,
|
|
375
|
+
viewBox: p.value,
|
|
376
|
+
style: e.style
|
|
377
|
+
}, { default: () => [R.value ? t.content(L.value) : D(I.value, L.value, null)] })] })]), A.value && D(q, {
|
|
378
|
+
cursor: e.cursor,
|
|
379
|
+
cursorSlot: t.cursor,
|
|
380
|
+
tooltipEventType: h.value,
|
|
381
|
+
coordinate: x.value,
|
|
382
|
+
payload: S.value,
|
|
383
|
+
index: v.value?.activeIndex
|
|
384
|
+
}, null)]) : null;
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
//#endregion
|
|
388
|
+
export { J as default, U as getUniqPayload };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { isNullish as e } from "../../utils/validate.mjs";
|
|
2
|
+
import { useViewBox as t } from "../../context/chartLayoutContext.mjs";
|
|
3
|
+
import { LabelVueProps as n } from "./types.mjs";
|
|
4
|
+
import { usePolarLabelViewBox as r } from "../../context/polarLabelViewBoxContext.mjs";
|
|
5
|
+
import { getAttrsOfCartesianLabel as i, getAttrsOfPolarLabel as a, isPolar as o, renderRadialLabel as s } from "./utils.mjs";
|
|
6
|
+
import c from "../Text.mjs";
|
|
7
|
+
import { createVNode as l, defineComponent as u, mergeProps as d } from "vue";
|
|
8
|
+
//#region src/components/label/Label.tsx
|
|
9
|
+
var f = /* @__PURE__ */ u({
|
|
10
|
+
name: "Label",
|
|
11
|
+
props: n,
|
|
12
|
+
slots: Object,
|
|
13
|
+
setup(n, { slots: u, attrs: f }) {
|
|
14
|
+
let p = t(), m = r();
|
|
15
|
+
return () => {
|
|
16
|
+
let { viewBox: t, value: r, position: h, textBreakAll: g, formatter: _ } = n, v = t || m.value || p.value;
|
|
17
|
+
if (!v || e(r) && !u.content) return null;
|
|
18
|
+
let y = o(v);
|
|
19
|
+
if (u.content) return u.content({
|
|
20
|
+
...n,
|
|
21
|
+
viewBox: v
|
|
22
|
+
});
|
|
23
|
+
let b = r;
|
|
24
|
+
if (typeof _ == "function" && (b = _(b)), y && (h === "insideStart" || h === "insideEnd" || h === "end")) return s(n, h, b, f, v);
|
|
25
|
+
let x = y ? a(n, v) : i(n, v), S = f.textAnchor != null && (f.textAnchor === "start" || f.textAnchor === "middle" || f.textAnchor === "end") ? f.textAnchor : x.textAnchor;
|
|
26
|
+
return l(c, d({ class: ["v-charts-label", n.class] }, f, x, {
|
|
27
|
+
textAnchor: S,
|
|
28
|
+
angle: n.angle,
|
|
29
|
+
breakAll: g,
|
|
30
|
+
value: b
|
|
31
|
+
}), null);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
//#endregion
|
|
36
|
+
export { f as Label };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { isNullish as e } from "../../utils/validate.mjs";
|
|
2
|
+
import { getValueByDataKey as t } from "../../utils/chart.mjs";
|
|
3
|
+
import { Layer as n } from "../../container/Layer.mjs";
|
|
4
|
+
import { LabelListVueProps as r } from "./types.mjs";
|
|
5
|
+
import { parseViewBox as i } from "./utils.mjs";
|
|
6
|
+
import { Label as a } from "./Label.mjs";
|
|
7
|
+
import { useLabelLayerRef as o } from "../../context/labelLayerContext.mjs";
|
|
8
|
+
import { useCartesianLabelListData as s } from "../../context/cartesianLabelListContext.mjs";
|
|
9
|
+
import { Teleport as c, createVNode as l, defineComponent as u, isVNode as d, mergeProps as f } from "vue";
|
|
10
|
+
//#region src/components/label/LabelList.tsx
|
|
11
|
+
function p(e) {
|
|
12
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !d(e);
|
|
13
|
+
}
|
|
14
|
+
var m = /* @__PURE__ */ u({
|
|
15
|
+
props: r,
|
|
16
|
+
setup(r, { attrs: u, slots: d }) {
|
|
17
|
+
let m = o(null), h = s(null);
|
|
18
|
+
return () => {
|
|
19
|
+
let o, { dataKey: s, valueAccessor: g, clockWise: _, id: v, ...y } = r, b = r.data ?? h?.value;
|
|
20
|
+
if (!b || !b.length) return null;
|
|
21
|
+
let x = l(n, { class: "v-charts-label-list" }, p(o = b.map((n, r) => {
|
|
22
|
+
let o = e(s) ? g(n, r) : t(n && n.payload, s), c = e(v) ? void 0 : `${v}-${r}`, p = i(e(_) ? n : {
|
|
23
|
+
...n,
|
|
24
|
+
clockWise: _
|
|
25
|
+
});
|
|
26
|
+
if (d.label) return d.label({
|
|
27
|
+
...y,
|
|
28
|
+
...u,
|
|
29
|
+
...p,
|
|
30
|
+
value: o,
|
|
31
|
+
index: r,
|
|
32
|
+
key: `label-${r}`
|
|
33
|
+
});
|
|
34
|
+
let m = n.fill != null && !("fill" in y) && !("fill" in u) ? n.fill : void 0;
|
|
35
|
+
return l(a, f(y, u, m == null ? {} : { fill: m }, {
|
|
36
|
+
id: c,
|
|
37
|
+
parentViewBox: n.parentViewBox,
|
|
38
|
+
value: o,
|
|
39
|
+
viewBox: p,
|
|
40
|
+
key: `label-${r}`,
|
|
41
|
+
index: r
|
|
42
|
+
}), null);
|
|
43
|
+
})) ? o : { default: () => [o] });
|
|
44
|
+
return m?.value ? l(c, { to: m.value }, p(x) ? x : { default: () => [x] }) : x;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
//#endregion
|
|
49
|
+
export { m as LabelList };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { last as e } from "es-toolkit/compat";
|
|
2
|
+
var t = {
|
|
3
|
+
id: { type: String },
|
|
4
|
+
data: { type: Array },
|
|
5
|
+
valueAccessor: {
|
|
6
|
+
type: Function,
|
|
7
|
+
default: (t) => Array.isArray(t.value) ? e(t.value) : t.value
|
|
8
|
+
},
|
|
9
|
+
clockWise: { type: Boolean },
|
|
10
|
+
dataKey: { type: [String, Function] },
|
|
11
|
+
textBreakAll: { type: Boolean },
|
|
12
|
+
position: { type: String },
|
|
13
|
+
offset: { type: Number },
|
|
14
|
+
angle: { type: Number }
|
|
15
|
+
}, n = {
|
|
16
|
+
id: { type: String },
|
|
17
|
+
class: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
viewBox: { type: Object },
|
|
22
|
+
parentViewBox: { type: Object },
|
|
23
|
+
value: { type: [Number, String] },
|
|
24
|
+
formatter: { type: Function },
|
|
25
|
+
offset: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: 5
|
|
28
|
+
},
|
|
29
|
+
position: { type: [String, Object] },
|
|
30
|
+
textBreakAll: { type: Boolean },
|
|
31
|
+
angle: { type: Number },
|
|
32
|
+
index: { type: Number }
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
export { t as LabelListVueProps, n as LabelVueProps };
|