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,10 @@
|
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
|
+
var ComposedChart = generateCategoricalChart({
|
|
4
|
+
chartName: "ComposedChart",
|
|
5
|
+
defaultTooltipEventType: "axis",
|
|
6
|
+
tooltipPayloadSearcher: arrayTooltipSearcher,
|
|
7
|
+
validateTooltipEventTypes: ["axis"]
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ComposedChart };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
|
+
//#region src/chart/FunnelChart.ts
|
|
4
|
+
var FunnelChart = generateCategoricalChart({
|
|
5
|
+
chartName: "FunnelChart",
|
|
6
|
+
defaultTooltipEventType: "item",
|
|
7
|
+
validateTooltipEventTypes: ["item"],
|
|
8
|
+
tooltipPayloadSearcher: arrayTooltipSearcher
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { FunnelChart };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
|
+
var LineChart = generateCategoricalChart({
|
|
4
|
+
chartName: "LineChart",
|
|
5
|
+
defaultTooltipEventType: "axis",
|
|
6
|
+
tooltipPayloadSearcher: arrayTooltipSearcher,
|
|
7
|
+
validateTooltipEventTypes: ["axis", "item"]
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { LineChart };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
|
+
//#region src/chart/PieChart.ts
|
|
4
|
+
var PieChart = generateCategoricalChart({
|
|
5
|
+
chartName: "PieChart",
|
|
6
|
+
defaultProps: {
|
|
7
|
+
layout: "centric",
|
|
8
|
+
startAngle: 0,
|
|
9
|
+
endAngle: 360
|
|
10
|
+
},
|
|
11
|
+
defaultTooltipEventType: "item",
|
|
12
|
+
validateTooltipEventTypes: ["item"],
|
|
13
|
+
tooltipPayloadSearcher: arrayTooltipSearcher
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { PieChart };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
|
+
//#region src/chart/RadarChart.ts
|
|
4
|
+
var RadarChart = generateCategoricalChart({
|
|
5
|
+
chartName: "RadarChart",
|
|
6
|
+
defaultProps: {
|
|
7
|
+
layout: "centric",
|
|
8
|
+
startAngle: 90,
|
|
9
|
+
endAngle: -270
|
|
10
|
+
},
|
|
11
|
+
defaultTooltipEventType: "axis",
|
|
12
|
+
validateTooltipEventTypes: ["axis"],
|
|
13
|
+
tooltipPayloadSearcher: arrayTooltipSearcher
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { RadarChart };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
|
+
//#region src/chart/RadialBarChart.ts
|
|
4
|
+
var RadialBarChart = generateCategoricalChart({
|
|
5
|
+
chartName: "RadialBarChart",
|
|
6
|
+
defaultProps: {
|
|
7
|
+
layout: "radial",
|
|
8
|
+
startAngle: 0,
|
|
9
|
+
endAngle: 360
|
|
10
|
+
},
|
|
11
|
+
defaultTooltipEventType: "axis",
|
|
12
|
+
validateTooltipEventTypes: ["axis", "item"],
|
|
13
|
+
tooltipPayloadSearcher: arrayTooltipSearcher
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { RadialBarChart };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { getChartPointer } from "../utils/chart.mjs";
|
|
2
|
+
import { mouseLeaveChart } from "../state/tooltipSlice.mjs";
|
|
3
|
+
import { useAppDispatch } from "../state/hooks.mjs";
|
|
4
|
+
import { mouseClickAction, mouseMoveAction } from "../state/mouseEventsMiddleware.mjs";
|
|
5
|
+
import { focusAction, keyDownAction } from "../state/keyboardEventsMiddleware.mjs";
|
|
6
|
+
import { externalEventAction } from "../state/externalEventsMiddleware.mjs";
|
|
7
|
+
import { touchEventAction } from "../state/touchEventsMiddleware.mjs";
|
|
8
|
+
import { useSynchronisedEventsFromOtherCharts } from "../events/useChartSynchronisation.mjs";
|
|
9
|
+
import { useReportScale } from "../state/utils/useReportScale.mjs";
|
|
10
|
+
import { providePortalRaw } from "./TooltipPortalContext.mjs";
|
|
11
|
+
import { provideLegendPortalRaw } from "./LegendPortalContext.mjs";
|
|
12
|
+
import { createVNode, defineComponent, ref } from "vue";
|
|
13
|
+
//#region src/chart/RechartsWrapper.tsx
|
|
14
|
+
var RechartsWrapper = /* @__PURE__ */ defineComponent({
|
|
15
|
+
name: "RechartsWrapper",
|
|
16
|
+
props: {
|
|
17
|
+
class: { type: String },
|
|
18
|
+
height: {
|
|
19
|
+
type: Number,
|
|
20
|
+
required: true
|
|
21
|
+
},
|
|
22
|
+
onClick: { type: Function },
|
|
23
|
+
onContextMenu: { type: Function },
|
|
24
|
+
onDoubleClick: { type: Function },
|
|
25
|
+
onMouseDown: { type: Function },
|
|
26
|
+
onMouseEnter: { type: Function },
|
|
27
|
+
onMouseLeave: { type: Function },
|
|
28
|
+
onMouseMove: { type: Function },
|
|
29
|
+
onMouseUp: { type: Function },
|
|
30
|
+
onTouchEnd: { type: Function },
|
|
31
|
+
onTouchMove: { type: Function },
|
|
32
|
+
onTouchStart: { type: Function },
|
|
33
|
+
style: { type: Object },
|
|
34
|
+
width: {
|
|
35
|
+
type: Number,
|
|
36
|
+
required: true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
setup(props, { slots }) {
|
|
40
|
+
const dispatch = useAppDispatch();
|
|
41
|
+
useSynchronisedEventsFromOtherCharts();
|
|
42
|
+
const scaleRef = useReportScale();
|
|
43
|
+
const tooltipPortal = ref(null);
|
|
44
|
+
const legendPortal = ref(null);
|
|
45
|
+
providePortalRaw(tooltipPortal);
|
|
46
|
+
provideLegendPortalRaw(legendPortal);
|
|
47
|
+
const innerRef = (node) => {
|
|
48
|
+
scaleRef.value = node;
|
|
49
|
+
tooltipPortal.value = node;
|
|
50
|
+
legendPortal.value = node;
|
|
51
|
+
};
|
|
52
|
+
const myOnClick = (e) => {
|
|
53
|
+
const chartPointer = getChartPointer(e);
|
|
54
|
+
if (chartPointer) dispatch(mouseClickAction(chartPointer));
|
|
55
|
+
dispatch(externalEventAction({
|
|
56
|
+
handler: props.onClick,
|
|
57
|
+
event: e
|
|
58
|
+
}));
|
|
59
|
+
};
|
|
60
|
+
const myOnMouseEnter = (e) => {
|
|
61
|
+
const chartPointer = getChartPointer(e);
|
|
62
|
+
if (chartPointer) dispatch(mouseMoveAction(chartPointer));
|
|
63
|
+
dispatch(externalEventAction({
|
|
64
|
+
handler: props.onMouseEnter,
|
|
65
|
+
event: e
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
68
|
+
const myOnMouseLeave = (e) => {
|
|
69
|
+
dispatch(mouseLeaveChart());
|
|
70
|
+
dispatch(externalEventAction({
|
|
71
|
+
handler: props.onMouseLeave,
|
|
72
|
+
event: e
|
|
73
|
+
}));
|
|
74
|
+
};
|
|
75
|
+
const myOnMouseMove = (e) => {
|
|
76
|
+
const chartPointer = getChartPointer(e);
|
|
77
|
+
if (chartPointer) dispatch(mouseMoveAction(chartPointer));
|
|
78
|
+
dispatch(externalEventAction({
|
|
79
|
+
handler: props.onMouseMove,
|
|
80
|
+
event: e
|
|
81
|
+
}));
|
|
82
|
+
};
|
|
83
|
+
const onFocus = () => {
|
|
84
|
+
dispatch(focusAction());
|
|
85
|
+
};
|
|
86
|
+
const onKeyDown = (e) => {
|
|
87
|
+
dispatch(keyDownAction(e.key));
|
|
88
|
+
};
|
|
89
|
+
const myOnContextMenu = (e) => {
|
|
90
|
+
dispatch(externalEventAction({
|
|
91
|
+
handler: props.onContextMenu,
|
|
92
|
+
event: e
|
|
93
|
+
}));
|
|
94
|
+
};
|
|
95
|
+
const myOnDoubleClick = (e) => {
|
|
96
|
+
dispatch(externalEventAction({
|
|
97
|
+
handler: props.onDoubleClick,
|
|
98
|
+
event: e
|
|
99
|
+
}));
|
|
100
|
+
};
|
|
101
|
+
const myOnMouseDown = (e) => {
|
|
102
|
+
dispatch(externalEventAction({
|
|
103
|
+
handler: props.onMouseDown,
|
|
104
|
+
event: e
|
|
105
|
+
}));
|
|
106
|
+
};
|
|
107
|
+
const myOnMouseUp = (e) => {
|
|
108
|
+
dispatch(externalEventAction({
|
|
109
|
+
handler: props.onMouseUp,
|
|
110
|
+
event: e
|
|
111
|
+
}));
|
|
112
|
+
};
|
|
113
|
+
const myOnTouchStart = (e) => {
|
|
114
|
+
dispatch(externalEventAction({
|
|
115
|
+
handler: props.onTouchStart,
|
|
116
|
+
event: e
|
|
117
|
+
}));
|
|
118
|
+
};
|
|
119
|
+
const myOnTouchMove = (e) => {
|
|
120
|
+
dispatch(touchEventAction(e));
|
|
121
|
+
dispatch(externalEventAction({
|
|
122
|
+
handler: props.onTouchMove,
|
|
123
|
+
event: e
|
|
124
|
+
}));
|
|
125
|
+
};
|
|
126
|
+
const myOnTouchEnd = (e) => {
|
|
127
|
+
dispatch(externalEventAction({
|
|
128
|
+
handler: props.onTouchEnd,
|
|
129
|
+
event: e
|
|
130
|
+
}));
|
|
131
|
+
};
|
|
132
|
+
return () => createVNode("div", {
|
|
133
|
+
"class": ["v-charts-wrapper", props.class],
|
|
134
|
+
"style": {
|
|
135
|
+
position: "relative",
|
|
136
|
+
cursor: "default",
|
|
137
|
+
width: `${props.width}px`,
|
|
138
|
+
height: `${props.height}px`,
|
|
139
|
+
...props.style
|
|
140
|
+
},
|
|
141
|
+
"role": "application",
|
|
142
|
+
"onClick": myOnClick,
|
|
143
|
+
"onContextmenu": myOnContextMenu,
|
|
144
|
+
"onDblclick": myOnDoubleClick,
|
|
145
|
+
"onFocus": onFocus,
|
|
146
|
+
"onKeydown": onKeyDown,
|
|
147
|
+
"onMousedown": myOnMouseDown,
|
|
148
|
+
"onMouseenter": myOnMouseEnter,
|
|
149
|
+
"onMouseleave": myOnMouseLeave,
|
|
150
|
+
"onMousemove": myOnMouseMove,
|
|
151
|
+
"onMouseup": myOnMouseUp,
|
|
152
|
+
"onTouchend": myOnTouchEnd,
|
|
153
|
+
"onTouchmove": myOnTouchMove,
|
|
154
|
+
"onTouchstart": myOnTouchStart,
|
|
155
|
+
"ref": innerRef
|
|
156
|
+
}, [slots.default?.()]);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
//#endregion
|
|
160
|
+
export { RechartsWrapper };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
|
+
var ScatterChart = generateCategoricalChart({
|
|
4
|
+
chartName: "ScatterChart",
|
|
5
|
+
defaultTooltipEventType: "item",
|
|
6
|
+
tooltipPayloadSearcher: arrayTooltipSearcher,
|
|
7
|
+
validateTooltipEventTypes: ["axis", "item"]
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ScatterChart };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Surface_vue_vue_type_script_setup_true_lang_default from "./Surface.vue_vue_type_script_setup_true_lang.mjs";
|
|
2
|
+
//#region src/chart/Surface.vue
|
|
3
|
+
var Surface_default = Surface_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { Surface_default as default };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { provideLabelLayerRef } from "../context/labelLayerContext.mjs";
|
|
2
|
+
import { provideGraphicalLayerRef } from "../context/graphicalLayerContext.mjs";
|
|
3
|
+
import { provideCursorLayerRef } from "../context/cursorLayerContext.mjs";
|
|
4
|
+
import { computed, createElementBlock, createElementVNode, defineComponent, mergeProps, openBlock, ref, renderSlot, toDisplayString } from "vue";
|
|
5
|
+
//#region src/chart/Surface.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _hoisted_1 = [
|
|
7
|
+
"width",
|
|
8
|
+
"height",
|
|
9
|
+
"viewBox"
|
|
10
|
+
];
|
|
11
|
+
var Surface_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12
|
+
name: "ChartsSurface",
|
|
13
|
+
inheritAttrs: false,
|
|
14
|
+
__name: "Surface",
|
|
15
|
+
props: {
|
|
16
|
+
width: {},
|
|
17
|
+
height: {},
|
|
18
|
+
viewBox: {},
|
|
19
|
+
class: {},
|
|
20
|
+
style: {},
|
|
21
|
+
title: {},
|
|
22
|
+
desc: {}
|
|
23
|
+
},
|
|
24
|
+
setup(__props) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const svgViewBox = computed(() => {
|
|
27
|
+
const svgView = props.viewBox || {
|
|
28
|
+
width: props.width,
|
|
29
|
+
height: props.height,
|
|
30
|
+
x: 0,
|
|
31
|
+
y: 0
|
|
32
|
+
};
|
|
33
|
+
return `${svgView.x} ${svgView.y} ${svgView.width} ${svgView.height}`;
|
|
34
|
+
});
|
|
35
|
+
const cursorLayerRef = ref(null);
|
|
36
|
+
provideCursorLayerRef(cursorLayerRef);
|
|
37
|
+
const graphicalLayerRef = ref(null);
|
|
38
|
+
provideGraphicalLayerRef(graphicalLayerRef);
|
|
39
|
+
const labelLayerRef = ref(null);
|
|
40
|
+
provideLabelLayerRef(labelLayerRef);
|
|
41
|
+
return (_ctx, _cache) => {
|
|
42
|
+
return openBlock(), createElementBlock("svg", mergeProps(_ctx.$attrs, {
|
|
43
|
+
class: ["vcharts-surface", [props.class]],
|
|
44
|
+
width: _ctx.width,
|
|
45
|
+
height: _ctx.height,
|
|
46
|
+
style: _ctx.style,
|
|
47
|
+
viewBox: svgViewBox.value
|
|
48
|
+
}), [
|
|
49
|
+
createElementVNode("title", null, toDisplayString(_ctx.title), 1),
|
|
50
|
+
createElementVNode("desc", null, toDisplayString(_ctx.desc), 1),
|
|
51
|
+
renderSlot(_ctx.$slots, "default"),
|
|
52
|
+
createElementVNode("g", {
|
|
53
|
+
ref_key: "cursorLayerRef",
|
|
54
|
+
ref: cursorLayerRef,
|
|
55
|
+
class: "v-charts-cursor-layer"
|
|
56
|
+
}, null, 512),
|
|
57
|
+
createElementVNode("g", {
|
|
58
|
+
ref_key: "graphicalLayerRef",
|
|
59
|
+
ref: graphicalLayerRef,
|
|
60
|
+
class: "v-charts-graphical-layer"
|
|
61
|
+
}, null, 512),
|
|
62
|
+
createElementVNode("g", {
|
|
63
|
+
ref_key: "labelLayerRef",
|
|
64
|
+
ref: labelLayerRef,
|
|
65
|
+
class: "v-charts-label-layer"
|
|
66
|
+
}, null, 512)
|
|
67
|
+
], 16, _hoisted_1);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
//#endregion
|
|
72
|
+
export { Surface_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { validateWidthHeight } from "../utils/validate.mjs";
|
|
2
|
+
import { provideClipPathId } from "./provideClipPathId.mjs";
|
|
3
|
+
import { createRechartsStore } from "../state/store.mjs";
|
|
4
|
+
import Surface_default from "./Surface.mjs";
|
|
5
|
+
import { ChartDataContextProvider } from "../context/ChartDataContextProvider.mjs";
|
|
6
|
+
import ClipPath_default from "../container/ClipPath.mjs";
|
|
7
|
+
import { RechartsWrapper } from "./RechartsWrapper.mjs";
|
|
8
|
+
import { FULL_WIDTH_AND_HEIGHT } from "./const.mjs";
|
|
9
|
+
import { ReportMainChartProps } from "../state/ReportMainChartProps.mjs";
|
|
10
|
+
import ReportChartProps_default from "../state/ReportChartProps.mjs";
|
|
11
|
+
import { applyDefaultProps } from "../utils/props.mjs";
|
|
12
|
+
import { ReportPolarOptions } from "../state/ReportPolarOptions.mjs";
|
|
13
|
+
import { Fragment, createVNode, defineComponent, mergeProps } from "vue";
|
|
14
|
+
import { provideStore } from "@reduxjs/vue-redux";
|
|
15
|
+
//#region src/chart/generateCategoricalChart.tsx
|
|
16
|
+
var defaultLayout = "horizontal";
|
|
17
|
+
var defaultMargin = {
|
|
18
|
+
top: 5,
|
|
19
|
+
right: 5,
|
|
20
|
+
bottom: 5,
|
|
21
|
+
left: 5
|
|
22
|
+
};
|
|
23
|
+
var CategoricalProps = {
|
|
24
|
+
accessibilityLayer: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: true
|
|
27
|
+
},
|
|
28
|
+
barCategoryGap: {
|
|
29
|
+
type: [Number, String],
|
|
30
|
+
default: "10%"
|
|
31
|
+
},
|
|
32
|
+
barGap: {
|
|
33
|
+
type: [Number, String],
|
|
34
|
+
default: 4
|
|
35
|
+
},
|
|
36
|
+
barSize: { type: [Number, String] },
|
|
37
|
+
class: { type: String },
|
|
38
|
+
compact: { type: Boolean },
|
|
39
|
+
cx: { type: [Number, String] },
|
|
40
|
+
cy: { type: [Number, String] },
|
|
41
|
+
data: {
|
|
42
|
+
type: Array,
|
|
43
|
+
default: () => []
|
|
44
|
+
},
|
|
45
|
+
dataKey: { type: [
|
|
46
|
+
String,
|
|
47
|
+
Number,
|
|
48
|
+
Function
|
|
49
|
+
] },
|
|
50
|
+
desc: { type: String },
|
|
51
|
+
endAngle: { type: Number },
|
|
52
|
+
height: { type: Number },
|
|
53
|
+
id: { type: String },
|
|
54
|
+
innerRadius: { type: [Number, String] },
|
|
55
|
+
layout: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: defaultLayout
|
|
58
|
+
},
|
|
59
|
+
margin: {
|
|
60
|
+
type: Object,
|
|
61
|
+
default: () => defaultMargin
|
|
62
|
+
},
|
|
63
|
+
maxBarSize: { type: Number },
|
|
64
|
+
outerRadius: { type: [Number, String] },
|
|
65
|
+
reverseStackOrder: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: false
|
|
68
|
+
},
|
|
69
|
+
role: { type: String },
|
|
70
|
+
stackOffset: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: "none"
|
|
73
|
+
},
|
|
74
|
+
startAngle: { type: Number },
|
|
75
|
+
style: { type: Object },
|
|
76
|
+
syncId: { type: [Number, String] },
|
|
77
|
+
syncMethod: {
|
|
78
|
+
type: [String, Function],
|
|
79
|
+
default: "index"
|
|
80
|
+
},
|
|
81
|
+
tabIndex: { type: Number },
|
|
82
|
+
throttleDelay: { type: Number },
|
|
83
|
+
title: { type: String },
|
|
84
|
+
width: { type: Number },
|
|
85
|
+
to: { type: [String, Object] }
|
|
86
|
+
};
|
|
87
|
+
function generateCategoricalChart({ chartName, defaultProps = {}, defaultTooltipEventType = "axis", validateTooltipEventTypes = ["axis"], tooltipPayloadSearcher }) {
|
|
88
|
+
return /* @__PURE__ */ defineComponent({
|
|
89
|
+
name: chartName,
|
|
90
|
+
props: applyDefaultProps(CategoricalProps, defaultProps),
|
|
91
|
+
setup(props, { attrs, slots }) {
|
|
92
|
+
provideStore({ store: createRechartsStore({ options: {
|
|
93
|
+
chartName,
|
|
94
|
+
defaultTooltipEventType,
|
|
95
|
+
validateTooltipEventTypes,
|
|
96
|
+
tooltipPayloadSearcher,
|
|
97
|
+
eventEmitter: void 0
|
|
98
|
+
} }, props.id ?? chartName) });
|
|
99
|
+
const clipPathId = provideClipPathId(props);
|
|
100
|
+
return () => {
|
|
101
|
+
const { compact, width, height, title, desc, ...rest } = props;
|
|
102
|
+
const attributes = { ...attrs };
|
|
103
|
+
if (!validateWidthHeight({
|
|
104
|
+
width,
|
|
105
|
+
height
|
|
106
|
+
})) return null;
|
|
107
|
+
const layout = props.layout ?? defaultProps.layout ?? defaultLayout;
|
|
108
|
+
const isPolarChart = layout === "centric" || layout === "radial";
|
|
109
|
+
if (compact) return createVNode(Fragment, null, [
|
|
110
|
+
createVNode(ChartDataContextProvider, { "chartData": props.data }, null),
|
|
111
|
+
createVNode(ReportMainChartProps, {
|
|
112
|
+
"width": width,
|
|
113
|
+
"height": height,
|
|
114
|
+
"layout": layout,
|
|
115
|
+
"margin": props.margin ?? defaultMargin
|
|
116
|
+
}, null),
|
|
117
|
+
isPolarChart && createVNode(ReportPolarOptions, {
|
|
118
|
+
"cx": props.cx ?? "50%",
|
|
119
|
+
"cy": props.cy ?? "50%",
|
|
120
|
+
"startAngle": props.startAngle ?? defaultProps.startAngle ?? 90,
|
|
121
|
+
"endAngle": props.endAngle ?? defaultProps.endAngle ?? -270,
|
|
122
|
+
"innerRadius": props.innerRadius ?? 0,
|
|
123
|
+
"outerRadius": props.outerRadius ?? "80%"
|
|
124
|
+
}, null),
|
|
125
|
+
createVNode(Surface_default, mergeProps(attrs, rest, {
|
|
126
|
+
"width": width,
|
|
127
|
+
"height": height,
|
|
128
|
+
"title": title,
|
|
129
|
+
"desc": desc
|
|
130
|
+
}), { default: () => [createVNode(ClipPath_default, { "clipPathId": clipPathId }, null), slots.default?.()] })
|
|
131
|
+
]);
|
|
132
|
+
if (props.accessibilityLayer) {
|
|
133
|
+
attributes.tabIndex = props.tabIndex ?? 0;
|
|
134
|
+
attributes.role = props.role ?? "application";
|
|
135
|
+
}
|
|
136
|
+
const eventHandlerAttrs = {};
|
|
137
|
+
const svgAttributes = {};
|
|
138
|
+
for (const [key, value] of Object.entries(attributes)) if (key.startsWith("on") && typeof value === "function") eventHandlerAttrs[key] = value;
|
|
139
|
+
else svgAttributes[key] = value;
|
|
140
|
+
return createVNode(Fragment, null, [
|
|
141
|
+
createVNode(ChartDataContextProvider, { "chartData": props.data }, null),
|
|
142
|
+
createVNode(ReportMainChartProps, {
|
|
143
|
+
"width": width,
|
|
144
|
+
"height": height,
|
|
145
|
+
"layout": layout,
|
|
146
|
+
"margin": props.margin ?? defaultMargin
|
|
147
|
+
}, null),
|
|
148
|
+
isPolarChart && createVNode(ReportPolarOptions, {
|
|
149
|
+
"cx": props.cx ?? "50%",
|
|
150
|
+
"cy": props.cy ?? "50%",
|
|
151
|
+
"startAngle": props.startAngle ?? defaultProps.startAngle ?? 90,
|
|
152
|
+
"endAngle": props.endAngle ?? defaultProps.endAngle ?? -270,
|
|
153
|
+
"innerRadius": props.innerRadius ?? 0,
|
|
154
|
+
"outerRadius": props.outerRadius ?? "80%"
|
|
155
|
+
}, null),
|
|
156
|
+
createVNode(RechartsWrapper, mergeProps({
|
|
157
|
+
"style": props.style,
|
|
158
|
+
"class": props.class,
|
|
159
|
+
"width": width,
|
|
160
|
+
"height": height
|
|
161
|
+
}, eventHandlerAttrs), { default: () => [createVNode(Surface_default, mergeProps(svgAttributes, {
|
|
162
|
+
"width": width,
|
|
163
|
+
"height": height,
|
|
164
|
+
"title": title,
|
|
165
|
+
"desc": desc,
|
|
166
|
+
"style": FULL_WIDTH_AND_HEIGHT
|
|
167
|
+
}), { default: () => [createVNode(ClipPath_default, { "clipPathId": clipPathId }, null), slots.default?.()] }), slots.tooltip?.()] }),
|
|
168
|
+
createVNode(ReportChartProps_default, props, null)
|
|
169
|
+
]);
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
//#endregion
|
|
175
|
+
export { generateCategoricalChart };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { uniqueId } from "../utils/data-utils.mjs";
|
|
2
|
+
import { createContext } from "../utils/createContext.mjs";
|
|
3
|
+
//#region src/chart/provideClipPathId.ts
|
|
4
|
+
var [useClipPathId, provideClipPathIdRaw] = createContext("clipPathId");
|
|
5
|
+
/**
|
|
6
|
+
* Provide the clipPathId to child components.
|
|
7
|
+
* @param props - The props object from the chart component
|
|
8
|
+
*/
|
|
9
|
+
function provideClipPathId(props) {
|
|
10
|
+
const clipPathId = `${props.id ?? uniqueId("v-charts")}-clip`;
|
|
11
|
+
provideClipPathIdRaw(clipPathId);
|
|
12
|
+
return clipPathId;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { provideClipPathId, useClipPathId };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent } from "vue";
|
|
2
|
+
//#region src/components/Cell.tsx
|
|
3
|
+
/**
|
|
4
|
+
* Cell is a marker component used to define per-item colors and styles.
|
|
5
|
+
* It renders nothing — parent components (Bar, Pie, etc.) read Cell
|
|
6
|
+
* children from the default slot and apply their props by index.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* ```vue
|
|
10
|
+
* <Bar data-key="value">
|
|
11
|
+
* <Cell v-for="(entry, index) in data" :key="index" :fill="COLORS[index]" />
|
|
12
|
+
* </Bar>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
var Cell = /* @__PURE__ */ defineComponent({
|
|
16
|
+
name: "Cell",
|
|
17
|
+
inheritAttrs: false,
|
|
18
|
+
setup() {
|
|
19
|
+
return () => null;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Cell };
|