react-native-chart-kit 7.0.0-next.0 → 7.0.0-next.2
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/README.md +17 -0
- package/dist/v2/core/data/index.d.ts +3 -0
- package/dist/v2/core/data/index.d.ts.map +1 -0
- package/dist/v2/core/data/index.js +1 -0
- package/dist/v2/core/data/normalize.d.ts +8 -0
- package/dist/v2/core/data/normalize.d.ts.map +1 -0
- package/dist/v2/core/data/normalize.js +229 -0
- package/dist/v2/core/data/normalizeValues.d.ts +16 -0
- package/dist/v2/core/data/normalizeValues.d.ts.map +1 -0
- package/dist/v2/core/data/normalizeValues.js +96 -0
- package/dist/v2/core/data/types.d.ts +161 -0
- package/dist/v2/core/data/types.d.ts.map +1 -0
- package/dist/v2/core/data/types.js +1 -0
- package/dist/v2/core/geometry/areaPath.d.ts +3 -0
- package/dist/v2/core/geometry/areaPath.d.ts.map +1 -0
- package/dist/v2/core/geometry/areaPath.js +36 -0
- package/dist/v2/core/geometry/barRects.d.ts +44 -0
- package/dist/v2/core/geometry/barRects.d.ts.map +1 -0
- package/dist/v2/core/geometry/barRects.js +201 -0
- package/dist/v2/core/geometry/contributionHeatmap.d.ts +49 -0
- package/dist/v2/core/geometry/contributionHeatmap.d.ts.map +1 -0
- package/dist/v2/core/geometry/contributionHeatmap.js +107 -0
- package/dist/v2/core/geometry/horizontalBarRects.d.ts +27 -0
- package/dist/v2/core/geometry/horizontalBarRects.d.ts.map +1 -0
- package/dist/v2/core/geometry/horizontalBarRects.js +202 -0
- package/dist/v2/core/geometry/index.d.ts +12 -0
- package/dist/v2/core/geometry/index.d.ts.map +1 -0
- package/dist/v2/core/geometry/index.js +11 -0
- package/dist/v2/core/geometry/lineDecimation.d.ts +8 -0
- package/dist/v2/core/geometry/lineDecimation.d.ts.map +1 -0
- package/dist/v2/core/geometry/lineDecimation.js +110 -0
- package/dist/v2/core/geometry/linePath.d.ts +5 -0
- package/dist/v2/core/geometry/linePath.d.ts.map +1 -0
- package/dist/v2/core/geometry/linePath.js +98 -0
- package/dist/v2/core/geometry/lineSeries.d.ts +29 -0
- package/dist/v2/core/geometry/lineSeries.d.ts.map +1 -0
- package/dist/v2/core/geometry/lineSeries.js +51 -0
- package/dist/v2/core/geometry/path.d.ts +6 -0
- package/dist/v2/core/geometry/path.d.ts.map +1 -0
- package/dist/v2/core/geometry/path.js +24 -0
- package/dist/v2/core/geometry/pieArcs.d.ts +29 -0
- package/dist/v2/core/geometry/pieArcs.d.ts.map +1 -0
- package/dist/v2/core/geometry/pieArcs.js +142 -0
- package/dist/v2/core/geometry/progressRings.d.ts +30 -0
- package/dist/v2/core/geometry/progressRings.d.ts.map +1 -0
- package/dist/v2/core/geometry/progressRings.js +104 -0
- package/dist/v2/core/geometry/types.d.ts +32 -0
- package/dist/v2/core/geometry/types.d.ts.map +1 -0
- package/dist/v2/core/geometry/types.js +1 -0
- package/dist/v2/core/index.d.ts +6 -0
- package/dist/v2/core/index.d.ts.map +1 -0
- package/dist/v2/core/index.js +6 -0
- package/dist/v2/core/interaction/index.d.ts +5 -0
- package/dist/v2/core/interaction/index.d.ts.map +1 -0
- package/dist/v2/core/interaction/index.js +2 -0
- package/dist/v2/core/interaction/viewport.d.ts +71 -0
- package/dist/v2/core/interaction/viewport.d.ts.map +1 -0
- package/dist/v2/core/interaction/viewport.js +216 -0
- package/dist/v2/core/interaction/viewportTransform.d.ts +17 -0
- package/dist/v2/core/interaction/viewportTransform.d.ts.map +1 -0
- package/dist/v2/core/interaction/viewportTransform.js +70 -0
- package/dist/v2/core/layout/autoPadding.d.ts +3 -0
- package/dist/v2/core/layout/autoPadding.d.ts.map +1 -0
- package/dist/v2/core/layout/autoPadding.js +33 -0
- package/dist/v2/core/layout/chartBox.d.ts +5 -0
- package/dist/v2/core/layout/chartBox.d.ts.map +1 -0
- package/dist/v2/core/layout/chartBox.js +22 -0
- package/dist/v2/core/layout/debugLayout.d.ts +3 -0
- package/dist/v2/core/layout/debugLayout.d.ts.map +1 -0
- package/dist/v2/core/layout/debugLayout.js +20 -0
- package/dist/v2/core/layout/index.d.ts +8 -0
- package/dist/v2/core/layout/index.d.ts.map +1 -0
- package/dist/v2/core/layout/index.js +6 -0
- package/dist/v2/core/layout/labelCollision.d.ts +3 -0
- package/dist/v2/core/layout/labelCollision.d.ts.map +1 -0
- package/dist/v2/core/layout/labelCollision.js +90 -0
- package/dist/v2/core/layout/legendLayout.d.ts +3 -0
- package/dist/v2/core/layout/legendLayout.d.ts.map +1 -0
- package/dist/v2/core/layout/legendLayout.js +39 -0
- package/dist/v2/core/layout/tooltipPlacement.d.ts +3 -0
- package/dist/v2/core/layout/tooltipPlacement.d.ts.map +1 -0
- package/dist/v2/core/layout/tooltipPlacement.js +76 -0
- package/dist/v2/core/layout/types.d.ts +114 -0
- package/dist/v2/core/layout/types.d.ts.map +1 -0
- package/dist/v2/core/layout/types.js +1 -0
- package/dist/v2/core/scales/band.d.ts +15 -0
- package/dist/v2/core/scales/band.d.ts.map +1 -0
- package/dist/v2/core/scales/band.js +34 -0
- package/dist/v2/core/scales/domain.d.ts +6 -0
- package/dist/v2/core/scales/domain.d.ts.map +1 -0
- package/dist/v2/core/scales/domain.js +109 -0
- package/dist/v2/core/scales/index.d.ts +7 -0
- package/dist/v2/core/scales/index.d.ts.map +1 -0
- package/dist/v2/core/scales/index.js +5 -0
- package/dist/v2/core/scales/linear.d.ts +8 -0
- package/dist/v2/core/scales/linear.d.ts.map +1 -0
- package/dist/v2/core/scales/linear.js +22 -0
- package/dist/v2/core/scales/ticks.d.ts +4 -0
- package/dist/v2/core/scales/ticks.d.ts.map +1 -0
- package/dist/v2/core/scales/ticks.js +111 -0
- package/dist/v2/core/scales/time.d.ts +8 -0
- package/dist/v2/core/scales/time.d.ts.map +1 -0
- package/dist/v2/core/scales/time.js +23 -0
- package/dist/v2/core/scales/types.d.ts +46 -0
- package/dist/v2/core/scales/types.d.ts.map +1 -0
- package/dist/v2/core/scales/types.js +1 -0
- package/dist/v2/index.d.ts +1 -0
- package/dist/v2/index.js +1 -0
- package/dist/v2/react-native/charts/bar/BarChart.d.ts +6 -0
- package/dist/v2/react-native/charts/bar/BarChart.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/BarChart.js +198 -0
- package/dist/v2/react-native/charts/bar/BarChartSurface.d.ts +36 -0
- package/dist/v2/react-native/charts/bar/BarChartSurface.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/BarChartSurface.js +126 -0
- package/dist/v2/react-native/charts/bar/StackedBarChart.d.ts +4 -0
- package/dist/v2/react-native/charts/bar/StackedBarChart.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/StackedBarChart.js +9 -0
- package/dist/v2/react-native/charts/bar/accessibility.d.ts +31 -0
- package/dist/v2/react-native/charts/bar/accessibility.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/accessibility.js +87 -0
- package/dist/v2/react-native/charts/bar/interaction.d.ts +18 -0
- package/dist/v2/react-native/charts/bar/interaction.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/interaction.js +62 -0
- package/dist/v2/react-native/charts/bar/model.d.ts +3 -0
- package/dist/v2/react-native/charts/bar/model.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/model.js +326 -0
- package/dist/v2/react-native/charts/bar/modelUtils.d.ts +27 -0
- package/dist/v2/react-native/charts/bar/modelUtils.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/modelUtils.js +58 -0
- package/dist/v2/react-native/charts/bar/options.d.ts +7 -0
- package/dist/v2/react-native/charts/bar/options.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/options.js +49 -0
- package/dist/v2/react-native/charts/bar/rendererSafety.d.ts +12 -0
- package/dist/v2/react-native/charts/bar/rendererSafety.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/rendererSafety.js +31 -0
- package/dist/v2/react-native/charts/bar/selectionAnimation.d.ts +42 -0
- package/dist/v2/react-native/charts/bar/selectionAnimation.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/selectionAnimation.js +158 -0
- package/dist/v2/react-native/charts/bar/stackedCompat.d.ts +55 -0
- package/dist/v2/react-native/charts/bar/stackedCompat.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/stackedCompat.js +105 -0
- package/dist/v2/react-native/charts/bar/tooltip.d.ts +11 -0
- package/dist/v2/react-native/charts/bar/tooltip.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/tooltip.js +15 -0
- package/dist/v2/react-native/charts/bar/tooltipModel.d.ts +33 -0
- package/dist/v2/react-native/charts/bar/tooltipModel.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/tooltipModel.js +40 -0
- package/dist/v2/react-native/charts/bar/tooltipPlacement.d.ts +9 -0
- package/dist/v2/react-native/charts/bar/tooltipPlacement.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/tooltipPlacement.js +9 -0
- package/dist/v2/react-native/charts/bar/types.d.ts +211 -0
- package/dist/v2/react-native/charts/bar/types.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/types.js +1 -0
- package/dist/v2/react-native/charts/bar/useAnimatedTooltipModel.d.ts +10 -0
- package/dist/v2/react-native/charts/bar/useAnimatedTooltipModel.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/useAnimatedTooltipModel.js +87 -0
- package/dist/v2/react-native/charts/bar/viewport.d.ts +20 -0
- package/dist/v2/react-native/charts/bar/viewport.d.ts.map +1 -0
- package/dist/v2/react-native/charts/bar/viewport.js +47 -0
- package/dist/v2/react-native/charts/contribution/ContributionGraph.d.ts +13 -0
- package/dist/v2/react-native/charts/contribution/ContributionGraph.d.ts.map +1 -0
- package/dist/v2/react-native/charts/contribution/ContributionGraph.js +65 -0
- package/dist/v2/react-native/charts/contribution/accessibility.d.ts +25 -0
- package/dist/v2/react-native/charts/contribution/accessibility.d.ts.map +1 -0
- package/dist/v2/react-native/charts/contribution/accessibility.js +50 -0
- package/dist/v2/react-native/charts/contribution/model.d.ts +17 -0
- package/dist/v2/react-native/charts/contribution/model.d.ts.map +1 -0
- package/dist/v2/react-native/charts/contribution/model.js +102 -0
- package/dist/v2/react-native/charts/contribution/types.d.ts +50 -0
- package/dist/v2/react-native/charts/contribution/types.d.ts.map +1 -0
- package/dist/v2/react-native/charts/contribution/types.js +1 -0
- package/dist/v2/react-native/charts/line/AreaChart.d.ts +3 -0
- package/dist/v2/react-native/charts/line/AreaChart.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/AreaChart.js +3 -0
- package/dist/v2/react-native/charts/line/ChartSurface.d.ts +16 -0
- package/dist/v2/react-native/charts/line/ChartSurface.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/ChartSurface.js +151 -0
- package/dist/v2/react-native/charts/line/LineChart.d.ts +6 -0
- package/dist/v2/react-native/charts/line/LineChart.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/LineChart.js +294 -0
- package/dist/v2/react-native/charts/line/StickyYAxis.d.ts +15 -0
- package/dist/v2/react-native/charts/line/StickyYAxis.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/StickyYAxis.js +26 -0
- package/dist/v2/react-native/charts/line/accessibility.d.ts +34 -0
- package/dist/v2/react-native/charts/line/accessibility.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/accessibility.js +103 -0
- package/dist/v2/react-native/charts/line/axisLabels.d.ts +37 -0
- package/dist/v2/react-native/charts/line/axisLabels.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/axisLabels.js +55 -0
- package/dist/v2/react-native/charts/line/debugLayout.d.ts +26 -0
- package/dist/v2/react-native/charts/line/debugLayout.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/debugLayout.js +77 -0
- package/dist/v2/react-native/charts/line/debugOverlay.d.ts +9 -0
- package/dist/v2/react-native/charts/line/debugOverlay.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/debugOverlay.js +30 -0
- package/dist/v2/react-native/charts/line/defaultTooltip.d.ts +3 -0
- package/dist/v2/react-native/charts/line/defaultTooltip.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/defaultTooltip.js +17 -0
- package/dist/v2/react-native/charts/line/interaction.d.ts +82 -0
- package/dist/v2/react-native/charts/line/interaction.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/interaction.js +94 -0
- package/dist/v2/react-native/charts/line/legend.d.ts +35 -0
- package/dist/v2/react-native/charts/line/legend.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/legend.js +95 -0
- package/dist/v2/react-native/charts/line/markers.d.ts +11 -0
- package/dist/v2/react-native/charts/line/markers.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/markers.js +52 -0
- package/dist/v2/react-native/charts/line/options.d.ts +172 -0
- package/dist/v2/react-native/charts/line/options.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/options.js +168 -0
- package/dist/v2/react-native/charts/line/outsidePressSurfaces.d.ts +15 -0
- package/dist/v2/react-native/charts/line/outsidePressSurfaces.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/outsidePressSurfaces.js +37 -0
- package/dist/v2/react-native/charts/line/overviewProps.d.ts +45 -0
- package/dist/v2/react-native/charts/line/overviewProps.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/overviewProps.js +4 -0
- package/dist/v2/react-native/charts/line/rangeSelector.d.ts +19 -0
- package/dist/v2/react-native/charts/line/rangeSelector.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/rangeSelector.js +176 -0
- package/dist/v2/react-native/charts/line/rangeSelectorConfig.d.ts +38 -0
- package/dist/v2/react-native/charts/line/rangeSelectorConfig.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/rangeSelectorConfig.js +41 -0
- package/dist/v2/react-native/charts/line/referenceLabelPlacement.d.ts +21 -0
- package/dist/v2/react-native/charts/line/referenceLabelPlacement.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/referenceLabelPlacement.js +113 -0
- package/dist/v2/react-native/charts/line/references.d.ts +62 -0
- package/dist/v2/react-native/charts/line/references.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/references.js +156 -0
- package/dist/v2/react-native/charts/line/renderer.d.ts +4 -0
- package/dist/v2/react-native/charts/line/renderer.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/renderer.js +23 -0
- package/dist/v2/react-native/charts/line/responders.d.ts +13 -0
- package/dist/v2/react-native/charts/line/responders.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/responders.js +59 -0
- package/dist/v2/react-native/charts/line/selection.d.ts +31 -0
- package/dist/v2/react-native/charts/line/selection.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/selection.js +26 -0
- package/dist/v2/react-native/charts/line/seriesInput.d.ts +4 -0
- package/dist/v2/react-native/charts/line/seriesInput.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/seriesInput.js +13 -0
- package/dist/v2/react-native/charts/line/seriesStyles.d.ts +20 -0
- package/dist/v2/react-native/charts/line/seriesStyles.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/seriesStyles.js +33 -0
- package/dist/v2/react-native/charts/line/stickyYAxisLayout.d.ts +6 -0
- package/dist/v2/react-native/charts/line/stickyYAxisLayout.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/stickyYAxisLayout.js +2 -0
- package/dist/v2/react-native/charts/line/text.d.ts +7 -0
- package/dist/v2/react-native/charts/line/text.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/text.js +7 -0
- package/dist/v2/react-native/charts/line/thresholdRendering.d.ts +28 -0
- package/dist/v2/react-native/charts/line/thresholdRendering.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/thresholdRendering.js +145 -0
- package/dist/v2/react-native/charts/line/tooltip.d.ts +70 -0
- package/dist/v2/react-native/charts/line/tooltip.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/tooltip.js +87 -0
- package/dist/v2/react-native/charts/line/types.d.ts +371 -0
- package/dist/v2/react-native/charts/line/types.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/types.js +1 -0
- package/dist/v2/react-native/charts/line/useAnimatedTooltipModel.d.ts +13 -0
- package/dist/v2/react-native/charts/line/useAnimatedTooltipModel.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/useAnimatedTooltipModel.js +84 -0
- package/dist/v2/react-native/charts/line/useAnimatedYAxisLabels.d.ts +5 -0
- package/dist/v2/react-native/charts/line/useAnimatedYAxisLabels.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/useAnimatedYAxisLabels.js +141 -0
- package/dist/v2/react-native/charts/line/useChartModel.d.ts +103 -0
- package/dist/v2/react-native/charts/line/useChartModel.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/useChartModel.js +367 -0
- package/dist/v2/react-native/charts/line/useDebugLayout.d.ts +16 -0
- package/dist/v2/react-native/charts/line/useDebugLayout.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/useDebugLayout.js +35 -0
- package/dist/v2/react-native/charts/line/utils.d.ts +10 -0
- package/dist/v2/react-native/charts/line/utils.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/utils.js +40 -0
- package/dist/v2/react-native/charts/line/viewportInteraction.d.ts +3 -0
- package/dist/v2/react-native/charts/line/viewportInteraction.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/viewportInteraction.js +1 -0
- package/dist/v2/react-native/charts/line/viewportInteractionConfig.d.ts +3 -0
- package/dist/v2/react-native/charts/line/viewportInteractionConfig.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/viewportInteractionConfig.js +1 -0
- package/dist/v2/react-native/charts/line/viewportPinchZoom.d.ts +2 -0
- package/dist/v2/react-native/charts/line/viewportPinchZoom.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/viewportPinchZoom.js +1 -0
- package/dist/v2/react-native/charts/line/xLabelCandidates.d.ts +13 -0
- package/dist/v2/react-native/charts/line/xLabelCandidates.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/xLabelCandidates.js +23 -0
- package/dist/v2/react-native/charts/line/xLabels.d.ts +39 -0
- package/dist/v2/react-native/charts/line/xLabels.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/xLabels.js +289 -0
- package/dist/v2/react-native/charts/line/xScale.d.ts +6 -0
- package/dist/v2/react-native/charts/line/xScale.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/xScale.js +25 -0
- package/dist/v2/react-native/charts/line/yAxisModel.d.ts +29 -0
- package/dist/v2/react-native/charts/line/yAxisModel.d.ts.map +1 -0
- package/dist/v2/react-native/charts/line/yAxisModel.js +39 -0
- package/dist/v2/react-native/charts/pie/PieChart.d.ts +7 -0
- package/dist/v2/react-native/charts/pie/PieChart.d.ts.map +1 -0
- package/dist/v2/react-native/charts/pie/PieChart.js +244 -0
- package/dist/v2/react-native/charts/pie/accessibility.d.ts +28 -0
- package/dist/v2/react-native/charts/pie/accessibility.d.ts.map +1 -0
- package/dist/v2/react-native/charts/pie/accessibility.js +49 -0
- package/dist/v2/react-native/charts/pie/activeSlice.d.ts +15 -0
- package/dist/v2/react-native/charts/pie/activeSlice.d.ts.map +1 -0
- package/dist/v2/react-native/charts/pie/activeSlice.js +26 -0
- package/dist/v2/react-native/charts/pie/arcLabels.d.ts +32 -0
- package/dist/v2/react-native/charts/pie/arcLabels.d.ts.map +1 -0
- package/dist/v2/react-native/charts/pie/arcLabels.js +191 -0
- package/dist/v2/react-native/charts/pie/interaction.d.ts +26 -0
- package/dist/v2/react-native/charts/pie/interaction.d.ts.map +1 -0
- package/dist/v2/react-native/charts/pie/interaction.js +66 -0
- package/dist/v2/react-native/charts/pie/model.d.ts +15 -0
- package/dist/v2/react-native/charts/pie/model.d.ts.map +1 -0
- package/dist/v2/react-native/charts/pie/model.js +157 -0
- package/dist/v2/react-native/charts/pie/selectionAnimation.d.ts +33 -0
- package/dist/v2/react-native/charts/pie/selectionAnimation.d.ts.map +1 -0
- package/dist/v2/react-native/charts/pie/selectionAnimation.js +121 -0
- package/dist/v2/react-native/charts/pie/sliceSeparator.d.ts +7 -0
- package/dist/v2/react-native/charts/pie/sliceSeparator.d.ts.map +1 -0
- package/dist/v2/react-native/charts/pie/sliceSeparator.js +26 -0
- package/dist/v2/react-native/charts/pie/slices.d.ts +20 -0
- package/dist/v2/react-native/charts/pie/slices.d.ts.map +1 -0
- package/dist/v2/react-native/charts/pie/slices.js +54 -0
- package/dist/v2/react-native/charts/pie/types.d.ts +165 -0
- package/dist/v2/react-native/charts/pie/types.d.ts.map +1 -0
- package/dist/v2/react-native/charts/pie/types.js +1 -0
- package/dist/v2/react-native/charts/progress/ProgressChart.d.ts +7 -0
- package/dist/v2/react-native/charts/progress/ProgressChart.d.ts.map +1 -0
- package/dist/v2/react-native/charts/progress/ProgressChart.js +111 -0
- package/dist/v2/react-native/charts/progress/accessibility.d.ts +26 -0
- package/dist/v2/react-native/charts/progress/accessibility.d.ts.map +1 -0
- package/dist/v2/react-native/charts/progress/accessibility.js +71 -0
- package/dist/v2/react-native/charts/progress/animation.d.ts +36 -0
- package/dist/v2/react-native/charts/progress/animation.d.ts.map +1 -0
- package/dist/v2/react-native/charts/progress/animation.js +103 -0
- package/dist/v2/react-native/charts/progress/model.d.ts +14 -0
- package/dist/v2/react-native/charts/progress/model.d.ts.map +1 -0
- package/dist/v2/react-native/charts/progress/model.js +133 -0
- package/dist/v2/react-native/charts/progress/types.d.ts +72 -0
- package/dist/v2/react-native/charts/progress/types.d.ts.map +1 -0
- package/dist/v2/react-native/charts/progress/types.js +1 -0
- package/dist/v2/react-native/index.d.ts +24 -0
- package/dist/v2/react-native/index.d.ts.map +1 -0
- package/dist/v2/react-native/index.js +14 -0
- package/dist/v2/react-native/selection/ChartSelectionProvider.d.ts +27 -0
- package/dist/v2/react-native/selection/ChartSelectionProvider.d.ts.map +1 -0
- package/dist/v2/react-native/selection/ChartSelectionProvider.js +92 -0
- package/dist/v2/react-native/selection/index.d.ts +2 -0
- package/dist/v2/react-native/selection/index.d.ts.map +1 -0
- package/dist/v2/react-native/selection/index.js +1 -0
- package/dist/v2/react-native/selection/scope.d.ts +16 -0
- package/dist/v2/react-native/selection/scope.d.ts.map +1 -0
- package/dist/v2/react-native/selection/scope.js +18 -0
- package/dist/v2/react-native/theme/index.d.ts +4 -0
- package/dist/v2/react-native/theme/index.d.ts.map +1 -0
- package/dist/v2/react-native/theme/index.js +2 -0
- package/dist/v2/react-native/theme/presets.d.ts +84 -0
- package/dist/v2/react-native/theme/presets.d.ts.map +1 -0
- package/dist/v2/react-native/theme/presets.js +298 -0
- package/dist/v2/react-native/theme/provider.d.ts +20 -0
- package/dist/v2/react-native/theme/provider.d.ts.map +1 -0
- package/dist/v2/react-native/theme/provider.js +27 -0
- package/dist/v2/react-native/viewport/bounds.d.ts +7 -0
- package/dist/v2/react-native/viewport/bounds.d.ts.map +1 -0
- package/dist/v2/react-native/viewport/bounds.js +7 -0
- package/dist/v2/react-native/viewport/config.d.ts +13 -0
- package/dist/v2/react-native/viewport/config.d.ts.map +1 -0
- package/dist/v2/react-native/viewport/config.js +64 -0
- package/dist/v2/react-native/viewport/pan.d.ts +23 -0
- package/dist/v2/react-native/viewport/pan.d.ts.map +1 -0
- package/dist/v2/react-native/viewport/pan.js +110 -0
- package/dist/v2/react-native/viewport/panResponder.d.ts +14 -0
- package/dist/v2/react-native/viewport/panResponder.d.ts.map +1 -0
- package/dist/v2/react-native/viewport/panResponder.js +115 -0
- package/dist/v2/react-native/viewport/pinchZoom.d.ts +17 -0
- package/dist/v2/react-native/viewport/pinchZoom.d.ts.map +1 -0
- package/dist/v2/react-native/viewport/pinchZoom.js +131 -0
- package/dist/v2/react-native/viewport/types.d.ts +55 -0
- package/dist/v2/react-native/viewport/types.d.ts.map +1 -0
- package/dist/v2/react-native/viewport/types.js +1 -0
- package/dist/v2/svg-renderer/capabilities.d.ts +3 -0
- package/dist/v2/svg-renderer/capabilities.d.ts.map +1 -0
- package/dist/v2/svg-renderer/capabilities.js +12 -0
- package/dist/v2/svg-renderer/clipPath.d.ts +4 -0
- package/dist/v2/svg-renderer/clipPath.d.ts.map +1 -0
- package/dist/v2/svg-renderer/clipPath.js +35 -0
- package/dist/v2/svg-renderer/defs.d.ts +6 -0
- package/dist/v2/svg-renderer/defs.d.ts.map +1 -0
- package/dist/v2/svg-renderer/defs.js +18 -0
- package/dist/v2/svg-renderer/ensureConsole.d.ts +4 -0
- package/dist/v2/svg-renderer/ensureConsole.d.ts.map +1 -0
- package/dist/v2/svg-renderer/ensureConsole.js +54 -0
- package/dist/v2/svg-renderer/hitRegions.d.ts +3 -0
- package/dist/v2/svg-renderer/hitRegions.d.ts.map +1 -0
- package/dist/v2/svg-renderer/hitRegions.js +6 -0
- package/dist/v2/svg-renderer/index.d.ts +14 -0
- package/dist/v2/svg-renderer/index.d.ts.map +1 -0
- package/dist/v2/svg-renderer/index.js +13 -0
- package/dist/v2/svg-renderer/layerOrder.d.ts +19 -0
- package/dist/v2/svg-renderer/layerOrder.d.ts.map +1 -0
- package/dist/v2/svg-renderer/layerOrder.js +18 -0
- package/dist/v2/svg-renderer/layers.d.ts +3 -0
- package/dist/v2/svg-renderer/layers.d.ts.map +1 -0
- package/dist/v2/svg-renderer/layers.js +4 -0
- package/dist/v2/svg-renderer/primitives.d.ts +12 -0
- package/dist/v2/svg-renderer/primitives.d.ts.map +1 -0
- package/dist/v2/svg-renderer/primitives.js +13 -0
- package/dist/v2/svg-renderer/renderer.d.ts +4 -0
- package/dist/v2/svg-renderer/renderer.d.ts.map +1 -0
- package/dist/v2/svg-renderer/renderer.js +24 -0
- package/dist/v2/svg-renderer/symbolGeometry.d.ts +6 -0
- package/dist/v2/svg-renderer/symbolGeometry.d.ts.map +1 -0
- package/dist/v2/svg-renderer/symbolGeometry.js +10 -0
- package/dist/v2/svg-renderer/symbols.d.ts +3 -0
- package/dist/v2/svg-renderer/symbols.d.ts.map +1 -0
- package/dist/v2/svg-renderer/symbols.js +23 -0
- package/dist/v2/svg-renderer/testIds.d.ts +2 -0
- package/dist/v2/svg-renderer/testIds.d.ts.map +1 -0
- package/dist/v2/svg-renderer/testIds.js +10 -0
- package/dist/v2/svg-renderer/textMeasurement.d.ts +4 -0
- package/dist/v2/svg-renderer/textMeasurement.d.ts.map +1 -0
- package/dist/v2/svg-renderer/textMeasurement.js +37 -0
- package/dist/v2/svg-renderer/types.d.ts +134 -0
- package/dist/v2/svg-renderer/types.d.ts.map +1 -0
- package/dist/v2/svg-renderer/types.js +1 -0
- package/package.json +46 -47
- package/v2/index.d.ts +1 -0
- package/v2/index.js +1 -0
- package/v2/package.json +6 -0
- package/scripts/chartkit-codemod.mjs +0 -256
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const getLineChartOutsidePressSurfaces = ({ enabled, mainHeight, visibleInteractionBounds, width }) => {
|
|
2
|
+
if (!enabled) {
|
|
3
|
+
return [];
|
|
4
|
+
}
|
|
5
|
+
const surfaces = [
|
|
6
|
+
{
|
|
7
|
+
key: "top",
|
|
8
|
+
height: visibleInteractionBounds.y,
|
|
9
|
+
left: 0,
|
|
10
|
+
top: 0,
|
|
11
|
+
width
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
key: "left",
|
|
15
|
+
height: visibleInteractionBounds.height,
|
|
16
|
+
left: 0,
|
|
17
|
+
top: visibleInteractionBounds.y,
|
|
18
|
+
width: visibleInteractionBounds.x
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
key: "right",
|
|
22
|
+
height: visibleInteractionBounds.height,
|
|
23
|
+
left: visibleInteractionBounds.x + visibleInteractionBounds.width,
|
|
24
|
+
top: visibleInteractionBounds.y,
|
|
25
|
+
width: width - (visibleInteractionBounds.x + visibleInteractionBounds.width)
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
key: "bottom",
|
|
29
|
+
height: mainHeight -
|
|
30
|
+
(visibleInteractionBounds.y + visibleInteractionBounds.height),
|
|
31
|
+
left: 0,
|
|
32
|
+
top: visibleInteractionBounds.y + visibleInteractionBounds.height,
|
|
33
|
+
width
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
return surfaces.filter((surface) => surface.width > 0 && surface.height > 0);
|
|
37
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { LineChartProps } from "./types";
|
|
2
|
+
export declare const getLineChartOverviewProps: <TData extends Record<string, unknown>>(props: LineChartProps<TData>) => {
|
|
3
|
+
data: TData[];
|
|
4
|
+
xKey: keyof TData & string;
|
|
5
|
+
yKey?: keyof TData & string;
|
|
6
|
+
yKeys?: (keyof TData & string)[];
|
|
7
|
+
series?: import("./types").LineChartSeries<TData>[];
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
theme?: import("../..").ChartKitThemeMode | import("../..").CartesianChartTheme;
|
|
11
|
+
preset?: import("../..").CartesianChartPresetValue;
|
|
12
|
+
onViewportChange?: (event: import("./types").LineChartViewportChangeEvent) => void;
|
|
13
|
+
viewportInteraction?: boolean | import("./types").LineChartViewportInteractionConfig;
|
|
14
|
+
decimation?: false | "auto" | number | import("./options").LineChartDecimationConfig;
|
|
15
|
+
curve?: import("../../../core/index").LineCurve;
|
|
16
|
+
connectNulls?: boolean;
|
|
17
|
+
area?: boolean;
|
|
18
|
+
areaFill?: import("./options").LineChartAreaFillConfig;
|
|
19
|
+
showDots?: boolean;
|
|
20
|
+
dots?: boolean | import("./options").LineChartDotConfig;
|
|
21
|
+
renderDot?: (props: import("./types").LineChartDotRenderProps<TData>) => import("react").ReactNode;
|
|
22
|
+
renderActiveDot?: (props: import("./types").LineChartDotRenderProps<TData>) => import("react").ReactNode;
|
|
23
|
+
renderCrosshair?: (props: import("./types").LineChartCrosshairRenderProps<TData>) => import("react").ReactNode;
|
|
24
|
+
renderTooltip?: (props: import("./types").LineChartTooltipRenderProps<TData>) => import("react").ReactNode;
|
|
25
|
+
referenceLines?: import("./types").LineChartReferenceLineConfig[];
|
|
26
|
+
referenceBands?: import("./types").LineChartReferenceBandConfig[];
|
|
27
|
+
showHorizontalGridLines?: boolean;
|
|
28
|
+
showVerticalGridLines?: boolean;
|
|
29
|
+
labelStrategy?: import("./types").LineChartLabelStrategy;
|
|
30
|
+
labelRotation?: number;
|
|
31
|
+
labelMinGap?: number;
|
|
32
|
+
edgeLabelPolicy?: import("./types").LineChartEdgeLabelPolicy;
|
|
33
|
+
yDomain?: import("../../../core/index").NumericDomainInput;
|
|
34
|
+
yAxisLabelWidth?: import("./axisLabels").LineChartYAxisLabelWidth;
|
|
35
|
+
axisLabelAnimation?: boolean | import("./axisLabels").LineChartAxisLabelAnimationConfig;
|
|
36
|
+
formatXLabel?: (value: import("../../../core/index").ChartXValue, index: number) => string;
|
|
37
|
+
formatYLabel?: (value: number) => string;
|
|
38
|
+
renderer?: import("./types").LineChartRenderer;
|
|
39
|
+
id?: string;
|
|
40
|
+
debugLayout?: boolean;
|
|
41
|
+
onLayoutDebug?: (model: import("../../../core/index").LayoutDebugModel) => void;
|
|
42
|
+
accessibilityLabel?: string;
|
|
43
|
+
testID?: string;
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=overviewProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overviewProps.d.ts","sourceRoot":"","sources":["../../../src/charts/line/overviewProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,yBAAyB,GACpC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAErC,OAAO,cAAc,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmB7B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export const getLineChartOverviewProps = (props) => {
|
|
2
|
+
const { activeDot: _activeDot, crosshair: _crosshair, defaultSelectedIndex: _defaultSelectedIndex, initialIndex: _initialIndex, interaction: _interaction, legend: _legend, rangeSelector: _rangeSelector, selectedIndex: _selectedIndex, scrollable: _scrollable, tooltip: _tooltip, viewport: _viewport, visiblePoints: _visiblePoints, ...overviewBaseProps } = props;
|
|
3
|
+
return overviewBaseProps;
|
|
4
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { GestureResponderEvent } from "react-native";
|
|
2
|
+
import { type ResolvedChartViewportWindow } from "../../../core/index";
|
|
3
|
+
import type { LineChartModel } from "./useChartModel";
|
|
4
|
+
import type { LineChartRenderer } from "./types";
|
|
5
|
+
import type { LineChartProps } from "./types";
|
|
6
|
+
import type { LineChartRangeSelectorResolvedConfig } from "./rangeSelectorConfig";
|
|
7
|
+
export declare const LineChartRangeSelector: <TData extends Record<string, unknown>>({ config, dataLength, isVisible, model, onViewportChange, preventBrowserSelection, renderer: rendererProp, testID, viewportWindow, width }: {
|
|
8
|
+
config: LineChartRangeSelectorResolvedConfig;
|
|
9
|
+
dataLength: number;
|
|
10
|
+
isVisible: boolean;
|
|
11
|
+
model: LineChartModel<TData>;
|
|
12
|
+
onViewportChange: LineChartProps<TData>["onViewportChange"];
|
|
13
|
+
preventBrowserSelection: (event: GestureResponderEvent) => void;
|
|
14
|
+
renderer?: LineChartRenderer | undefined;
|
|
15
|
+
testID?: string | undefined;
|
|
16
|
+
viewportWindow: ResolvedChartViewportWindow;
|
|
17
|
+
width: number;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
//# sourceMappingURL=rangeSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rangeSelector.d.ts","sourceRoot":"","sources":["../../../src/charts/line/rangeSelector.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EACV,iBAAiB,EAKlB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,uBAAuB,CAAC;AAGlF,eAAO,MAAM,sBAAsB,GAAI,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,4IAW3E;IACD,MAAM,EAAE,oCAAoC,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAC7B,gBAAgB,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAAC;IAC5D,uBAAuB,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,cAAc,EAAE,2BAA2B,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC;CACf,mDAyUA,CAAC"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useRef } from "react";
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
import { resolveChartViewportWindowFromHandlePosition, resolveChartViewportWindowFromPosition } from "../../../core/index";
|
|
5
|
+
import { getLineChartRenderer } from "./renderer";
|
|
6
|
+
import { clamp } from "./utils";
|
|
7
|
+
export const LineChartRangeSelector = ({ config, dataLength, isVisible, model, onViewportChange, preventBrowserSelection, renderer: rendererProp, testID, viewportWindow, width }) => {
|
|
8
|
+
const interactionRef = useRef("move");
|
|
9
|
+
const rangeStartPoint = model.interactionPoints.find((point) => point.dataIndex === viewportWindow.startIndex);
|
|
10
|
+
const rangeEndPoint = model.interactionPoints.find((point) => point.dataIndex === Math.max(0, viewportWindow.endIndex - 1));
|
|
11
|
+
const windowX = rangeStartPoint?.x ?? model.boxes.plot.x;
|
|
12
|
+
const windowEndX = rangeEndPoint?.x ?? model.boxes.plot.x + model.boxes.plot.width;
|
|
13
|
+
const windowWidth = Math.max(10, windowEndX - windowX);
|
|
14
|
+
const emitViewportChange = useCallback((nextWindow, interaction) => {
|
|
15
|
+
onViewportChange?.({
|
|
16
|
+
viewport: {
|
|
17
|
+
startIndex: nextWindow.startIndex,
|
|
18
|
+
endIndex: nextWindow.endIndex
|
|
19
|
+
},
|
|
20
|
+
startIndex: nextWindow.startIndex,
|
|
21
|
+
endIndex: nextWindow.endIndex,
|
|
22
|
+
visibleCount: nextWindow.visibleCount,
|
|
23
|
+
itemCount: nextWindow.itemCount,
|
|
24
|
+
isWindowed: nextWindow.isWindowed,
|
|
25
|
+
source: "rangeSelector",
|
|
26
|
+
interaction
|
|
27
|
+
});
|
|
28
|
+
}, [onViewportChange]);
|
|
29
|
+
const isInteractive = isVisible && config.interactive && onViewportChange !== undefined;
|
|
30
|
+
const getInteraction = useCallback((locationX) => {
|
|
31
|
+
const handleHitSlop = Math.max(config.handleHitSlop, config.handleWidth * 2);
|
|
32
|
+
const startDistance = Math.abs(locationX - windowX);
|
|
33
|
+
const endDistance = Math.abs(locationX - windowEndX);
|
|
34
|
+
if (startDistance <= handleHitSlop && startDistance <= endDistance) {
|
|
35
|
+
return "resizeStart";
|
|
36
|
+
}
|
|
37
|
+
if (endDistance <= handleHitSlop) {
|
|
38
|
+
return "resizeEnd";
|
|
39
|
+
}
|
|
40
|
+
return "move";
|
|
41
|
+
}, [config.handleHitSlop, config.handleWidth, windowEndX, windowX]);
|
|
42
|
+
const handleInteraction = useCallback((event, interaction) => {
|
|
43
|
+
preventBrowserSelection(event);
|
|
44
|
+
if (!isInteractive) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const nextWindow = interaction === "move"
|
|
48
|
+
? resolveChartViewportWindowFromPosition({
|
|
49
|
+
itemCount: dataLength,
|
|
50
|
+
locationX: event.nativeEvent.locationX,
|
|
51
|
+
plotWidth: model.boxes.plot.width,
|
|
52
|
+
plotX: model.boxes.plot.x,
|
|
53
|
+
visibleCount: viewportWindow.visibleCount
|
|
54
|
+
})
|
|
55
|
+
: resolveChartViewportWindowFromHandlePosition({
|
|
56
|
+
currentWindow: viewportWindow,
|
|
57
|
+
handle: interaction === "resizeStart" ? "start" : "end",
|
|
58
|
+
itemCount: dataLength,
|
|
59
|
+
locationX: event.nativeEvent.locationX,
|
|
60
|
+
minVisibleCount: config.minVisiblePoints,
|
|
61
|
+
plotWidth: model.boxes.plot.width,
|
|
62
|
+
plotX: model.boxes.plot.x
|
|
63
|
+
});
|
|
64
|
+
if (nextWindow.startIndex === viewportWindow.startIndex &&
|
|
65
|
+
nextWindow.endIndex === viewportWindow.endIndex) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
emitViewportChange(nextWindow, interaction);
|
|
69
|
+
}, [
|
|
70
|
+
config.minVisiblePoints,
|
|
71
|
+
dataLength,
|
|
72
|
+
emitViewportChange,
|
|
73
|
+
isInteractive,
|
|
74
|
+
model.boxes.plot.width,
|
|
75
|
+
model.boxes.plot.x,
|
|
76
|
+
preventBrowserSelection,
|
|
77
|
+
viewportWindow
|
|
78
|
+
]);
|
|
79
|
+
const responderProps = isInteractive
|
|
80
|
+
? {
|
|
81
|
+
onStartShouldSetResponder: () => true,
|
|
82
|
+
onMoveShouldSetResponder: () => true,
|
|
83
|
+
onResponderGrant: (event) => {
|
|
84
|
+
const interaction = getInteraction(event.nativeEvent.locationX);
|
|
85
|
+
interactionRef.current = interaction;
|
|
86
|
+
config.onGestureStart?.({ interaction });
|
|
87
|
+
handleInteraction(event, interaction);
|
|
88
|
+
},
|
|
89
|
+
onResponderMove: (event) => {
|
|
90
|
+
handleInteraction(event, interactionRef.current);
|
|
91
|
+
},
|
|
92
|
+
onResponderRelease: () => {
|
|
93
|
+
config.onGestureEnd?.({ interaction: interactionRef.current });
|
|
94
|
+
interactionRef.current = "move";
|
|
95
|
+
},
|
|
96
|
+
onResponderTerminate: () => {
|
|
97
|
+
config.onGestureEnd?.({ interaction: interactionRef.current });
|
|
98
|
+
interactionRef.current = "move";
|
|
99
|
+
},
|
|
100
|
+
onResponderTerminationRequest: () => false
|
|
101
|
+
}
|
|
102
|
+
: {};
|
|
103
|
+
if (!isVisible) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
const plotX = model.boxes.plot.x;
|
|
107
|
+
const plotY = model.boxes.plot.y;
|
|
108
|
+
const plotWidth = model.boxes.plot.width;
|
|
109
|
+
const plotHeight = model.boxes.plot.height;
|
|
110
|
+
const handleWidth = config.handleWidth;
|
|
111
|
+
const handleColor = config.handleColor ?? config.windowStroke ?? model.resolvedTheme.axis;
|
|
112
|
+
const renderer = getLineChartRenderer(rendererProp);
|
|
113
|
+
const { Group, Path, Rect, Surface } = renderer;
|
|
114
|
+
const Layer = renderer.Layer ?? Group;
|
|
115
|
+
const handleMinX = model.boxes.plot.x;
|
|
116
|
+
const handleMaxX = model.boxes.plot.x + model.boxes.plot.width - handleWidth;
|
|
117
|
+
const startHandleX = clamp(windowX - handleWidth / 2, handleMinX, handleMaxX);
|
|
118
|
+
const endHandleX = clamp(windowEndX - handleWidth / 2, handleMinX, handleMaxX);
|
|
119
|
+
const handleHeight = Math.max(8, config.handleHeight ?? plotHeight - config.handleInset * 2);
|
|
120
|
+
const handleY = plotY + (plotHeight - handleHeight) / 2;
|
|
121
|
+
const handleRadius = config.handleRadius ?? handleWidth / 2;
|
|
122
|
+
const windowProps = {
|
|
123
|
+
x: windowX,
|
|
124
|
+
y: plotY,
|
|
125
|
+
width: windowWidth,
|
|
126
|
+
height: plotHeight,
|
|
127
|
+
radius: config.windowRadius,
|
|
128
|
+
fill: config.windowFill ?? model.resolvedTheme.axis,
|
|
129
|
+
opacity: config.windowOpacity,
|
|
130
|
+
stroke: config.windowStroke ?? model.resolvedTheme.axis,
|
|
131
|
+
strokeOpacity: config.windowStrokeOpacity,
|
|
132
|
+
strokeWidth: config.windowStrokeWidth,
|
|
133
|
+
theme: model.resolvedTheme
|
|
134
|
+
};
|
|
135
|
+
const renderWindow = () => config.renderWindow ? (config.renderWindow(windowProps)) : (_jsx(Rect, { x: windowProps.x, y: windowProps.y, width: windowProps.width, height: windowProps.height, rx: windowProps.radius, fill: windowProps.fill, opacity: windowProps.opacity, stroke: windowProps.stroke, strokeOpacity: windowProps.strokeOpacity, strokeWidth: windowProps.strokeWidth }));
|
|
136
|
+
const renderHandle = (side, x) => {
|
|
137
|
+
const handleProps = {
|
|
138
|
+
side,
|
|
139
|
+
x,
|
|
140
|
+
y: handleY,
|
|
141
|
+
width: handleWidth,
|
|
142
|
+
height: handleHeight,
|
|
143
|
+
radius: handleRadius,
|
|
144
|
+
color: handleColor,
|
|
145
|
+
opacity: config.handleOpacity,
|
|
146
|
+
theme: model.resolvedTheme,
|
|
147
|
+
window: windowProps
|
|
148
|
+
};
|
|
149
|
+
return config.renderHandle ? (config.renderHandle(handleProps)) : (_jsx(Rect, { x: handleProps.x, y: handleProps.y, width: handleProps.width, height: handleProps.height, rx: handleProps.radius, fill: handleProps.color, opacity: handleProps.opacity }));
|
|
150
|
+
};
|
|
151
|
+
const renderLine = (props) => config.renderLine ? (_jsx(Group, { children: config.renderLine(props) }, `range-line-${props.key}`)) : (_jsx(Path, { d: props.path, fill: "none", stroke: props.color, strokeLinecap: "round", strokeLinejoin: "round", strokeOpacity: props.opacity, strokeWidth: props.strokeWidth, ...(props.strokeDasharray
|
|
152
|
+
? { strokeDasharray: props.strokeDasharray }
|
|
153
|
+
: {}) }, `range-line-${props.key}`));
|
|
154
|
+
return (_jsx(View, { pointerEvents: isInteractive ? "auto" : "none", style: {
|
|
155
|
+
height: config.height,
|
|
156
|
+
marginTop: config.gap,
|
|
157
|
+
overflow: "hidden",
|
|
158
|
+
width
|
|
159
|
+
}, testID: testID ? `${testID}-range-selector` : undefined, ...responderProps, children: _jsxs(Surface, { width: width, height: config.height, children: [_jsxs(Layer, { name: "background", children: [_jsx(Rect, { x: 0, y: 0, width: width, height: config.height, rx: 8, fill: config.backgroundFill ?? model.resolvedTheme.background }), _jsx(Rect, { x: plotX, y: plotY, width: plotWidth, height: plotHeight, rx: config.plotRadius, fill: config.plotFill ?? model.resolvedTheme.plotBackground })] }), _jsx(Layer, { name: "data", children: model.geometries.map(({ geometry, style }, index) => {
|
|
160
|
+
const seriesStyle = config.series?.[geometry.key];
|
|
161
|
+
const lineProps = {
|
|
162
|
+
color: seriesStyle?.color ?? style.color,
|
|
163
|
+
index,
|
|
164
|
+
key: geometry.key,
|
|
165
|
+
label: geometry.label,
|
|
166
|
+
opacity: seriesStyle?.opacity ?? config.lineOpacity,
|
|
167
|
+
path: geometry.line.path,
|
|
168
|
+
strokeDasharray: seriesStyle?.strokeDasharray,
|
|
169
|
+
strokeWidth: seriesStyle?.strokeWidth ??
|
|
170
|
+
config.lineStrokeWidth ??
|
|
171
|
+
Math.max(config.lineMinStrokeWidth, style.strokeWidth * config.lineStrokeWidthScale),
|
|
172
|
+
theme: model.resolvedTheme
|
|
173
|
+
};
|
|
174
|
+
return renderLine(lineProps);
|
|
175
|
+
}) }), _jsxs(Layer, { name: "overlays", children: [config.outsideOpacity > 0 ? (_jsxs(Group, { children: [_jsx(Rect, { x: plotX, y: plotY, width: Math.max(0, windowX - plotX), height: plotHeight, fill: config.outsideFill ?? model.resolvedTheme.background, opacity: config.outsideOpacity }, "range-selector-outside-start"), _jsx(Rect, { x: windowEndX, y: plotY, width: Math.max(0, plotX + plotWidth - windowEndX), height: plotHeight, fill: config.outsideFill ?? model.resolvedTheme.background, opacity: config.outsideOpacity }, "range-selector-outside-end")] }, "range-selector-outside")) : null, renderWindow(), isInteractive ? (_jsxs(Group, { children: [renderHandle("start", startHandleX), renderHandle("end", endHandleX)] }, "range-selector-handles")) : null] })] }) }));
|
|
176
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { LineChartProps } from "./types";
|
|
2
|
+
export declare const getRangeSelectorConfig: (rangeSelector: LineChartProps<Record<string, unknown>>["rangeSelector"]) => {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
height: number;
|
|
5
|
+
gap: number;
|
|
6
|
+
interactive: boolean;
|
|
7
|
+
minVisiblePoints: number;
|
|
8
|
+
backgroundFill: string | undefined;
|
|
9
|
+
plotFill: string | undefined;
|
|
10
|
+
plotRadius: number;
|
|
11
|
+
lineMinStrokeWidth: number;
|
|
12
|
+
lineStrokeWidth: number | undefined;
|
|
13
|
+
lineStrokeWidthScale: number;
|
|
14
|
+
series: Record<string, import("./types").LineChartRangeSelectorSeriesStyle> | undefined;
|
|
15
|
+
outsideFill: string | undefined;
|
|
16
|
+
outsideOpacity: number;
|
|
17
|
+
windowFill: string | undefined;
|
|
18
|
+
windowOpacity: number;
|
|
19
|
+
windowRadius: number;
|
|
20
|
+
windowStroke: string | undefined;
|
|
21
|
+
windowStrokeOpacity: number;
|
|
22
|
+
windowStrokeWidth: number;
|
|
23
|
+
lineOpacity: number;
|
|
24
|
+
handleColor: string | undefined;
|
|
25
|
+
handleHeight: number | undefined;
|
|
26
|
+
handleHitSlop: number;
|
|
27
|
+
handleInset: number;
|
|
28
|
+
handleOpacity: number;
|
|
29
|
+
handleRadius: number | undefined;
|
|
30
|
+
handleWidth: number;
|
|
31
|
+
renderHandle: ((props: import("./types").LineChartRangeSelectorHandleRenderProps) => import("react").ReactNode) | undefined;
|
|
32
|
+
renderLine: ((props: import("./types").LineChartRangeSelectorLineRenderProps) => import("react").ReactNode) | undefined;
|
|
33
|
+
renderWindow: ((props: import("./types").LineChartRangeSelectorWindowRenderProps) => import("react").ReactNode) | undefined;
|
|
34
|
+
onGestureEnd: ((event: import("./types").LineChartRangeSelectorGestureEvent) => void) | undefined;
|
|
35
|
+
onGestureStart: ((event: import("./types").LineChartRangeSelectorGestureEvent) => void) | undefined;
|
|
36
|
+
};
|
|
37
|
+
export type LineChartRangeSelectorResolvedConfig = ReturnType<typeof getRangeSelectorConfig>;
|
|
38
|
+
//# sourceMappingURL=rangeSelectorConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rangeSelectorConfig.d.ts","sourceRoot":"","sources":["../../../src/charts/line/rangeSelectorConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,sBAAsB,GACjC,eAAe,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CxE,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG,UAAU,CAC3D,OAAO,sBAAsB,CAC9B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export const getRangeSelectorConfig = (rangeSelector) => {
|
|
2
|
+
const config = typeof rangeSelector === "object" ? rangeSelector : {};
|
|
3
|
+
const visible = typeof rangeSelector === "boolean"
|
|
4
|
+
? rangeSelector
|
|
5
|
+
: rangeSelector !== undefined && config.visible !== false;
|
|
6
|
+
return {
|
|
7
|
+
visible,
|
|
8
|
+
height: config.height ?? 54,
|
|
9
|
+
gap: config.gap ?? 10,
|
|
10
|
+
interactive: config.interactive ?? false,
|
|
11
|
+
minVisiblePoints: config.minVisiblePoints ?? 2,
|
|
12
|
+
backgroundFill: config.backgroundFill,
|
|
13
|
+
plotFill: config.plotFill,
|
|
14
|
+
plotRadius: config.plotRadius ?? 6,
|
|
15
|
+
lineMinStrokeWidth: config.lineMinStrokeWidth ?? 1.5,
|
|
16
|
+
lineStrokeWidth: config.lineStrokeWidth,
|
|
17
|
+
lineStrokeWidthScale: config.lineStrokeWidthScale ?? 0.62,
|
|
18
|
+
series: config.series,
|
|
19
|
+
outsideFill: config.outsideFill,
|
|
20
|
+
outsideOpacity: config.outsideOpacity ?? 0,
|
|
21
|
+
windowFill: config.windowFill,
|
|
22
|
+
windowOpacity: config.windowOpacity ?? 0.1,
|
|
23
|
+
windowRadius: config.windowRadius ?? 6,
|
|
24
|
+
windowStroke: config.windowStroke,
|
|
25
|
+
windowStrokeOpacity: config.windowStrokeOpacity ?? 0.42,
|
|
26
|
+
windowStrokeWidth: config.windowStrokeWidth ?? 1,
|
|
27
|
+
lineOpacity: config.lineOpacity ?? 0.62,
|
|
28
|
+
handleColor: config.handleColor,
|
|
29
|
+
handleHeight: config.handleHeight,
|
|
30
|
+
handleHitSlop: config.handleHitSlop ?? 18,
|
|
31
|
+
handleInset: config.handleInset ?? 6,
|
|
32
|
+
handleOpacity: config.handleOpacity ?? 0.9,
|
|
33
|
+
handleRadius: config.handleRadius,
|
|
34
|
+
handleWidth: config.handleWidth ?? 3,
|
|
35
|
+
renderHandle: config.renderHandle,
|
|
36
|
+
renderLine: config.renderLine,
|
|
37
|
+
renderWindow: config.renderWindow,
|
|
38
|
+
onGestureEnd: config.onGestureEnd,
|
|
39
|
+
onGestureStart: config.onGestureStart
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { GeometryPoint, Rect } from "../../../core/index";
|
|
2
|
+
import type { LineChartReferenceLabelPlacement } from "./types";
|
|
3
|
+
export type ReferenceCollisionGeometry = {
|
|
4
|
+
line: {
|
|
5
|
+
segments: Array<{
|
|
6
|
+
points: GeometryPoint[];
|
|
7
|
+
}>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const resolveReferenceLineLabelY: ({ geometries, labelOffset, labelPlacement, lineY, plot, text, textAnchor, fontSize, x }: {
|
|
11
|
+
geometries: ReferenceCollisionGeometry[] | undefined;
|
|
12
|
+
labelOffset: number;
|
|
13
|
+
labelPlacement: LineChartReferenceLabelPlacement | undefined;
|
|
14
|
+
lineY: number;
|
|
15
|
+
plot: Rect;
|
|
16
|
+
text: string;
|
|
17
|
+
textAnchor: "middle" | "start" | "end";
|
|
18
|
+
fontSize: number;
|
|
19
|
+
x: number;
|
|
20
|
+
}) => number;
|
|
21
|
+
//# sourceMappingURL=referenceLabelPlacement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"referenceLabelPlacement.d.ts","sourceRoot":"","sources":["../../../src/charts/line/referenceLabelPlacement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAKhE,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE;QACJ,QAAQ,EAAE,KAAK,CAAC;YACd,MAAM,EAAE,aAAa,EAAE,CAAC;SACzB,CAAC,CAAC;KACJ,CAAC;CACH,CAAC;AAuMF,eAAO,MAAM,0BAA0B,GAAI,yFAUxC;IACD,UAAU,EAAE,0BAA0B,EAAE,GAAG,SAAS,CAAC;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,gCAAgC,GAAG,SAAS,CAAC;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,WAoBA,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
const referenceLabelSeriesPadding = 10;
|
|
2
|
+
const referenceLabelSpacing = 3;
|
|
3
|
+
const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
4
|
+
const estimateReferenceLabelWidth = (text, fontSize) => Math.max(fontSize, text.length * fontSize * 0.56);
|
|
5
|
+
const getReferenceLabelBox = ({ fontSize, text, textAnchor, x, y }) => {
|
|
6
|
+
const width = estimateReferenceLabelWidth(text, fontSize);
|
|
7
|
+
const left = textAnchor === "middle"
|
|
8
|
+
? x - width / 2
|
|
9
|
+
: textAnchor === "end"
|
|
10
|
+
? x - width
|
|
11
|
+
: x;
|
|
12
|
+
return {
|
|
13
|
+
x: left,
|
|
14
|
+
y: y - fontSize,
|
|
15
|
+
width,
|
|
16
|
+
height: fontSize
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
const expandBox = (box, padding) => ({
|
|
20
|
+
x: box.x - padding,
|
|
21
|
+
y: box.y - padding,
|
|
22
|
+
width: box.width + padding * 2,
|
|
23
|
+
height: box.height + padding * 2
|
|
24
|
+
});
|
|
25
|
+
const containsPoint = (box, point) => point.x >= box.x &&
|
|
26
|
+
point.x <= box.x + box.width &&
|
|
27
|
+
point.y >= box.y &&
|
|
28
|
+
point.y <= box.y + box.height;
|
|
29
|
+
const orientation = (a, b, c) => (b.y - a.y) * (c.x - b.x) - (b.x - a.x) * (c.y - b.y);
|
|
30
|
+
const isBetween = (value, start, end) => value >= Math.min(start, end) && value <= Math.max(start, end);
|
|
31
|
+
const segmentsIntersect = (a, b, c, d) => {
|
|
32
|
+
const first = orientation(a, b, c);
|
|
33
|
+
const second = orientation(a, b, d);
|
|
34
|
+
const third = orientation(c, d, a);
|
|
35
|
+
const fourth = orientation(c, d, b);
|
|
36
|
+
if (first === 0 && isBetween(c.x, a.x, b.x) && isBetween(c.y, a.y, b.y)) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
if (second === 0 && isBetween(d.x, a.x, b.x) && isBetween(d.y, a.y, b.y)) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
if (third === 0 && isBetween(a.x, c.x, d.x) && isBetween(a.y, c.y, d.y)) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
if (fourth === 0 && isBetween(b.x, c.x, d.x) && isBetween(b.y, c.y, d.y)) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
return first > 0 !== second > 0 && third > 0 !== fourth > 0;
|
|
49
|
+
};
|
|
50
|
+
const segmentIntersectsBox = (start, end, box) => {
|
|
51
|
+
if (containsPoint(box, start) || containsPoint(box, end)) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
const left = box.x;
|
|
55
|
+
const right = box.x + box.width;
|
|
56
|
+
const top = box.y;
|
|
57
|
+
const bottom = box.y + box.height;
|
|
58
|
+
const topLeft = { x: left, y: top };
|
|
59
|
+
const topRight = { x: right, y: top };
|
|
60
|
+
const bottomRight = { x: right, y: bottom };
|
|
61
|
+
const bottomLeft = { x: left, y: bottom };
|
|
62
|
+
return (segmentsIntersect(start, end, topLeft, topRight) ||
|
|
63
|
+
segmentsIntersect(start, end, topRight, bottomRight) ||
|
|
64
|
+
segmentsIntersect(start, end, bottomRight, bottomLeft) ||
|
|
65
|
+
segmentsIntersect(start, end, bottomLeft, topLeft));
|
|
66
|
+
};
|
|
67
|
+
const collidesWithSeries = (box, geometries) => {
|
|
68
|
+
if (!geometries || geometries.length === 0) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
const paddedBox = expandBox(box, referenceLabelSeriesPadding);
|
|
72
|
+
return geometries.some((geometry) => geometry.line.segments.some((segment) => segment.points.some((point, index) => {
|
|
73
|
+
const next = segment.points[index + 1];
|
|
74
|
+
return next ? segmentIntersectsBox(point, next, paddedBox) : false;
|
|
75
|
+
})));
|
|
76
|
+
};
|
|
77
|
+
const getReferenceLabelCandidate = ({ geometries, labelOffset, labelPlacement, lineY, plot, text, textAnchor, fontSize, x }) => {
|
|
78
|
+
const plotBottom = plot.y + plot.height;
|
|
79
|
+
const desiredY = labelPlacement === "above"
|
|
80
|
+
? lineY - labelOffset
|
|
81
|
+
: lineY + fontSize + labelOffset;
|
|
82
|
+
const y = clamp(desiredY, plot.y + fontSize, plotBottom - referenceLabelSpacing);
|
|
83
|
+
const box = getReferenceLabelBox({ fontSize, text, textAnchor, x, y });
|
|
84
|
+
const overflow = Math.max(0, plot.y - box.y) + Math.max(0, box.y + box.height - plotBottom);
|
|
85
|
+
const lineCollision = lineY >= box.y - referenceLabelSpacing &&
|
|
86
|
+
lineY <= box.y + box.height + referenceLabelSpacing;
|
|
87
|
+
const seriesCollision = collidesWithSeries(box, geometries);
|
|
88
|
+
return {
|
|
89
|
+
box,
|
|
90
|
+
y,
|
|
91
|
+
score: (labelPlacement === "below" ? 1 : 0) +
|
|
92
|
+
overflow * 20 +
|
|
93
|
+
(lineCollision ? 200 : 0) +
|
|
94
|
+
(seriesCollision ? 100 : 0)
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export const resolveReferenceLineLabelY = ({ geometries, labelOffset, labelPlacement, lineY, plot, text, textAnchor, fontSize, x }) => {
|
|
98
|
+
const placements = labelPlacement === "above" || labelPlacement === "below"
|
|
99
|
+
? [labelPlacement]
|
|
100
|
+
: ["above", "below"];
|
|
101
|
+
const candidates = placements.map((placement) => getReferenceLabelCandidate({
|
|
102
|
+
geometries,
|
|
103
|
+
labelOffset,
|
|
104
|
+
labelPlacement: placement,
|
|
105
|
+
lineY,
|
|
106
|
+
plot,
|
|
107
|
+
text,
|
|
108
|
+
textAnchor,
|
|
109
|
+
fontSize,
|
|
110
|
+
x
|
|
111
|
+
}));
|
|
112
|
+
return candidates.sort((a, b) => a.score - b.score)[0]?.y ?? lineY;
|
|
113
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { LinearScale, Rect } from "../../../core/index";
|
|
2
|
+
import type { ResolvedCartesianChartTheme } from "../../theme";
|
|
3
|
+
import { type ReferenceCollisionGeometry } from "./referenceLabelPlacement";
|
|
4
|
+
import type { LineChartReferenceBandConfig, LineChartReferenceLineConfig } from "./types";
|
|
5
|
+
export type LineChartReferenceLabelContainerModel = {
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
borderRadius: number;
|
|
8
|
+
opacity: number;
|
|
9
|
+
paddingX: number;
|
|
10
|
+
paddingY: number;
|
|
11
|
+
};
|
|
12
|
+
export type LineChartReferenceLineModel = {
|
|
13
|
+
key: string;
|
|
14
|
+
x1: number;
|
|
15
|
+
x2: number;
|
|
16
|
+
y: number;
|
|
17
|
+
color: string;
|
|
18
|
+
opacity: number;
|
|
19
|
+
strokeDasharray?: readonly number[];
|
|
20
|
+
strokeWidth: number;
|
|
21
|
+
label?: {
|
|
22
|
+
text: string;
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
color: string;
|
|
26
|
+
container?: LineChartReferenceLabelContainerModel;
|
|
27
|
+
fontSize: number;
|
|
28
|
+
textAnchor: "middle" | "start" | "end";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type LineChartReferenceBandModel = {
|
|
32
|
+
key: string;
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
width: number;
|
|
36
|
+
height: number;
|
|
37
|
+
color: string;
|
|
38
|
+
opacity: number;
|
|
39
|
+
label?: {
|
|
40
|
+
text: string;
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
color: string;
|
|
44
|
+
container?: LineChartReferenceLabelContainerModel;
|
|
45
|
+
fontSize: number;
|
|
46
|
+
textAnchor: "middle" | "start" | "end";
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const buildLineChartReferenceLineModels: ({ geometries, lines, plot, theme, yScale }: {
|
|
50
|
+
geometries?: ReferenceCollisionGeometry[] | undefined;
|
|
51
|
+
lines: LineChartReferenceLineConfig[] | undefined;
|
|
52
|
+
plot: Rect;
|
|
53
|
+
theme: ResolvedCartesianChartTheme;
|
|
54
|
+
yScale: LinearScale;
|
|
55
|
+
}) => LineChartReferenceLineModel[];
|
|
56
|
+
export declare const buildLineChartReferenceBandModels: ({ bands, plot, theme, yScale }: {
|
|
57
|
+
bands: LineChartReferenceBandConfig[] | undefined;
|
|
58
|
+
plot: Rect;
|
|
59
|
+
theme: ResolvedCartesianChartTheme;
|
|
60
|
+
yScale: LinearScale;
|
|
61
|
+
}) => LineChartReferenceBandModel[];
|
|
62
|
+
//# sourceMappingURL=references.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../../src/charts/line/references.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,4BAA4B,EAG5B,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,qCAAqC,GAAG;IAClD,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,qCAAqC,CAAC;QAClD,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;KACxC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,qCAAqC,CAAC;QAClD,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;KACxC,CAAC;CACH,CAAC;AAgGF,eAAO,MAAM,iCAAiC,GAAI,4CAM/C;IACD,UAAU,CAAC,EAAE,0BAA0B,EAAE,GAAG,SAAS,CAAC;IACtD,KAAK,EAAE,4BAA4B,EAAE,GAAG,SAAS,CAAC;IAClD,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,2BAA2B,CAAC;IACnC,MAAM,EAAE,WAAW,CAAC;CACrB,KAAG,2BAA2B,EAwE9B,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAAI,gCAK/C;IACD,KAAK,EAAE,4BAA4B,EAAE,GAAG,SAAS,CAAC;IAClD,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,2BAA2B,CAAC;IACnC,MAAM,EAAE,WAAW,CAAC;CACrB,KAAG,2BAA2B,EA8D9B,CAAC"}
|