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,112 @@
|
|
|
1
|
+
import { isPercent as e } from "../utils/validate.mjs";
|
|
2
|
+
import { normalizeStyle as t } from "../utils/style.mjs";
|
|
3
|
+
import { provideSizeContext as n } from "./useSizeContext.mjs";
|
|
4
|
+
import { Fragment as r, cloneVNode as i, computed as a, createBlock as o, createElementBlock as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, onMounted as d, onUnmounted as f, openBlock as p, ref as m, resolveDynamicComponent as h, toRef as g, useSlots as _ } from "vue";
|
|
5
|
+
import { useThrottleFn as v } from "@vueuse/core";
|
|
6
|
+
//#region src/container/ResponsiveContainer.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var y = ["id"], b = /* @__PURE__ */ c({
|
|
8
|
+
name: "ResponsiveContainer",
|
|
9
|
+
inheritAttrs: !1,
|
|
10
|
+
__name: "ResponsiveContainer",
|
|
11
|
+
props: {
|
|
12
|
+
aspect: {},
|
|
13
|
+
width: { default: "100%" },
|
|
14
|
+
height: { default: "100%" },
|
|
15
|
+
minWidth: { default: 0 },
|
|
16
|
+
minHeight: {},
|
|
17
|
+
initialDimension: { default: () => ({
|
|
18
|
+
width: -1,
|
|
19
|
+
height: -1
|
|
20
|
+
}) },
|
|
21
|
+
maxHeight: {},
|
|
22
|
+
debounce: { default: 0 },
|
|
23
|
+
id: {},
|
|
24
|
+
class: {},
|
|
25
|
+
style: {},
|
|
26
|
+
onResize: {}
|
|
27
|
+
},
|
|
28
|
+
setup(c) {
|
|
29
|
+
let b = c, x = _(), S = g(b, "debounce"), C = m({
|
|
30
|
+
width: b.initialDimension.width,
|
|
31
|
+
height: b.initialDimension.height
|
|
32
|
+
}), w = a(() => e(b.width) ? C.value.width : b.width), T = a(() => {
|
|
33
|
+
let t = e(b.height) ? C.value.height : b.height;
|
|
34
|
+
return b.aspect && b.aspect > 0 && (b.width && (b.height == null || b.height === "auto") ? t = w.value / b.aspect : b.height && (b.width == null || b.width)), t;
|
|
35
|
+
}), E = a(() => {
|
|
36
|
+
let e = w.value;
|
|
37
|
+
return b.aspect && b.aspect > 0 && b.height && (b.width == null || b.width === "auto") && (e = T.value * b.aspect), e;
|
|
38
|
+
});
|
|
39
|
+
n({
|
|
40
|
+
sizes: C,
|
|
41
|
+
calculatedWidth: E,
|
|
42
|
+
calculatedHeight: T
|
|
43
|
+
});
|
|
44
|
+
function D(e, t) {
|
|
45
|
+
let n = Math.round(e), r = Math.round(t), { width: i, height: a } = C.value;
|
|
46
|
+
i === n && a === r || (C.value = {
|
|
47
|
+
width: n,
|
|
48
|
+
height: r
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
let O = v((e) => {
|
|
52
|
+
let { width: t, height: n } = e[0].contentRect;
|
|
53
|
+
D(t, n), b.onResize?.(t, n);
|
|
54
|
+
}, S, !0, !1), k = m(), A = null;
|
|
55
|
+
d(() => {
|
|
56
|
+
A = new ResizeObserver(O);
|
|
57
|
+
let { width: e, height: t } = k.value.getBoundingClientRect() ?? {
|
|
58
|
+
width: 0,
|
|
59
|
+
height: 0
|
|
60
|
+
};
|
|
61
|
+
D(e, t), A.observe(k.value);
|
|
62
|
+
}), f(() => {
|
|
63
|
+
A?.disconnect();
|
|
64
|
+
});
|
|
65
|
+
let j = a(() => {
|
|
66
|
+
let { width: e, height: t } = C.value;
|
|
67
|
+
return e >= 0 && t >= 0;
|
|
68
|
+
});
|
|
69
|
+
function M(e) {
|
|
70
|
+
let t = [];
|
|
71
|
+
for (let n of e) n.type === r && Array.isArray(n.children) ? t.push(...M(n.children)) : t.push(n);
|
|
72
|
+
return t;
|
|
73
|
+
}
|
|
74
|
+
function N() {
|
|
75
|
+
if (!j.value) return;
|
|
76
|
+
let e = E.value, n = T.value, r = x.default?.();
|
|
77
|
+
if (r) return M(r).map((r, a) => i(r, {
|
|
78
|
+
width: e,
|
|
79
|
+
height: n,
|
|
80
|
+
key: r.key || `responsive-child-${a}`,
|
|
81
|
+
style: {
|
|
82
|
+
...t({
|
|
83
|
+
maxHeight: C.value.height,
|
|
84
|
+
maxWidth: C.value.width
|
|
85
|
+
}),
|
|
86
|
+
height: "100%",
|
|
87
|
+
width: "100%",
|
|
88
|
+
...r.props?.style
|
|
89
|
+
}
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
let P = a(() => ({
|
|
93
|
+
...b.style,
|
|
94
|
+
...t({
|
|
95
|
+
width: b.width,
|
|
96
|
+
height: b.height,
|
|
97
|
+
minWidth: b.minWidth,
|
|
98
|
+
minHeight: b.minHeight,
|
|
99
|
+
maxHeight: b.maxHeight
|
|
100
|
+
})
|
|
101
|
+
}));
|
|
102
|
+
return (e, t) => (p(), s("div", {
|
|
103
|
+
id: e.id ? `${e.id}` : void 0,
|
|
104
|
+
ref_key: "containerRef",
|
|
105
|
+
ref: k,
|
|
106
|
+
class: l(["vcharts-responsive-container", [b.class]]),
|
|
107
|
+
style: u(P.value)
|
|
108
|
+
}, [(p(), o(h(() => N())))], 14, y));
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
//#endregion
|
|
112
|
+
export { b as default };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createVNode as e, defineComponent as t, mergeProps as n } from "vue";
|
|
2
|
+
//#region src/container/Surface.tsx
|
|
3
|
+
var r = /* @__PURE__ */ t({
|
|
4
|
+
name: "Surface",
|
|
5
|
+
props: {
|
|
6
|
+
width: {
|
|
7
|
+
type: Number,
|
|
8
|
+
required: !0
|
|
9
|
+
},
|
|
10
|
+
height: {
|
|
11
|
+
type: Number,
|
|
12
|
+
required: !0
|
|
13
|
+
},
|
|
14
|
+
viewBox: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default: void 0
|
|
17
|
+
},
|
|
18
|
+
class: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: void 0
|
|
21
|
+
},
|
|
22
|
+
style: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: void 0
|
|
25
|
+
},
|
|
26
|
+
title: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: void 0
|
|
29
|
+
},
|
|
30
|
+
desc: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: void 0
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
setup(t, { slots: r, attrs: i }) {
|
|
36
|
+
return () => {
|
|
37
|
+
let { width: a, height: o, viewBox: s, class: c, style: l, title: u, desc: d, ...f } = t, p = s || {
|
|
38
|
+
width: a,
|
|
39
|
+
height: o,
|
|
40
|
+
x: 0,
|
|
41
|
+
y: 0
|
|
42
|
+
};
|
|
43
|
+
return e("svg", n({
|
|
44
|
+
class: ["vcharts-surface", c],
|
|
45
|
+
width: a,
|
|
46
|
+
height: o,
|
|
47
|
+
style: l,
|
|
48
|
+
viewBox: `${p.x} ${p.y} ${p.width} ${p.height}`
|
|
49
|
+
}, f, i), [
|
|
50
|
+
u && e("title", null, [u]),
|
|
51
|
+
d && e("desc", null, [d]),
|
|
52
|
+
r.default?.()
|
|
53
|
+
]);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
//#endregion
|
|
58
|
+
export { r as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useAppDispatch as e } from "../state/hooks.mjs";
|
|
2
|
+
import { setChartData as t } from "../state/chartDataSlice.mjs";
|
|
3
|
+
import { defineComponent as n, onUnmounted as r, watch as i } from "vue";
|
|
4
|
+
//#region src/context/ChartDataContextProvider.ts
|
|
5
|
+
var a = n({
|
|
6
|
+
name: "ChartDataContextProvider",
|
|
7
|
+
props: { chartData: {
|
|
8
|
+
type: Array,
|
|
9
|
+
required: !0
|
|
10
|
+
} },
|
|
11
|
+
setup(n) {
|
|
12
|
+
let a = e();
|
|
13
|
+
return i(() => n.chartData, (e) => {
|
|
14
|
+
a(t(Array.from(e)));
|
|
15
|
+
}, { immediate: !0 }), r(() => {
|
|
16
|
+
a(t(void 0));
|
|
17
|
+
}), () => null;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { a as ChartDataContextProvider };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createContext as e } from "../utils/createContext.mjs";
|
|
2
|
+
import { defineComponent as t } from "vue";
|
|
3
|
+
//#region src/context/PanoramaContextProvider.ts
|
|
4
|
+
var [n, r] = e("PanoramaContext");
|
|
5
|
+
function i() {
|
|
6
|
+
return n(!1);
|
|
7
|
+
}
|
|
8
|
+
t({
|
|
9
|
+
name: "PanoramaContextProvider",
|
|
10
|
+
props: { isPanorama: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
required: !0
|
|
13
|
+
} },
|
|
14
|
+
setup(e, { slots: t }) {
|
|
15
|
+
return r(!0), () => t.default?.();
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { i as useIsPanorama };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useIsPanorama as e } from "./PanoramaContextProvider.mjs";
|
|
2
|
+
import { selectChartHeight as t, selectChartWidth as n } from "../state/selectors/containerSelectors.mjs";
|
|
3
|
+
import { selectChartOffset as r, selectChartViewBox as i } from "../state/selectors/selectChartOffset.mjs";
|
|
4
|
+
import { selectBrushDimensions as a, selectBrushSettings as o } from "../state/selectors/brushSelectors.mjs";
|
|
5
|
+
import { selectChartLayout as s } from "../state/selectors/common.mjs";
|
|
6
|
+
import { useAppSelector as c } from "../state/hooks.mjs";
|
|
7
|
+
import { selectChartOffsetInternal as l } from "../state/selectors/selectChartOffsetInternal.mjs";
|
|
8
|
+
import { computed as u } from "vue";
|
|
9
|
+
//#region src/context/chartLayoutContext.tsx
|
|
10
|
+
function d() {
|
|
11
|
+
return c(r);
|
|
12
|
+
}
|
|
13
|
+
var f = () => c(s);
|
|
14
|
+
function p() {
|
|
15
|
+
let t = e(), n = c(i), r = c(a), s = c(o);
|
|
16
|
+
return u(() => {
|
|
17
|
+
if (!t || !r.value || !s.value) return n.value;
|
|
18
|
+
let e = s.value.padding;
|
|
19
|
+
return {
|
|
20
|
+
width: r.value.width - e.left - e.right,
|
|
21
|
+
height: r.value.height - e.top - e.bottom,
|
|
22
|
+
x: e.left,
|
|
23
|
+
y: e.top
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function m() {
|
|
28
|
+
return c(n);
|
|
29
|
+
}
|
|
30
|
+
function h() {
|
|
31
|
+
return c(t);
|
|
32
|
+
}
|
|
33
|
+
function g() {
|
|
34
|
+
return c(l);
|
|
35
|
+
}
|
|
36
|
+
var _ = {
|
|
37
|
+
top: 0,
|
|
38
|
+
right: 0,
|
|
39
|
+
bottom: 0,
|
|
40
|
+
left: 0
|
|
41
|
+
};
|
|
42
|
+
function v() {
|
|
43
|
+
return c((e) => e.layout.margin ?? _);
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { h as useChartHeight, f as useChartLayout, m as useChartWidth, v as useMargin, d as useOffset, g as useOffsetInternal, p as useViewBox };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { computed as e, inject as t } from "vue";
|
|
2
|
+
//#region src/context/polarLabelViewBoxContext.ts
|
|
3
|
+
var n = Symbol("polar-label-view-box");
|
|
4
|
+
function r() {
|
|
5
|
+
return t(n, e(() => void 0));
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { n as POLAR_LABEL_VIEW_BOX_KEY, r as usePolarLabelViewBox };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { getBandSizeOfAxis as e } from "../utils/chart.mjs";
|
|
2
|
+
import { selectTooltipAxis as t, selectTooltipAxisScale as n, selectTooltipAxisTicks as r } from "../state/selectors/tooltipSelectors.mjs";
|
|
3
|
+
import { useAppSelector as i } from "../state/hooks.mjs";
|
|
4
|
+
import { computed as a } from "vue";
|
|
5
|
+
//#region src/context/useTooltipAxis.ts
|
|
6
|
+
var o = () => i(t);
|
|
7
|
+
function s() {
|
|
8
|
+
let t = o(), s = i(r), c = i(n);
|
|
9
|
+
return a(() => e({
|
|
10
|
+
...t.value,
|
|
11
|
+
scale: c.value
|
|
12
|
+
}, s.value));
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { s as useTooltipAxisBandSize };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { selectEventEmitter as e, selectSyncId as t, selectSyncMethod as n } from "../state/selectors/rootPropsSelectors.mjs";
|
|
2
|
+
import { setSyncInteraction as r } from "../state/tooltipSlice.mjs";
|
|
3
|
+
import { selectTooltipAxisTicks as i } from "../state/selectors/tooltipSelectors.mjs";
|
|
4
|
+
import { useAppDispatch as a, useAppSelector as o } from "../state/hooks.mjs";
|
|
5
|
+
import { useChartLayout as s, useViewBox as c } from "../context/chartLayoutContext.mjs";
|
|
6
|
+
import { createEventEmitter as l } from "../state/optionsSlice.mjs";
|
|
7
|
+
import { setDataStartEndIndexes as u } from "../state/chartDataSlice.mjs";
|
|
8
|
+
import { BRUSH_SYNC_EVENT as d, TOOLTIP_SYNC_EVENT as f, eventCenter as p } from "../utils/events.mjs";
|
|
9
|
+
import { onMounted as m, watch as h } from "vue";
|
|
10
|
+
//#region src/events/useChartSynchronisation.tsx
|
|
11
|
+
function g() {
|
|
12
|
+
let l = o(t), u = o(e), d = a(), m = o(n), g = o(i), _ = s(), v = c();
|
|
13
|
+
h([
|
|
14
|
+
o((e) => e.rootProps.class),
|
|
15
|
+
u,
|
|
16
|
+
l,
|
|
17
|
+
m,
|
|
18
|
+
g,
|
|
19
|
+
_,
|
|
20
|
+
v
|
|
21
|
+
], (e, t, n) => {
|
|
22
|
+
if (l.value == null) return;
|
|
23
|
+
let i = (e, t, n) => {
|
|
24
|
+
if (u.value === n || l.value !== e) return;
|
|
25
|
+
if (m.value === "index") {
|
|
26
|
+
d(t);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (g.value == null) return;
|
|
30
|
+
let i;
|
|
31
|
+
if (typeof m.value == "function") {
|
|
32
|
+
let e = {
|
|
33
|
+
activeTooltipIndex: t.payload.index == null ? void 0 : Number(t.payload.index),
|
|
34
|
+
isTooltipActive: t.payload.active,
|
|
35
|
+
activeIndex: t.payload.index == null ? void 0 : Number(t.payload.index),
|
|
36
|
+
activeLabel: t.payload.label,
|
|
37
|
+
activeDataKey: t.payload.dataKey,
|
|
38
|
+
activeCoordinate: t.payload.coordinate
|
|
39
|
+
}, n = m.value(g.value, e);
|
|
40
|
+
i = g.value[n];
|
|
41
|
+
} else m.value === "value" && (i = g.value.find((e) => String(e.value) === t.payload.label));
|
|
42
|
+
if (i == null || t.payload.active === !1) {
|
|
43
|
+
d(r({
|
|
44
|
+
active: !1,
|
|
45
|
+
coordinate: void 0,
|
|
46
|
+
dataKey: void 0,
|
|
47
|
+
index: null,
|
|
48
|
+
label: void 0
|
|
49
|
+
}));
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
let { x: a, y: o } = t.payload.coordinate, s = Math.min(a, v.value?.x + v.value?.width), c = Math.min(o, v.value?.y + v.value?.height), f = {
|
|
53
|
+
x: _.value === "horizontal" ? i.coordinate : s,
|
|
54
|
+
y: _.value === "horizontal" ? c : i.coordinate
|
|
55
|
+
};
|
|
56
|
+
d(r({
|
|
57
|
+
active: t.payload.active,
|
|
58
|
+
coordinate: f,
|
|
59
|
+
dataKey: t.payload.dataKey,
|
|
60
|
+
index: String(i.index),
|
|
61
|
+
label: t.payload.label
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
64
|
+
p.on(f, i), n(() => {
|
|
65
|
+
p.off(f, i);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function _() {
|
|
70
|
+
let n = o(t), r = o(e), i = a();
|
|
71
|
+
h([n, r], (e, t, a) => {
|
|
72
|
+
if (n == null) return;
|
|
73
|
+
let o = (e, t, a) => {
|
|
74
|
+
r.value !== a && n.value === e && i(u(t));
|
|
75
|
+
};
|
|
76
|
+
p.on(d, o), a(() => {
|
|
77
|
+
p.off(d, o);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function v() {
|
|
82
|
+
let e = a();
|
|
83
|
+
m(() => {
|
|
84
|
+
e(l());
|
|
85
|
+
}), g(), _();
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
export { v as useSynchronisedEventsFromOtherCharts };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { useIsPanorama as e } from "../context/PanoramaContextProvider.mjs";
|
|
2
|
+
import { getTooltipNameProp as t } from "../utils/chart.mjs";
|
|
3
|
+
import { SetCartesianGraphicalItem as n } from "../state/SetGraphicalItem.mjs";
|
|
4
|
+
import { SetLegendPayload as r } from "../state/SetLegendPayload.mjs";
|
|
5
|
+
import { SetTooltipEntrySettings as i } from "../state/SetTooltipEntrySettings.mjs";
|
|
6
|
+
import { computed as a, useAttrs as o } from "vue";
|
|
7
|
+
//#region src/hooks/useSetupGraphicalItem.ts
|
|
8
|
+
function s(e, t) {
|
|
9
|
+
return e && e !== "none" ? e : t;
|
|
10
|
+
}
|
|
11
|
+
function c(e, t, n) {
|
|
12
|
+
return e === "bar" ? n : s(t, n);
|
|
13
|
+
}
|
|
14
|
+
function l(s, l, d) {
|
|
15
|
+
let f = o(), p = e(), m = a(() => [{
|
|
16
|
+
inactive: s.hide,
|
|
17
|
+
dataKey: s.dataKey,
|
|
18
|
+
type: s.legendType,
|
|
19
|
+
color: c(l, f.stroke ?? s.stroke, f.fill ?? s.fill),
|
|
20
|
+
value: t(s.name, s.dataKey),
|
|
21
|
+
payload: { ...s }
|
|
22
|
+
}]);
|
|
23
|
+
n(a(() => ({
|
|
24
|
+
...s,
|
|
25
|
+
isPanorama: p,
|
|
26
|
+
type: l,
|
|
27
|
+
errorBars: d?.errorBars?.value
|
|
28
|
+
}))), r(m), d?.skipTooltip || i({
|
|
29
|
+
fn: u,
|
|
30
|
+
args: a(() => ({
|
|
31
|
+
...s,
|
|
32
|
+
...f,
|
|
33
|
+
_itemType: l
|
|
34
|
+
}))
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function u(e) {
|
|
38
|
+
let { dataKey: n, data: r, stroke: i, fill: a, name: o, hide: s, unit: l, _itemType: u } = e;
|
|
39
|
+
return {
|
|
40
|
+
dataDefinedOnItem: r,
|
|
41
|
+
positions: void 0,
|
|
42
|
+
settings: {
|
|
43
|
+
stroke: i,
|
|
44
|
+
strokeWidth: e["stroke-width"],
|
|
45
|
+
fill: a,
|
|
46
|
+
dataKey: n,
|
|
47
|
+
nameKey: void 0,
|
|
48
|
+
name: t(o, n),
|
|
49
|
+
hide: s,
|
|
50
|
+
type: e.tooltipType,
|
|
51
|
+
color: c(u, i, a),
|
|
52
|
+
unit: l
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { l as useSetupGraphicalItem };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Curve as e, CurveVueProps as t, getPath as n } from "./shape/Curve.mjs";
|
|
2
|
+
import { Dot as r } from "./shape/Dot.mjs";
|
|
3
|
+
import { Label as i } from "./components/label/Label.mjs";
|
|
4
|
+
import { LabelList as a } from "./components/label/LabelList.mjs";
|
|
5
|
+
import { Area as o } from "./cartesian/area/Area.mjs";
|
|
6
|
+
import { CartesianAxis as s } from "./cartesian/cartesian-axis/CartesianAxis.mjs";
|
|
7
|
+
import { XAxis as c } from "./cartesian/axis/XAxis.mjs";
|
|
8
|
+
import { YAxis as l } from "./cartesian/axis/YAxis.mjs";
|
|
9
|
+
import { Rectangle as u } from "./shape/Rectangle.mjs";
|
|
10
|
+
import { createErrorBarRegistry as d, provideErrorBarContext as f, provideErrorBarRegistry as p, useErrorBarContext as m, useErrorBarRegistry as h } from "./cartesian/error-bar/ErrorBarContext.mjs";
|
|
11
|
+
import { Cell as g } from "./components/Cell.mjs";
|
|
12
|
+
import { Bar as _ } from "./cartesian/bar/Bar.mjs";
|
|
13
|
+
import { CartesianGrid as v } from "./cartesian/cartesian-grid/CartesianGrid.mjs";
|
|
14
|
+
import { ErrorBar as y, ErrorBarVueProps as b } from "./cartesian/error-bar/ErrorBar.mjs";
|
|
15
|
+
import { LineContextKey as x, provideLineContext as S, useLine as C, useLineContext as w } from "./cartesian/line/hooks/useLine.mjs";
|
|
16
|
+
import { Line as T } from "./cartesian/line/Line.mjs";
|
|
17
|
+
import { ReferenceArea as E } from "./cartesian/reference-area/ReferenceArea.mjs";
|
|
18
|
+
import { ReferenceLine as D } from "./cartesian/reference-line/ReferenceLine.mjs";
|
|
19
|
+
import { Symbols as O } from "./shape/Symbols.mjs";
|
|
20
|
+
import { Scatter as k } from "./cartesian/scatter/Scatter.mjs";
|
|
21
|
+
import { ZAxis as A } from "./cartesian/z-axis/ZAxis.mjs";
|
|
22
|
+
import { AreaChart as j } from "./chart/AreaChart.mjs";
|
|
23
|
+
import { BarChart as M } from "./chart/BarChart.mjs";
|
|
24
|
+
import { ComposedChart as N } from "./chart/ComposedChart.mjs";
|
|
25
|
+
import { LineChart as P } from "./chart/LineChart.mjs";
|
|
26
|
+
import { PieChart as F } from "./chart/PieChart.mjs";
|
|
27
|
+
import { RadarChart as I } from "./chart/RadarChart.mjs";
|
|
28
|
+
import { ScatterChart as L } from "./chart/ScatterChart.mjs";
|
|
29
|
+
import { RadialBarChart as R } from "./chart/RadialBarChart.mjs";
|
|
30
|
+
import z from "./container/ResponsiveContainer.mjs";
|
|
31
|
+
import B from "./components/legend/Legend.mjs";
|
|
32
|
+
import { Cross as V } from "./shape/Cross.mjs";
|
|
33
|
+
import { Sector as H } from "./shape/Sector.mjs";
|
|
34
|
+
import U, { getUniqPayload as W } from "./components/Tooltip.mjs";
|
|
35
|
+
import { PieVueProps as G } from "./polar/pie/type.mjs";
|
|
36
|
+
import { Pie as K } from "./polar/pie/Pie.mjs";
|
|
37
|
+
import { Radar as q } from "./polar/radar/Radar.mjs";
|
|
38
|
+
import { PolarGrid as J } from "./polar/radar/PolarGrid.mjs";
|
|
39
|
+
import { PolarAngleAxis as Y } from "./polar/radar/PolarAngleAxis.mjs";
|
|
40
|
+
import { PolarRadiusAxis as X } from "./polar/radar/PolarRadiusAxis.mjs";
|
|
41
|
+
import { RadialBar as Z } from "./polar/radial-bar/RadialBar.mjs";
|
|
42
|
+
export { o as Area, j as AreaChart, _ as Bar, M as BarChart, s as CartesianAxis, v as CartesianGrid, g as Cell, N as ComposedChart, V as Cross, e as Curve, t as CurveVueProps, r as Dot, y as ErrorBar, b as ErrorBarVueProps, i as Label, a as LabelList, B as Legend, T as Line, P as LineChart, x as LineContextKey, K as Pie, F as PieChart, G as PieVueProps, Y as PolarAngleAxis, J as PolarGrid, X as PolarRadiusAxis, q as Radar, I as RadarChart, Z as RadialBar, R as RadialBarChart, u as Rectangle, E as ReferenceArea, D as ReferenceLine, z as ResponsiveContainer, k as Scatter, L as ScatterChart, H as Sector, O as Symbols, U as Tooltip, c as XAxis, l as YAxis, A as ZAxis, d as createErrorBarRegistry, n as getPath, W as getUniqPayload, f as provideErrorBarContext, p as provideErrorBarRegistry, S as provideLineContext, m as useErrorBarContext, h as useErrorBarRegistry, C as useLine, w as useLineContext };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { selectChartOffset as e } from "../../state/selectors/selectChartOffset.mjs";
|
|
2
|
+
import { polarToCartesian as t } from "../../utils/polar.mjs";
|
|
3
|
+
import { mouseLeaveItem as n, setActiveMouseOverItemIndex as r } from "../../state/tooltipSlice.mjs";
|
|
4
|
+
import { useAppDispatch as i, useAppSelector as a } from "../../state/hooks.mjs";
|
|
5
|
+
import { Layer as o } from "../../container/Layer.mjs";
|
|
6
|
+
import { Animate as s } from "../../animation/Animate.mjs";
|
|
7
|
+
import { SetPolarGraphicalItem as c } from "../../state/SetGraphicalItem.mjs";
|
|
8
|
+
import { SetLegendPayload as l } from "../../state/SetLegendPayload.mjs";
|
|
9
|
+
import { SetTooltipEntrySettings as u } from "../../state/SetTooltipEntrySettings.mjs";
|
|
10
|
+
import { Sector as d } from "../../shape/Sector.mjs";
|
|
11
|
+
import { computePieSectors as f, selectDisplayedData as p, selectPieLegend as m, selectSynchronisedPieSettings as h } from "../../state/selectors/pieSelectors.mjs";
|
|
12
|
+
import { PieVueProps as g } from "./type.mjs";
|
|
13
|
+
import { computed as _, createVNode as v, defineComponent as y, mergeProps as b, ref as x, watch as S } from "vue";
|
|
14
|
+
//#region src/polar/pie/Pie.tsx
|
|
15
|
+
var C = 20, w = /* @__PURE__ */ y({
|
|
16
|
+
name: "Pie",
|
|
17
|
+
props: g,
|
|
18
|
+
inheritAttrs: !1,
|
|
19
|
+
slots: Object,
|
|
20
|
+
setup(g, { attrs: y, slots: w }) {
|
|
21
|
+
let T = i(), E = _(() => g.activeIndex !== -1), D = x(g.activeIndex);
|
|
22
|
+
S(() => g.activeIndex, (e) => {
|
|
23
|
+
D.value = e;
|
|
24
|
+
});
|
|
25
|
+
let O = _(() => ({
|
|
26
|
+
data: g.data,
|
|
27
|
+
dataKey: g.dataKey,
|
|
28
|
+
nameKey: g.nameKey,
|
|
29
|
+
cx: g.cx,
|
|
30
|
+
cy: g.cy,
|
|
31
|
+
innerRadius: g.innerRadius,
|
|
32
|
+
outerRadius: g.outerRadius,
|
|
33
|
+
startAngle: g.startAngle,
|
|
34
|
+
endAngle: g.endAngle,
|
|
35
|
+
paddingAngle: g.paddingAngle,
|
|
36
|
+
minAngle: g.minAngle,
|
|
37
|
+
fill: g.fill,
|
|
38
|
+
legendType: g.legendType,
|
|
39
|
+
tooltipType: g.tooltipType,
|
|
40
|
+
presentationProps: {}
|
|
41
|
+
}));
|
|
42
|
+
c(_(() => ({
|
|
43
|
+
type: "pie",
|
|
44
|
+
data: g.data ?? [],
|
|
45
|
+
dataKey: g.dataKey,
|
|
46
|
+
hide: g.hide,
|
|
47
|
+
angleAxisId: 0,
|
|
48
|
+
radiusAxisId: 0
|
|
49
|
+
})));
|
|
50
|
+
let k = a((e) => p(e, O.value)), A = a((e) => h(e, O.value)), j = a((t) => e(t)), M = a((e) => m(e, O.value));
|
|
51
|
+
l(_(() => M.value ?? []));
|
|
52
|
+
let N = _(() => {
|
|
53
|
+
if (!(A.value == null || k.value == null)) return f({
|
|
54
|
+
offset: j.value,
|
|
55
|
+
pieSettings: O.value,
|
|
56
|
+
displayedData: k.value
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
u({
|
|
60
|
+
fn: (e) => e,
|
|
61
|
+
args: _(() => ({
|
|
62
|
+
dataDefinedOnItem: k.value ?? [],
|
|
63
|
+
positions: N.value?.map((e) => e.tooltipPosition),
|
|
64
|
+
settings: {
|
|
65
|
+
dataKey: g.dataKey,
|
|
66
|
+
nameKey: g.nameKey,
|
|
67
|
+
name: String(g.dataKey ?? ""),
|
|
68
|
+
hide: g.hide,
|
|
69
|
+
type: g.tooltipType,
|
|
70
|
+
color: g.fill,
|
|
71
|
+
fill: g.fill,
|
|
72
|
+
stroke: g.stroke,
|
|
73
|
+
unit: ""
|
|
74
|
+
}
|
|
75
|
+
}))
|
|
76
|
+
});
|
|
77
|
+
function P(e, t) {
|
|
78
|
+
E.value || (D.value = t), T(r({
|
|
79
|
+
activeIndex: String(t),
|
|
80
|
+
activeDataKey: g.dataKey,
|
|
81
|
+
activeCoordinate: e.tooltipPosition
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
function F() {
|
|
85
|
+
E.value || (D.value = -1), T(n());
|
|
86
|
+
}
|
|
87
|
+
function I(e, n) {
|
|
88
|
+
let r = t(e.cx, e.cy, e.outerRadius, e.midAngle), i = t(e.cx, e.cy, e.outerRadius + C, e.midAngle), a = i.x > e.cx ? "start" : i.x < e.cx ? "end" : "middle";
|
|
89
|
+
return v("g", { key: `label-${n}` }, [v("line", {
|
|
90
|
+
x1: r.x,
|
|
91
|
+
y1: r.y,
|
|
92
|
+
x2: i.x,
|
|
93
|
+
y2: i.y,
|
|
94
|
+
stroke: e.fill,
|
|
95
|
+
fill: "none"
|
|
96
|
+
}, null), v("text", {
|
|
97
|
+
x: i.x,
|
|
98
|
+
y: i.y,
|
|
99
|
+
"text-anchor": a,
|
|
100
|
+
"dominant-baseline": "middle",
|
|
101
|
+
fill: e.fill
|
|
102
|
+
}, [String(e.value)])]);
|
|
103
|
+
}
|
|
104
|
+
return () => {
|
|
105
|
+
let e = N.value;
|
|
106
|
+
if (!e || e.length === 0) return null;
|
|
107
|
+
let t = y.stroke ?? g.stroke;
|
|
108
|
+
return v(o, { class: ["v-charts-pie", g.className] }, { default: () => [v(s, {
|
|
109
|
+
isActive: g.isAnimationActive,
|
|
110
|
+
from: 0,
|
|
111
|
+
to: 1,
|
|
112
|
+
transition: { duration: 1.5 }
|
|
113
|
+
}, { default: (n) => {
|
|
114
|
+
let r = e[0]?.startAngle ?? 0, i = e.map((e, i) => {
|
|
115
|
+
let a = i > 0 ? e.paddingAngle : 0, o = (e.endAngle - e.startAngle) * n, s = r + a, c = r + o + a;
|
|
116
|
+
r = c;
|
|
117
|
+
let l = w.shape ? w.shape({
|
|
118
|
+
...e,
|
|
119
|
+
startAngle: s,
|
|
120
|
+
endAngle: c,
|
|
121
|
+
stroke: t,
|
|
122
|
+
isActive: D.value === i
|
|
123
|
+
}) : v(d, b(y, {
|
|
124
|
+
cx: e.cx,
|
|
125
|
+
cy: e.cy,
|
|
126
|
+
innerRadius: e.innerRadius,
|
|
127
|
+
outerRadius: e.outerRadius,
|
|
128
|
+
startAngle: s,
|
|
129
|
+
endAngle: c,
|
|
130
|
+
fill: e.fill,
|
|
131
|
+
stroke: t
|
|
132
|
+
}), null);
|
|
133
|
+
return v("g", {
|
|
134
|
+
key: `sector-${i}`,
|
|
135
|
+
onMouseenter: () => P(e, i),
|
|
136
|
+
onMouseleave: F
|
|
137
|
+
}, [l]);
|
|
138
|
+
});
|
|
139
|
+
return n >= 1 && g.label && i.push(...e.map(I)), i;
|
|
140
|
+
} })] });
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
//#endregion
|
|
145
|
+
export { w as Pie };
|