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,151 @@
|
|
|
1
|
+
import { isNan as e, isNullish as t, isNumber as n } from "../../utils/validate.mjs";
|
|
2
|
+
import { interpolate as r } from "../../utils/data-utils.mjs";
|
|
3
|
+
import { Curve as i } from "../../shape/Curve.mjs";
|
|
4
|
+
import { isClipDot as a } from "../../utils/chart.mjs";
|
|
5
|
+
import { useOffset as o } from "../../context/chartLayoutContext.mjs";
|
|
6
|
+
import { useAreaContext as s } from "./hooks/useArea.mjs";
|
|
7
|
+
import { Layer as c } from "../../container/Layer.mjs";
|
|
8
|
+
import { Dot as l } from "../../shape/Dot.mjs";
|
|
9
|
+
import { LabelList as u } from "../../components/label/LabelList.mjs";
|
|
10
|
+
import { Fragment as d, createVNode as f, defineComponent as p, mergeProps as m, ref as h, watch as g } from "vue";
|
|
11
|
+
import { animate as _ } from "motion-v";
|
|
12
|
+
//#region src/cartesian/area/RenderArea.tsx
|
|
13
|
+
var v = /* @__PURE__ */ p({
|
|
14
|
+
name: "Dots",
|
|
15
|
+
props: { points: {
|
|
16
|
+
type: Array,
|
|
17
|
+
default: () => []
|
|
18
|
+
} },
|
|
19
|
+
setup(e) {
|
|
20
|
+
let { clipPathId: t, props: n, attrs: r, dotSlot: i } = s();
|
|
21
|
+
return () => {
|
|
22
|
+
let { points: o } = e;
|
|
23
|
+
if (!b(o, n.dot)) return null;
|
|
24
|
+
let s = a(n.dot), u = {
|
|
25
|
+
fill: n.fill,
|
|
26
|
+
"fill-opacity": n.fillOpacity,
|
|
27
|
+
"stroke-width": n.strokeWidth,
|
|
28
|
+
stroke: n.stroke
|
|
29
|
+
};
|
|
30
|
+
return f(c, {
|
|
31
|
+
class: "v-charts-area-dots",
|
|
32
|
+
"clip-path": n.needClip ? `url(#clipPath-${s ? "" : "dots-"}${t.value})` : void 0
|
|
33
|
+
}, { default: () => [o?.map((e) => {
|
|
34
|
+
let t = {
|
|
35
|
+
...u,
|
|
36
|
+
...r,
|
|
37
|
+
r: 3,
|
|
38
|
+
cx: e.x,
|
|
39
|
+
cy: e.y,
|
|
40
|
+
class: "v-charts-area-dot",
|
|
41
|
+
clipDot: s
|
|
42
|
+
};
|
|
43
|
+
return i ? i(t) : f(l, t, null);
|
|
44
|
+
})] });
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}), y = /* @__PURE__ */ p({
|
|
48
|
+
name: "StaticArea",
|
|
49
|
+
setup() {
|
|
50
|
+
let { points: a, clipPathId: l, layout: p, attrs: y, areaData: b, props: x, isAnimating: S, isClipRectAnimating: C } = s(), w = o(), T = h(a.value || []), E = h(b.value?.baseLine || []), D = T.value || [], O = b.value?.baseLine || [], k = !1;
|
|
51
|
+
return g(a, (i, a, o) => {
|
|
52
|
+
if (C.value) {
|
|
53
|
+
T.value = i, E.value = b.value?.baseLine || [];
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (i && i.length > 0) {
|
|
57
|
+
k = !1, S.value = !0;
|
|
58
|
+
let a = _(0, 1, {
|
|
59
|
+
...x.transition,
|
|
60
|
+
onUpdate(a) {
|
|
61
|
+
if (!k && D.length) {
|
|
62
|
+
let o = D.length / i.length, s = a === 1 ? i : i.map((e, t) => {
|
|
63
|
+
let n = Math.floor(t * o);
|
|
64
|
+
if (D[n]) {
|
|
65
|
+
let t = D[n];
|
|
66
|
+
return {
|
|
67
|
+
...e,
|
|
68
|
+
x: r(t.x, e.x, a),
|
|
69
|
+
y: r(t.y, e.y, a)
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return e;
|
|
73
|
+
}), c;
|
|
74
|
+
c = n(b.value?.baseLine) ? r(O, b.value?.baseLine, a) : t(b.value?.baseLine) || e(b.value?.baseLine) ? r(O, 0, a) : b?.value.baseLine.map((e, t) => {
|
|
75
|
+
let n = Math.floor(t * o);
|
|
76
|
+
if (Array.isArray(O) && O[n]) {
|
|
77
|
+
let t = O[n];
|
|
78
|
+
return {
|
|
79
|
+
...e,
|
|
80
|
+
x: r(t.x, e.x, a),
|
|
81
|
+
y: r(t.y, e.y, a)
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
return e;
|
|
85
|
+
}), T.value = s, E.value = c;
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
onPlay() {
|
|
89
|
+
x.onAnimationStart?.();
|
|
90
|
+
},
|
|
91
|
+
onComplete() {
|
|
92
|
+
S.value = !1, x.onAnimationEnd?.();
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
o(() => {
|
|
96
|
+
k = !0, a.stop(), D = T.value, O = E.value;
|
|
97
|
+
});
|
|
98
|
+
} else S.value = !1, T.value = i || [], E.value = b.value?.baseLine || [], D = T.value, O = E.value;
|
|
99
|
+
}, { immediate: !0 }), () => {
|
|
100
|
+
let e = {
|
|
101
|
+
...y,
|
|
102
|
+
fill: x.fill,
|
|
103
|
+
"fill-opacity": x.fillOpacity,
|
|
104
|
+
height: w.value.height,
|
|
105
|
+
width: w.value.width,
|
|
106
|
+
"stroke-width": x.strokeWidth
|
|
107
|
+
}, t = b.value?.isRange, n = !S.value && x.label, r = typeof x.label == "object" ? x.label : {};
|
|
108
|
+
return f(d, null, [
|
|
109
|
+
T.value && T.value.length > 1 && f(c, { "clip-path": x.needClip ? `url(#clipPath-${l.value})` : void 0 }, { default: () => [
|
|
110
|
+
f(i, m(e, {
|
|
111
|
+
points: T.value,
|
|
112
|
+
connectNulls: x.connectNulls,
|
|
113
|
+
type: x.type,
|
|
114
|
+
layout: p.value,
|
|
115
|
+
baseLine: E.value,
|
|
116
|
+
stroke: "none",
|
|
117
|
+
class: "v-charts-area-area"
|
|
118
|
+
}), null),
|
|
119
|
+
y.stroke !== "none" && f(i, m(e, {
|
|
120
|
+
layout: p.value,
|
|
121
|
+
type: x.type,
|
|
122
|
+
connectNulls: x.connectNulls,
|
|
123
|
+
fill: "none",
|
|
124
|
+
points: T.value,
|
|
125
|
+
stroke: x.stroke,
|
|
126
|
+
class: "v-charts-area-curve"
|
|
127
|
+
}), null),
|
|
128
|
+
y.stroke !== "none" && t && f(i, m(e, {
|
|
129
|
+
class: "v-charts-area-curve",
|
|
130
|
+
layout: p.value,
|
|
131
|
+
type: x.type,
|
|
132
|
+
connectNulls: x.connectNulls,
|
|
133
|
+
fill: "none",
|
|
134
|
+
points: E.value,
|
|
135
|
+
stroke: x.stroke
|
|
136
|
+
}), null)
|
|
137
|
+
] }),
|
|
138
|
+
f(v, { points: T.value }, null),
|
|
139
|
+
n && f(u, m(r, {
|
|
140
|
+
data: b.value?.points ?? [],
|
|
141
|
+
dataKey: x.dataKey
|
|
142
|
+
}), null)
|
|
143
|
+
]);
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
function b(e, t) {
|
|
148
|
+
return e == null || !e.length ? !1 : t ? !0 : e.length === 1;
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
151
|
+
export { y as StaticArea };
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { selectArea as o } from "../../../state/selectors/areaSelectors.mjs";
|
|
8
|
+
import { filterProps as s } from "../../../utils/VueUtils.mjs";
|
|
9
|
+
import { computed as c, inject as l, provide as u, ref as d, watch as f } from "vue";
|
|
10
|
+
//#region src/cartesian/area/hooks/useArea.ts
|
|
11
|
+
var p = Symbol("AreaContext");
|
|
12
|
+
function m(e) {
|
|
13
|
+
u(p, e);
|
|
14
|
+
}
|
|
15
|
+
function h() {
|
|
16
|
+
let e = l(p);
|
|
17
|
+
if (!e) throw Error("useAreaContext must be used within Area component");
|
|
18
|
+
return e;
|
|
19
|
+
}
|
|
20
|
+
function g(l, u = {}, p) {
|
|
21
|
+
let h = i(), g = a(), _ = e("v-charts-area-"), v = c(() => l.id || _), y = t(), b = d(l.isAnimationActive), x = c(() => (h.value === "horizontal" || h.value === "vertical") && (g.value === "AreaChart" || g.value === "ComposedChart") && !l.hide), S = c(() => ({
|
|
22
|
+
baseValue: l.baseValue,
|
|
23
|
+
stackId: l.stackId,
|
|
24
|
+
connectNulls: l.connectNulls,
|
|
25
|
+
data: l.data,
|
|
26
|
+
dataKey: l.dataKey
|
|
27
|
+
})), C = r((e) => o(e, l.xAxisId, l.yAxisId, y, S.value)), w = d(!0);
|
|
28
|
+
f(() => l.hide, (e) => {
|
|
29
|
+
e || (w.value = !0);
|
|
30
|
+
});
|
|
31
|
+
let T = c(() => l.isAnimationActive && C.value?.points?.length && w.value), E = l.dot, D = n(E), { r: O = 3, strokeWidth: k = 2 } = s(E, !1) ?? {
|
|
32
|
+
r: 3,
|
|
33
|
+
strokeWidth: 2
|
|
34
|
+
}, A = O * 2 + k, j = {
|
|
35
|
+
clipPathId: v,
|
|
36
|
+
layout: h,
|
|
37
|
+
points: c(() => C.value?.points),
|
|
38
|
+
props: l,
|
|
39
|
+
attrs: u,
|
|
40
|
+
dot: E,
|
|
41
|
+
clipDot: D,
|
|
42
|
+
dotSize: A,
|
|
43
|
+
dotSlot: p,
|
|
44
|
+
areaData: C,
|
|
45
|
+
isAnimating: b,
|
|
46
|
+
isClipRectAnimating: w
|
|
47
|
+
};
|
|
48
|
+
return m(j), {
|
|
49
|
+
shouldRender: x,
|
|
50
|
+
areaData: C,
|
|
51
|
+
points: j.points,
|
|
52
|
+
clipPathId: v,
|
|
53
|
+
shouldShowAnimation: T
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { g as useArea, h as useAreaContext };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { CurveVueProps as e } from "../../shape/Curve.mjs";
|
|
2
|
+
//#region src/cartesian/area/type.ts
|
|
3
|
+
var t = {
|
|
4
|
+
...e,
|
|
5
|
+
activeDot: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: !0
|
|
8
|
+
},
|
|
9
|
+
baseValue: {
|
|
10
|
+
type: [Number, String],
|
|
11
|
+
default: void 0
|
|
12
|
+
},
|
|
13
|
+
connectNulls: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
data: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default: void 0
|
|
20
|
+
},
|
|
21
|
+
dataKey: {
|
|
22
|
+
type: [
|
|
23
|
+
String,
|
|
24
|
+
Number,
|
|
25
|
+
Function
|
|
26
|
+
],
|
|
27
|
+
required: !0
|
|
28
|
+
},
|
|
29
|
+
dot: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
fill: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "#3182bd"
|
|
36
|
+
},
|
|
37
|
+
fillOpacity: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: .6
|
|
40
|
+
},
|
|
41
|
+
strokeWidth: { type: Number },
|
|
42
|
+
stroke: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "#3182bd"
|
|
45
|
+
},
|
|
46
|
+
hide: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
isAnimationActive: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: !0
|
|
53
|
+
},
|
|
54
|
+
label: {
|
|
55
|
+
type: [Boolean, Object],
|
|
56
|
+
default: void 0
|
|
57
|
+
},
|
|
58
|
+
legendType: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: "line"
|
|
61
|
+
},
|
|
62
|
+
onAnimationEnd: {
|
|
63
|
+
type: Function,
|
|
64
|
+
default: void 0
|
|
65
|
+
},
|
|
66
|
+
onAnimationStart: {
|
|
67
|
+
type: Function,
|
|
68
|
+
default: void 0
|
|
69
|
+
},
|
|
70
|
+
transition: {
|
|
71
|
+
type: Object,
|
|
72
|
+
default: {
|
|
73
|
+
duration: .8,
|
|
74
|
+
ease: "easeOut"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
needClip: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: !1
|
|
80
|
+
},
|
|
81
|
+
stackId: {
|
|
82
|
+
type: [String, Number],
|
|
83
|
+
default: void 0
|
|
84
|
+
},
|
|
85
|
+
tooltipType: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: void 0
|
|
88
|
+
},
|
|
89
|
+
unit: {
|
|
90
|
+
type: [String, Number],
|
|
91
|
+
default: void 0
|
|
92
|
+
},
|
|
93
|
+
xAxisId: {
|
|
94
|
+
type: [String, Number],
|
|
95
|
+
default: 0
|
|
96
|
+
},
|
|
97
|
+
yAxisId: {
|
|
98
|
+
type: [String, Number],
|
|
99
|
+
default: 0
|
|
100
|
+
},
|
|
101
|
+
activeIndex: {
|
|
102
|
+
type: Number,
|
|
103
|
+
default: void 0
|
|
104
|
+
},
|
|
105
|
+
activePoint: {
|
|
106
|
+
type: Object,
|
|
107
|
+
default: void 0
|
|
108
|
+
},
|
|
109
|
+
id: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: void 0
|
|
112
|
+
},
|
|
113
|
+
left: {
|
|
114
|
+
type: Number,
|
|
115
|
+
default: 0
|
|
116
|
+
},
|
|
117
|
+
top: {
|
|
118
|
+
type: Number,
|
|
119
|
+
default: 0
|
|
120
|
+
},
|
|
121
|
+
width: {
|
|
122
|
+
type: Number,
|
|
123
|
+
default: 0
|
|
124
|
+
},
|
|
125
|
+
height: {
|
|
126
|
+
type: Number,
|
|
127
|
+
default: 0
|
|
128
|
+
},
|
|
129
|
+
name: { type: [String, Number] },
|
|
130
|
+
class: {
|
|
131
|
+
type: String,
|
|
132
|
+
default: void 0
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
//#endregion
|
|
136
|
+
export { t as AreaVueProps };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { isNumber as e } from "../../utils/validate.mjs";
|
|
2
|
+
import { getCateCoordinateOfLine as t, getValueByDataKey as n } from "../../utils/chart.mjs";
|
|
3
|
+
//#region src/cartesian/area/utils.ts
|
|
4
|
+
function r(t, n, r, i, a) {
|
|
5
|
+
let o = r ?? n;
|
|
6
|
+
if (e(o)) return o;
|
|
7
|
+
let s = t === "horizontal" ? a : i, c = s.scale.domain();
|
|
8
|
+
if (s.type === "number") {
|
|
9
|
+
let e = Math.max(c[0], c[1]), t = Math.min(c[0], c[1]);
|
|
10
|
+
return o === "dataMin" ? t : o === "dataMax" || e < 0 ? e : Math.max(Math.min(c[0], c[1]), 0);
|
|
11
|
+
}
|
|
12
|
+
return o === "dataMin" ? c[0] : o === "dataMax" ? c[1] : c[0];
|
|
13
|
+
}
|
|
14
|
+
function i({ areaSettings: { connectNulls: e, baseValue: i, dataKey: a }, stackedData: o, layout: s, chartBaseValue: c, xAxis: l, yAxis: u, displayedData: d, dataStartIndex: f, xAxisTicks: p, yAxisTicks: m, bandSize: h }) {
|
|
15
|
+
let g = o && o.length, _ = r(s, c, i, l, u), v = s === "horizontal", y = !1, b = d.map((r, i) => {
|
|
16
|
+
let s;
|
|
17
|
+
g ? s = o[f + i] : (s = n(r, a), Array.isArray(s) ? y = !0 : s = [_, s]);
|
|
18
|
+
let c = s[1] == null || g && !e && n(r, a) == null;
|
|
19
|
+
return v ? {
|
|
20
|
+
x: t({
|
|
21
|
+
axis: l,
|
|
22
|
+
ticks: p,
|
|
23
|
+
bandSize: h,
|
|
24
|
+
entry: r,
|
|
25
|
+
index: i
|
|
26
|
+
}),
|
|
27
|
+
y: c ? null : u.scale(s[1]),
|
|
28
|
+
value: s,
|
|
29
|
+
payload: r
|
|
30
|
+
} : {
|
|
31
|
+
x: c ? null : l.scale(s[1]),
|
|
32
|
+
y: t({
|
|
33
|
+
axis: u,
|
|
34
|
+
ticks: m,
|
|
35
|
+
bandSize: h,
|
|
36
|
+
entry: r,
|
|
37
|
+
index: i
|
|
38
|
+
}),
|
|
39
|
+
value: s,
|
|
40
|
+
payload: r
|
|
41
|
+
};
|
|
42
|
+
}), x;
|
|
43
|
+
return x = g || y ? b.map((e) => {
|
|
44
|
+
let t = Array.isArray(e.value) ? e.value[0] : null;
|
|
45
|
+
return v ? {
|
|
46
|
+
x: e.x,
|
|
47
|
+
y: t != null && e.y != null ? u.scale(t) : null
|
|
48
|
+
} : {
|
|
49
|
+
x: t == null ? null : l.scale(t),
|
|
50
|
+
y: e.y
|
|
51
|
+
};
|
|
52
|
+
}) : v ? u.scale(_) : l.scale(_), {
|
|
53
|
+
points: b,
|
|
54
|
+
baseLine: x,
|
|
55
|
+
isRange: y
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { i as computeArea };
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { useIsPanorama as e } from "../../context/PanoramaContextProvider.mjs";
|
|
2
|
+
import { selectAxisViewBox as t } from "../../state/selectors/selectChartOffset.mjs";
|
|
3
|
+
import { implicitXAxis as n, selectAxisScale as r, selectTicksOfAxis as i, selectXAxisPosition as a, selectXAxisSize as o } from "../../state/selectors/axisSelectors.mjs";
|
|
4
|
+
import { useAppDispatch as s, useAppSelector as c } from "../../state/hooks.mjs";
|
|
5
|
+
import { addXAxis as l, removeXAxis 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/XAxis.tsx
|
|
9
|
+
var g = /* @__PURE__ */ p({
|
|
10
|
+
props: {
|
|
11
|
+
xAxisId: {
|
|
12
|
+
type: [String, Number],
|
|
13
|
+
default: 0
|
|
14
|
+
},
|
|
15
|
+
ticks: Array
|
|
16
|
+
},
|
|
17
|
+
inheritAttrs: !1,
|
|
18
|
+
setup(n, { attrs: s, slots: l }) {
|
|
19
|
+
let u = e(), p = "xAxis", h = c((e) => r(e, p, n.xAxisId, u)), g = c((e) => o(e, n.xAxisId)), _ = c((e) => a(e, n.xAxisId)), v = c((e) => i(e, p, n.xAxisId, u)), y = c(t);
|
|
20
|
+
return () => {
|
|
21
|
+
let { ticks: e, ...t } = n;
|
|
22
|
+
return g.value == null || _.value == null ? null : f(d, m(t, s, {
|
|
23
|
+
viewBox: y.value,
|
|
24
|
+
scale: h.value,
|
|
25
|
+
x: _.value?.x,
|
|
26
|
+
y: _.value?.y,
|
|
27
|
+
width: g.value?.width,
|
|
28
|
+
height: g.value?.height,
|
|
29
|
+
ticks: v.value,
|
|
30
|
+
class: ["v-charts-xAxis xAxis", s.class]
|
|
31
|
+
}), { default: () => [l.tick ? { tick: l.tick } : void 0] });
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}), _ = /* @__PURE__ */ p({
|
|
35
|
+
props: {
|
|
36
|
+
interval: [String, Number],
|
|
37
|
+
xAxisId: [String, Number],
|
|
38
|
+
scale: [String, Function],
|
|
39
|
+
type: String,
|
|
40
|
+
padding: Object,
|
|
41
|
+
allowDataOverflow: Boolean,
|
|
42
|
+
domain: { type: Array },
|
|
43
|
+
dataKey: { type: [
|
|
44
|
+
String,
|
|
45
|
+
Number,
|
|
46
|
+
Function
|
|
47
|
+
] },
|
|
48
|
+
allowDuplicatedCategory: Boolean,
|
|
49
|
+
allowDecimals: Boolean,
|
|
50
|
+
tickCount: Number,
|
|
51
|
+
includeHidden: Boolean,
|
|
52
|
+
reversed: Boolean,
|
|
53
|
+
ticks: Array,
|
|
54
|
+
height: Number,
|
|
55
|
+
orientation: String,
|
|
56
|
+
mirror: Boolean,
|
|
57
|
+
hide: Boolean,
|
|
58
|
+
unit: String,
|
|
59
|
+
name: String,
|
|
60
|
+
angle: Number,
|
|
61
|
+
minTickGap: Number,
|
|
62
|
+
tick: {
|
|
63
|
+
type: [Boolean, Object],
|
|
64
|
+
default: !0
|
|
65
|
+
},
|
|
66
|
+
tickFormatter: Function
|
|
67
|
+
},
|
|
68
|
+
setup(e, { slots: t }) {
|
|
69
|
+
let n = s();
|
|
70
|
+
return h((t) => {
|
|
71
|
+
let r = {
|
|
72
|
+
interval: e.interval ?? "preserveEnd",
|
|
73
|
+
id: e.xAxisId,
|
|
74
|
+
scale: e.scale,
|
|
75
|
+
type: e.type,
|
|
76
|
+
padding: e.padding,
|
|
77
|
+
allowDataOverflow: e.allowDataOverflow,
|
|
78
|
+
domain: e.domain,
|
|
79
|
+
dataKey: e.dataKey,
|
|
80
|
+
allowDuplicatedCategory: e.allowDuplicatedCategory,
|
|
81
|
+
allowDecimals: e.allowDecimals,
|
|
82
|
+
tickCount: e.tickCount,
|
|
83
|
+
includeHidden: e.includeHidden ?? !1,
|
|
84
|
+
reversed: e.reversed,
|
|
85
|
+
ticks: e.ticks,
|
|
86
|
+
height: e.height,
|
|
87
|
+
orientation: e.orientation,
|
|
88
|
+
mirror: e.mirror,
|
|
89
|
+
hide: e.hide,
|
|
90
|
+
unit: e.unit,
|
|
91
|
+
name: e.name,
|
|
92
|
+
angle: e.angle ?? 0,
|
|
93
|
+
minTickGap: e.minTickGap ?? 5,
|
|
94
|
+
tick: e.tick ?? !0,
|
|
95
|
+
tickFormatter: e.tickFormatter
|
|
96
|
+
};
|
|
97
|
+
n(l(r)), t(() => {
|
|
98
|
+
n(u(r));
|
|
99
|
+
});
|
|
100
|
+
}), () => f(g, e, { default: () => [t.tick ? { tick: t.tick } : void 0] });
|
|
101
|
+
}
|
|
102
|
+
}), v = /* @__PURE__ */ p({
|
|
103
|
+
name: "XAxis",
|
|
104
|
+
props: {
|
|
105
|
+
allowDataOverflow: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: n.allowDataOverflow
|
|
108
|
+
},
|
|
109
|
+
allowDecimals: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: n.allowDecimals
|
|
112
|
+
},
|
|
113
|
+
allowDuplicatedCategory: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: n.allowDuplicatedCategory
|
|
116
|
+
},
|
|
117
|
+
height: {
|
|
118
|
+
type: Number,
|
|
119
|
+
default: n.height
|
|
120
|
+
},
|
|
121
|
+
hide: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: !1
|
|
124
|
+
},
|
|
125
|
+
mirror: {
|
|
126
|
+
type: Boolean,
|
|
127
|
+
default: n.mirror
|
|
128
|
+
},
|
|
129
|
+
orientation: {
|
|
130
|
+
type: String,
|
|
131
|
+
default: n.orientation
|
|
132
|
+
},
|
|
133
|
+
padding: {
|
|
134
|
+
type: Object,
|
|
135
|
+
default: n.padding
|
|
136
|
+
},
|
|
137
|
+
reversed: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: n.reversed
|
|
140
|
+
},
|
|
141
|
+
scale: {
|
|
142
|
+
type: [String, Function],
|
|
143
|
+
default: n.scale
|
|
144
|
+
},
|
|
145
|
+
tickCount: {
|
|
146
|
+
type: Number,
|
|
147
|
+
default: n.tickCount
|
|
148
|
+
},
|
|
149
|
+
type: {
|
|
150
|
+
type: String,
|
|
151
|
+
default: n.type
|
|
152
|
+
},
|
|
153
|
+
xAxisId: {
|
|
154
|
+
type: [String, Number],
|
|
155
|
+
default: 0
|
|
156
|
+
},
|
|
157
|
+
dataKey: {
|
|
158
|
+
type: [
|
|
159
|
+
String,
|
|
160
|
+
Number,
|
|
161
|
+
Function
|
|
162
|
+
],
|
|
163
|
+
default: void 0
|
|
164
|
+
},
|
|
165
|
+
domain: { type: Array },
|
|
166
|
+
axisLine: {
|
|
167
|
+
type: Boolean,
|
|
168
|
+
default: !0
|
|
169
|
+
},
|
|
170
|
+
ticks: { type: Array },
|
|
171
|
+
interval: { type: [String, Number] },
|
|
172
|
+
unit: { type: String },
|
|
173
|
+
tickLine: {
|
|
174
|
+
type: [Boolean, Object],
|
|
175
|
+
default: !0
|
|
176
|
+
},
|
|
177
|
+
tickMargin: Number,
|
|
178
|
+
minTickGap: {
|
|
179
|
+
type: Number,
|
|
180
|
+
default: 5
|
|
181
|
+
},
|
|
182
|
+
tickFormatter: Function
|
|
183
|
+
},
|
|
184
|
+
setup(e, { attrs: t, slots: n }) {
|
|
185
|
+
return () => f(_, m(e, t), { default: () => [n.tick ? { tick: n.tick } : void 0] });
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
//#endregion
|
|
189
|
+
export { v as XAxis };
|