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,115 @@
|
|
|
1
|
+
import { selectAxisWithScale as e } from "../../state/selectors/axisSelectors.mjs";
|
|
2
|
+
import { useAppSelector as t } from "../../state/hooks.mjs";
|
|
3
|
+
import { useChartLayout as n } from "../../context/chartLayoutContext.mjs";
|
|
4
|
+
import { Layer as r } from "../../container/Layer.mjs";
|
|
5
|
+
import { useErrorBarContext as i, useErrorBarRegistry as a } from "./ErrorBarContext.mjs";
|
|
6
|
+
import { createVNode as o, defineComponent as s, isVNode as c, onUnmounted as l } from "vue";
|
|
7
|
+
//#region src/cartesian/error-bar/ErrorBar.tsx
|
|
8
|
+
function u(e) {
|
|
9
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !c(e);
|
|
10
|
+
}
|
|
11
|
+
var d = {
|
|
12
|
+
dataKey: {
|
|
13
|
+
type: [
|
|
14
|
+
String,
|
|
15
|
+
Number,
|
|
16
|
+
Function
|
|
17
|
+
],
|
|
18
|
+
required: !0
|
|
19
|
+
},
|
|
20
|
+
width: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 5
|
|
23
|
+
},
|
|
24
|
+
direction: { type: String },
|
|
25
|
+
stroke: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "black"
|
|
28
|
+
},
|
|
29
|
+
strokeWidth: {
|
|
30
|
+
type: [Number, String],
|
|
31
|
+
default: 1.5
|
|
32
|
+
}
|
|
33
|
+
}, f = /* @__PURE__ */ s({
|
|
34
|
+
name: "ErrorBar",
|
|
35
|
+
props: d,
|
|
36
|
+
setup(s) {
|
|
37
|
+
let c = n(), { data: d, dataPointFormatter: f, xAxisId: p, yAxisId: m, errorBarOffset: h } = i(), g = a(null);
|
|
38
|
+
if (g) {
|
|
39
|
+
let e = {
|
|
40
|
+
direction: s.direction ?? (c.value === "horizontal" ? "y" : "x"),
|
|
41
|
+
dataKey: s.dataKey
|
|
42
|
+
};
|
|
43
|
+
g.register(e), l(() => g.unregister(e));
|
|
44
|
+
}
|
|
45
|
+
let _ = t((t) => e(t, "xAxis", p, !1)), v = t((t) => e(t, "yAxis", m, !1));
|
|
46
|
+
return () => {
|
|
47
|
+
let e = _.value, t = v.value;
|
|
48
|
+
if (e?.scale == null || t?.scale == null || d.value == null) return null;
|
|
49
|
+
let n = s.direction ?? (c.value === "horizontal" ? "y" : "x");
|
|
50
|
+
if (n === "x" && e.type !== "number") return null;
|
|
51
|
+
let i = h.value, a = d.value.map((a, c) => {
|
|
52
|
+
let l, { x: d, y: p, value: m, errorVal: h } = f(a, s.dataKey, n);
|
|
53
|
+
if (!h || d == null || p == null) return null;
|
|
54
|
+
let g = [], _, v;
|
|
55
|
+
if (Array.isArray(h)) {
|
|
56
|
+
let [e, t] = h;
|
|
57
|
+
if (e == null || t == null) return null;
|
|
58
|
+
_ = e, v = t;
|
|
59
|
+
} else _ = v = h;
|
|
60
|
+
if (n === "x") {
|
|
61
|
+
let { scale: t } = e, n = p + i, r = n + s.width, a = n - s.width, o = t(m - _), c = t(m + v);
|
|
62
|
+
o != null && c != null && (g.push({
|
|
63
|
+
x1: c,
|
|
64
|
+
y1: r,
|
|
65
|
+
x2: c,
|
|
66
|
+
y2: a
|
|
67
|
+
}), g.push({
|
|
68
|
+
x1: o,
|
|
69
|
+
y1: n,
|
|
70
|
+
x2: c,
|
|
71
|
+
y2: n
|
|
72
|
+
}), g.push({
|
|
73
|
+
x1: o,
|
|
74
|
+
y1: r,
|
|
75
|
+
x2: o,
|
|
76
|
+
y2: a
|
|
77
|
+
}));
|
|
78
|
+
} else if (n === "y") {
|
|
79
|
+
let { scale: e } = t, n = d + i, r = n - s.width, a = n + s.width, o = e(m - _), c = e(m + v);
|
|
80
|
+
o != null && c != null && (g.push({
|
|
81
|
+
x1: r,
|
|
82
|
+
y1: c,
|
|
83
|
+
x2: a,
|
|
84
|
+
y2: c
|
|
85
|
+
}), g.push({
|
|
86
|
+
x1: n,
|
|
87
|
+
y1: o,
|
|
88
|
+
x2: n,
|
|
89
|
+
y2: c
|
|
90
|
+
}), g.push({
|
|
91
|
+
x1: r,
|
|
92
|
+
y1: o,
|
|
93
|
+
x2: a,
|
|
94
|
+
y2: o
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
return o(r, {
|
|
98
|
+
class: "v-charts-errorBar",
|
|
99
|
+
key: `bar-${d}-${p}-${m}-${c}`
|
|
100
|
+
}, u(l = g.map((e, t) => o("line", {
|
|
101
|
+
key: `errorbar-${c}-${e.x1}-${e.y1}-${e.x2}-${e.y2}-${t}`,
|
|
102
|
+
x1: e.x1,
|
|
103
|
+
y1: e.y1,
|
|
104
|
+
x2: e.x2,
|
|
105
|
+
y2: e.y2,
|
|
106
|
+
stroke: s.stroke,
|
|
107
|
+
"stroke-width": s.strokeWidth
|
|
108
|
+
}, null))) ? l : { default: () => [l] });
|
|
109
|
+
});
|
|
110
|
+
return o(r, { class: "v-charts-errorBars" }, u(a) ? a : { default: () => [a] });
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
//#endregion
|
|
115
|
+
export { f as ErrorBar, d as ErrorBarVueProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createContext as e } from "../../utils/createContext.mjs";
|
|
2
|
+
import { shallowRef as t } from "vue";
|
|
3
|
+
import { createContext as n } from "motion-v";
|
|
4
|
+
//#region src/cartesian/error-bar/ErrorBarContext.ts
|
|
5
|
+
var [r, i] = n("ErrorBarContext"), [a, o] = e("ErrorBarRegistry");
|
|
6
|
+
function s() {
|
|
7
|
+
let e = t([]);
|
|
8
|
+
return {
|
|
9
|
+
errorBars: e,
|
|
10
|
+
register(t) {
|
|
11
|
+
e.value = [...e.value, t];
|
|
12
|
+
},
|
|
13
|
+
unregister(t) {
|
|
14
|
+
e.value = e.value.filter((e) => e !== t);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { s as createErrorBarRegistry, i as provideErrorBarContext, o as provideErrorBarRegistry, r as useErrorBarContext, a as useErrorBarRegistry };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { isNullish as e } from "../../utils/validate.mjs";
|
|
2
|
+
import { selectActiveTooltipIndex as t } from "../../state/selectors/tooltipSelectors.mjs";
|
|
3
|
+
import { useAppSelector as n } from "../../state/hooks.mjs";
|
|
4
|
+
import { Layer as r } from "../../container/Layer.mjs";
|
|
5
|
+
import { Dot as i } from "../../shape/Dot.mjs";
|
|
6
|
+
import { createVNode as a, defineComponent as o, isVNode as s } from "vue";
|
|
7
|
+
//#region src/cartesian/line/ActivePoints.tsx
|
|
8
|
+
function c(e) {
|
|
9
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !s(e);
|
|
10
|
+
}
|
|
11
|
+
var l = /* @__PURE__ */ o({
|
|
12
|
+
name: "ActivePoints",
|
|
13
|
+
props: {
|
|
14
|
+
points: {
|
|
15
|
+
type: Array,
|
|
16
|
+
required: !0
|
|
17
|
+
},
|
|
18
|
+
mainColor: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: !0
|
|
21
|
+
},
|
|
22
|
+
itemDataKey: {
|
|
23
|
+
type: [
|
|
24
|
+
String,
|
|
25
|
+
Number,
|
|
26
|
+
Function
|
|
27
|
+
],
|
|
28
|
+
required: !0
|
|
29
|
+
},
|
|
30
|
+
activeDot: {
|
|
31
|
+
type: [
|
|
32
|
+
Object,
|
|
33
|
+
Boolean,
|
|
34
|
+
Function
|
|
35
|
+
],
|
|
36
|
+
required: !0
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
slots: Object,
|
|
40
|
+
setup(r, { slots: i }) {
|
|
41
|
+
let a = n(t);
|
|
42
|
+
return () => {
|
|
43
|
+
let { points: t } = r;
|
|
44
|
+
if (!t?.length || e(a.value)) return null;
|
|
45
|
+
let n = t[Number(a.value)];
|
|
46
|
+
return e(n) ? null : u({
|
|
47
|
+
point: n,
|
|
48
|
+
childIndex: Number(a.value),
|
|
49
|
+
mainColor: r.mainColor,
|
|
50
|
+
dataKey: r.itemDataKey,
|
|
51
|
+
activeDot: r.activeDot,
|
|
52
|
+
slots: i
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
function u({ point: e, childIndex: t, mainColor: n, activeDot: o, dataKey: s, slots: l }) {
|
|
58
|
+
if (o === !1) return null;
|
|
59
|
+
let u = {
|
|
60
|
+
index: t,
|
|
61
|
+
dataKey: s,
|
|
62
|
+
cx: e.x,
|
|
63
|
+
cy: e.y,
|
|
64
|
+
r: 4,
|
|
65
|
+
fill: n,
|
|
66
|
+
"stroke-width": 2,
|
|
67
|
+
stroke: "#fff",
|
|
68
|
+
payload: e.payload,
|
|
69
|
+
value: e.value,
|
|
70
|
+
...typeof o == "object" ? o : {}
|
|
71
|
+
}, d;
|
|
72
|
+
return d = l.activeDot ? l.activeDot(u) : a(i, u, null), a(r, { class: "v-charts-active-dot" }, c(d) ? d : { default: () => [d] });
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { l as ActivePoints };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Layer as e } from "../../container/Layer.mjs";
|
|
2
|
+
import { provideCartesianLabelListData as t } from "../../context/cartesianLabelListContext.mjs";
|
|
3
|
+
import { useSetupGraphicalItem as n } from "../../hooks/useSetupGraphicalItem.mjs";
|
|
4
|
+
import { useGraphicalLayerRef as r } from "../../context/graphicalLayerContext.mjs";
|
|
5
|
+
import { GraphicalItemClipPath as i } from "../GraphicalItemClipPath.mjs";
|
|
6
|
+
import { LineVueProps as a } from "./type.mjs";
|
|
7
|
+
import { useLine as o } from "./hooks/useLine.mjs";
|
|
8
|
+
import { StaticLine as s } from "./StaticLine.mjs";
|
|
9
|
+
import { ActivePoints as c } from "./ActivePoints.mjs";
|
|
10
|
+
import { Fragment as l, Teleport as u, computed as d, createVNode as f, defineComponent as p, isVNode as m } from "vue";
|
|
11
|
+
//#region src/cartesian/line/Line.tsx
|
|
12
|
+
function h(e) {
|
|
13
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
|
|
14
|
+
}
|
|
15
|
+
var g = /* @__PURE__ */ p({
|
|
16
|
+
name: "Line",
|
|
17
|
+
props: a,
|
|
18
|
+
inheritAttrs: !1,
|
|
19
|
+
slots: Object,
|
|
20
|
+
setup(a, { attrs: p, slots: m }) {
|
|
21
|
+
n(a, "line");
|
|
22
|
+
let { shouldRender: g, needClip: _, clipPathId: v, lineData: y, points: b } = o(a, p, m.shape, m.dot, m.label), x = r(null);
|
|
23
|
+
return t(d(() => y.value)), () => {
|
|
24
|
+
if (!g.value) return null;
|
|
25
|
+
let t;
|
|
26
|
+
m.activeDot && (t = { activeDot: m.activeDot });
|
|
27
|
+
let n = m.default?.(), r = f(l, null, [f(e, { class: ["v-charts-line", p.class] }, { default: () => [
|
|
28
|
+
_.value && f("defs", null, [f(i, {
|
|
29
|
+
clipPathId: v.value,
|
|
30
|
+
xAxisId: a.xAxisId,
|
|
31
|
+
yAxisId: a.yAxisId
|
|
32
|
+
}, null)]),
|
|
33
|
+
f(s, null, null),
|
|
34
|
+
n
|
|
35
|
+
] }), f(c, {
|
|
36
|
+
points: y.value ?? [],
|
|
37
|
+
mainColor: p.stroke ?? a.stroke,
|
|
38
|
+
itemDataKey: a.dataKey,
|
|
39
|
+
activeDot: a.activeDot
|
|
40
|
+
}, h(t) ? t : { default: () => [t] })]);
|
|
41
|
+
return x?.value ? f(u, { to: x.value }, h(r) ? r : { default: () => [r] }) : r;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
//#endregion
|
|
46
|
+
export { g as Line };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { interpolate as e } from "../../utils/data-utils.mjs";
|
|
2
|
+
import { Curve as t } from "../../shape/Curve.mjs";
|
|
3
|
+
import { Layer as n } from "../../container/Layer.mjs";
|
|
4
|
+
import { Dot as r } from "../../shape/Dot.mjs";
|
|
5
|
+
import { LabelList as i } from "../../components/label/LabelList.mjs";
|
|
6
|
+
import { useLineContext as a } from "./hooks/useLine.mjs";
|
|
7
|
+
import { Fragment as o, createVNode as s, defineComponent as c, mergeProps as l, onBeforeUnmount as u, ref as d, watch as f } from "vue";
|
|
8
|
+
import { animate as p } from "motion-v";
|
|
9
|
+
//#region src/cartesian/line/StaticLine.tsx
|
|
10
|
+
var m = /* @__PURE__ */ c({
|
|
11
|
+
name: "LineDots",
|
|
12
|
+
props: { points: {
|
|
13
|
+
type: Array,
|
|
14
|
+
default: () => []
|
|
15
|
+
} },
|
|
16
|
+
setup(e) {
|
|
17
|
+
let { clipPathId: t, clipDot: i, props: o, attrs: c, needClip: u, dotSlot: d } = a();
|
|
18
|
+
return () => {
|
|
19
|
+
let { points: a } = e;
|
|
20
|
+
if (!g(a, o.dot)) return null;
|
|
21
|
+
let f = typeof o.dot == "object" && o.dot !== null ? o.dot : {}, p = {
|
|
22
|
+
fill: "#fff",
|
|
23
|
+
stroke: o.stroke,
|
|
24
|
+
"stroke-width": o.strokeWidth,
|
|
25
|
+
...f
|
|
26
|
+
};
|
|
27
|
+
return s(n, {
|
|
28
|
+
class: "v-charts-line-dots",
|
|
29
|
+
"clip-path": u.value ? `url(#clipPath-${i ? "" : "dots-"}${t.value})` : void 0
|
|
30
|
+
}, { default: () => [a?.map((e, t) => {
|
|
31
|
+
let n = e;
|
|
32
|
+
return d ? d({
|
|
33
|
+
...p,
|
|
34
|
+
...c,
|
|
35
|
+
cx: e.x,
|
|
36
|
+
cy: e.y,
|
|
37
|
+
index: t,
|
|
38
|
+
value: n.value,
|
|
39
|
+
payload: n.payload
|
|
40
|
+
}) : s(r, l({ r: 3 }, p, c, {
|
|
41
|
+
cx: e.x,
|
|
42
|
+
cy: e.y,
|
|
43
|
+
class: "v-charts-line-dot",
|
|
44
|
+
clipDot: i
|
|
45
|
+
}), null);
|
|
46
|
+
})] });
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}), h = /* @__PURE__ */ c({
|
|
50
|
+
name: "StaticLine",
|
|
51
|
+
setup() {
|
|
52
|
+
let { points: r, clipPathId: c, layout: h, attrs: g, lineData: _, props: v, isAnimating: y, needClip: b, shapeSlot: x, labelSlot: S } = a(), C = d([]), w = d(1), T = !0, E = [], D = [], O = null, k = !1;
|
|
53
|
+
function A() {
|
|
54
|
+
O &&= (O.stop(), null);
|
|
55
|
+
}
|
|
56
|
+
return u(() => {
|
|
57
|
+
A();
|
|
58
|
+
}), f(r, (t) => {
|
|
59
|
+
if (!(t && D.length === t.length && t.every((e, t) => e.x === D[t].x && e.y === D[t].y))) if (t && t.length > 0) {
|
|
60
|
+
if (!v.isAnimationActive) {
|
|
61
|
+
T = !1, A(), k = !1, y.value = !1, C.value = t, E = t, D = t, w.value = 0;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
T ? (T = !1, k = !0, y.value = !0, C.value = t, D = t, w.value = 1, A(), O = p(1, 0, {
|
|
65
|
+
...v.transition,
|
|
66
|
+
onUpdate(e) {
|
|
67
|
+
k && (w.value = e);
|
|
68
|
+
},
|
|
69
|
+
onPlay() {
|
|
70
|
+
v.onAnimationStart?.();
|
|
71
|
+
},
|
|
72
|
+
onComplete() {
|
|
73
|
+
w.value = 0, y.value = !1, k = !1, O = null, E = C.value, D = E, v.onAnimationEnd?.();
|
|
74
|
+
}
|
|
75
|
+
})) : k ? (C.value = t, D = t) : (y.value = !0, w.value = 0, C.value.length && (E = C.value), D = t, A(), O = p(0, 1, {
|
|
76
|
+
...v.transition,
|
|
77
|
+
onUpdate(n) {
|
|
78
|
+
if (E.length) {
|
|
79
|
+
let r = E.length / t.length;
|
|
80
|
+
C.value = n === 1 ? t : t.map((t, i) => {
|
|
81
|
+
let a = Math.floor(i * r);
|
|
82
|
+
if (E[a]) {
|
|
83
|
+
let r = E[a];
|
|
84
|
+
return {
|
|
85
|
+
...t,
|
|
86
|
+
x: e(r.x, t.x, n),
|
|
87
|
+
y: e(r.y, t.y, n)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return t;
|
|
91
|
+
});
|
|
92
|
+
} else C.value = t;
|
|
93
|
+
},
|
|
94
|
+
onPlay() {
|
|
95
|
+
v.onAnimationStart?.();
|
|
96
|
+
},
|
|
97
|
+
onComplete() {
|
|
98
|
+
y.value = !1, E = t, D = t, O = null, v.onAnimationEnd?.();
|
|
99
|
+
}
|
|
100
|
+
}));
|
|
101
|
+
} else A(), k = !1, y.value = !1, C.value = t || [], E = C.value, D = E, w.value = 0;
|
|
102
|
+
}, { immediate: !0 }), () => {
|
|
103
|
+
let e = {
|
|
104
|
+
...g,
|
|
105
|
+
fill: "none",
|
|
106
|
+
stroke: v.stroke,
|
|
107
|
+
"stroke-width": v.strokeWidth
|
|
108
|
+
}, r = w.value, a = !y.value && (v.label || S), u = typeof v.label == "object" ? v.label : {}, d = null;
|
|
109
|
+
C.value && C.value.length > 1 && (d = x ? x({
|
|
110
|
+
...e,
|
|
111
|
+
points: C.value,
|
|
112
|
+
connectNulls: v.connectNulls,
|
|
113
|
+
type: v.type,
|
|
114
|
+
layout: h.value,
|
|
115
|
+
class: "v-charts-line-curve"
|
|
116
|
+
}) : s(t, l(e, g["stroke-dasharray"] == null && r > 0 ? {
|
|
117
|
+
pathLength: 1,
|
|
118
|
+
"stroke-dasharray": 1,
|
|
119
|
+
"stroke-dashoffset": r
|
|
120
|
+
} : {}, {
|
|
121
|
+
points: C.value,
|
|
122
|
+
connectNulls: v.connectNulls,
|
|
123
|
+
type: v.type,
|
|
124
|
+
layout: h.value,
|
|
125
|
+
class: "v-charts-line-curve"
|
|
126
|
+
}), null));
|
|
127
|
+
let f = g["stroke-dasharray"] != null, p = (x || f) && r > 0 && d;
|
|
128
|
+
return s(o, null, [
|
|
129
|
+
d && s(n, { "clip-path": b.value ? `url(#clipPath-${c.value})` : void 0 }, { default: () => [p ? s("g", null, [s("defs", null, [s("clipPath", { id: `line-anim-${c.value}` }, [s("rect", {
|
|
130
|
+
x: "0",
|
|
131
|
+
y: "0",
|
|
132
|
+
width: `${(1 - r) * 100}%`,
|
|
133
|
+
height: "100%"
|
|
134
|
+
}, null)])]), s("g", { "clip-path": `url(#line-anim-${c.value})` }, [d])]) : d] }),
|
|
135
|
+
s(m, { points: C.value }, null),
|
|
136
|
+
a && s(i, l(u, {
|
|
137
|
+
data: _.value ?? [],
|
|
138
|
+
dataKey: v.dataKey
|
|
139
|
+
}), S ? { label: S } : void 0)
|
|
140
|
+
]);
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
function g(e, t) {
|
|
145
|
+
return e == null || !e.length ? !1 : t ? !0 : e.length === 1;
|
|
146
|
+
}
|
|
147
|
+
//#endregion
|
|
148
|
+
export { h as StaticLine };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { uniqueId as e } from "../../../utils/data-utils.mjs";
|
|
2
|
+
import { useIsPanorama as t } from "../../../context/PanoramaContextProvider.mjs";
|
|
3
|
+
import { isClipDot 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 { useChartName as a } from "../../../state/selectors/selectors.mjs";
|
|
7
|
+
import { filterProps as o } from "../../../utils/VueUtils.mjs";
|
|
8
|
+
import { useNeedsClip as s } from "../../useNeedsClip.mjs";
|
|
9
|
+
import { selectLinePoints as c } from "../../../state/selectors/lineSelectors.mjs";
|
|
10
|
+
import { computed as l, inject as u, provide as d, ref as f } from "vue";
|
|
11
|
+
//#region src/cartesian/line/hooks/useLine.ts
|
|
12
|
+
var p = Symbol("LineContext");
|
|
13
|
+
function m(e) {
|
|
14
|
+
d(p, e);
|
|
15
|
+
}
|
|
16
|
+
function h() {
|
|
17
|
+
let e = u(p);
|
|
18
|
+
if (!e) throw Error("useLineContext must be used within Line component");
|
|
19
|
+
return e;
|
|
20
|
+
}
|
|
21
|
+
function g(u, d = {}, p, h, g) {
|
|
22
|
+
let _ = i(), v = a(), y = e("v-charts-line-"), b = l(() => u.id || y), x = t(), S = f(u.isAnimationActive), { needClip: C } = s(u.xAxisId, u.yAxisId), w = l(() => (_.value === "horizontal" || _.value === "vertical") && (v.value === "LineChart" || v.value === "ComposedChart") && !u.hide), T = l(() => ({
|
|
23
|
+
data: u.data,
|
|
24
|
+
dataKey: u.dataKey
|
|
25
|
+
})), E = r((e) => c(e, u.xAxisId, u.yAxisId, x, T.value)), D = u.dot, O = n(D), { r: k = 3, strokeWidth: A = 2 } = o(D, !1) ?? {
|
|
26
|
+
r: 3,
|
|
27
|
+
strokeWidth: 2
|
|
28
|
+
}, j = k * 2 + A, M = {
|
|
29
|
+
clipPathId: b,
|
|
30
|
+
layout: _,
|
|
31
|
+
points: l(() => E.value),
|
|
32
|
+
props: u,
|
|
33
|
+
attrs: d,
|
|
34
|
+
lineData: E,
|
|
35
|
+
isAnimating: S,
|
|
36
|
+
needClip: C,
|
|
37
|
+
dot: D,
|
|
38
|
+
clipDot: O,
|
|
39
|
+
dotSize: j,
|
|
40
|
+
shapeSlot: p,
|
|
41
|
+
dotSlot: h,
|
|
42
|
+
labelSlot: g
|
|
43
|
+
};
|
|
44
|
+
return m(M), {
|
|
45
|
+
shouldRender: w,
|
|
46
|
+
needClip: C,
|
|
47
|
+
lineData: E,
|
|
48
|
+
points: M.points,
|
|
49
|
+
clipPathId: b
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { p as LineContextKey, m as provideLineContext, g as useLine, h as useLineContext };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { CurveVueProps as e } from "../../shape/Curve.mjs";
|
|
2
|
+
//#region src/cartesian/line/type.ts
|
|
3
|
+
var t = {
|
|
4
|
+
...e,
|
|
5
|
+
activeDot: {
|
|
6
|
+
type: [
|
|
7
|
+
Boolean,
|
|
8
|
+
Object,
|
|
9
|
+
Function
|
|
10
|
+
],
|
|
11
|
+
default: !0
|
|
12
|
+
},
|
|
13
|
+
animationDuration: { type: Number },
|
|
14
|
+
animationEasing: { type: String },
|
|
15
|
+
animationBegin: {
|
|
16
|
+
type: Number,
|
|
17
|
+
default: 0
|
|
18
|
+
},
|
|
19
|
+
animationId: { type: String },
|
|
20
|
+
isAnimationActive: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !0
|
|
23
|
+
},
|
|
24
|
+
connectNulls: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
},
|
|
28
|
+
data: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default: void 0
|
|
31
|
+
},
|
|
32
|
+
dataKey: {
|
|
33
|
+
type: [
|
|
34
|
+
String,
|
|
35
|
+
Number,
|
|
36
|
+
Function
|
|
37
|
+
],
|
|
38
|
+
required: !0
|
|
39
|
+
},
|
|
40
|
+
dot: {
|
|
41
|
+
type: [
|
|
42
|
+
Boolean,
|
|
43
|
+
Object,
|
|
44
|
+
Function
|
|
45
|
+
],
|
|
46
|
+
default: !0
|
|
47
|
+
},
|
|
48
|
+
hide: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !1
|
|
51
|
+
},
|
|
52
|
+
label: { type: [Boolean, Object] },
|
|
53
|
+
legendType: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "line"
|
|
56
|
+
},
|
|
57
|
+
onAnimationEnd: { type: Function },
|
|
58
|
+
onAnimationStart: { type: Function },
|
|
59
|
+
stroke: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "#3182bd"
|
|
62
|
+
},
|
|
63
|
+
strokeWidth: {
|
|
64
|
+
type: Number,
|
|
65
|
+
default: 1
|
|
66
|
+
},
|
|
67
|
+
tooltipType: { type: String },
|
|
68
|
+
transition: {
|
|
69
|
+
type: Object,
|
|
70
|
+
default: () => ({
|
|
71
|
+
duration: .8,
|
|
72
|
+
ease: "easeOut"
|
|
73
|
+
})
|
|
74
|
+
},
|
|
75
|
+
type: { type: [String, Function] },
|
|
76
|
+
unit: { type: [String, Number] },
|
|
77
|
+
xAxisId: {
|
|
78
|
+
type: [String, Number],
|
|
79
|
+
default: 0
|
|
80
|
+
},
|
|
81
|
+
yAxisId: {
|
|
82
|
+
type: [String, Number],
|
|
83
|
+
default: 0
|
|
84
|
+
},
|
|
85
|
+
needClip: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: !1
|
|
88
|
+
},
|
|
89
|
+
id: { type: String },
|
|
90
|
+
activeIndex: { type: Number },
|
|
91
|
+
activePoint: { type: Object },
|
|
92
|
+
left: {
|
|
93
|
+
type: Number,
|
|
94
|
+
default: 0
|
|
95
|
+
},
|
|
96
|
+
top: {
|
|
97
|
+
type: Number,
|
|
98
|
+
default: 0
|
|
99
|
+
},
|
|
100
|
+
width: {
|
|
101
|
+
type: Number,
|
|
102
|
+
default: 0
|
|
103
|
+
},
|
|
104
|
+
height: {
|
|
105
|
+
type: Number,
|
|
106
|
+
default: 0
|
|
107
|
+
},
|
|
108
|
+
name: { type: [String, Number] },
|
|
109
|
+
class: { type: String }
|
|
110
|
+
};
|
|
111
|
+
//#endregion
|
|
112
|
+
export { t as LineVueProps };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { isNullish as e } from "../../utils/validate.mjs";
|
|
2
|
+
import { getCateCoordinateOfLine as t, getValueByDataKey as n } from "../../utils/chart.mjs";
|
|
3
|
+
//#region src/cartesian/line/utils.ts
|
|
4
|
+
function r({ layout: r, xAxis: i, yAxis: a, xAxisTicks: o, yAxisTicks: s, dataKey: c, bandSize: l, displayedData: u }) {
|
|
5
|
+
return u.map((u, d) => {
|
|
6
|
+
let f = n(u, c);
|
|
7
|
+
return r === "horizontal" ? {
|
|
8
|
+
x: t({
|
|
9
|
+
axis: i,
|
|
10
|
+
ticks: o,
|
|
11
|
+
bandSize: l,
|
|
12
|
+
entry: u,
|
|
13
|
+
index: d
|
|
14
|
+
}),
|
|
15
|
+
y: e(f) ? null : a.scale(f),
|
|
16
|
+
value: f,
|
|
17
|
+
payload: u
|
|
18
|
+
} : {
|
|
19
|
+
x: e(f) ? null : i.scale(f),
|
|
20
|
+
y: t({
|
|
21
|
+
axis: a,
|
|
22
|
+
ticks: s,
|
|
23
|
+
bandSize: l,
|
|
24
|
+
entry: u,
|
|
25
|
+
index: d
|
|
26
|
+
}),
|
|
27
|
+
value: f,
|
|
28
|
+
payload: u
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { r as computeLinePoints };
|