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,181 @@
|
|
|
1
|
+
import { useIsPanorama as e } from "../../context/PanoramaContextProvider.mjs";
|
|
2
|
+
import { selectAxisViewBox as t } from "../../state/selectors/selectChartOffset.mjs";
|
|
3
|
+
import { implicitYAxis as n, selectAxisScale as r, selectTicksOfAxis as i, selectYAxisPosition as a, selectYAxisSize as o } from "../../state/selectors/axisSelectors.mjs";
|
|
4
|
+
import { useAppDispatch as s, useAppSelector as c } from "../../state/hooks.mjs";
|
|
5
|
+
import { addYAxis as l, removeYAxis as u } from "../../state/cartesianAxisSlice.mjs";
|
|
6
|
+
import { CartesianAxis as d } from "../cartesian-axis/CartesianAxis.mjs";
|
|
7
|
+
import { createVNode as f, defineComponent as p, mergeProps as m, watchEffect as h } from "vue";
|
|
8
|
+
//#region src/cartesian/axis/YAxis.tsx
|
|
9
|
+
var g = /* @__PURE__ */ p({
|
|
10
|
+
props: { yAxisId: {
|
|
11
|
+
type: [String, Number],
|
|
12
|
+
default: 0
|
|
13
|
+
} },
|
|
14
|
+
inheritAttrs: !1,
|
|
15
|
+
setup(n, { attrs: s }) {
|
|
16
|
+
let l = e(), u = "yAxis", p = c((e) => r(e, u, n.yAxisId, l)), h = c((e) => o(e, n.yAxisId)), g = c((e) => a(e, n.yAxisId)), _ = c((e) => i(e, u, n.yAxisId, l)), v = c(t);
|
|
17
|
+
return () => {
|
|
18
|
+
let { ...e } = n;
|
|
19
|
+
return h.value == null || g.value == null ? null : f(d, m(e, s, {
|
|
20
|
+
viewBox: v.value,
|
|
21
|
+
scale: p.value,
|
|
22
|
+
x: g.value?.x,
|
|
23
|
+
y: g.value?.y,
|
|
24
|
+
width: h.value?.width,
|
|
25
|
+
height: h.value?.height,
|
|
26
|
+
ticks: _.value,
|
|
27
|
+
class: ["v-charts-yAxis yAxis", s.class]
|
|
28
|
+
}), null);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}), _ = /* @__PURE__ */ p({
|
|
32
|
+
props: {
|
|
33
|
+
interval: [String, Number],
|
|
34
|
+
yAxisId: {
|
|
35
|
+
type: [String, Number],
|
|
36
|
+
default: 0
|
|
37
|
+
},
|
|
38
|
+
scale: [String, Function],
|
|
39
|
+
type: String,
|
|
40
|
+
padding: Object,
|
|
41
|
+
allowDataOverflow: Boolean,
|
|
42
|
+
allowDuplicatedCategory: Boolean,
|
|
43
|
+
allowDecimals: Boolean,
|
|
44
|
+
tickCount: Number,
|
|
45
|
+
includeHidden: Boolean,
|
|
46
|
+
reversed: Boolean,
|
|
47
|
+
ticks: Array,
|
|
48
|
+
width: Number,
|
|
49
|
+
orientation: String,
|
|
50
|
+
mirror: Boolean,
|
|
51
|
+
hide: Boolean,
|
|
52
|
+
unit: String,
|
|
53
|
+
name: String,
|
|
54
|
+
angle: Number,
|
|
55
|
+
minTickGap: Number,
|
|
56
|
+
tick: {
|
|
57
|
+
type: [Boolean, Object],
|
|
58
|
+
default: !0
|
|
59
|
+
},
|
|
60
|
+
tickFormatter: Function,
|
|
61
|
+
domain: Array,
|
|
62
|
+
dataKey: {
|
|
63
|
+
type: [
|
|
64
|
+
String,
|
|
65
|
+
Number,
|
|
66
|
+
Function
|
|
67
|
+
],
|
|
68
|
+
default: void 0
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
setup(e) {
|
|
72
|
+
let t = s();
|
|
73
|
+
return h((n) => {
|
|
74
|
+
let r = {
|
|
75
|
+
...e,
|
|
76
|
+
interval: e.interval ?? "preserveEnd",
|
|
77
|
+
id: e.yAxisId,
|
|
78
|
+
dataKey: e.dataKey,
|
|
79
|
+
includeHidden: e.includeHidden ?? !1,
|
|
80
|
+
angle: e.angle ?? 0,
|
|
81
|
+
minTickGap: e.minTickGap ?? 5,
|
|
82
|
+
tick: e.tick ?? !0
|
|
83
|
+
};
|
|
84
|
+
t(l(r)), n(() => {
|
|
85
|
+
t(u(r));
|
|
86
|
+
});
|
|
87
|
+
}), () => f(g, e, null);
|
|
88
|
+
}
|
|
89
|
+
}), v = /* @__PURE__ */ p({
|
|
90
|
+
name: "YAxis",
|
|
91
|
+
props: {
|
|
92
|
+
allowDataOverflow: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: n.allowDataOverflow
|
|
95
|
+
},
|
|
96
|
+
allowDecimals: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: n.allowDecimals
|
|
99
|
+
},
|
|
100
|
+
allowDuplicatedCategory: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: n.allowDuplicatedCategory
|
|
103
|
+
},
|
|
104
|
+
width: {
|
|
105
|
+
type: Number,
|
|
106
|
+
default: n.width
|
|
107
|
+
},
|
|
108
|
+
hide: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: !1
|
|
111
|
+
},
|
|
112
|
+
mirror: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: n.mirror
|
|
115
|
+
},
|
|
116
|
+
orientation: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: n.orientation
|
|
119
|
+
},
|
|
120
|
+
padding: {
|
|
121
|
+
type: Object,
|
|
122
|
+
default: n.padding
|
|
123
|
+
},
|
|
124
|
+
reversed: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: n.reversed
|
|
127
|
+
},
|
|
128
|
+
scale: {
|
|
129
|
+
type: [String, Function],
|
|
130
|
+
default: n.scale
|
|
131
|
+
},
|
|
132
|
+
tickCount: {
|
|
133
|
+
type: Number,
|
|
134
|
+
default: n.tickCount
|
|
135
|
+
},
|
|
136
|
+
type: {
|
|
137
|
+
type: String,
|
|
138
|
+
default: n.type
|
|
139
|
+
},
|
|
140
|
+
yAxisId: { type: [String, Number] },
|
|
141
|
+
dataKey: {
|
|
142
|
+
type: [
|
|
143
|
+
String,
|
|
144
|
+
Number,
|
|
145
|
+
Function
|
|
146
|
+
],
|
|
147
|
+
default: void 0
|
|
148
|
+
},
|
|
149
|
+
tickFormatter: {
|
|
150
|
+
type: Function,
|
|
151
|
+
default: void 0
|
|
152
|
+
},
|
|
153
|
+
unit: {
|
|
154
|
+
type: String,
|
|
155
|
+
default: void 0
|
|
156
|
+
},
|
|
157
|
+
interval: { type: [String, Number] },
|
|
158
|
+
domain: {
|
|
159
|
+
type: Array,
|
|
160
|
+
default: void 0
|
|
161
|
+
},
|
|
162
|
+
axisLine: {
|
|
163
|
+
type: [Boolean, Object],
|
|
164
|
+
default: !0
|
|
165
|
+
},
|
|
166
|
+
tickLine: {
|
|
167
|
+
type: [Boolean, Object],
|
|
168
|
+
default: !0
|
|
169
|
+
},
|
|
170
|
+
tickMargin: Number,
|
|
171
|
+
minTickGap: {
|
|
172
|
+
type: Number,
|
|
173
|
+
default: 5
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
setup(e, { attrs: t }) {
|
|
177
|
+
return () => f(_, m(e, t), null);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
//#endregion
|
|
181
|
+
export { v as YAxis };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { getValueByDataKey as e } from "../../utils/chart.mjs";
|
|
2
|
+
import { useChartLayout as t } from "../../context/chartLayoutContext.mjs";
|
|
3
|
+
import { Layer as n } from "../../container/Layer.mjs";
|
|
4
|
+
import { provideCartesianLabelListData as r } from "../../context/cartesianLabelListContext.mjs";
|
|
5
|
+
import { LabelList as i } from "../../components/label/LabelList.mjs";
|
|
6
|
+
import { useSetupGraphicalItem as a } from "../../hooks/useSetupGraphicalItem.mjs";
|
|
7
|
+
import { useGraphicalLayerRef as o } from "../../context/graphicalLayerContext.mjs";
|
|
8
|
+
import { BarVueProps as s } from "./type.mjs";
|
|
9
|
+
import { useNeedsClip as c } from "../useNeedsClip.mjs";
|
|
10
|
+
import { useBar as l } from "./hooks/useBar.mjs";
|
|
11
|
+
import { GraphicalItemClipPath as u } from "../GraphicalItemClipPath.mjs";
|
|
12
|
+
import { BarBackground as d } from "./components/BarBackground.mjs";
|
|
13
|
+
import { BarRectangles as f } from "./components/BarRectangles.mjs";
|
|
14
|
+
import { createErrorBarRegistry as p, provideErrorBarContext as m, provideErrorBarRegistry as h } from "../error-bar/ErrorBarContext.mjs";
|
|
15
|
+
import { Cell as g } from "../../components/Cell.mjs";
|
|
16
|
+
import { Fragment as _, Teleport as v, computed as y, createVNode as b, defineComponent as x, isVNode as S, mergeProps as C } from "vue";
|
|
17
|
+
//#region src/cartesian/bar/Bar.tsx
|
|
18
|
+
function w(e) {
|
|
19
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !S(e);
|
|
20
|
+
}
|
|
21
|
+
var T = (t, n) => {
|
|
22
|
+
let r = Array.isArray(t.value) ? t.value[1] : t.value;
|
|
23
|
+
return {
|
|
24
|
+
x: t.x,
|
|
25
|
+
y: t.y,
|
|
26
|
+
value: r,
|
|
27
|
+
errorVal: e(t.payload ?? t, n)
|
|
28
|
+
};
|
|
29
|
+
}, E = /* @__PURE__ */ x({
|
|
30
|
+
name: "Bar",
|
|
31
|
+
props: s,
|
|
32
|
+
inheritAttrs: !1,
|
|
33
|
+
slots: Object,
|
|
34
|
+
setup(e, { attrs: s, slots: x }) {
|
|
35
|
+
let S = p();
|
|
36
|
+
h(S), a(e, "bar", { errorBars: S.errorBars });
|
|
37
|
+
let { shouldRender: E, clipPathId: D, barData: O, isAnimating: k, cellProps: A } = l(e, x.shape, x.activeBar), { needClip: j } = c(e.xAxisId, e.yAxisId), M = t(), N = y(() => {
|
|
38
|
+
let e = O.value?.[0];
|
|
39
|
+
return e == null || e.height == null || e.width == null ? 0 : M.value === "vertical" ? e.height / 2 : e.width / 2;
|
|
40
|
+
});
|
|
41
|
+
m({
|
|
42
|
+
data: O,
|
|
43
|
+
xAxisId: e.xAxisId ?? "xAxis-0",
|
|
44
|
+
yAxisId: e.yAxisId ?? "yAxis-0",
|
|
45
|
+
dataPointFormatter: T,
|
|
46
|
+
errorBarOffset: N
|
|
47
|
+
}), r(y(() => {
|
|
48
|
+
if (!(k.value || !O.value)) return O.value.map((t, n) => {
|
|
49
|
+
let r = A.value?.[n]?.fill ?? t.payload?.fill ?? e.fill;
|
|
50
|
+
return {
|
|
51
|
+
x: t.x,
|
|
52
|
+
y: t.y,
|
|
53
|
+
width: t.width,
|
|
54
|
+
height: t.height,
|
|
55
|
+
value: t.value,
|
|
56
|
+
payload: t.payload,
|
|
57
|
+
parentViewBox: t.parentViewBox,
|
|
58
|
+
...r == null ? {} : { fill: r }
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}));
|
|
62
|
+
let P = o(null), F = (e) => {
|
|
63
|
+
let t = [];
|
|
64
|
+
for (let n of e) n.type === g ? t.push(n.props ?? {}) : n.type === _ && Array.isArray(n.children) && t.push(...F(n.children));
|
|
65
|
+
return t;
|
|
66
|
+
}, I = (e) => e.filter((e) => !(e.type === g || e.type === _ && Array.isArray(e.children) && e.children.some((e) => e.type === g)));
|
|
67
|
+
return () => {
|
|
68
|
+
if (!E.value) return null;
|
|
69
|
+
let t = x.default?.() ?? [], r = F(t);
|
|
70
|
+
A.value = r;
|
|
71
|
+
let a = r.length > 0 ? I(t) : t, o = b(n, { class: ["v-charts-bar", s.class] }, { default: () => [
|
|
72
|
+
j.value && b("defs", null, [b(u, {
|
|
73
|
+
clipPathId: D,
|
|
74
|
+
xAxisId: e.xAxisId,
|
|
75
|
+
yAxisId: e.yAxisId
|
|
76
|
+
}, null)]),
|
|
77
|
+
b(n, {
|
|
78
|
+
class: "v-charts-bar-rectangles",
|
|
79
|
+
"clip-path": j.value ? `url(#clipPath-${D})` : null
|
|
80
|
+
}, { default: () => [e.background && b(d, null, null), b(f, null, null)] }),
|
|
81
|
+
!k.value && e.label && b(i, C(typeof e.label == "object" ? e.label : {}, { data: O.value }), null),
|
|
82
|
+
a
|
|
83
|
+
] });
|
|
84
|
+
return P?.value ? b(v, { to: P.value }, w(o) ? o : { default: () => [o] }) : o;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
//#endregion
|
|
89
|
+
export { E as Bar };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Layer as e } from "../../../container/Layer.mjs";
|
|
2
|
+
import { useBarContext as t } from "../hooks/useBar.mjs";
|
|
3
|
+
import { Rectangle as n } from "../../../shape/Rectangle.mjs";
|
|
4
|
+
import { Fragment as r, createVNode as i, defineComponent as a } from "vue";
|
|
5
|
+
//#region src/cartesian/bar/components/BarBackground.tsx
|
|
6
|
+
var o = /* @__PURE__ */ a({
|
|
7
|
+
name: "BarBackground",
|
|
8
|
+
inheritAttrs: !1,
|
|
9
|
+
setup(a, { attrs: o }) {
|
|
10
|
+
let { props: s, data: c } = t();
|
|
11
|
+
return () => {
|
|
12
|
+
let t = c.value, a = s.background;
|
|
13
|
+
return !a || !t ? null : i(r, null, [t.map((t, r) => {
|
|
14
|
+
let { value: o, background: s, tooltipPosition: c, ...l } = t;
|
|
15
|
+
if (!s) return null;
|
|
16
|
+
let u = typeof a == "object" ? a : {}, d = {
|
|
17
|
+
option: a,
|
|
18
|
+
...l,
|
|
19
|
+
fill: "#eee",
|
|
20
|
+
...s,
|
|
21
|
+
...u
|
|
22
|
+
};
|
|
23
|
+
return i(e, { key: `background-bar-${r}` }, { default: () => [i(n, d, null)] });
|
|
24
|
+
})]);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { o as BarBackground };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { mouseLeaveItem as e, setActiveClickItemIndex as t, setActiveMouseOverItemIndex as n } from "../../../state/tooltipSlice.mjs";
|
|
2
|
+
import { selectActiveTooltipDataKey as r, selectActiveTooltipIndex as i } from "../../../state/selectors/tooltipSelectors.mjs";
|
|
3
|
+
import { useAppDispatch as a, useAppSelector as o } from "../../../state/hooks.mjs";
|
|
4
|
+
import { filterProps as s } from "../../../utils/VueUtils.mjs";
|
|
5
|
+
import { Layer as c } from "../../../container/Layer.mjs";
|
|
6
|
+
import { Animate as l } from "../../../animation/Animate.mjs";
|
|
7
|
+
import { useBarContext as u } from "../hooks/useBar.mjs";
|
|
8
|
+
import { Rectangle as d } from "../../../shape/Rectangle.mjs";
|
|
9
|
+
import { Fragment as f, createVNode as p, defineComponent as m, isVNode as h } from "vue";
|
|
10
|
+
//#region src/cartesian/bar/components/BarRectangles.tsx
|
|
11
|
+
function g(e) {
|
|
12
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
13
|
+
}
|
|
14
|
+
var _ = /* @__PURE__ */ m({
|
|
15
|
+
name: "BarRectangles",
|
|
16
|
+
inheritAttrs: !1,
|
|
17
|
+
setup(m) {
|
|
18
|
+
let h = a(), _ = o(i), v = o(r), y = null, b = 0, { props: x, data: S, layout: C, isAnimating: w, shapeSlot: T, activeBarSlot: E, cellProps: D } = u(), { dataKey: O, isAnimationActive: k, onAnimationStart: A, onAnimationEnd: j, activeBar: M, activeIndex: N } = x, P = (e, t) => (r) => {
|
|
19
|
+
h(n({
|
|
20
|
+
activeDataKey: O,
|
|
21
|
+
activeIndex: String(t),
|
|
22
|
+
activeCoordinate: {
|
|
23
|
+
x: e.tooltipPosition.x,
|
|
24
|
+
y: e.tooltipPosition.y
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
27
|
+
}, F = (t, n) => (t) => {
|
|
28
|
+
h(e());
|
|
29
|
+
}, I = (e, n) => (r) => {
|
|
30
|
+
h(t({
|
|
31
|
+
activeDataKey: O,
|
|
32
|
+
activeIndex: String(n),
|
|
33
|
+
activeCoordinate: {
|
|
34
|
+
x: e.tooltipPosition.x,
|
|
35
|
+
y: e.tooltipPosition.y
|
|
36
|
+
}
|
|
37
|
+
}));
|
|
38
|
+
}, L = s(x, !1), R = (e, t) => (n) => e + (t - e) * n, z = (e) => e ? p(f, null, [e.map((e, t) => {
|
|
39
|
+
let n, r = M !== !1 || N != null || !!E, i = N == null ? r && String(t) === _.value && (v.value == null || O === v.value) : r && t === N, a = i && typeof M == "object" ? M : {}, o = e.payload?.fill, s = D.value?.[t], l = {
|
|
40
|
+
...L,
|
|
41
|
+
...o ? { fill: o } : {},
|
|
42
|
+
...e,
|
|
43
|
+
...s ?? {},
|
|
44
|
+
...i ? a : {},
|
|
45
|
+
isActive: i,
|
|
46
|
+
index: t,
|
|
47
|
+
dataKey: O
|
|
48
|
+
};
|
|
49
|
+
return p(c, {
|
|
50
|
+
key: `rectangle-${e?.x}-${e?.y}-${e?.value}-${t}`,
|
|
51
|
+
class: "v-charts-bar-rectangle",
|
|
52
|
+
onMouseenter: P(e, t),
|
|
53
|
+
onMouseleave: F(e, t),
|
|
54
|
+
onClick: I(e, t)
|
|
55
|
+
}, g(n = i && E ? E(l) : T ? T(l) : p(d, l, null)) ? n : { default: () => [n] });
|
|
56
|
+
})]) : null;
|
|
57
|
+
return () => {
|
|
58
|
+
let e = S.value;
|
|
59
|
+
if (!e) return null;
|
|
60
|
+
if (k && y !== e) {
|
|
61
|
+
let t = y;
|
|
62
|
+
return b++, w.value = !0, p(l, {
|
|
63
|
+
key: b,
|
|
64
|
+
transition: x.transition,
|
|
65
|
+
isActive: k,
|
|
66
|
+
onAnimationStart: A,
|
|
67
|
+
onAnimationEnd: () => {
|
|
68
|
+
w.value = !1, j?.();
|
|
69
|
+
}
|
|
70
|
+
}, { default: (n) => {
|
|
71
|
+
let r = n === 1 ? e : e.map((e, r) => {
|
|
72
|
+
let i = t?.[r];
|
|
73
|
+
if (i && i.stackedBarStart === e.stackedBarStart) {
|
|
74
|
+
let t = R(i.x || 0, e.x || 0), r = R(i.y || 0, e.y || 0), a = R(i.width, e.width), o = R(i.height, e.height);
|
|
75
|
+
return {
|
|
76
|
+
...e,
|
|
77
|
+
x: t(n),
|
|
78
|
+
y: r(n),
|
|
79
|
+
width: a(n),
|
|
80
|
+
height: o(n)
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
if (C.value === "horizontal") {
|
|
84
|
+
let t = R(0, e.height)(n), r = R(e.stackedBarStart, e.y)(n);
|
|
85
|
+
return {
|
|
86
|
+
...e,
|
|
87
|
+
y: r,
|
|
88
|
+
height: t
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
let a = R(0, e.width)(n), o = R(e.stackedBarStart, e.x)(n);
|
|
92
|
+
return {
|
|
93
|
+
...e,
|
|
94
|
+
width: a,
|
|
95
|
+
x: o
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
return n > 0 && (y = r), p("g", null, [z(r)]);
|
|
99
|
+
} });
|
|
100
|
+
}
|
|
101
|
+
return w.value = !1, y = e, p("g", null, [z(e)]);
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
//#endregion
|
|
106
|
+
export { _ as BarRectangles };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { uniqueId as e } from "../../../utils/data-utils.mjs";
|
|
2
|
+
import { useIsPanorama as t } from "../../../context/PanoramaContextProvider.mjs";
|
|
3
|
+
import { getNormalizedStackId as n } from "../../../utils/chart.mjs";
|
|
4
|
+
import { useAppSelector as r } from "../../../state/hooks.mjs";
|
|
5
|
+
import { useChartLayout as i } from "../../../context/chartLayoutContext.mjs";
|
|
6
|
+
import { useNeedsClip as a } from "../../useNeedsClip.mjs";
|
|
7
|
+
import { selectBarRectangles as o } from "../../../state/selectors/barSelectors.mjs";
|
|
8
|
+
import { computed as s, ref as c, shallowRef as l, useAttrs as u } from "vue";
|
|
9
|
+
import { createContext as d } from "motion-v";
|
|
10
|
+
//#region src/cartesian/bar/hooks/useBar.ts
|
|
11
|
+
var [f, p] = d("BarContext");
|
|
12
|
+
function m(d, f, m) {
|
|
13
|
+
let h = t(), g = u(), _ = i(), { needClip: v } = a(d.xAxisId, d.yAxisId), y = s(() => ({
|
|
14
|
+
barSize: d.barSize,
|
|
15
|
+
data: d.data,
|
|
16
|
+
dataKey: d.dataKey,
|
|
17
|
+
maxBarSize: d.maxBarSize,
|
|
18
|
+
minPointSize: d.minPointSize,
|
|
19
|
+
stackId: n(d.stackId)
|
|
20
|
+
})), b = r((e) => o(e, d.xAxisId, d.yAxisId, h, y.value)), x = s(() => (_.value === "vertical" || _.value === "horizontal") && !d.hide), S = e("v-charts-bar-"), C = c(!1), w = l([]);
|
|
21
|
+
return p({
|
|
22
|
+
clipPathId: S,
|
|
23
|
+
layout: _,
|
|
24
|
+
props: d,
|
|
25
|
+
attrs: g,
|
|
26
|
+
data: b,
|
|
27
|
+
isAnimating: C,
|
|
28
|
+
shapeSlot: f,
|
|
29
|
+
activeBarSlot: m,
|
|
30
|
+
cellProps: w
|
|
31
|
+
}), {
|
|
32
|
+
shouldRender: x,
|
|
33
|
+
needClip: v,
|
|
34
|
+
clipPathId: S,
|
|
35
|
+
barData: b,
|
|
36
|
+
isAnimating: C,
|
|
37
|
+
cellProps: w
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { m as useBar, f as useBarContext };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
//#region src/cartesian/bar/type.ts
|
|
2
|
+
var e = {
|
|
3
|
+
class: {
|
|
4
|
+
type: String,
|
|
5
|
+
default: void 0
|
|
6
|
+
},
|
|
7
|
+
barSize: { type: [String, Number] },
|
|
8
|
+
data: {
|
|
9
|
+
type: Array,
|
|
10
|
+
default: void 0
|
|
11
|
+
},
|
|
12
|
+
dataKey: {
|
|
13
|
+
type: [
|
|
14
|
+
String,
|
|
15
|
+
Number,
|
|
16
|
+
Function
|
|
17
|
+
],
|
|
18
|
+
required: !0
|
|
19
|
+
},
|
|
20
|
+
fill: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: void 0
|
|
23
|
+
},
|
|
24
|
+
stroke: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
28
|
+
strokeWidth: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 0
|
|
31
|
+
},
|
|
32
|
+
unit: {
|
|
33
|
+
type: [String, Number],
|
|
34
|
+
default: void 0
|
|
35
|
+
},
|
|
36
|
+
name: { type: [String, Number] },
|
|
37
|
+
tooltipType: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: void 0
|
|
40
|
+
},
|
|
41
|
+
legendType: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "rect"
|
|
44
|
+
},
|
|
45
|
+
minPointSize: {
|
|
46
|
+
type: [Number, Function],
|
|
47
|
+
default: 0
|
|
48
|
+
},
|
|
49
|
+
maxBarSize: { type: Number },
|
|
50
|
+
hide: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: !1
|
|
53
|
+
},
|
|
54
|
+
background: {
|
|
55
|
+
type: [Boolean, Object],
|
|
56
|
+
default: !1
|
|
57
|
+
},
|
|
58
|
+
radius: {
|
|
59
|
+
type: [Number, Array],
|
|
60
|
+
default: void 0
|
|
61
|
+
},
|
|
62
|
+
onAnimationStart: {
|
|
63
|
+
type: Function,
|
|
64
|
+
default: void 0
|
|
65
|
+
},
|
|
66
|
+
onAnimationEnd: {
|
|
67
|
+
type: Function,
|
|
68
|
+
default: void 0
|
|
69
|
+
},
|
|
70
|
+
isAnimationActive: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: !0
|
|
73
|
+
},
|
|
74
|
+
activeBar: {
|
|
75
|
+
type: [
|
|
76
|
+
Object,
|
|
77
|
+
Boolean,
|
|
78
|
+
Function
|
|
79
|
+
],
|
|
80
|
+
default: !1
|
|
81
|
+
},
|
|
82
|
+
activeIndex: {
|
|
83
|
+
type: Number,
|
|
84
|
+
default: void 0
|
|
85
|
+
},
|
|
86
|
+
id: {
|
|
87
|
+
type: String,
|
|
88
|
+
default: void 0
|
|
89
|
+
},
|
|
90
|
+
stackId: {
|
|
91
|
+
type: [String, Number],
|
|
92
|
+
default: void 0
|
|
93
|
+
},
|
|
94
|
+
xAxisId: {
|
|
95
|
+
type: [String, Number],
|
|
96
|
+
default: 0
|
|
97
|
+
},
|
|
98
|
+
yAxisId: {
|
|
99
|
+
type: [String, Number],
|
|
100
|
+
default: 0
|
|
101
|
+
},
|
|
102
|
+
animationBegin: {
|
|
103
|
+
type: Number,
|
|
104
|
+
default: 0
|
|
105
|
+
},
|
|
106
|
+
animationDuration: {
|
|
107
|
+
type: Number,
|
|
108
|
+
default: 1500
|
|
109
|
+
},
|
|
110
|
+
animationEasing: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: "ease"
|
|
113
|
+
},
|
|
114
|
+
transition: {
|
|
115
|
+
type: Object,
|
|
116
|
+
default: {
|
|
117
|
+
duration: .4,
|
|
118
|
+
ease: "easeOut"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
needClip: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: !1
|
|
124
|
+
},
|
|
125
|
+
label: {
|
|
126
|
+
type: [Boolean, Object],
|
|
127
|
+
default: !1
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
//#endregion
|
|
131
|
+
export { e as BarVueProps };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { isNullish as e, isNumber as t } from "../../utils/validate.mjs";
|
|
2
|
+
import { mathSign as n } from "../../utils/data.mjs";
|
|
3
|
+
import { getBaseValueOfBar as r, getCateCoordinateOfBar as i, getValueByDataKey as a, truncateByDomain as o } from "../../utils/chart.mjs";
|
|
4
|
+
import { toRaw as s } from "vue";
|
|
5
|
+
import { isNaN as c } from "es-toolkit/compat";
|
|
6
|
+
import { invariant as l } from "es-toolkit";
|
|
7
|
+
//#region src/cartesian/bar/utils.ts
|
|
8
|
+
function u(n, r = 0) {
|
|
9
|
+
return (i, a) => {
|
|
10
|
+
if (t(n)) return n;
|
|
11
|
+
let o = t(i) || e(i);
|
|
12
|
+
return o ? n(i, a) : (l(o, `minPointSize callback function received a value with type of ${typeof i}. Currently only numbers or null/undefined are supported.`), r);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
var d = 0;
|
|
16
|
+
function f({ layout: e, barSettings: { dataKey: t, minPointSize: l }, pos: f, bandSize: p, xAxis: m, yAxis: h, xAxisTicks: g, yAxisTicks: _, stackedData: v, displayedData: y, offset: b }) {
|
|
17
|
+
let x = {
|
|
18
|
+
x: b.left,
|
|
19
|
+
y: b.top,
|
|
20
|
+
width: b.width,
|
|
21
|
+
height: b.height
|
|
22
|
+
}, S = e === "horizontal" ? h : m, C = v ? S.scale.domain() : null, w = r({ numericAxis: S }), T = S.scale(w);
|
|
23
|
+
return y.map((r, y) => {
|
|
24
|
+
let S = s(r), E, D, O, k, A, j;
|
|
25
|
+
v ? E = o(v[y], C) : (E = a(S, t), Array.isArray(E) || (E = [w, E]));
|
|
26
|
+
let M = u(l, d)(E[1], y);
|
|
27
|
+
if (e === "horizontal") {
|
|
28
|
+
let [e, t] = [h.scale(E[0]), h.scale(E[1])];
|
|
29
|
+
D = i({
|
|
30
|
+
axis: m,
|
|
31
|
+
ticks: g,
|
|
32
|
+
bandSize: p,
|
|
33
|
+
offset: f.offset,
|
|
34
|
+
entry: S,
|
|
35
|
+
index: y
|
|
36
|
+
}), O = t ?? e ?? void 0, k = f.size;
|
|
37
|
+
let r = e - t;
|
|
38
|
+
if (A = c(r) ? 0 : r, j = {
|
|
39
|
+
x: D,
|
|
40
|
+
y: b.top,
|
|
41
|
+
width: k,
|
|
42
|
+
height: b.height
|
|
43
|
+
}, Math.abs(M) > 0 && Math.abs(A) < Math.abs(M)) {
|
|
44
|
+
let e = n(A || M) * (Math.abs(M) - Math.abs(A));
|
|
45
|
+
O -= e, A += e;
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
let [e, t] = [m.scale(E[0]), m.scale(E[1])];
|
|
49
|
+
if (D = e, O = i({
|
|
50
|
+
axis: h,
|
|
51
|
+
ticks: _,
|
|
52
|
+
bandSize: p,
|
|
53
|
+
offset: f.offset,
|
|
54
|
+
entry: S,
|
|
55
|
+
index: y
|
|
56
|
+
}), k = t - e, A = f.size, j = {
|
|
57
|
+
x: b.left,
|
|
58
|
+
y: O,
|
|
59
|
+
width: b.width,
|
|
60
|
+
height: A
|
|
61
|
+
}, Math.abs(M) > 0 && Math.abs(k) < Math.abs(M)) {
|
|
62
|
+
let e = n(k || M) * (Math.abs(M) - Math.abs(k));
|
|
63
|
+
k += e;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
x: D,
|
|
68
|
+
y: O,
|
|
69
|
+
width: k,
|
|
70
|
+
height: A,
|
|
71
|
+
stackedBarStart: T ?? 0,
|
|
72
|
+
value: v ? E : E[1],
|
|
73
|
+
payload: S,
|
|
74
|
+
background: j,
|
|
75
|
+
tooltipPosition: {
|
|
76
|
+
x: D + k / 2,
|
|
77
|
+
y: O + A / 2
|
|
78
|
+
},
|
|
79
|
+
parentViewBox: x
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { f as computeBarRectangles };
|