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,43 @@
|
|
|
1
|
+
import { createVNode, defineComponent } from "vue";
|
|
2
|
+
//#region src/cartesian/cartesian-grid/HorizontalStripes.tsx
|
|
3
|
+
var HorizontalStripes = /* @__PURE__ */ defineComponent({
|
|
4
|
+
name: "HorizontalStripes",
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
props: {
|
|
7
|
+
horizontalFill: Array,
|
|
8
|
+
fillOpacity: Number,
|
|
9
|
+
x: Number,
|
|
10
|
+
y: Number,
|
|
11
|
+
width: Number,
|
|
12
|
+
height: Number,
|
|
13
|
+
horizontalPoints: Array,
|
|
14
|
+
horizontal: [Boolean, Object]
|
|
15
|
+
},
|
|
16
|
+
setup(props) {
|
|
17
|
+
return () => {
|
|
18
|
+
const { horizontalFill, fillOpacity, x, y, width, height, horizontalPoints, horizontal = true } = props;
|
|
19
|
+
if (!horizontal || !horizontalFill || !horizontalFill.length) return null;
|
|
20
|
+
const roundedSortedHorizontalPoints = horizontalPoints?.map((e) => Math.round(e + y - y)).sort((a, b) => a - b);
|
|
21
|
+
if (y !== roundedSortedHorizontalPoints?.[0]) roundedSortedHorizontalPoints?.unshift(0);
|
|
22
|
+
const items = roundedSortedHorizontalPoints?.map((entry, i) => {
|
|
23
|
+
const lineHeight = !roundedSortedHorizontalPoints[i + 1] ? y + height - entry : roundedSortedHorizontalPoints[i + 1] - entry;
|
|
24
|
+
if (lineHeight <= 0) return null;
|
|
25
|
+
const colorIndex = i % horizontalFill.length;
|
|
26
|
+
return createVNode("rect", {
|
|
27
|
+
"key": `react-${i}`,
|
|
28
|
+
"y": entry,
|
|
29
|
+
"x": x,
|
|
30
|
+
"height": lineHeight,
|
|
31
|
+
"width": width,
|
|
32
|
+
"stroke": "none",
|
|
33
|
+
"fill": horizontalFill[colorIndex],
|
|
34
|
+
"fill-opacity": fillOpacity,
|
|
35
|
+
"class": "v-charts-cartesian-grid-bg"
|
|
36
|
+
}, null);
|
|
37
|
+
});
|
|
38
|
+
return createVNode("g", { "class": "v-charts-cartesian-gridstripes-horizontal" }, [items]);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
export { HorizontalStripes as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { renderLineItem } from "./utils.mjs";
|
|
2
|
+
import { createVNode, defineComponent } from "vue";
|
|
3
|
+
//#region src/cartesian/cartesian-grid/VerticalGridLines.tsx
|
|
4
|
+
var VerticalGridLines = /* @__PURE__ */ defineComponent({
|
|
5
|
+
name: "VerticalGridLines",
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
props: {
|
|
8
|
+
x: Number,
|
|
9
|
+
y: Number,
|
|
10
|
+
width: Number,
|
|
11
|
+
height: Number,
|
|
12
|
+
verticalPoints: Array,
|
|
13
|
+
xAxisId: [String, Number],
|
|
14
|
+
yAxisId: [String, Number],
|
|
15
|
+
offset: Object,
|
|
16
|
+
xAxis: Object,
|
|
17
|
+
yAxis: Object,
|
|
18
|
+
vertical: [Boolean, Object]
|
|
19
|
+
},
|
|
20
|
+
setup(props, { attrs, slots }) {
|
|
21
|
+
return () => {
|
|
22
|
+
const { y, height, vertical = true, verticalPoints } = props;
|
|
23
|
+
if (!vertical || !verticalPoints || !verticalPoints.length) return null;
|
|
24
|
+
const { xAxisId, yAxisId, ...otherLineItemProps } = {
|
|
25
|
+
...props,
|
|
26
|
+
...attrs
|
|
27
|
+
};
|
|
28
|
+
const items = verticalPoints.map((entry, i) => {
|
|
29
|
+
const lineItemProps = {
|
|
30
|
+
...otherLineItemProps,
|
|
31
|
+
x1: entry,
|
|
32
|
+
y1: y,
|
|
33
|
+
x2: entry,
|
|
34
|
+
y2: y + height,
|
|
35
|
+
key: `line-${i}`,
|
|
36
|
+
index: i
|
|
37
|
+
};
|
|
38
|
+
return renderLineItem(slots.vertical, vertical, lineItemProps);
|
|
39
|
+
});
|
|
40
|
+
return createVNode("g", { "class": "v-charts-cartesian-grid-vertical" }, [items]);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
export { VerticalGridLines as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { createVNode, defineComponent } from "vue";
|
|
2
|
+
//#region src/cartesian/cartesian-grid/VerticalStripes.tsx
|
|
3
|
+
var VerticalStripes = /* @__PURE__ */ defineComponent({
|
|
4
|
+
name: "VerticalStripes",
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
props: {
|
|
7
|
+
verticalFill: Array,
|
|
8
|
+
fillOpacity: Number,
|
|
9
|
+
x: Number,
|
|
10
|
+
y: Number,
|
|
11
|
+
width: Number,
|
|
12
|
+
height: Number,
|
|
13
|
+
verticalPoints: Array,
|
|
14
|
+
vertical: [Boolean, Object]
|
|
15
|
+
},
|
|
16
|
+
setup(props) {
|
|
17
|
+
return () => {
|
|
18
|
+
const { verticalFill, fillOpacity, x, y, width, height, verticalPoints, vertical = true } = props;
|
|
19
|
+
if (!vertical || !verticalFill || !verticalFill.length) return null;
|
|
20
|
+
const roundedSortedVerticalPoints = verticalPoints?.map((e) => Math.round(e + x - x)).sort((a, b) => a - b);
|
|
21
|
+
if (x !== roundedSortedVerticalPoints?.[0]) roundedSortedVerticalPoints?.unshift(0);
|
|
22
|
+
const items = roundedSortedVerticalPoints?.map((entry, i) => {
|
|
23
|
+
const lineWidth = !roundedSortedVerticalPoints[i + 1] ? x + width - entry : roundedSortedVerticalPoints[i + 1] - entry;
|
|
24
|
+
if (lineWidth <= 0) return null;
|
|
25
|
+
const colorIndex = i % verticalFill.length;
|
|
26
|
+
return createVNode("rect", {
|
|
27
|
+
"key": `react-${i}`,
|
|
28
|
+
"x": entry,
|
|
29
|
+
"y": y,
|
|
30
|
+
"width": lineWidth,
|
|
31
|
+
"height": height,
|
|
32
|
+
"stroke": "none",
|
|
33
|
+
"fill": verticalFill[colorIndex],
|
|
34
|
+
"fill-opacity": fillOpacity,
|
|
35
|
+
"class": "v-charts-cartesian-grid-bg"
|
|
36
|
+
}, null);
|
|
37
|
+
});
|
|
38
|
+
return createVNode("g", { "class": "v-charts-cartesian-gridstripes-vertical" }, [items]);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
export { VerticalStripes as default };
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
//#region src/cartesian/cartesian-grid/const.ts
|
|
2
|
+
var CartesianAxisDefaultProps = {
|
|
3
|
+
x: 0,
|
|
4
|
+
y: 0,
|
|
5
|
+
width: 0,
|
|
6
|
+
height: 0,
|
|
7
|
+
viewBox: {
|
|
8
|
+
x: 0,
|
|
9
|
+
y: 0,
|
|
10
|
+
width: 0,
|
|
11
|
+
height: 0
|
|
12
|
+
},
|
|
13
|
+
orientation: "bottom",
|
|
14
|
+
ticks: [],
|
|
15
|
+
stroke: "#666",
|
|
16
|
+
tickLine: true,
|
|
17
|
+
axisLine: true,
|
|
18
|
+
mirror: false,
|
|
19
|
+
minTickGap: 5,
|
|
20
|
+
tickSize: 6,
|
|
21
|
+
tickMargin: 2,
|
|
22
|
+
interval: "preserveEnd"
|
|
23
|
+
};
|
|
24
|
+
var SVGContainerPropKeys = ["viewBox"];
|
|
25
|
+
var PolyElementKeys = ["points", "pathLength"];
|
|
26
|
+
/** map of svg element types to unique svg attributes that belong to that element */
|
|
27
|
+
var FilteredElementKeyMap = {
|
|
28
|
+
svg: SVGContainerPropKeys,
|
|
29
|
+
polygon: PolyElementKeys,
|
|
30
|
+
polyline: PolyElementKeys
|
|
31
|
+
};
|
|
32
|
+
var SVGElementPropKeys = [
|
|
33
|
+
"aria-activedescendant",
|
|
34
|
+
"aria-atomic",
|
|
35
|
+
"aria-autocomplete",
|
|
36
|
+
"aria-busy",
|
|
37
|
+
"aria-checked",
|
|
38
|
+
"aria-colcount",
|
|
39
|
+
"aria-colindex",
|
|
40
|
+
"aria-colspan",
|
|
41
|
+
"aria-controls",
|
|
42
|
+
"aria-current",
|
|
43
|
+
"aria-describedby",
|
|
44
|
+
"aria-details",
|
|
45
|
+
"aria-disabled",
|
|
46
|
+
"aria-errormessage",
|
|
47
|
+
"aria-expanded",
|
|
48
|
+
"aria-flowto",
|
|
49
|
+
"aria-haspopup",
|
|
50
|
+
"aria-hidden",
|
|
51
|
+
"aria-invalid",
|
|
52
|
+
"aria-keyshortcuts",
|
|
53
|
+
"aria-label",
|
|
54
|
+
"aria-labelledby",
|
|
55
|
+
"aria-level",
|
|
56
|
+
"aria-live",
|
|
57
|
+
"aria-modal",
|
|
58
|
+
"aria-multiline",
|
|
59
|
+
"aria-multiselectable",
|
|
60
|
+
"aria-orientation",
|
|
61
|
+
"aria-owns",
|
|
62
|
+
"aria-placeholder",
|
|
63
|
+
"aria-posinset",
|
|
64
|
+
"aria-pressed",
|
|
65
|
+
"aria-readonly",
|
|
66
|
+
"aria-relevant",
|
|
67
|
+
"aria-required",
|
|
68
|
+
"aria-roledescription",
|
|
69
|
+
"aria-rowcount",
|
|
70
|
+
"aria-rowindex",
|
|
71
|
+
"aria-rowspan",
|
|
72
|
+
"aria-selected",
|
|
73
|
+
"aria-setsize",
|
|
74
|
+
"aria-sort",
|
|
75
|
+
"aria-valuemax",
|
|
76
|
+
"aria-valuemin",
|
|
77
|
+
"aria-valuenow",
|
|
78
|
+
"aria-valuetext",
|
|
79
|
+
"class",
|
|
80
|
+
"color",
|
|
81
|
+
"height",
|
|
82
|
+
"id",
|
|
83
|
+
"lang",
|
|
84
|
+
"max",
|
|
85
|
+
"media",
|
|
86
|
+
"method",
|
|
87
|
+
"min",
|
|
88
|
+
"name",
|
|
89
|
+
"style",
|
|
90
|
+
"target",
|
|
91
|
+
"width",
|
|
92
|
+
"role",
|
|
93
|
+
"tabIndex",
|
|
94
|
+
"accentHeight",
|
|
95
|
+
"accumulate",
|
|
96
|
+
"additive",
|
|
97
|
+
"alignmentBaseline",
|
|
98
|
+
"allowReorder",
|
|
99
|
+
"alphabetic",
|
|
100
|
+
"amplitude",
|
|
101
|
+
"arabicForm",
|
|
102
|
+
"ascent",
|
|
103
|
+
"attributeName",
|
|
104
|
+
"attributeType",
|
|
105
|
+
"autoReverse",
|
|
106
|
+
"azimuth",
|
|
107
|
+
"baseFrequency",
|
|
108
|
+
"baselineShift",
|
|
109
|
+
"baseProfile",
|
|
110
|
+
"bbox",
|
|
111
|
+
"begin",
|
|
112
|
+
"bias",
|
|
113
|
+
"by",
|
|
114
|
+
"calcMode",
|
|
115
|
+
"capHeight",
|
|
116
|
+
"clip",
|
|
117
|
+
"clipPath",
|
|
118
|
+
"clipPathUnits",
|
|
119
|
+
"clipRule",
|
|
120
|
+
"colorInterpolation",
|
|
121
|
+
"colorInterpolationFilters",
|
|
122
|
+
"colorProfile",
|
|
123
|
+
"colorRendering",
|
|
124
|
+
"contentScriptType",
|
|
125
|
+
"contentStyleType",
|
|
126
|
+
"cursor",
|
|
127
|
+
"cx",
|
|
128
|
+
"cy",
|
|
129
|
+
"d",
|
|
130
|
+
"decelerate",
|
|
131
|
+
"descent",
|
|
132
|
+
"diffuseConstant",
|
|
133
|
+
"direction",
|
|
134
|
+
"display",
|
|
135
|
+
"divisor",
|
|
136
|
+
"dominantBaseline",
|
|
137
|
+
"dur",
|
|
138
|
+
"dx",
|
|
139
|
+
"dy",
|
|
140
|
+
"edgeMode",
|
|
141
|
+
"elevation",
|
|
142
|
+
"enableBackground",
|
|
143
|
+
"end",
|
|
144
|
+
"exponent",
|
|
145
|
+
"externalResourcesRequired",
|
|
146
|
+
"fill",
|
|
147
|
+
"fillOpacity",
|
|
148
|
+
"fillRule",
|
|
149
|
+
"filter",
|
|
150
|
+
"filterRes",
|
|
151
|
+
"filterUnits",
|
|
152
|
+
"floodColor",
|
|
153
|
+
"floodOpacity",
|
|
154
|
+
"focusable",
|
|
155
|
+
"fontFamily",
|
|
156
|
+
"fontSize",
|
|
157
|
+
"fontSizeAdjust",
|
|
158
|
+
"fontStretch",
|
|
159
|
+
"fontStyle",
|
|
160
|
+
"fontVariant",
|
|
161
|
+
"fontWeight",
|
|
162
|
+
"format",
|
|
163
|
+
"from",
|
|
164
|
+
"fx",
|
|
165
|
+
"fy",
|
|
166
|
+
"g1",
|
|
167
|
+
"g2",
|
|
168
|
+
"glyphName",
|
|
169
|
+
"glyphOrientationHorizontal",
|
|
170
|
+
"glyphOrientationVertical",
|
|
171
|
+
"glyphRef",
|
|
172
|
+
"gradientTransform",
|
|
173
|
+
"gradientUnits",
|
|
174
|
+
"hanging",
|
|
175
|
+
"horizAdvX",
|
|
176
|
+
"horizOriginX",
|
|
177
|
+
"href",
|
|
178
|
+
"ideographic",
|
|
179
|
+
"imageRendering",
|
|
180
|
+
"in2",
|
|
181
|
+
"in",
|
|
182
|
+
"intercept",
|
|
183
|
+
"k1",
|
|
184
|
+
"k2",
|
|
185
|
+
"k3",
|
|
186
|
+
"k4",
|
|
187
|
+
"k",
|
|
188
|
+
"kernelMatrix",
|
|
189
|
+
"kernelUnitLength",
|
|
190
|
+
"kerning",
|
|
191
|
+
"keyPoints",
|
|
192
|
+
"keySplines",
|
|
193
|
+
"keyTimes",
|
|
194
|
+
"lengthAdjust",
|
|
195
|
+
"letterSpacing",
|
|
196
|
+
"lightingColor",
|
|
197
|
+
"limitingConeAngle",
|
|
198
|
+
"local",
|
|
199
|
+
"markerEnd",
|
|
200
|
+
"markerHeight",
|
|
201
|
+
"markerMid",
|
|
202
|
+
"markerStart",
|
|
203
|
+
"markerUnits",
|
|
204
|
+
"markerWidth",
|
|
205
|
+
"mask",
|
|
206
|
+
"maskContentUnits",
|
|
207
|
+
"maskUnits",
|
|
208
|
+
"mathematical",
|
|
209
|
+
"mode",
|
|
210
|
+
"numOctaves",
|
|
211
|
+
"offset",
|
|
212
|
+
"opacity",
|
|
213
|
+
"operator",
|
|
214
|
+
"order",
|
|
215
|
+
"orient",
|
|
216
|
+
"orientation",
|
|
217
|
+
"origin",
|
|
218
|
+
"overflow",
|
|
219
|
+
"overlinePosition",
|
|
220
|
+
"overlineThickness",
|
|
221
|
+
"paintOrder",
|
|
222
|
+
"panose1",
|
|
223
|
+
"pathLength",
|
|
224
|
+
"patternContentUnits",
|
|
225
|
+
"patternTransform",
|
|
226
|
+
"patternUnits",
|
|
227
|
+
"pointerEvents",
|
|
228
|
+
"pointsAtX",
|
|
229
|
+
"pointsAtY",
|
|
230
|
+
"pointsAtZ",
|
|
231
|
+
"preserveAlpha",
|
|
232
|
+
"preserveAspectRatio",
|
|
233
|
+
"primitiveUnits",
|
|
234
|
+
"r",
|
|
235
|
+
"radius",
|
|
236
|
+
"refX",
|
|
237
|
+
"refY",
|
|
238
|
+
"renderingIntent",
|
|
239
|
+
"repeatCount",
|
|
240
|
+
"repeatDur",
|
|
241
|
+
"requiredExtensions",
|
|
242
|
+
"requiredFeatures",
|
|
243
|
+
"restart",
|
|
244
|
+
"result",
|
|
245
|
+
"rotate",
|
|
246
|
+
"rx",
|
|
247
|
+
"ry",
|
|
248
|
+
"seed",
|
|
249
|
+
"shapeRendering",
|
|
250
|
+
"slope",
|
|
251
|
+
"spacing",
|
|
252
|
+
"specularConstant",
|
|
253
|
+
"specularExponent",
|
|
254
|
+
"speed",
|
|
255
|
+
"spreadMethod",
|
|
256
|
+
"startOffset",
|
|
257
|
+
"stdDeviation",
|
|
258
|
+
"stemh",
|
|
259
|
+
"stemv",
|
|
260
|
+
"stitchTiles",
|
|
261
|
+
"stopColor",
|
|
262
|
+
"stopOpacity",
|
|
263
|
+
"strikethroughPosition",
|
|
264
|
+
"strikethroughThickness",
|
|
265
|
+
"string",
|
|
266
|
+
"stroke",
|
|
267
|
+
"stroke-dasharray",
|
|
268
|
+
"strokeDashoffset",
|
|
269
|
+
"strokeLinecap",
|
|
270
|
+
"strokeLinejoin",
|
|
271
|
+
"strokeMiterlimit",
|
|
272
|
+
"strokeOpacity",
|
|
273
|
+
"strokeWidth",
|
|
274
|
+
"surfaceScale",
|
|
275
|
+
"systemLanguage",
|
|
276
|
+
"tableValues",
|
|
277
|
+
"targetX",
|
|
278
|
+
"targetY",
|
|
279
|
+
"textAnchor",
|
|
280
|
+
"textDecoration",
|
|
281
|
+
"textLength",
|
|
282
|
+
"textRendering",
|
|
283
|
+
"to",
|
|
284
|
+
"transform",
|
|
285
|
+
"u1",
|
|
286
|
+
"u2",
|
|
287
|
+
"underlinePosition",
|
|
288
|
+
"underlineThickness",
|
|
289
|
+
"unicode",
|
|
290
|
+
"unicodeBidi",
|
|
291
|
+
"unicodeRange",
|
|
292
|
+
"unitsPerEm",
|
|
293
|
+
"vAlphabetic",
|
|
294
|
+
"values",
|
|
295
|
+
"vectorEffect",
|
|
296
|
+
"version",
|
|
297
|
+
"vertAdvY",
|
|
298
|
+
"vertOriginX",
|
|
299
|
+
"vertOriginY",
|
|
300
|
+
"vHanging",
|
|
301
|
+
"vIdeographic",
|
|
302
|
+
"viewTarget",
|
|
303
|
+
"visibility",
|
|
304
|
+
"vMathematical",
|
|
305
|
+
"widths",
|
|
306
|
+
"wordSpacing",
|
|
307
|
+
"writingMode",
|
|
308
|
+
"x1",
|
|
309
|
+
"x2",
|
|
310
|
+
"x",
|
|
311
|
+
"xChannelSelector",
|
|
312
|
+
"xHeight",
|
|
313
|
+
"xlinkActuate",
|
|
314
|
+
"xlinkArcrole",
|
|
315
|
+
"xlinkHref",
|
|
316
|
+
"xlinkRole",
|
|
317
|
+
"xlinkShow",
|
|
318
|
+
"xlinkTitle",
|
|
319
|
+
"xlinkType",
|
|
320
|
+
"xmlBase",
|
|
321
|
+
"xmlLang",
|
|
322
|
+
"xmlns",
|
|
323
|
+
"xmlnsXlink",
|
|
324
|
+
"xmlSpace",
|
|
325
|
+
"y1",
|
|
326
|
+
"y2",
|
|
327
|
+
"y",
|
|
328
|
+
"yChannelSelector",
|
|
329
|
+
"z",
|
|
330
|
+
"zoomAndPan",
|
|
331
|
+
"ref",
|
|
332
|
+
"key",
|
|
333
|
+
"angle"
|
|
334
|
+
];
|
|
335
|
+
//#endregion
|
|
336
|
+
export { CartesianAxisDefaultProps, FilteredElementKeyMap, SVGElementPropKeys };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { filterProps } from "../../utils/VueUtils.mjs";
|
|
2
|
+
import { createVNode, mergeProps } from "vue";
|
|
3
|
+
//#region src/cartesian/cartesian-grid/utils.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Render a grid line item.
|
|
6
|
+
* Priority: slot > default <line> with optional SVG attr overrides from `option`.
|
|
7
|
+
*/
|
|
8
|
+
function renderLineItem(slot, option, props) {
|
|
9
|
+
if (slot) return slot(props);
|
|
10
|
+
const { x1, y1, x2, y2, key, ...others } = { ...props };
|
|
11
|
+
const { offset: __, ...restOfFilteredProps } = filterProps(others, false);
|
|
12
|
+
return createVNode("line", mergeProps(restOfFilteredProps, {
|
|
13
|
+
"x1": x1,
|
|
14
|
+
"y1": y1,
|
|
15
|
+
"x2": x2,
|
|
16
|
+
"y2": y2,
|
|
17
|
+
"fill": "none",
|
|
18
|
+
"key": key
|
|
19
|
+
}), null);
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { renderLineItem };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { selectAxisWithScale } from "../../state/selectors/axisSelectors.mjs";
|
|
2
|
+
import { useAppSelector } from "../../state/hooks.mjs";
|
|
3
|
+
import { useChartLayout } from "../../context/chartLayoutContext.mjs";
|
|
4
|
+
import { Layer } from "../../container/Layer.mjs";
|
|
5
|
+
import { useErrorBarContext, useErrorBarRegistry } from "./ErrorBarContext.mjs";
|
|
6
|
+
import { createVNode, defineComponent, isVNode, onUnmounted } from "vue";
|
|
7
|
+
//#region src/cartesian/error-bar/ErrorBar.tsx
|
|
8
|
+
function _isSlot(s) {
|
|
9
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
10
|
+
}
|
|
11
|
+
var ErrorBarVueProps = {
|
|
12
|
+
dataKey: {
|
|
13
|
+
type: [
|
|
14
|
+
String,
|
|
15
|
+
Number,
|
|
16
|
+
Function
|
|
17
|
+
],
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
width: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 5
|
|
23
|
+
},
|
|
24
|
+
direction: { type: String },
|
|
25
|
+
stroke: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "black"
|
|
28
|
+
},
|
|
29
|
+
strokeWidth: {
|
|
30
|
+
type: [Number, String],
|
|
31
|
+
default: 1.5
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var ErrorBar = /* @__PURE__ */ defineComponent({
|
|
35
|
+
name: "ErrorBar",
|
|
36
|
+
props: ErrorBarVueProps,
|
|
37
|
+
setup(props) {
|
|
38
|
+
const layout = useChartLayout();
|
|
39
|
+
const { data, dataPointFormatter, xAxisId, yAxisId, errorBarOffset } = useErrorBarContext();
|
|
40
|
+
const registry = useErrorBarRegistry(null);
|
|
41
|
+
if (registry) {
|
|
42
|
+
const settings = {
|
|
43
|
+
direction: props.direction ?? (layout.value === "horizontal" ? "y" : "x"),
|
|
44
|
+
dataKey: props.dataKey
|
|
45
|
+
};
|
|
46
|
+
registry.register(settings);
|
|
47
|
+
onUnmounted(() => registry.unregister(settings));
|
|
48
|
+
}
|
|
49
|
+
const xAxis = useAppSelector((state) => selectAxisWithScale(state, "xAxis", xAxisId, false));
|
|
50
|
+
const yAxis = useAppSelector((state) => selectAxisWithScale(state, "yAxis", yAxisId, false));
|
|
51
|
+
return () => {
|
|
52
|
+
const xAxisVal = xAxis.value;
|
|
53
|
+
const yAxisVal = yAxis.value;
|
|
54
|
+
if (xAxisVal?.scale == null || yAxisVal?.scale == null || data.value == null) return null;
|
|
55
|
+
const direction = props.direction ?? (layout.value === "horizontal" ? "y" : "x");
|
|
56
|
+
if (direction === "x" && xAxisVal.type !== "number") return null;
|
|
57
|
+
const offset = errorBarOffset.value;
|
|
58
|
+
const errorBars = data.value.map((entry, dataIndex) => {
|
|
59
|
+
let _slot;
|
|
60
|
+
const { x, y, value, errorVal } = dataPointFormatter(entry, props.dataKey, direction);
|
|
61
|
+
if (!errorVal || x == null || y == null) return null;
|
|
62
|
+
const lineCoordinates = [];
|
|
63
|
+
let lowBound, highBound;
|
|
64
|
+
if (Array.isArray(errorVal)) {
|
|
65
|
+
const [low, high] = errorVal;
|
|
66
|
+
if (low == null || high == null) return null;
|
|
67
|
+
lowBound = low;
|
|
68
|
+
highBound = high;
|
|
69
|
+
} else lowBound = highBound = errorVal;
|
|
70
|
+
if (direction === "x") {
|
|
71
|
+
const { scale } = xAxisVal;
|
|
72
|
+
const yMid = y + offset;
|
|
73
|
+
const yMin = yMid + props.width;
|
|
74
|
+
const yMax = yMid - props.width;
|
|
75
|
+
const xMin = scale(value - lowBound);
|
|
76
|
+
const xMax = scale(value + highBound);
|
|
77
|
+
if (xMin != null && xMax != null) {
|
|
78
|
+
lineCoordinates.push({
|
|
79
|
+
x1: xMax,
|
|
80
|
+
y1: yMin,
|
|
81
|
+
x2: xMax,
|
|
82
|
+
y2: yMax
|
|
83
|
+
});
|
|
84
|
+
lineCoordinates.push({
|
|
85
|
+
x1: xMin,
|
|
86
|
+
y1: yMid,
|
|
87
|
+
x2: xMax,
|
|
88
|
+
y2: yMid
|
|
89
|
+
});
|
|
90
|
+
lineCoordinates.push({
|
|
91
|
+
x1: xMin,
|
|
92
|
+
y1: yMin,
|
|
93
|
+
x2: xMin,
|
|
94
|
+
y2: yMax
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
} else if (direction === "y") {
|
|
98
|
+
const { scale } = yAxisVal;
|
|
99
|
+
const xMid = x + offset;
|
|
100
|
+
const xMin = xMid - props.width;
|
|
101
|
+
const xMax = xMid + props.width;
|
|
102
|
+
const yMin = scale(value - lowBound);
|
|
103
|
+
const yMax = scale(value + highBound);
|
|
104
|
+
if (yMin != null && yMax != null) {
|
|
105
|
+
lineCoordinates.push({
|
|
106
|
+
x1: xMin,
|
|
107
|
+
y1: yMax,
|
|
108
|
+
x2: xMax,
|
|
109
|
+
y2: yMax
|
|
110
|
+
});
|
|
111
|
+
lineCoordinates.push({
|
|
112
|
+
x1: xMid,
|
|
113
|
+
y1: yMin,
|
|
114
|
+
x2: xMid,
|
|
115
|
+
y2: yMax
|
|
116
|
+
});
|
|
117
|
+
lineCoordinates.push({
|
|
118
|
+
x1: xMin,
|
|
119
|
+
y1: yMin,
|
|
120
|
+
x2: xMax,
|
|
121
|
+
y2: yMin
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return createVNode(Layer, {
|
|
126
|
+
"class": "v-charts-errorBar",
|
|
127
|
+
"key": `bar-${x}-${y}-${value}-${dataIndex}`
|
|
128
|
+
}, _isSlot(_slot = lineCoordinates.map((c, lineIndex) => createVNode("line", {
|
|
129
|
+
"key": `errorbar-${dataIndex}-${c.x1}-${c.y1}-${c.x2}-${c.y2}-${lineIndex}`,
|
|
130
|
+
"x1": c.x1,
|
|
131
|
+
"y1": c.y1,
|
|
132
|
+
"x2": c.x2,
|
|
133
|
+
"y2": c.y2,
|
|
134
|
+
"stroke": props.stroke,
|
|
135
|
+
"stroke-width": props.strokeWidth
|
|
136
|
+
}, null))) ? _slot : { default: () => [_slot] });
|
|
137
|
+
});
|
|
138
|
+
return createVNode(Layer, { "class": "v-charts-errorBars" }, _isSlot(errorBars) ? errorBars : { default: () => [errorBars] });
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
//#endregion
|
|
143
|
+
export { ErrorBar, ErrorBarVueProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createContext as createContext$1 } from "../../utils/createContext.mjs";
|
|
2
|
+
import { shallowRef } from "vue";
|
|
3
|
+
import { createContext } from "motion-v";
|
|
4
|
+
//#region src/cartesian/error-bar/ErrorBarContext.ts
|
|
5
|
+
var [useErrorBarContext, provideErrorBarContext] = createContext("ErrorBarContext");
|
|
6
|
+
var [useErrorBarRegistry, provideErrorBarRegistry] = createContext$1("ErrorBarRegistry");
|
|
7
|
+
function createErrorBarRegistry() {
|
|
8
|
+
const errorBars = shallowRef([]);
|
|
9
|
+
return {
|
|
10
|
+
errorBars,
|
|
11
|
+
register(settings) {
|
|
12
|
+
errorBars.value = [...errorBars.value, settings];
|
|
13
|
+
},
|
|
14
|
+
unregister(settings) {
|
|
15
|
+
errorBars.value = errorBars.value.filter((s) => s !== settings);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { createErrorBarRegistry, provideErrorBarContext, provideErrorBarRegistry, useErrorBarContext, useErrorBarRegistry };
|