vccs 0.0.1 → 0.2.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/Funnel.d.ts +2 -0
- package/dist/cartesian/funnel/index.d.ts +2 -0
- package/dist/cartesian/funnel/type.d.ts +106 -0
- package/dist/cartesian/funnel/utils.d.ts +12 -0
- package/dist/cartesian/index.d.ts +12 -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/FunnelChart.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 +9 -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 +89 -0
- package/dist/es/cartesian/GraphicalItemClipPath.mjs +37 -0
- package/dist/es/cartesian/area/ActivePoints.mjs +78 -0
- package/dist/es/cartesian/area/Area.mjs +52 -0
- package/dist/es/cartesian/area/ClipRect.mjs +125 -0
- package/dist/es/cartesian/area/RenderArea.mjs +185 -0
- package/dist/es/cartesian/area/hooks/useArea.mjs +81 -0
- package/dist/es/cartesian/area/type.mjs +136 -0
- package/dist/es/cartesian/area/utils.mjs +79 -0
- package/dist/es/cartesian/axis/XAxis.mjs +203 -0
- package/dist/es/cartesian/axis/YAxis.mjs +192 -0
- package/dist/es/cartesian/bar/Bar.mjs +111 -0
- package/dist/es/cartesian/bar/components/BarBackground.mjs +32 -0
- package/dist/es/cartesian/bar/components/BarRectangles.mjs +143 -0
- package/dist/es/cartesian/bar/hooks/useBar.mjs +53 -0
- package/dist/es/cartesian/bar/type.mjs +131 -0
- package/dist/es/cartesian/bar/utils.mjs +111 -0
- package/dist/es/cartesian/cartesian-axis/CartesianAxis.mjs +296 -0
- package/dist/es/cartesian/cartesian-grid/Background.mjs +33 -0
- package/dist/es/cartesian/cartesian-grid/CartesianGrid.mjs +174 -0
- package/dist/es/cartesian/cartesian-grid/HorizontalGridLines.mjs +50 -0
- package/dist/es/cartesian/cartesian-grid/HorizontalStripes.mjs +43 -0
- package/dist/es/cartesian/cartesian-grid/VerticalGridLines.mjs +45 -0
- package/dist/es/cartesian/cartesian-grid/VerticalStripes.mjs +43 -0
- package/dist/es/cartesian/cartesian-grid/const.mjs +336 -0
- package/dist/es/cartesian/cartesian-grid/utils.mjs +22 -0
- package/dist/es/cartesian/error-bar/ErrorBar.mjs +143 -0
- package/dist/es/cartesian/error-bar/ErrorBarContext.mjs +20 -0
- package/dist/es/cartesian/funnel/Funnel.mjs +177 -0
- package/dist/es/cartesian/funnel/type.mjs +80 -0
- package/dist/es/cartesian/funnel/utils.mjs +102 -0
- package/dist/es/cartesian/line/ActivePoints.mjs +79 -0
- package/dist/es/cartesian/line/Line.mjs +50 -0
- package/dist/es/cartesian/line/StaticLine.mjs +217 -0
- package/dist/es/cartesian/line/hooks/useLine.mjs +69 -0
- package/dist/es/cartesian/line/type.mjs +112 -0
- package/dist/es/cartesian/line/utils.mjs +34 -0
- package/dist/es/cartesian/reference-area/ReferenceArea.mjs +163 -0
- package/dist/es/cartesian/reference-line/ReferenceLine.mjs +165 -0
- package/dist/es/cartesian/scatter/Scatter.mjs +280 -0
- package/dist/es/cartesian/scatter/hooks/useScatter.mjs +23 -0
- package/dist/es/cartesian/useNeedsClip.mjs +23 -0
- package/dist/es/cartesian/utils/get-ticks.mjs +118 -0
- package/dist/es/cartesian/z-axis/ZAxis.mjs +72 -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/FunnelChart.mjs +11 -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 +160 -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 +72 -0
- package/dist/es/chart/TooltipPortalContext.mjs +5 -0
- package/dist/es/chart/const.mjs +7 -0
- package/dist/es/chart/generateCategoricalChart.mjs +175 -0
- package/dist/es/chart/provideClipPathId.mjs +15 -0
- package/dist/es/components/Cell.mjs +23 -0
- package/dist/es/components/Text.mjs +5 -0
- package/dist/es/components/Text.vue_vue_type_script_setup_true_lang.mjs +191 -0
- package/dist/es/components/Tooltip.mjs +463 -0
- package/dist/es/components/label/Label.mjs +40 -0
- package/dist/es/components/label/LabelList.mjs +55 -0
- package/dist/es/components/label/types.mjs +38 -0
- package/dist/es/components/label/utils.mjs +265 -0
- package/dist/es/components/legend/Legend.mjs +93 -0
- package/dist/es/components/legend/LegendSymbol.mjs +62 -0
- package/dist/es/components/legend/hooks/useLegend.mjs +72 -0
- package/dist/es/components/legend/hooks/useLegendContent.mjs +68 -0
- package/dist/es/components/legend/type.mjs +41 -0
- package/dist/es/components/legend/utils.mjs +25 -0
- package/dist/es/components/utils.mjs +44 -0
- package/dist/es/container/ClipPath.mjs +25 -0
- package/dist/es/container/Layer.mjs +14 -0
- package/dist/es/container/ResponsiveContainer.mjs +5 -0
- package/dist/es/container/ResponsiveContainer.vue_vue_type_script_setup_true_lang.mjs +144 -0
- package/dist/es/container/Surface.mjs +62 -0
- package/dist/es/container/useSizeContext.mjs +5 -0
- package/dist/es/context/ChartDataContextProvider.mjs +27 -0
- package/dist/es/context/PanoramaContextProvider.mjs +24 -0
- package/dist/es/context/accessibilityContext.mjs +5 -0
- package/dist/es/context/cartesianLabelListContext.mjs +5 -0
- package/dist/es/context/chartLayoutContext.mjs +49 -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 +17 -0
- package/dist/es/events/useChartSynchronisation.mjs +113 -0
- package/dist/es/hooks/useIsAnimating.mjs +28 -0
- package/dist/es/hooks/useSetupGraphicalItem.mjs +66 -0
- package/dist/es/index.mjs +46 -0
- package/dist/es/polar/pie/Pie.mjs +161 -0
- package/dist/es/polar/pie/type.mjs +97 -0
- package/dist/es/polar/radar/PolarAngleAxis.mjs +180 -0
- package/dist/es/polar/radar/PolarGrid.mjs +115 -0
- package/dist/es/polar/radar/PolarRadiusAxis.mjs +162 -0
- package/dist/es/polar/radar/Radar.mjs +284 -0
- package/dist/es/polar/radial-bar/RadialBar.mjs +197 -0
- package/dist/es/polar/radial-bar/type.mjs +97 -0
- package/dist/es/shape/Cross.mjs +16 -0
- package/dist/es/shape/Curve.mjs +86 -0
- package/dist/es/shape/Dot.mjs +24 -0
- package/dist/es/shape/Rectangle.mjs +83 -0
- package/dist/es/shape/Sector.mjs +156 -0
- package/dist/es/shape/Symbols.mjs +52 -0
- package/dist/es/shape/Trapezoid.mjs +52 -0
- package/dist/es/state/ReportChartProps.mjs +64 -0
- package/dist/es/state/ReportMainChartProps.mjs +46 -0
- package/dist/es/state/ReportPolarOptions.mjs +56 -0
- package/dist/es/state/SetGraphicalItem.mjs +49 -0
- package/dist/es/state/SetLegendPayload.mjs +20 -0
- package/dist/es/state/SetTooltipEntrySettings.mjs +19 -0
- package/dist/es/state/brushSlice.mjs +26 -0
- package/dist/es/state/cartesianAxisSlice.mjs +39 -0
- package/dist/es/state/chartDataSlice.mjs +33 -0
- package/dist/es/state/externalEventsMiddleware.mjs +30 -0
- package/dist/es/state/graphicalItemsSlice.mjs +47 -0
- package/dist/es/state/hooks.mjs +6 -0
- package/dist/es/state/keyboardEventsMiddleware.mjs +63 -0
- package/dist/es/state/layoutSlice.mjs +39 -0
- package/dist/es/state/legendSlice.mjs +40 -0
- package/dist/es/state/mouseEventsMiddleware.mjs +41 -0
- package/dist/es/state/optionsSlice.mjs +25 -0
- package/dist/es/state/polarAxisSlice.mjs +28 -0
- package/dist/es/state/polarOptionsSlice.mjs +13 -0
- package/dist/es/state/reduxDevtoolsJsonStringifyReplacer.mjs +8 -0
- package/dist/es/state/referenceElementsSlice.mjs +36 -0
- package/dist/es/state/rootPropsSlice.mjs +32 -0
- package/dist/es/state/selectors/areaSelectors.mjs +77 -0
- package/dist/es/state/selectors/axisSelectors.mjs +879 -0
- package/dist/es/state/selectors/barSelectors.mjs +241 -0
- package/dist/es/state/selectors/brushSelectors.mjs +18 -0
- package/dist/es/state/selectors/combiners/combineActiveLabel.mjs +9 -0
- package/dist/es/state/selectors/combiners/combineActiveTooltipIndex.mjs +43 -0
- package/dist/es/state/selectors/combiners/combineAxisRangeWithReverse.mjs +8 -0
- package/dist/es/state/selectors/combiners/combineCoordinateForDefaultIndex.mjs +21 -0
- package/dist/es/state/selectors/combiners/combineTooltipInteractionState.mjs +37 -0
- package/dist/es/state/selectors/combiners/combineTooltipPayloadConfigurations.mjs +13 -0
- package/dist/es/state/selectors/common.mjs +4 -0
- package/dist/es/state/selectors/containerSelectors.mjs +7 -0
- package/dist/es/state/selectors/dataSelectors.mjs +35 -0
- package/dist/es/state/selectors/funnelSelectors.mjs +38 -0
- package/dist/es/state/selectors/legendSelectors.mjs +10 -0
- package/dist/es/state/selectors/lineSelectors.mjs +64 -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 +132 -0
- package/dist/es/state/selectors/polarAxisSelectors.mjs +167 -0
- package/dist/es/state/selectors/polarGridSelectors.mjs +19 -0
- package/dist/es/state/selectors/polarScaleSelectors.mjs +55 -0
- package/dist/es/state/selectors/polarSelectors.mjs +81 -0
- package/dist/es/state/selectors/radarSelectors.mjs +133 -0
- package/dist/es/state/selectors/radialBarSelectors.mjs +259 -0
- package/dist/es/state/selectors/rootPropsSelectors.mjs +14 -0
- package/dist/es/state/selectors/scatterSelectors.mjs +134 -0
- package/dist/es/state/selectors/selectActivePropsFromChartPointer.mjs +20 -0
- package/dist/es/state/selectors/selectAllAxes.mjs +10 -0
- package/dist/es/state/selectors/selectChartOffset.mjs +69 -0
- package/dist/es/state/selectors/selectChartOffsetInternal.mjs +66 -0
- package/dist/es/state/selectors/selectTooltipEventType.mjs +22 -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 +104 -0
- package/dist/es/state/selectors/tooltipSelectors.mjs +269 -0
- package/dist/es/state/selectors/touchSelectors.mjs +19 -0
- package/dist/es/state/store.mjs +55 -0
- package/dist/es/state/tooltipSlice.mjs +102 -0
- package/dist/es/state/touchEventsMiddleware.mjs +44 -0
- package/dist/es/state/utils/useReportScale.mjs +19 -0
- package/dist/es/synchronisation/syncSelectors.mjs +6 -0
- package/dist/es/synchronisation/useChartSynchronisation.mjs +38 -0
- package/dist/es/types/event.mjs +166 -0
- package/dist/es/utils/ReduceCSSCalc.mjs +114 -0
- package/dist/es/utils/VueUtils.mjs +39 -0
- package/dist/es/utils/attrs.mjs +69 -0
- package/dist/es/utils/cartesian.mjs +54 -0
- package/dist/es/utils/chart.mjs +366 -0
- package/dist/es/utils/const.mjs +32 -0
- package/dist/es/utils/createContext.mjs +31 -0
- package/dist/es/utils/data-utils.mjs +13 -0
- package/dist/es/utils/data.mjs +41 -0
- package/dist/es/utils/events.mjs +7 -0
- package/dist/es/utils/getLinearRegression.mjs +34 -0
- package/dist/es/utils/grid.mjs +23 -0
- package/dist/es/utils/isDomainSpecifiedByUser.mjs +116 -0
- package/dist/es/utils/legend.mjs +19 -0
- package/dist/es/utils/log.mjs +14 -0
- package/dist/es/utils/payload/getUniqPayload.mjs +9 -0
- package/dist/es/utils/polar.mjs +59 -0
- package/dist/es/utils/props.mjs +20 -0
- package/dist/es/utils/resolveDefaultProps.mjs +26 -0
- package/dist/es/utils/scale/getNiceTickValues.mjs +137 -0
- package/dist/es/utils/scale/utils/arithmetic.mjs +54 -0
- package/dist/es/utils/scale/utils/utils.mjs +53 -0
- package/dist/es/utils/style.mjs +30 -0
- package/dist/es/utils/tick.mjs +42 -0
- package/dist/es/utils/tooltip/translate.mjs +73 -0
- package/dist/es/utils/validate.mjs +42 -0
- package/dist/events/useChartSynchronisation.d.ts +8 -0
- package/dist/hooks/useIsAnimating.d.ts +14 -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/Trapezoid.d.ts +31 -0
- package/dist/shape/index.d.ts +9 -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,250 @@
|
|
|
1
|
+
import { PropType, SlotsType } from 'vue';
|
|
2
|
+
import { TooltipIndex, TooltipPayload, TooltipPayloadEntry } from '../state/tooltipSlice';
|
|
3
|
+
import { AxisId } from '../state/cartesianAxisSlice';
|
|
4
|
+
import { ChartCoordinate, Coordinate } from '../types';
|
|
5
|
+
import { TooltipTrigger } from '../types/tooltip';
|
|
6
|
+
export type ContentType = any | ((props: TooltipContentProps) => any);
|
|
7
|
+
export type TooltipContentProps = {
|
|
8
|
+
label?: string | number;
|
|
9
|
+
payload: TooltipPayload;
|
|
10
|
+
coordinate?: ChartCoordinate;
|
|
11
|
+
active: boolean;
|
|
12
|
+
accessibilityLayer: boolean;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
15
|
+
type AllowInDimension = {
|
|
16
|
+
x: boolean;
|
|
17
|
+
y: boolean;
|
|
18
|
+
};
|
|
19
|
+
type UniqueFunc<T> = (entry: T) => unknown;
|
|
20
|
+
export type UniqueOption<T> = boolean | UniqueFunc<T>;
|
|
21
|
+
export declare function getUniqPayload<T>(payload: ReadonlyArray<T>, option: UniqueOption<T>, defaultUniqBy: UniqueFunc<T>): ReadonlyArray<T>;
|
|
22
|
+
export declare const Tooltip: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
23
|
+
/**
|
|
24
|
+
* If true, then Tooltip is always displayed, once an activeIndex is set by mouse over, or programmatically.
|
|
25
|
+
* If false, then Tooltip is never displayed.
|
|
26
|
+
* If active is undefined, Recharts will control when the Tooltip displays.
|
|
27
|
+
*/
|
|
28
|
+
readonly active: {
|
|
29
|
+
readonly type: BooleanConstructor;
|
|
30
|
+
readonly default: any;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* If true, then Tooltip will show information about hidden series (defaults to false).
|
|
34
|
+
*/
|
|
35
|
+
readonly includeHidden: BooleanConstructor;
|
|
36
|
+
readonly allowEscapeViewBox: {
|
|
37
|
+
readonly type: PropType<AllowInDimension>;
|
|
38
|
+
readonly default: () => {
|
|
39
|
+
x: boolean;
|
|
40
|
+
y: boolean;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
readonly content: PropType<ContentType>;
|
|
44
|
+
readonly cursor: {
|
|
45
|
+
readonly type: PropType<boolean | object>;
|
|
46
|
+
readonly default: true;
|
|
47
|
+
};
|
|
48
|
+
readonly filterNull: {
|
|
49
|
+
readonly type: BooleanConstructor;
|
|
50
|
+
readonly default: true;
|
|
51
|
+
};
|
|
52
|
+
readonly defaultIndex: PropType<number | TooltipIndex>;
|
|
53
|
+
readonly isAnimationActive: {
|
|
54
|
+
readonly type: BooleanConstructor;
|
|
55
|
+
readonly default: true;
|
|
56
|
+
};
|
|
57
|
+
readonly offset: {
|
|
58
|
+
readonly type: NumberConstructor;
|
|
59
|
+
readonly default: 10;
|
|
60
|
+
};
|
|
61
|
+
readonly payloadUniqBy: PropType<UniqueOption<TooltipPayloadEntry>>;
|
|
62
|
+
/**
|
|
63
|
+
* If portal is defined, then Tooltip will use this element as a target for rendering using Teleport
|
|
64
|
+
*/
|
|
65
|
+
readonly portal: {
|
|
66
|
+
readonly type: PropType<HTMLElement | null>;
|
|
67
|
+
readonly default: any;
|
|
68
|
+
};
|
|
69
|
+
readonly position: PropType<Partial<Coordinate>>;
|
|
70
|
+
readonly reverseDirection: {
|
|
71
|
+
readonly type: PropType<AllowInDimension>;
|
|
72
|
+
readonly default: () => {
|
|
73
|
+
x: boolean;
|
|
74
|
+
y: boolean;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* If true, tooltip will appear on top of all bars on an axis tick.
|
|
79
|
+
* If false, tooltip will appear on individual bars.
|
|
80
|
+
*/
|
|
81
|
+
readonly shared: {
|
|
82
|
+
readonly type: PropType<boolean | undefined>;
|
|
83
|
+
readonly default: any;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* If `hover` then the Tooltip shows on mouse enter and hides on mouse leave.
|
|
87
|
+
* If `click` then the Tooltip shows after clicking and stays active.
|
|
88
|
+
*/
|
|
89
|
+
readonly trigger: {
|
|
90
|
+
readonly type: PropType<TooltipTrigger>;
|
|
91
|
+
readonly default: "hover";
|
|
92
|
+
};
|
|
93
|
+
readonly style: {
|
|
94
|
+
readonly type: ObjectConstructor;
|
|
95
|
+
readonly default: () => {};
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Tooltip axis ID
|
|
99
|
+
*/
|
|
100
|
+
readonly axisId: {
|
|
101
|
+
readonly type: PropType<AxisId>;
|
|
102
|
+
readonly default: 0;
|
|
103
|
+
};
|
|
104
|
+
readonly contentStyle: {
|
|
105
|
+
readonly type: ObjectConstructor;
|
|
106
|
+
readonly default: () => {};
|
|
107
|
+
};
|
|
108
|
+
readonly itemStyle: {
|
|
109
|
+
readonly type: ObjectConstructor;
|
|
110
|
+
readonly default: () => {};
|
|
111
|
+
};
|
|
112
|
+
readonly labelStyle: {
|
|
113
|
+
readonly type: ObjectConstructor;
|
|
114
|
+
readonly default: () => {};
|
|
115
|
+
};
|
|
116
|
+
readonly itemSorter: {
|
|
117
|
+
readonly type: StringConstructor;
|
|
118
|
+
readonly default: "name";
|
|
119
|
+
};
|
|
120
|
+
readonly separator: {
|
|
121
|
+
readonly type: StringConstructor;
|
|
122
|
+
readonly default: " : ";
|
|
123
|
+
};
|
|
124
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
125
|
+
/**
|
|
126
|
+
* If true, then Tooltip is always displayed, once an activeIndex is set by mouse over, or programmatically.
|
|
127
|
+
* If false, then Tooltip is never displayed.
|
|
128
|
+
* If active is undefined, Recharts will control when the Tooltip displays.
|
|
129
|
+
*/
|
|
130
|
+
readonly active: {
|
|
131
|
+
readonly type: BooleanConstructor;
|
|
132
|
+
readonly default: any;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* If true, then Tooltip will show information about hidden series (defaults to false).
|
|
136
|
+
*/
|
|
137
|
+
readonly includeHidden: BooleanConstructor;
|
|
138
|
+
readonly allowEscapeViewBox: {
|
|
139
|
+
readonly type: PropType<AllowInDimension>;
|
|
140
|
+
readonly default: () => {
|
|
141
|
+
x: boolean;
|
|
142
|
+
y: boolean;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
readonly content: PropType<ContentType>;
|
|
146
|
+
readonly cursor: {
|
|
147
|
+
readonly type: PropType<boolean | object>;
|
|
148
|
+
readonly default: true;
|
|
149
|
+
};
|
|
150
|
+
readonly filterNull: {
|
|
151
|
+
readonly type: BooleanConstructor;
|
|
152
|
+
readonly default: true;
|
|
153
|
+
};
|
|
154
|
+
readonly defaultIndex: PropType<number | TooltipIndex>;
|
|
155
|
+
readonly isAnimationActive: {
|
|
156
|
+
readonly type: BooleanConstructor;
|
|
157
|
+
readonly default: true;
|
|
158
|
+
};
|
|
159
|
+
readonly offset: {
|
|
160
|
+
readonly type: NumberConstructor;
|
|
161
|
+
readonly default: 10;
|
|
162
|
+
};
|
|
163
|
+
readonly payloadUniqBy: PropType<UniqueOption<TooltipPayloadEntry>>;
|
|
164
|
+
/**
|
|
165
|
+
* If portal is defined, then Tooltip will use this element as a target for rendering using Teleport
|
|
166
|
+
*/
|
|
167
|
+
readonly portal: {
|
|
168
|
+
readonly type: PropType<HTMLElement | null>;
|
|
169
|
+
readonly default: any;
|
|
170
|
+
};
|
|
171
|
+
readonly position: PropType<Partial<Coordinate>>;
|
|
172
|
+
readonly reverseDirection: {
|
|
173
|
+
readonly type: PropType<AllowInDimension>;
|
|
174
|
+
readonly default: () => {
|
|
175
|
+
x: boolean;
|
|
176
|
+
y: boolean;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* If true, tooltip will appear on top of all bars on an axis tick.
|
|
181
|
+
* If false, tooltip will appear on individual bars.
|
|
182
|
+
*/
|
|
183
|
+
readonly shared: {
|
|
184
|
+
readonly type: PropType<boolean | undefined>;
|
|
185
|
+
readonly default: any;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* If `hover` then the Tooltip shows on mouse enter and hides on mouse leave.
|
|
189
|
+
* If `click` then the Tooltip shows after clicking and stays active.
|
|
190
|
+
*/
|
|
191
|
+
readonly trigger: {
|
|
192
|
+
readonly type: PropType<TooltipTrigger>;
|
|
193
|
+
readonly default: "hover";
|
|
194
|
+
};
|
|
195
|
+
readonly style: {
|
|
196
|
+
readonly type: ObjectConstructor;
|
|
197
|
+
readonly default: () => {};
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Tooltip axis ID
|
|
201
|
+
*/
|
|
202
|
+
readonly axisId: {
|
|
203
|
+
readonly type: PropType<AxisId>;
|
|
204
|
+
readonly default: 0;
|
|
205
|
+
};
|
|
206
|
+
readonly contentStyle: {
|
|
207
|
+
readonly type: ObjectConstructor;
|
|
208
|
+
readonly default: () => {};
|
|
209
|
+
};
|
|
210
|
+
readonly itemStyle: {
|
|
211
|
+
readonly type: ObjectConstructor;
|
|
212
|
+
readonly default: () => {};
|
|
213
|
+
};
|
|
214
|
+
readonly labelStyle: {
|
|
215
|
+
readonly type: ObjectConstructor;
|
|
216
|
+
readonly default: () => {};
|
|
217
|
+
};
|
|
218
|
+
readonly itemSorter: {
|
|
219
|
+
readonly type: StringConstructor;
|
|
220
|
+
readonly default: "name";
|
|
221
|
+
};
|
|
222
|
+
readonly separator: {
|
|
223
|
+
readonly type: StringConstructor;
|
|
224
|
+
readonly default: " : ";
|
|
225
|
+
};
|
|
226
|
+
}>> & Readonly<{}>, {
|
|
227
|
+
readonly style: Record<string, any>;
|
|
228
|
+
readonly cursor: boolean | object;
|
|
229
|
+
readonly offset: number;
|
|
230
|
+
readonly isAnimationActive: boolean;
|
|
231
|
+
readonly includeHidden: boolean;
|
|
232
|
+
readonly active: boolean;
|
|
233
|
+
readonly shared: boolean;
|
|
234
|
+
readonly trigger: TooltipTrigger;
|
|
235
|
+
readonly axisId: AxisId;
|
|
236
|
+
readonly separator: string;
|
|
237
|
+
readonly contentStyle: Record<string, any>;
|
|
238
|
+
readonly itemStyle: Record<string, any>;
|
|
239
|
+
readonly itemSorter: string;
|
|
240
|
+
readonly portal: HTMLElement;
|
|
241
|
+
readonly allowEscapeViewBox: AllowInDimension;
|
|
242
|
+
readonly reverseDirection: AllowInDimension;
|
|
243
|
+
readonly labelStyle: Record<string, any>;
|
|
244
|
+
readonly filterNull: boolean;
|
|
245
|
+
}, SlotsType<{
|
|
246
|
+
content?: (props: TooltipContentProps) => any;
|
|
247
|
+
cursor?: (props: Record<string, any>) => any;
|
|
248
|
+
default?: () => any;
|
|
249
|
+
}>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
250
|
+
export default Tooltip;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { SlotsType } from 'vue';
|
|
2
|
+
import { LabelSlots } from './types';
|
|
3
|
+
export declare const Label: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
id: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
7
|
+
class: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
viewBox: {
|
|
12
|
+
type: import('vue').PropType<import('./types').ViewBox>;
|
|
13
|
+
};
|
|
14
|
+
parentViewBox: {
|
|
15
|
+
type: import('vue').PropType<import('./types').ViewBox>;
|
|
16
|
+
};
|
|
17
|
+
value: {
|
|
18
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
19
|
+
};
|
|
20
|
+
formatter: {
|
|
21
|
+
type: import('vue').PropType<import('./types').LabelFormatter>;
|
|
22
|
+
};
|
|
23
|
+
offset: {
|
|
24
|
+
type: NumberConstructor;
|
|
25
|
+
default: number;
|
|
26
|
+
};
|
|
27
|
+
position: {
|
|
28
|
+
type: import('vue').PropType<import('./types').LabelPosition>;
|
|
29
|
+
};
|
|
30
|
+
textBreakAll: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
};
|
|
33
|
+
angle: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
};
|
|
36
|
+
index: {
|
|
37
|
+
type: NumberConstructor;
|
|
38
|
+
};
|
|
39
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
42
|
+
id: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
};
|
|
45
|
+
class: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
viewBox: {
|
|
50
|
+
type: import('vue').PropType<import('./types').ViewBox>;
|
|
51
|
+
};
|
|
52
|
+
parentViewBox: {
|
|
53
|
+
type: import('vue').PropType<import('./types').ViewBox>;
|
|
54
|
+
};
|
|
55
|
+
value: {
|
|
56
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
57
|
+
};
|
|
58
|
+
formatter: {
|
|
59
|
+
type: import('vue').PropType<import('./types').LabelFormatter>;
|
|
60
|
+
};
|
|
61
|
+
offset: {
|
|
62
|
+
type: NumberConstructor;
|
|
63
|
+
default: number;
|
|
64
|
+
};
|
|
65
|
+
position: {
|
|
66
|
+
type: import('vue').PropType<import('./types').LabelPosition>;
|
|
67
|
+
};
|
|
68
|
+
textBreakAll: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
};
|
|
71
|
+
angle: {
|
|
72
|
+
type: NumberConstructor;
|
|
73
|
+
};
|
|
74
|
+
index: {
|
|
75
|
+
type: NumberConstructor;
|
|
76
|
+
};
|
|
77
|
+
}>> & Readonly<{}>, {
|
|
78
|
+
class: string;
|
|
79
|
+
offset: number;
|
|
80
|
+
textBreakAll: boolean;
|
|
81
|
+
}, SlotsType<LabelSlots>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const LabelList: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
id: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
};
|
|
5
|
+
data: {
|
|
6
|
+
type: import('vue').PropType<ReadonlyArray<import('./types').Data>>;
|
|
7
|
+
};
|
|
8
|
+
valueAccessor: {
|
|
9
|
+
type: import('vue').PropType<(entry: import('./types').Data, index: number) => string | number>;
|
|
10
|
+
default: (entry: import('./types').Data) => string | number;
|
|
11
|
+
};
|
|
12
|
+
clockWise: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
};
|
|
15
|
+
dataKey: {
|
|
16
|
+
type: import('vue').PropType<import('../../types').DataKey<Record<string, any>>>;
|
|
17
|
+
};
|
|
18
|
+
textBreakAll: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
};
|
|
21
|
+
position: {
|
|
22
|
+
type: import('vue').PropType<import('./types').LabelPosition>;
|
|
23
|
+
};
|
|
24
|
+
offset: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
};
|
|
27
|
+
angle: {
|
|
28
|
+
type: NumberConstructor;
|
|
29
|
+
};
|
|
30
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
31
|
+
id: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
};
|
|
34
|
+
data: {
|
|
35
|
+
type: import('vue').PropType<ReadonlyArray<import('./types').Data>>;
|
|
36
|
+
};
|
|
37
|
+
valueAccessor: {
|
|
38
|
+
type: import('vue').PropType<(entry: import('./types').Data, index: number) => string | number>;
|
|
39
|
+
default: (entry: import('./types').Data) => string | number;
|
|
40
|
+
};
|
|
41
|
+
clockWise: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
};
|
|
44
|
+
dataKey: {
|
|
45
|
+
type: import('vue').PropType<import('../../types').DataKey<Record<string, any>>>;
|
|
46
|
+
};
|
|
47
|
+
textBreakAll: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
};
|
|
50
|
+
position: {
|
|
51
|
+
type: import('vue').PropType<import('./types').LabelPosition>;
|
|
52
|
+
};
|
|
53
|
+
offset: {
|
|
54
|
+
type: NumberConstructor;
|
|
55
|
+
};
|
|
56
|
+
angle: {
|
|
57
|
+
type: NumberConstructor;
|
|
58
|
+
};
|
|
59
|
+
}>> & Readonly<{}>, {
|
|
60
|
+
clockWise: boolean;
|
|
61
|
+
textBreakAll: boolean;
|
|
62
|
+
valueAccessor: (entry: import('./types').Data, index: number) => string | number;
|
|
63
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ViewBox } from '../../cartesian/type';
|
|
2
|
+
import { DataKey, VuePropsToType } from '../../types';
|
|
3
|
+
import { PropType, VNode } from 'vue';
|
|
4
|
+
export type { ViewBox };
|
|
5
|
+
export interface Data {
|
|
6
|
+
value?: number | string | Array<number | string>;
|
|
7
|
+
payload?: any;
|
|
8
|
+
parentViewBox?: ViewBox;
|
|
9
|
+
fill?: string;
|
|
10
|
+
}
|
|
11
|
+
export type LabelPosition = 'top' | 'left' | 'right' | 'bottom' | 'inside' | 'outside' | 'insideLeft' | 'insideRight' | 'insideTop' | 'insideBottom' | 'insideTopLeft' | 'insideBottomLeft' | 'insideTopRight' | 'insideBottomRight' | 'insideStart' | 'insideEnd' | 'end' | 'center' | 'centerTop' | 'centerBottom' | 'middle' | {
|
|
12
|
+
x?: number;
|
|
13
|
+
y?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const LabelListVueProps: {
|
|
16
|
+
id: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
};
|
|
19
|
+
data: {
|
|
20
|
+
type: PropType<ReadonlyArray<Data>>;
|
|
21
|
+
};
|
|
22
|
+
valueAccessor: {
|
|
23
|
+
type: PropType<(entry: Data, index: number) => string | number>;
|
|
24
|
+
default: (entry: Data) => string | number;
|
|
25
|
+
};
|
|
26
|
+
clockWise: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
};
|
|
29
|
+
dataKey: {
|
|
30
|
+
type: PropType<DataKey<Record<string, any>>>;
|
|
31
|
+
};
|
|
32
|
+
textBreakAll: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
};
|
|
35
|
+
position: {
|
|
36
|
+
type: PropType<LabelPosition>;
|
|
37
|
+
};
|
|
38
|
+
offset: {
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
};
|
|
41
|
+
angle: {
|
|
42
|
+
type: NumberConstructor;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export type LabelFormatter = (label: string | number | undefined) => string | number | undefined;
|
|
46
|
+
export declare const LabelVueProps: {
|
|
47
|
+
id: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
};
|
|
50
|
+
class: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
viewBox: {
|
|
55
|
+
type: PropType<ViewBox>;
|
|
56
|
+
};
|
|
57
|
+
parentViewBox: {
|
|
58
|
+
type: PropType<ViewBox>;
|
|
59
|
+
};
|
|
60
|
+
value: {
|
|
61
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
62
|
+
};
|
|
63
|
+
formatter: {
|
|
64
|
+
type: PropType<LabelFormatter>;
|
|
65
|
+
};
|
|
66
|
+
offset: {
|
|
67
|
+
type: NumberConstructor;
|
|
68
|
+
default: number;
|
|
69
|
+
};
|
|
70
|
+
position: {
|
|
71
|
+
type: PropType<LabelPosition>;
|
|
72
|
+
};
|
|
73
|
+
textBreakAll: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
};
|
|
76
|
+
angle: {
|
|
77
|
+
type: NumberConstructor;
|
|
78
|
+
};
|
|
79
|
+
index: {
|
|
80
|
+
type: NumberConstructor;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export type LabelProps = VuePropsToType<typeof LabelVueProps>;
|
|
84
|
+
export interface LabelSlots {
|
|
85
|
+
content: (props: LabelProps & {
|
|
86
|
+
viewBox: ViewBox;
|
|
87
|
+
}) => VNode;
|
|
88
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CartesianViewBox, PolarViewBox, ViewBox } from '../../cartesian/type';
|
|
2
|
+
import { LabelProps } from './types';
|
|
3
|
+
import { Coordinate } from '../../types';
|
|
4
|
+
export declare function parseViewBox(props: any): ViewBox | undefined;
|
|
5
|
+
export declare function isPolar(viewBox: CartesianViewBox | PolarViewBox): viewBox is PolarViewBox;
|
|
6
|
+
export declare const RADIAN: number;
|
|
7
|
+
export declare function polarToCartesian(cx: number, cy: number, radius: number, angle: number): Coordinate;
|
|
8
|
+
type PolarLabelPosition = 'insideStart' | 'insideEnd' | 'end';
|
|
9
|
+
export declare function renderRadialLabel(labelProps: LabelProps, position: PolarLabelPosition, label: string | number | undefined, attrs: Record<string, any>, viewBox: PolarViewBox): import("vue/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function getAttrsOfPolarLabel(props: LabelProps, viewBox?: PolarViewBox): {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
textAnchor: string;
|
|
14
|
+
verticalAnchor: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function getAttrsOfCartesianLabel(props: LabelProps, viewBox: CartesianViewBox): {
|
|
17
|
+
height?: number;
|
|
18
|
+
width?: number;
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
textAnchor: string;
|
|
22
|
+
verticalAnchor: string;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { LegendType } from '../../types/legend';
|
|
3
|
+
import { LegendPayload } from '../DefaultLegendContent';
|
|
4
|
+
export declare const SIZE = 32;
|
|
5
|
+
export declare const LegendSymbol: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
6
|
+
type: PropType<LegendType>;
|
|
7
|
+
color: StringConstructor;
|
|
8
|
+
size: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
data: {
|
|
13
|
+
type: PropType<LegendPayload>;
|
|
14
|
+
};
|
|
15
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
16
|
+
type: PropType<LegendType>;
|
|
17
|
+
color: StringConstructor;
|
|
18
|
+
size: {
|
|
19
|
+
type: NumberConstructor;
|
|
20
|
+
default: number;
|
|
21
|
+
};
|
|
22
|
+
data: {
|
|
23
|
+
type: PropType<LegendPayload>;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {
|
|
26
|
+
size: number;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { LegendPayload } from '../../DefaultLegendContent';
|
|
3
|
+
import { LegendProps } from '../type';
|
|
4
|
+
export declare function useLegend(props: LegendProps): {
|
|
5
|
+
legendRef: import('vue').Ref<HTMLElement, HTMLElement>;
|
|
6
|
+
boundingBox: import('vue').ComputedRef<{
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}>;
|
|
10
|
+
widthOrHeight: import('vue').ComputedRef<{
|
|
11
|
+
height?: number;
|
|
12
|
+
width?: number;
|
|
13
|
+
}>;
|
|
14
|
+
processedPayload: import('vue').ComputedRef<LegendPayload[]>;
|
|
15
|
+
outerStyle: import('vue').ComputedRef<CSSProperties>;
|
|
16
|
+
legendPortal: import('vue').ComputedRef<HTMLElement>;
|
|
17
|
+
syncSettings: () => void;
|
|
18
|
+
syncSize: () => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CSSProperties, Component } from 'vue';
|
|
2
|
+
import { LayoutType } from '../../../types';
|
|
3
|
+
import { LegendType } from '../../../types/legend';
|
|
4
|
+
import { HorizontalAlignmentType, LegendPayload, VerticalAlignmentType } from '../../DefaultLegendContent';
|
|
5
|
+
interface LegendContentProps {
|
|
6
|
+
layout?: LayoutType;
|
|
7
|
+
align?: HorizontalAlignmentType;
|
|
8
|
+
verticalAlign?: VerticalAlignmentType;
|
|
9
|
+
iconSize?: number;
|
|
10
|
+
iconType?: LegendType;
|
|
11
|
+
wrapperStyle?: CSSProperties;
|
|
12
|
+
contentStyle?: CSSProperties;
|
|
13
|
+
formatter?: (value: string, entry: LegendPayload) => string;
|
|
14
|
+
onClick?: (data: LegendPayload, index: number) => void;
|
|
15
|
+
onMouseEnter?: (data: LegendPayload, index: number) => void;
|
|
16
|
+
onMouseLeave?: (data: LegendPayload, index: number) => void;
|
|
17
|
+
payload?: LegendPayload[];
|
|
18
|
+
content?: Component | ((props: any) => any);
|
|
19
|
+
}
|
|
20
|
+
export declare function useLegendContent(props: LegendContentProps): {
|
|
21
|
+
getWrapperStyle: (layout?: LayoutType, align?: HorizontalAlignmentType, verticalAlign?: VerticalAlignmentType) => CSSProperties;
|
|
22
|
+
getContentStyle: (layout?: LayoutType) => CSSProperties;
|
|
23
|
+
getItemStyle: (layout?: LayoutType) => CSSProperties;
|
|
24
|
+
getViewBox: () => {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
};
|
|
30
|
+
getSvgStyle: () => CSSProperties;
|
|
31
|
+
formatValue: (entry: LegendPayload) => string;
|
|
32
|
+
handleClick: (entry: LegendPayload, index: number) => void;
|
|
33
|
+
handleMouseEnter: (entry: LegendPayload, index: number) => void;
|
|
34
|
+
handleMouseLeave: (entry: LegendPayload, index: number) => void;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CSSProperties, PropType, VNode } from 'vue';
|
|
2
|
+
import { LayoutType, Margin } from '../../types';
|
|
3
|
+
import { LegendType } from '../../types/legend';
|
|
4
|
+
import { HorizontalAlignmentType, LegendPayload, VerticalAlignmentType } from '../DefaultLegendContent';
|
|
5
|
+
import { VuePropsToType, WithSVGProps } from '../../types/common';
|
|
6
|
+
export interface LegendSlots {
|
|
7
|
+
content: (params: LegendContentProps) => VNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const LegendVueProps: {
|
|
10
|
+
readonly layout: {
|
|
11
|
+
readonly type: PropType<LayoutType>;
|
|
12
|
+
readonly default: "horizontal";
|
|
13
|
+
};
|
|
14
|
+
readonly align: {
|
|
15
|
+
readonly type: PropType<HorizontalAlignmentType>;
|
|
16
|
+
readonly default: "center";
|
|
17
|
+
};
|
|
18
|
+
readonly verticalAlign: {
|
|
19
|
+
readonly type: PropType<VerticalAlignmentType>;
|
|
20
|
+
readonly default: "bottom";
|
|
21
|
+
};
|
|
22
|
+
readonly width: NumberConstructor;
|
|
23
|
+
readonly height: NumberConstructor;
|
|
24
|
+
readonly iconSize: {
|
|
25
|
+
readonly type: NumberConstructor;
|
|
26
|
+
readonly default: 14;
|
|
27
|
+
};
|
|
28
|
+
readonly iconType: PropType<LegendType>;
|
|
29
|
+
readonly wrapperStyle: PropType<CSSProperties>;
|
|
30
|
+
readonly contentStyle: PropType<CSSProperties>;
|
|
31
|
+
readonly itemStyle: PropType<CSSProperties>;
|
|
32
|
+
readonly formatter: PropType<(value: string, entry: LegendPayload) => string>;
|
|
33
|
+
readonly onClick: PropType<(data: LegendPayload, index: number) => void>;
|
|
34
|
+
readonly onMouseEnter: PropType<(data: LegendPayload, index: number) => void>;
|
|
35
|
+
readonly onMouseLeave: PropType<(data: LegendPayload, index: number) => void>;
|
|
36
|
+
readonly margin: PropType<Margin>;
|
|
37
|
+
readonly chartWidth: NumberConstructor;
|
|
38
|
+
readonly chartHeight: NumberConstructor;
|
|
39
|
+
readonly payloadUniqBy: PropType<boolean | ((item: LegendPayload) => any)>;
|
|
40
|
+
readonly itemSorter: {
|
|
41
|
+
readonly type: PropType<"value" | "dataKey" | ((item: LegendPayload) => number | string)>;
|
|
42
|
+
readonly default: "value";
|
|
43
|
+
};
|
|
44
|
+
readonly portal: PropType<HTMLElement | null>;
|
|
45
|
+
readonly onBBoxUpdate: PropType<(box: {
|
|
46
|
+
width: number;
|
|
47
|
+
height: number;
|
|
48
|
+
} | null) => void>;
|
|
49
|
+
};
|
|
50
|
+
export type LegendProps = VuePropsToType<typeof LegendVueProps>;
|
|
51
|
+
export type LegendPropsWithSVG = WithSVGProps<typeof LegendVueProps>;
|
|
52
|
+
export interface LegendContentProps extends LegendProps {
|
|
53
|
+
payload: LegendPayload[];
|
|
54
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { LayoutType, Margin } from '../../types';
|
|
3
|
+
import { HorizontalAlignmentType, VerticalAlignmentType } from '../DefaultLegendContent';
|
|
4
|
+
type PositionInput = {
|
|
5
|
+
layout?: LayoutType;
|
|
6
|
+
align?: HorizontalAlignmentType;
|
|
7
|
+
verticalAlign?: VerticalAlignmentType;
|
|
8
|
+
};
|
|
9
|
+
export declare function getDefaultPosition(style: CSSProperties | undefined, props: PositionInput, margin: Margin, chartWidth: number, chartHeight: number, box: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}): CSSProperties;
|
|
13
|
+
export declare function getWidthOrHeight(layout: LayoutType | undefined, height: number | undefined, width: number | undefined, maxWidth: number): null | {
|
|
14
|
+
height?: number;
|
|
15
|
+
width?: number;
|
|
16
|
+
};
|
|
17
|
+
export declare function defaultUniqBy(entry: any): any;
|
|
18
|
+
export {};
|