@gravity-ui/charts 1.41.2 → 1.42.1
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/dist/cjs/components/AxisX/AxisX.js +2 -1
- package/dist/cjs/components/AxisX/prepare-axis-data.js +2 -2
- package/dist/cjs/components/AxisX/types.d.ts +1 -1
- package/dist/cjs/components/AxisY/AxisY.js +2 -1
- package/dist/cjs/components/AxisY/prepare-axis-data.js +1 -1
- package/dist/cjs/components/AxisY/prepare-axis-title.js +1 -1
- package/dist/cjs/components/AxisY/types.d.ts +1 -1
- package/dist/cjs/components/AxisY/utils.js +1 -1
- package/dist/cjs/components/ChartInner/index.js +3 -2
- package/dist/cjs/components/ChartInner/useChartInnerHandlers.d.ts +1 -1
- package/dist/cjs/components/ChartInner/useChartInnerHandlers.js +4 -4
- package/dist/cjs/components/ChartInner/useChartInnerProps.d.ts +1 -1
- package/dist/cjs/components/ChartInner/useChartInnerProps.js +4 -4
- package/dist/cjs/components/ChartInner/useChartInnerState.js +1 -1
- package/dist/cjs/components/ChartInner/useDefaultState.d.ts +1 -1
- package/dist/cjs/components/ChartInner/useDefaultState.js +4 -4
- package/dist/cjs/components/ChartInner/utils/axis.d.ts +2 -2
- package/dist/cjs/components/ChartInner/utils/axis.js +1 -1
- package/dist/cjs/components/ChartInner/utils/normalized-original-data.js +1 -1
- package/dist/cjs/components/ChartInner/utils/title.js +1 -1
- package/dist/cjs/components/ChartInner/utils/tooltip.js +7 -2
- package/dist/cjs/components/ChartInner/utils/zoom.d.ts +1 -1
- package/dist/cjs/components/ChartInner/utils/zoom.js +1 -1
- package/dist/cjs/components/Legend/index.js +4 -3
- package/dist/cjs/components/PlotTitle/index.d.ts +1 -1
- package/dist/cjs/components/RangeSlider/index.js +2 -1
- package/dist/cjs/components/Tooltip/DefaultTooltipContent/RowWithAggregation.js +1 -1
- package/dist/cjs/components/Tooltip/DefaultTooltipContent/index.js +2 -2
- package/dist/cjs/components/Tooltip/DefaultTooltipContent/utils.d.ts +2 -1
- package/dist/cjs/components/Tooltip/DefaultTooltipContent/utils.js +5 -5
- package/dist/cjs/components/index.js +3 -3
- package/dist/cjs/components/utils/axis-title.js +1 -1
- package/dist/cjs/components/utils/index.d.ts +1 -1
- package/dist/cjs/components/utils/index.js +1 -1
- package/dist/cjs/core/axes/index.d.ts +5 -0
- package/dist/cjs/core/axes/index.js +5 -0
- package/dist/{esm/hooks/useAxis → cjs/core/axes}/range-slider.js +1 -1
- package/dist/cjs/core/axes/types.d.ts +84 -0
- package/dist/{esm/hooks/useAxis → cjs/core/axes}/utils.js +1 -1
- package/dist/cjs/{hooks/useAxis → core/axes}/x-axis.js +4 -4
- package/dist/cjs/{hooks/useAxis → core/axes}/y-axis.d.ts +2 -2
- package/dist/cjs/{hooks/useAxis → core/axes}/y-axis.js +3 -3
- package/dist/cjs/core/index.d.ts +10 -0
- package/dist/cjs/core/index.js +10 -0
- package/dist/{esm/utils/chart → cjs/core/layout}/chart-dimensions.d.ts +3 -1
- package/dist/cjs/{utils/chart → core/layout}/chart-dimensions.js +1 -1
- package/dist/cjs/core/layout/index.d.ts +3 -0
- package/dist/cjs/core/layout/index.js +3 -0
- package/dist/cjs/{hooks/useSplit/index.d.ts → core/layout/split.d.ts} +1 -1
- package/dist/{esm/hooks/useSplit/index.js → cjs/core/layout/split.js} +1 -1
- package/dist/cjs/core/scales/index.d.ts +4 -0
- package/dist/cjs/core/scales/index.js +4 -0
- package/dist/{esm/hooks/useAxisScales → cjs/core/scales}/utils.d.ts +3 -2
- package/dist/{esm/hooks/useAxisScales → cjs/core/scales}/utils.js +2 -2
- package/dist/{esm/hooks/useAxisScales → cjs/core/scales}/x-scale.d.ts +4 -2
- package/dist/{esm/hooks/useAxisScales → cjs/core/scales}/x-scale.js +3 -3
- package/dist/{esm/hooks/useAxisScales → cjs/core/scales}/y-scale.d.ts +3 -2
- package/dist/{esm/hooks/useAxisScales → cjs/core/scales}/y-scale.js +3 -3
- package/dist/{esm/hooks/useSeries → cjs/core/series}/constants.d.ts +1 -1
- package/dist/cjs/core/series/index.d.ts +4 -0
- package/dist/cjs/core/series/index.js +4 -0
- package/dist/cjs/{hooks/useSeries → core/series}/prepare-area.d.ts +1 -1
- package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-area.js +2 -2
- package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-bar-x.js +2 -2
- package/dist/cjs/{hooks/useSeries → core/series}/prepare-bar-y.js +3 -3
- package/dist/cjs/{hooks/useSeries → core/series}/prepare-funnel.js +2 -2
- package/dist/cjs/{hooks/useSeries → core/series}/prepare-heatmap.js +2 -2
- package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-legend.d.ts +1 -1
- package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-legend.js +2 -2
- package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-line.d.ts +1 -1
- package/dist/cjs/{hooks/useSeries → core/series}/prepare-line.js +2 -2
- package/dist/cjs/{hooks/useSeries → core/series}/prepare-options.js +1 -1
- package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-pie.js +2 -2
- package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-radar.d.ts +1 -1
- package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-radar.js +2 -2
- package/dist/cjs/{hooks/useSeries → core/series}/prepare-sankey.js +2 -2
- package/dist/cjs/{hooks/useSeries → core/series}/prepare-scatter.js +2 -2
- package/dist/cjs/{hooks/useSeries → core/series}/prepare-treemap.js +2 -2
- package/dist/{esm/hooks/useSeries → cjs/core/series}/prepare-waterfall.js +2 -2
- package/dist/cjs/core/series/types.d.ts +346 -0
- package/dist/cjs/core/series/utils.d.ts +11 -0
- package/dist/cjs/core/series/utils.js +37 -0
- package/dist/{esm → cjs/core}/types/chart/base.d.ts +19 -0
- package/dist/{esm → cjs/core}/types/chart/tooltip.d.ts +33 -0
- package/dist/cjs/core/types/formatter.d.ts +40 -0
- package/dist/cjs/core/types/index.d.ts +96 -0
- package/dist/cjs/core/types/index.js +24 -0
- package/dist/{esm/utils/chart → cjs/core/utils}/common.js +2 -2
- package/dist/cjs/{utils/chart → core/utils}/format.d.ts +1 -1
- package/dist/cjs/{utils/chart → core/utils}/format.js +1 -1
- package/dist/cjs/{utils/chart → core/utils}/get-closest-data.js +2 -2
- package/dist/{esm/utils/chart → cjs/core/utils}/get-hovered-plots.d.ts +2 -2
- package/dist/cjs/{utils/chart → core/utils}/index.d.ts +4 -2
- package/dist/{esm/utils/chart → cjs/core/utils}/index.js +4 -2
- package/dist/cjs/{utils/chart → core/utils}/series/line.d.ts +1 -1
- package/dist/{esm/utils/chart → cjs/core/utils}/series/sorting.js +2 -2
- package/dist/cjs/{utils/chart → core/utils}/symbol.d.ts +1 -1
- package/dist/{esm/utils/chart → cjs/core/utils}/symbol.js +1 -1
- package/dist/cjs/{utils/chart → core/utils}/text.js +1 -1
- package/dist/{esm/utils/chart → cjs/core/utils}/ticks/datetime.js +1 -1
- package/dist/cjs/core/utils/time.d.ts +15 -0
- package/dist/{esm/utils/chart → cjs/core/utils}/time.js +5 -4
- package/dist/cjs/{utils/chart → core/utils}/tooltip.d.ts +3 -2
- package/dist/{esm/utils/chart → cjs/core/utils}/tooltip.js +7 -3
- package/dist/{esm → cjs/core}/validation/index.js +1 -1
- package/dist/cjs/{validation → core/validation}/validate-axes.js +1 -1
- package/dist/cjs/core/zoom/index.d.ts +1 -0
- package/dist/cjs/core/zoom/index.js +1 -0
- package/dist/cjs/{utils/chart → core/zoom}/zoom.d.ts +3 -1
- package/dist/cjs/{utils/chart → core/zoom}/zoom.js +1 -1
- package/dist/cjs/hooks/index.d.ts +5 -5
- package/dist/cjs/hooks/index.js +5 -5
- package/dist/cjs/hooks/useAxis/index.d.ts +4 -4
- package/dist/cjs/hooks/useAxis/index.js +3 -3
- package/dist/cjs/hooks/useAxis/types.d.ts +1 -84
- package/dist/cjs/hooks/useAxis/types.js +1 -1
- package/dist/cjs/hooks/useAxisScales/index.d.ts +4 -4
- package/dist/cjs/hooks/useAxisScales/index.js +6 -6
- package/dist/cjs/hooks/useBrush/types.d.ts +1 -1
- package/dist/cjs/hooks/useCrosshair/index.js +1 -1
- package/dist/cjs/hooks/useCrosshair/useCrosshairHover.js +1 -1
- package/dist/cjs/hooks/useRangeSlider/index.d.ts +1 -1
- package/dist/cjs/hooks/useRangeSlider/index.js +2 -2
- package/dist/cjs/hooks/useRangeSlider/types.d.ts +1 -1
- package/dist/cjs/hooks/useRangeSlider/utils.d.ts +1 -1
- package/dist/cjs/hooks/useRangeSlider/utils.js +1 -1
- package/dist/cjs/hooks/useSeries/index.d.ts +1 -1
- package/dist/cjs/hooks/useSeries/index.js +2 -2
- package/dist/cjs/hooks/useSeries/types.d.ts +1 -346
- package/dist/cjs/hooks/useSeries/types.js +1 -1
- package/dist/cjs/hooks/useSeries/utils.d.ts +1 -11
- package/dist/cjs/hooks/useSeries/utils.js +1 -37
- package/dist/cjs/hooks/useShapes/area/index.js +2 -1
- package/dist/cjs/hooks/useShapes/area/prepare-data.d.ts +2 -2
- package/dist/cjs/hooks/useShapes/area/prepare-data.js +2 -2
- package/dist/cjs/hooks/useShapes/bar-x/index.js +2 -1
- package/dist/cjs/hooks/useShapes/bar-x/prepare-data.d.ts +2 -2
- package/dist/cjs/hooks/useShapes/bar-x/prepare-data.js +2 -2
- package/dist/cjs/hooks/useShapes/bar-y/prepare-data.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/bar-y/prepare-data.js +2 -2
- package/dist/cjs/hooks/useShapes/funnel/index.js +2 -1
- package/dist/cjs/hooks/useShapes/funnel/prepare-data.js +1 -1
- package/dist/cjs/hooks/useShapes/funnel/types.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/heatmap/prepare-data.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/heatmap/prepare-data.js +1 -1
- package/dist/cjs/hooks/useShapes/index.d.ts +3 -3
- package/dist/cjs/hooks/useShapes/index.js +2 -2
- package/dist/cjs/hooks/useShapes/line/index.js +2 -1
- package/dist/cjs/hooks/useShapes/line/prepare-data.d.ts +2 -2
- package/dist/cjs/hooks/useShapes/line/prepare-data.js +2 -2
- package/dist/cjs/hooks/useShapes/line/types.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/marker.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/marker.js +3 -2
- package/dist/cjs/hooks/useShapes/pie/index.js +2 -1
- package/dist/cjs/hooks/useShapes/pie/prepare-data.js +3 -3
- package/dist/cjs/hooks/useShapes/radar/prepare-data.js +2 -2
- package/dist/cjs/hooks/useShapes/sankey/prepare-data.js +1 -1
- package/dist/cjs/hooks/useShapes/scatter/prepare-data.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/scatter/prepare-data.js +1 -1
- package/dist/cjs/hooks/useShapes/treemap/prepare-data.js +3 -3
- package/dist/cjs/hooks/useShapes/utils.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/utils.js +1 -1
- package/dist/cjs/hooks/useShapes/waterfall/index.js +3 -2
- package/dist/cjs/hooks/useShapes/waterfall/prepare-data.d.ts +1 -1
- package/dist/cjs/hooks/useShapes/waterfall/prepare-data.js +2 -2
- package/dist/cjs/hooks/useZoom/index.d.ts +2 -2
- package/dist/cjs/hooks/useZoom/utils.d.ts +2 -2
- package/dist/cjs/hooks/useZoom/utils.js +1 -1
- package/dist/cjs/hooks/utils/bar-y.d.ts +1 -1
- package/dist/cjs/hooks/utils/bar-y.js +1 -1
- package/dist/cjs/hooks/utils/get-band-size.js +1 -1
- package/dist/cjs/index.d.ts +3 -2
- package/dist/cjs/index.js +3 -2
- package/dist/cjs/types/chart-ui.d.ts +1 -1
- package/dist/cjs/types/index.d.ts +1 -96
- package/dist/cjs/types/index.js +1 -24
- package/dist/cjs/utils/chart-ui/pie-center-text.js +2 -2
- package/dist/cjs/utils/index.d.ts +0 -3
- package/dist/cjs/utils/index.js +0 -3
- package/dist/esm/components/AxisX/AxisX.js +2 -1
- package/dist/esm/components/AxisX/prepare-axis-data.js +2 -2
- package/dist/esm/components/AxisX/types.d.ts +1 -1
- package/dist/esm/components/AxisY/AxisY.js +2 -1
- package/dist/esm/components/AxisY/prepare-axis-data.js +1 -1
- package/dist/esm/components/AxisY/prepare-axis-title.js +1 -1
- package/dist/esm/components/AxisY/types.d.ts +1 -1
- package/dist/esm/components/AxisY/utils.js +1 -1
- package/dist/esm/components/ChartInner/index.js +3 -2
- package/dist/esm/components/ChartInner/useChartInnerHandlers.d.ts +1 -1
- package/dist/esm/components/ChartInner/useChartInnerHandlers.js +4 -4
- package/dist/esm/components/ChartInner/useChartInnerProps.d.ts +1 -1
- package/dist/esm/components/ChartInner/useChartInnerProps.js +4 -4
- package/dist/esm/components/ChartInner/useChartInnerState.js +1 -1
- package/dist/esm/components/ChartInner/useDefaultState.d.ts +1 -1
- package/dist/esm/components/ChartInner/useDefaultState.js +4 -4
- package/dist/esm/components/ChartInner/utils/axis.d.ts +2 -2
- package/dist/esm/components/ChartInner/utils/axis.js +1 -1
- package/dist/esm/components/ChartInner/utils/normalized-original-data.js +1 -1
- package/dist/esm/components/ChartInner/utils/title.js +1 -1
- package/dist/esm/components/ChartInner/utils/tooltip.js +7 -2
- package/dist/esm/components/ChartInner/utils/zoom.d.ts +1 -1
- package/dist/esm/components/ChartInner/utils/zoom.js +1 -1
- package/dist/esm/components/Legend/index.js +4 -3
- package/dist/esm/components/PlotTitle/index.d.ts +1 -1
- package/dist/esm/components/RangeSlider/index.js +2 -1
- package/dist/esm/components/Tooltip/DefaultTooltipContent/RowWithAggregation.js +1 -1
- package/dist/esm/components/Tooltip/DefaultTooltipContent/index.js +2 -2
- package/dist/esm/components/Tooltip/DefaultTooltipContent/utils.d.ts +2 -1
- package/dist/esm/components/Tooltip/DefaultTooltipContent/utils.js +5 -5
- package/dist/esm/components/index.js +3 -3
- package/dist/esm/components/utils/axis-title.js +1 -1
- package/dist/esm/components/utils/index.d.ts +1 -1
- package/dist/esm/components/utils/index.js +1 -1
- package/dist/esm/core/axes/index.d.ts +5 -0
- package/dist/esm/core/axes/index.js +5 -0
- package/dist/{cjs/hooks/useAxis → esm/core/axes}/range-slider.js +1 -1
- package/dist/esm/core/axes/types.d.ts +84 -0
- package/dist/{cjs/hooks/useAxis → esm/core/axes}/utils.js +1 -1
- package/dist/esm/{hooks/useAxis → core/axes}/x-axis.js +4 -4
- package/dist/esm/{hooks/useAxis → core/axes}/y-axis.d.ts +2 -2
- package/dist/esm/{hooks/useAxis → core/axes}/y-axis.js +3 -3
- package/dist/esm/core/index.d.ts +10 -0
- package/dist/esm/core/index.js +10 -0
- package/dist/{cjs/utils/chart → esm/core/layout}/chart-dimensions.d.ts +3 -1
- package/dist/esm/{utils/chart → core/layout}/chart-dimensions.js +1 -1
- package/dist/esm/core/layout/index.d.ts +3 -0
- package/dist/esm/core/layout/index.js +3 -0
- package/dist/esm/{hooks/useSplit/index.d.ts → core/layout/split.d.ts} +1 -1
- package/dist/{cjs/hooks/useSplit/index.js → esm/core/layout/split.js} +1 -1
- package/dist/esm/core/scales/index.d.ts +4 -0
- package/dist/esm/core/scales/index.js +4 -0
- package/dist/{cjs/hooks/useAxisScales → esm/core/scales}/utils.d.ts +3 -2
- package/dist/{cjs/hooks/useAxisScales → esm/core/scales}/utils.js +2 -2
- package/dist/{cjs/hooks/useAxisScales → esm/core/scales}/x-scale.d.ts +4 -2
- package/dist/{cjs/hooks/useAxisScales → esm/core/scales}/x-scale.js +3 -3
- package/dist/{cjs/hooks/useAxisScales → esm/core/scales}/y-scale.d.ts +3 -2
- package/dist/{cjs/hooks/useAxisScales → esm/core/scales}/y-scale.js +3 -3
- package/dist/{cjs/hooks/useSeries → esm/core/series}/constants.d.ts +1 -1
- package/dist/esm/core/series/index.d.ts +4 -0
- package/dist/esm/core/series/index.js +4 -0
- package/dist/esm/{hooks/useSeries → core/series}/prepare-area.d.ts +1 -1
- package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-area.js +2 -2
- package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-bar-x.js +2 -2
- package/dist/esm/{hooks/useSeries → core/series}/prepare-bar-y.d.ts +3 -3
- package/dist/esm/{hooks/useSeries → core/series}/prepare-bar-y.js +3 -3
- package/dist/esm/{hooks/useSeries → core/series}/prepare-funnel.js +2 -2
- package/dist/esm/{hooks/useSeries → core/series}/prepare-heatmap.js +2 -2
- package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-legend.d.ts +1 -1
- package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-legend.js +2 -2
- package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-line.d.ts +1 -1
- package/dist/esm/{hooks/useSeries → core/series}/prepare-line.js +2 -2
- package/dist/esm/{hooks/useSeries → core/series}/prepare-options.js +1 -1
- package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-pie.js +2 -2
- package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-radar.d.ts +1 -1
- package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-radar.js +2 -2
- package/dist/esm/{hooks/useSeries → core/series}/prepare-sankey.js +2 -2
- package/dist/esm/{hooks/useSeries → core/series}/prepare-scatter.js +2 -2
- package/dist/esm/{hooks/useSeries → core/series}/prepare-treemap.js +2 -2
- package/dist/{cjs/hooks/useSeries → esm/core/series}/prepare-waterfall.js +2 -2
- package/dist/esm/core/series/types.d.ts +346 -0
- package/dist/esm/core/series/utils.d.ts +11 -0
- package/dist/esm/core/series/utils.js +37 -0
- package/dist/{cjs → esm/core}/types/chart/base.d.ts +19 -0
- package/dist/{cjs → esm/core}/types/chart/tooltip.d.ts +33 -0
- package/dist/esm/core/types/chart/zoom.js +1 -0
- package/dist/esm/core/types/formatter.d.ts +40 -0
- package/dist/esm/core/types/formatter.js +1 -0
- package/dist/esm/core/types/index.d.ts +96 -0
- package/dist/esm/core/types/index.js +24 -0
- package/dist/esm/core/types/misc.js +1 -0
- package/dist/{cjs/utils/chart → esm/core/utils}/common.js +2 -2
- package/dist/esm/{utils/chart → core/utils}/format.d.ts +1 -1
- package/dist/esm/{utils/chart → core/utils}/format.js +1 -1
- package/dist/esm/{utils/chart → core/utils}/get-closest-data.js +2 -2
- package/dist/{cjs/utils/chart → esm/core/utils}/get-hovered-plots.d.ts +2 -2
- package/dist/esm/{utils/chart → core/utils}/index.d.ts +4 -2
- package/dist/{cjs/utils/chart → esm/core/utils}/index.js +4 -2
- package/dist/esm/{utils/chart → core/utils}/series/line.d.ts +1 -1
- package/dist/{cjs/utils/chart → esm/core/utils}/series/sorting.js +2 -2
- package/dist/esm/{utils/chart → core/utils}/symbol.d.ts +1 -1
- package/dist/{cjs/utils/chart → esm/core/utils}/symbol.js +1 -1
- package/dist/esm/{utils/chart → core/utils}/text.js +1 -1
- package/dist/{cjs/utils/chart → esm/core/utils}/ticks/datetime.js +1 -1
- package/dist/esm/core/utils/time.d.ts +15 -0
- package/dist/{cjs/utils/chart → esm/core/utils}/time.js +5 -4
- package/dist/esm/core/utils/tooltip.d.ts +7 -0
- package/dist/{cjs/utils/chart → esm/core/utils}/tooltip.js +7 -3
- package/dist/esm/core/utils/types.js +1 -0
- package/dist/{cjs → esm/core}/validation/index.js +1 -1
- package/dist/esm/{validation → core/validation}/validate-axes.js +1 -1
- package/dist/esm/core/zoom/index.d.ts +1 -0
- package/dist/esm/core/zoom/index.js +1 -0
- package/dist/esm/{utils/chart → core/zoom}/zoom.d.ts +3 -1
- package/dist/esm/{utils/chart → core/zoom}/zoom.js +1 -1
- package/dist/esm/hooks/index.d.ts +5 -5
- package/dist/esm/hooks/index.js +5 -5
- package/dist/esm/hooks/useAxis/index.d.ts +4 -4
- package/dist/esm/hooks/useAxis/index.js +3 -3
- package/dist/esm/hooks/useAxis/types.d.ts +1 -84
- package/dist/esm/hooks/useAxis/types.js +1 -1
- package/dist/esm/hooks/useAxisScales/index.d.ts +4 -4
- package/dist/esm/hooks/useAxisScales/index.js +6 -6
- package/dist/esm/hooks/useBrush/types.d.ts +1 -1
- package/dist/esm/hooks/useCrosshair/index.js +1 -1
- package/dist/esm/hooks/useCrosshair/useCrosshairHover.js +1 -1
- package/dist/esm/hooks/useRangeSlider/index.d.ts +1 -1
- package/dist/esm/hooks/useRangeSlider/index.js +2 -2
- package/dist/esm/hooks/useRangeSlider/types.d.ts +1 -1
- package/dist/esm/hooks/useRangeSlider/utils.d.ts +1 -1
- package/dist/esm/hooks/useRangeSlider/utils.js +1 -1
- package/dist/esm/hooks/useSeries/index.d.ts +1 -1
- package/dist/esm/hooks/useSeries/index.js +2 -2
- package/dist/esm/hooks/useSeries/types.d.ts +1 -346
- package/dist/esm/hooks/useSeries/types.js +1 -1
- package/dist/esm/hooks/useSeries/utils.d.ts +1 -11
- package/dist/esm/hooks/useSeries/utils.js +1 -37
- package/dist/esm/hooks/useShapes/area/index.js +2 -1
- package/dist/esm/hooks/useShapes/area/prepare-data.d.ts +2 -2
- package/dist/esm/hooks/useShapes/area/prepare-data.js +2 -2
- package/dist/esm/hooks/useShapes/bar-x/index.js +2 -1
- package/dist/esm/hooks/useShapes/bar-x/prepare-data.d.ts +2 -2
- package/dist/esm/hooks/useShapes/bar-x/prepare-data.js +2 -2
- package/dist/esm/hooks/useShapes/bar-y/prepare-data.d.ts +1 -1
- package/dist/esm/hooks/useShapes/bar-y/prepare-data.js +2 -2
- package/dist/esm/hooks/useShapes/funnel/index.js +2 -1
- package/dist/esm/hooks/useShapes/funnel/prepare-data.js +1 -1
- package/dist/esm/hooks/useShapes/funnel/types.d.ts +1 -1
- package/dist/esm/hooks/useShapes/heatmap/prepare-data.d.ts +1 -1
- package/dist/esm/hooks/useShapes/heatmap/prepare-data.js +1 -1
- package/dist/esm/hooks/useShapes/index.d.ts +3 -3
- package/dist/esm/hooks/useShapes/index.js +2 -2
- package/dist/esm/hooks/useShapes/line/index.js +2 -1
- package/dist/esm/hooks/useShapes/line/prepare-data.d.ts +2 -2
- package/dist/esm/hooks/useShapes/line/prepare-data.js +2 -2
- package/dist/esm/hooks/useShapes/line/types.d.ts +1 -1
- package/dist/esm/hooks/useShapes/marker.d.ts +1 -1
- package/dist/esm/hooks/useShapes/marker.js +3 -2
- package/dist/esm/hooks/useShapes/pie/index.js +2 -1
- package/dist/esm/hooks/useShapes/pie/prepare-data.js +3 -3
- package/dist/esm/hooks/useShapes/radar/prepare-data.js +2 -2
- package/dist/esm/hooks/useShapes/sankey/prepare-data.js +1 -1
- package/dist/esm/hooks/useShapes/scatter/prepare-data.d.ts +1 -1
- package/dist/esm/hooks/useShapes/scatter/prepare-data.js +1 -1
- package/dist/esm/hooks/useShapes/treemap/prepare-data.js +3 -3
- package/dist/esm/hooks/useShapes/utils.d.ts +1 -1
- package/dist/esm/hooks/useShapes/utils.js +1 -1
- package/dist/esm/hooks/useShapes/waterfall/index.js +3 -2
- package/dist/esm/hooks/useShapes/waterfall/prepare-data.d.ts +1 -1
- package/dist/esm/hooks/useShapes/waterfall/prepare-data.js +2 -2
- package/dist/esm/hooks/useZoom/index.d.ts +2 -2
- package/dist/esm/hooks/useZoom/utils.d.ts +2 -2
- package/dist/esm/hooks/useZoom/utils.js +1 -1
- package/dist/esm/hooks/utils/bar-y.d.ts +1 -1
- package/dist/esm/hooks/utils/bar-y.js +1 -1
- package/dist/esm/hooks/utils/get-band-size.js +1 -1
- package/dist/esm/index.d.ts +3 -2
- package/dist/esm/index.js +3 -2
- package/dist/esm/types/chart-ui.d.ts +1 -1
- package/dist/esm/types/index.d.ts +1 -96
- package/dist/esm/types/index.js +1 -24
- package/dist/esm/utils/chart-ui/pie-center-text.js +2 -2
- package/dist/esm/utils/index.d.ts +0 -3
- package/dist/esm/utils/index.js +0 -3
- package/package.json +1 -1
- package/dist/cjs/types/formatter.d.ts +0 -13
- package/dist/cjs/utils/chart/time.d.ts +0 -4
- package/dist/esm/types/formatter.d.ts +0 -13
- package/dist/esm/utils/chart/time.d.ts +0 -4
- package/dist/esm/utils/chart/tooltip.d.ts +0 -6
- /package/dist/cjs/{hooks/useAxis → core/axes}/range-slider.d.ts +0 -0
- /package/dist/cjs/{hooks/useAxisScales → core/axes}/types.js +0 -0
- /package/dist/cjs/{hooks/useAxis → core/axes}/utils.d.ts +0 -0
- /package/dist/cjs/{hooks/useAxis → core/axes}/x-axis.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/axis.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/axis.js +0 -0
- /package/dist/cjs/{constants → core/constants}/chart-types.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/chart-types.js +0 -0
- /package/dist/cjs/{constants → core/constants}/datetime.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/datetime.js +0 -0
- /package/dist/cjs/{constants → core/constants}/defaults/axis.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/defaults/axis.js +0 -0
- /package/dist/cjs/{constants → core/constants}/defaults/brush.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/defaults/brush.js +0 -0
- /package/dist/cjs/{constants → core/constants}/defaults/data-labels.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/defaults/data-labels.js +0 -0
- /package/dist/cjs/{constants → core/constants}/defaults/index.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/defaults/index.js +0 -0
- /package/dist/cjs/{constants → core/constants}/defaults/legend.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/defaults/legend.js +0 -0
- /package/dist/cjs/{constants → core/constants}/defaults/series-options.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/defaults/series-options.js +0 -0
- /package/dist/cjs/{constants → core/constants}/index.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/index.js +0 -0
- /package/dist/cjs/{constants → core/constants}/layout-algorithms.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/layout-algorithms.js +0 -0
- /package/dist/cjs/{constants → core/constants}/line-styles.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/line-styles.js +0 -0
- /package/dist/cjs/{constants → core/constants}/misc.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/misc.js +0 -0
- /package/dist/cjs/{constants → core/constants}/palette.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/palette.js +0 -0
- /package/dist/cjs/{constants → core/constants}/symbol-types.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/symbol-types.js +0 -0
- /package/dist/cjs/{constants → core/constants}/tooltip.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/tooltip.js +0 -0
- /package/dist/cjs/{constants → core/constants}/typography.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/typography.js +0 -0
- /package/dist/cjs/{constants → core/constants}/zoom.d.ts +0 -0
- /package/dist/cjs/{constants → core/constants}/zoom.js +0 -0
- /package/dist/cjs/{i18n → core/i18n}/index.d.ts +0 -0
- /package/dist/cjs/{i18n → core/i18n}/index.js +0 -0
- /package/dist/cjs/{i18n → core/i18n}/keysets/en.json +0 -0
- /package/dist/cjs/{i18n → core/i18n}/keysets/ru.json +0 -0
- /package/dist/cjs/{hooks/useSplit/types.d.ts → core/layout/split-types.d.ts} +0 -0
- /package/dist/cjs/{hooks/useSplit/types.js → core/layout/split-types.js} +0 -0
- /package/dist/cjs/{hooks/useAxisScales → core/scales}/types.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/scales}/types.js +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/constants.js +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/prepare-bar-x.d.ts +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/prepare-bar-y.d.ts +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/prepare-funnel.d.ts +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/prepare-heatmap.d.ts +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/prepare-options.d.ts +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/prepare-pie.d.ts +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/prepare-sankey.d.ts +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/prepare-scatter.d.ts +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/prepare-treemap.d.ts +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/prepare-waterfall.d.ts +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/prepareSeries.d.ts +0 -0
- /package/dist/cjs/{hooks/useSeries → core/series}/prepareSeries.js +0 -0
- /package/dist/{esm/hooks/useAxisScales → cjs/core/series}/types.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/area.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/area.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/axis.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/axis.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/bar-x.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/bar-x.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/bar-y.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/bar-y.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/base.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/brush.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/brush.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/chart.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/chart.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/funnel.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/funnel.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/halo.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/halo.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/heatmap.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/heatmap.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/legend.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/legend.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/line.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/line.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/marker.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/marker.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/pie.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/pie.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/radar.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/radar.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/sankey.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/sankey.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/scatter.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/scatter.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/series.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/series.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/split.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/split.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/title.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/title.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/tooltip.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/treemap.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/treemap.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/waterfall.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/waterfall.js +0 -0
- /package/dist/cjs/{types → core/types}/chart/zoom.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/chart/zoom.js +0 -0
- /package/dist/cjs/{types → core/types}/formatter.js +0 -0
- /package/dist/cjs/{types → core/types}/misc.d.ts +0 -0
- /package/dist/cjs/{types → core/types}/misc.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/array.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/array.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/axis/common.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/axis/common.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/axis/x-axis.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/axis/x-axis.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/axis-generators/bottom.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/axis-generators/bottom.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/axis-generators/index.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/axis-generators/index.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/color.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/color.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/common.d.ts +0 -0
- /package/dist/cjs/{utils → core/utils}/dispatcher.d.ts +0 -0
- /package/dist/cjs/{utils → core/utils}/dispatcher.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/get-closest-data.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/get-hovered-plots.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/labels.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/labels.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/legend.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/legend.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/math.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/math.js +0 -0
- /package/dist/cjs/{utils → core/utils}/misc.d.ts +0 -0
- /package/dist/cjs/{utils → core/utils}/misc.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/series/index.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/series/index.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/series/line.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/series/sorting.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/series/waterfall.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/series/waterfall.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/series-type-guards.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/series-type-guards.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/text.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/ticks/datetime.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/ticks/index.d.ts +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/ticks/index.js +0 -0
- /package/dist/cjs/{utils/chart → core/utils}/types.d.ts +0 -0
- /package/dist/{esm/hooks/useSplit → cjs/core/utils}/types.js +0 -0
- /package/dist/cjs/{validation → core/validation}/index.d.ts +0 -0
- /package/dist/cjs/{validation → core/validation}/validate-axes.d.ts +0 -0
- /package/dist/esm/{hooks/useAxis → core/axes}/range-slider.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/axes}/types.js +0 -0
- /package/dist/esm/{hooks/useAxis → core/axes}/utils.d.ts +0 -0
- /package/dist/esm/{hooks/useAxis → core/axes}/x-axis.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/axis.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/axis.js +0 -0
- /package/dist/esm/{constants → core/constants}/chart-types.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/chart-types.js +0 -0
- /package/dist/esm/{constants → core/constants}/datetime.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/datetime.js +0 -0
- /package/dist/esm/{constants → core/constants}/defaults/axis.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/defaults/axis.js +0 -0
- /package/dist/esm/{constants → core/constants}/defaults/brush.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/defaults/brush.js +0 -0
- /package/dist/esm/{constants → core/constants}/defaults/data-labels.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/defaults/data-labels.js +0 -0
- /package/dist/esm/{constants → core/constants}/defaults/index.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/defaults/index.js +0 -0
- /package/dist/esm/{constants → core/constants}/defaults/legend.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/defaults/legend.js +0 -0
- /package/dist/esm/{constants → core/constants}/defaults/series-options.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/defaults/series-options.js +0 -0
- /package/dist/esm/{constants → core/constants}/index.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/index.js +0 -0
- /package/dist/esm/{constants → core/constants}/layout-algorithms.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/layout-algorithms.js +0 -0
- /package/dist/esm/{constants → core/constants}/line-styles.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/line-styles.js +0 -0
- /package/dist/esm/{constants → core/constants}/misc.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/misc.js +0 -0
- /package/dist/esm/{constants → core/constants}/palette.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/palette.js +0 -0
- /package/dist/esm/{constants → core/constants}/symbol-types.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/symbol-types.js +0 -0
- /package/dist/esm/{constants → core/constants}/tooltip.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/tooltip.js +0 -0
- /package/dist/esm/{constants → core/constants}/typography.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/typography.js +0 -0
- /package/dist/esm/{constants → core/constants}/zoom.d.ts +0 -0
- /package/dist/esm/{constants → core/constants}/zoom.js +0 -0
- /package/dist/esm/{i18n → core/i18n}/index.d.ts +0 -0
- /package/dist/esm/{i18n → core/i18n}/index.js +0 -0
- /package/dist/esm/{i18n → core/i18n}/keysets/en.json +0 -0
- /package/dist/esm/{i18n → core/i18n}/keysets/ru.json +0 -0
- /package/dist/esm/{hooks/useSplit/types.d.ts → core/layout/split-types.d.ts} +0 -0
- /package/dist/esm/{types/chart/area.js → core/layout/split-types.js} +0 -0
- /package/dist/esm/{hooks/useAxisScales → core/scales}/types.d.ts +0 -0
- /package/dist/esm/{types/chart/axis.js → core/scales/types.js} +0 -0
- /package/dist/esm/{hooks/useSeries → core/series}/constants.js +0 -0
- /package/dist/esm/{hooks/useSeries → core/series}/prepare-bar-x.d.ts +0 -0
- /package/dist/esm/{hooks/useSeries → core/series}/prepare-funnel.d.ts +0 -0
- /package/dist/esm/{hooks/useSeries → core/series}/prepare-heatmap.d.ts +0 -0
- /package/dist/esm/{hooks/useSeries → core/series}/prepare-options.d.ts +0 -0
- /package/dist/esm/{hooks/useSeries → core/series}/prepare-pie.d.ts +0 -0
- /package/dist/esm/{hooks/useSeries → core/series}/prepare-sankey.d.ts +0 -0
- /package/dist/esm/{hooks/useSeries → core/series}/prepare-scatter.d.ts +0 -0
- /package/dist/esm/{hooks/useSeries → core/series}/prepare-treemap.d.ts +0 -0
- /package/dist/esm/{hooks/useSeries → core/series}/prepare-waterfall.d.ts +0 -0
- /package/dist/esm/{hooks/useSeries → core/series}/prepareSeries.d.ts +0 -0
- /package/dist/esm/{hooks/useSeries → core/series}/prepareSeries.js +0 -0
- /package/dist/esm/{types/chart/bar-x.js → core/series/types.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/area.d.ts +0 -0
- /package/dist/esm/{types/chart/bar-y.js → core/types/chart/area.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/axis.d.ts +0 -0
- /package/dist/esm/{types/chart/base.js → core/types/chart/axis.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/bar-x.d.ts +0 -0
- /package/dist/esm/{types/chart/brush.js → core/types/chart/bar-x.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/bar-y.d.ts +0 -0
- /package/dist/esm/{types/chart/chart.js → core/types/chart/bar-y.js} +0 -0
- /package/dist/esm/{types/chart/funnel.js → core/types/chart/base.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/brush.d.ts +0 -0
- /package/dist/esm/{types/chart/halo.js → core/types/chart/brush.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/chart.d.ts +0 -0
- /package/dist/esm/{types/chart/heatmap.js → core/types/chart/chart.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/funnel.d.ts +0 -0
- /package/dist/esm/{types/chart/legend.js → core/types/chart/funnel.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/halo.d.ts +0 -0
- /package/dist/esm/{types/chart/line.js → core/types/chart/halo.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/heatmap.d.ts +0 -0
- /package/dist/esm/{types/chart/marker.js → core/types/chart/heatmap.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/legend.d.ts +0 -0
- /package/dist/esm/{types/chart/pie.js → core/types/chart/legend.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/line.d.ts +0 -0
- /package/dist/esm/{types/chart/radar.js → core/types/chart/line.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/marker.d.ts +0 -0
- /package/dist/esm/{types/chart/sankey.js → core/types/chart/marker.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/pie.d.ts +0 -0
- /package/dist/esm/{types/chart/scatter.js → core/types/chart/pie.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/radar.d.ts +0 -0
- /package/dist/esm/{types/chart/series.js → core/types/chart/radar.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/sankey.d.ts +0 -0
- /package/dist/esm/{types/chart/split.js → core/types/chart/sankey.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/scatter.d.ts +0 -0
- /package/dist/esm/{types/chart/title.js → core/types/chart/scatter.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/series.d.ts +0 -0
- /package/dist/esm/{types/chart/tooltip.js → core/types/chart/series.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/split.d.ts +0 -0
- /package/dist/esm/{types/chart/treemap.js → core/types/chart/split.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/title.d.ts +0 -0
- /package/dist/esm/{types/chart/waterfall.js → core/types/chart/title.js} +0 -0
- /package/dist/esm/{types/chart/zoom.js → core/types/chart/tooltip.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/treemap.d.ts +0 -0
- /package/dist/esm/{types/formatter.js → core/types/chart/treemap.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/waterfall.d.ts +0 -0
- /package/dist/esm/{types/misc.js → core/types/chart/waterfall.js} +0 -0
- /package/dist/esm/{types → core/types}/chart/zoom.d.ts +0 -0
- /package/dist/esm/{types → core/types}/misc.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/array.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/array.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/axis/common.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/axis/common.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/axis/x-axis.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/axis/x-axis.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/axis-generators/bottom.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/axis-generators/bottom.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/axis-generators/index.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/axis-generators/index.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/color.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/color.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/common.d.ts +0 -0
- /package/dist/esm/{utils → core/utils}/dispatcher.d.ts +0 -0
- /package/dist/esm/{utils → core/utils}/dispatcher.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/get-closest-data.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/get-hovered-plots.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/labels.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/labels.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/legend.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/legend.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/math.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/math.js +0 -0
- /package/dist/esm/{utils → core/utils}/misc.d.ts +0 -0
- /package/dist/esm/{utils → core/utils}/misc.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/series/index.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/series/index.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/series/line.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/series/sorting.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/series/waterfall.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/series/waterfall.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/series-type-guards.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/series-type-guards.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/text.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/ticks/datetime.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/ticks/index.d.ts +0 -0
- /package/dist/esm/{utils/chart → core/utils}/ticks/index.js +0 -0
- /package/dist/esm/{utils/chart → core/utils}/types.d.ts +0 -0
- /package/dist/esm/{validation → core/validation}/index.d.ts +0 -0
- /package/dist/esm/{validation → core/validation}/validate-axes.d.ts +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import memoize from 'lodash/memoize';
|
|
2
|
+
import { getSymbolBBoxWidth } from '~core/utils';
|
|
3
|
+
import { SymbolType } from '../constants';
|
|
4
|
+
import { getUniqId } from '../utils/misc';
|
|
5
|
+
import { DEFAULT_LEGEND_SYMBOL_PADDING, DEFAULT_LEGEND_SYMBOL_SIZE } from './constants';
|
|
6
|
+
export const getActiveLegendItems = (series) => {
|
|
7
|
+
return series.reduce((acc, s) => {
|
|
8
|
+
if (s.legend.enabled && s.visible) {
|
|
9
|
+
acc.push(s.legend.groupId);
|
|
10
|
+
}
|
|
11
|
+
return acc;
|
|
12
|
+
}, []);
|
|
13
|
+
};
|
|
14
|
+
export const getAllLegendItems = (series) => {
|
|
15
|
+
return series.map((s) => s.legend.groupId);
|
|
16
|
+
};
|
|
17
|
+
export function prepareLegendSymbol(series, symbolType) {
|
|
18
|
+
var _a;
|
|
19
|
+
const symbolOptions = ((_a = series.legend) === null || _a === void 0 ? void 0 : _a.symbol) || {};
|
|
20
|
+
const width = (symbolOptions === null || symbolOptions === void 0 ? void 0 : symbolOptions.width) || DEFAULT_LEGEND_SYMBOL_SIZE;
|
|
21
|
+
const type = symbolType || SymbolType.Circle;
|
|
22
|
+
return {
|
|
23
|
+
shape: 'symbol',
|
|
24
|
+
symbolType: type,
|
|
25
|
+
width,
|
|
26
|
+
bboxWidth: getSymbolBBoxWidth({ symbolSize: Math.pow(width, 2), symbolType: type }),
|
|
27
|
+
padding: (symbolOptions === null || symbolOptions === void 0 ? void 0 : symbolOptions.padding) || DEFAULT_LEGEND_SYMBOL_PADDING,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const getCommonStackId = memoize(getUniqId);
|
|
31
|
+
export function getSeriesStackId(series) {
|
|
32
|
+
let stackId = series.stackId;
|
|
33
|
+
if (!stackId) {
|
|
34
|
+
stackId = series.stacking ? getCommonStackId() : getUniqId();
|
|
35
|
+
}
|
|
36
|
+
return stackId;
|
|
37
|
+
}
|
|
@@ -15,6 +15,25 @@ export type CustomFormat = {
|
|
|
15
15
|
formattedValue?: string;
|
|
16
16
|
}) => string;
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Specifies how a value should be formatted for display.
|
|
20
|
+
*
|
|
21
|
+
* - `{ type: 'number' }` — numeric formatting with optional precision, units, percent display, etc.
|
|
22
|
+
* See [FormatNumberOptions](https://gravity-ui.github.io/charts/pages/api/Utilities/interfaces/FormatNumberOptions.html) for all available options.
|
|
23
|
+
* - `{ type: 'date' }` — date/time formatting
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // Two decimal places, shown as percent
|
|
27
|
+
* { type: 'number', precision: 2, format: 'percent' }
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* // Compact thousands: 1 500 000 → "1.5M"
|
|
31
|
+
* { type: 'number', unit: 'auto', precision: 1 }
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* // Date value (Unix ms) formatted as "17 October 2025"
|
|
35
|
+
* { type: 'date', format: 'DD MMMM YYYY' }
|
|
36
|
+
*/
|
|
18
37
|
export type ValueFormat = NumberFormat | DateFormat;
|
|
19
38
|
export interface BaseDataLabels {
|
|
20
39
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TOOLTIP_TOTALS_BUILT_IN_AGGREGATION } from '../../constants';
|
|
2
|
+
import type { DateTimeLabelFormats } from '../../utils/time';
|
|
2
3
|
import type { MeaningfulAny } from '../misc';
|
|
3
4
|
import type { AreaSeries, AreaSeriesData } from './area';
|
|
4
5
|
import type { AxisPlotBand, AxisPlotLine, ChartXAxis, ChartYAxis } from './axis';
|
|
@@ -201,4 +202,36 @@ export interface ChartTooltip<T = MeaningfulAny> {
|
|
|
201
202
|
*/
|
|
202
203
|
direction?: 'asc' | 'desc';
|
|
203
204
|
} | ChartTooltipSortComparator<T>;
|
|
205
|
+
/**
|
|
206
|
+
* Per-granularity display formats for the default datetime tooltip header.
|
|
207
|
+
* Ignored when `headerFormat` is set.
|
|
208
|
+
*
|
|
209
|
+
* Each value is a format string in the same form as the `format` argument to
|
|
210
|
+
* [`DateTime#format`](https://gravity-ui.github.io/date-utils/pages/api/DateTime/overview.html) in `@gravity-ui/date-utils`
|
|
211
|
+
* (see the **`FormatInput`** type there): Day.js–style tokens, e.g. `YYYY`, `MM`, `DD`, `HH`, `mm`, `ss`, `SSS`, `MMM`.
|
|
212
|
+
*
|
|
213
|
+
* Partial objects are merged with the built-in `DATETIME_LABEL_FORMATS`; omitted keys keep defaults.
|
|
214
|
+
* @example ISO-like date and time
|
|
215
|
+
* ```ts
|
|
216
|
+
* dateTimeLabelFormats: { day: 'YYYY-MM-DD', hour: 'YYYY-MM-DD HH:mm', minute: 'YYYY-MM-DD HH:mm' }
|
|
217
|
+
* ```
|
|
218
|
+
* @example US-style calendar date
|
|
219
|
+
* ```ts
|
|
220
|
+
* dateTimeLabelFormats: { day: 'MM/DD/YYYY', week: 'MM/DD/YYYY' }
|
|
221
|
+
* ```
|
|
222
|
+
* @example Only sub-day precision (other units stay defaults)
|
|
223
|
+
* ```ts
|
|
224
|
+
* dateTimeLabelFormats: { hour: 'HH:mm', minute: 'HH:mm', second: 'HH:mm:ss' }
|
|
225
|
+
* ```
|
|
226
|
+
* @example Coarse ranges: short month and full year
|
|
227
|
+
* ```ts
|
|
228
|
+
* dateTimeLabelFormats: { month: 'YYYY-MM', year: 'YYYY' }
|
|
229
|
+
* ```
|
|
230
|
+
* @example Localized-style month label with day precision unchanged
|
|
231
|
+
* ```ts
|
|
232
|
+
* dateTimeLabelFormats: { month: 'MMMM YYYY' }
|
|
233
|
+
* ```
|
|
234
|
+
* @see https://gravity-ui.github.io/date-utils/pages/api/DateTime/overview.html
|
|
235
|
+
*/
|
|
236
|
+
dateTimeLabelFormats?: DateTimeLabelFormats;
|
|
204
237
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface FormatOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Number of decimal places to display.
|
|
4
|
+
* Use `'auto'` to determine precision automatically based on the value magnitude.
|
|
5
|
+
*/
|
|
6
|
+
precision?: number | 'auto';
|
|
7
|
+
/** When `true`, inserts a thousands separator (e.g. `1 500 000`). */
|
|
8
|
+
showRankDelimiter?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* BCP 47 language tag used for locale-aware formatting (e.g. `'en'`, `'ru'`).
|
|
11
|
+
* Defaults to the application locale when omitted.
|
|
12
|
+
*/
|
|
13
|
+
lang?: string;
|
|
14
|
+
/** Internal rendering hint for axis label layout. Not intended for public use. */
|
|
15
|
+
labelMode?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface FormatNumberOptions extends FormatOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Display mode for the numeric value.
|
|
20
|
+
* - `'number'` — plain number (default).
|
|
21
|
+
* - `'percent'` — value is multiplied by 100 and rendered with a `%` suffix.
|
|
22
|
+
*/
|
|
23
|
+
format?: 'number' | 'percent';
|
|
24
|
+
/** Factor applied to the value before formatting. For example, `multiplier: 1000` converts seconds to milliseconds. */
|
|
25
|
+
multiplier?: number;
|
|
26
|
+
/** String prepended to the formatted value (e.g. `'$'`). */
|
|
27
|
+
prefix?: string;
|
|
28
|
+
/** String appended to the formatted value (e.g. `' USD'`). */
|
|
29
|
+
postfix?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Compact unit suffix applied to large numbers.
|
|
32
|
+
* - `'auto'` — picks the most appropriate unit automatically (`k`, `m`, `b`, `t`).
|
|
33
|
+
* - `'k'` — thousands (÷ 1 000).
|
|
34
|
+
* - `'m'` — millions (÷ 1 000 000).
|
|
35
|
+
* - `'b'` — billions (÷ 1 000 000 000).
|
|
36
|
+
* - `'t'` — trillions (÷ 1 000 000 000 000).
|
|
37
|
+
* - `null` — no unit suffix.
|
|
38
|
+
*/
|
|
39
|
+
unit?: 'auto' | 'k' | 'm' | 'b' | 't' | null;
|
|
40
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { ChartXAxis, ChartYAxis } from './chart/axis';
|
|
2
|
+
import type { ChartOptions } from './chart/chart';
|
|
3
|
+
import type { ChartLegend } from './chart/legend';
|
|
4
|
+
import type { ChartSeries, ChartSeriesOptions } from './chart/series';
|
|
5
|
+
import type { ChartSplit } from './chart/split';
|
|
6
|
+
import type { ChartTitle } from './chart/title';
|
|
7
|
+
import type { ChartTooltip } from './chart/tooltip';
|
|
8
|
+
import type { MeaningfulAny } from './misc';
|
|
9
|
+
export * from './misc';
|
|
10
|
+
export * from './chart/axis';
|
|
11
|
+
export * from './chart/base';
|
|
12
|
+
export * from './chart/chart';
|
|
13
|
+
export * from './chart/legend';
|
|
14
|
+
export * from './chart/pie';
|
|
15
|
+
export * from './chart/scatter';
|
|
16
|
+
export * from './chart/bar-x';
|
|
17
|
+
export * from './chart/bar-y';
|
|
18
|
+
export * from './chart/area';
|
|
19
|
+
export * from './chart/line';
|
|
20
|
+
export * from './chart/series';
|
|
21
|
+
export * from './chart/split';
|
|
22
|
+
export * from './chart/title';
|
|
23
|
+
export * from './chart/tooltip';
|
|
24
|
+
export * from './chart/zoom';
|
|
25
|
+
export * from './chart/halo';
|
|
26
|
+
export * from './chart/treemap';
|
|
27
|
+
export * from './chart/waterfall';
|
|
28
|
+
export * from './chart/sankey';
|
|
29
|
+
export * from './chart/radar';
|
|
30
|
+
export * from './chart/heatmap';
|
|
31
|
+
export * from './chart/funnel';
|
|
32
|
+
export * from './chart/brush';
|
|
33
|
+
export interface ChartData<T = MeaningfulAny> {
|
|
34
|
+
/**
|
|
35
|
+
* General options for the chart.
|
|
36
|
+
*/
|
|
37
|
+
chart?: ChartOptions;
|
|
38
|
+
/**
|
|
39
|
+
* The color list of palette.
|
|
40
|
+
* If no color is set in series, the colors would be adopted sequentially and circularly from this list as the colors of series.
|
|
41
|
+
* @default ['#4DA2F1', '#FF3D64', '#8AD554', '#FFC636', '#FFB9DD', '#84D1EE', '#FF91A1', '#54A520', '#DB9100', '#BA74B3', '#1F68A9', '#ED65A9', '#0FA08D', '#FF7E00', '#E8B0A4', '#52A6C5', '#BE2443', '#70C1AF', '#FFB46C', '#DCA3D7']
|
|
42
|
+
*/
|
|
43
|
+
colors?: string[];
|
|
44
|
+
/**
|
|
45
|
+
* Default state applied on first render.
|
|
46
|
+
*/
|
|
47
|
+
defaultState?: {
|
|
48
|
+
/**
|
|
49
|
+
* Position within the plot area to trigger hover on first render.
|
|
50
|
+
* Values can be absolute pixels (`number` or `"100px"`) or percentages (`"50%"`).
|
|
51
|
+
*/
|
|
52
|
+
hoveredPosition?: {
|
|
53
|
+
x: number | string;
|
|
54
|
+
y: number | string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The legend displays a labeled box for each data element in the chart.
|
|
59
|
+
* It shows a distinctive symbol paired with a name for every series.
|
|
60
|
+
*/
|
|
61
|
+
legend?: ChartLegend;
|
|
62
|
+
/**
|
|
63
|
+
* Represents the series data and series options.
|
|
64
|
+
*/
|
|
65
|
+
series: {
|
|
66
|
+
/**
|
|
67
|
+
* Contains data points to be plotted.
|
|
68
|
+
*/
|
|
69
|
+
data: ChartSeries<T>[];
|
|
70
|
+
/**
|
|
71
|
+
* Allows for customizing the appearance and behavior of the series.
|
|
72
|
+
*/
|
|
73
|
+
options?: ChartSeriesOptions;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Setting for displaying charts on different plots.
|
|
77
|
+
* It can be used to visualize related information on multiple charts.
|
|
78
|
+
*/
|
|
79
|
+
split?: ChartSplit;
|
|
80
|
+
/**
|
|
81
|
+
* The main title of the chart.
|
|
82
|
+
*/
|
|
83
|
+
title?: ChartTitle;
|
|
84
|
+
/**
|
|
85
|
+
* Options for the tooltip that appears when the user hovers over a series or point.
|
|
86
|
+
*/
|
|
87
|
+
tooltip?: ChartTooltip<T>;
|
|
88
|
+
/**
|
|
89
|
+
* Options for the the X axis.
|
|
90
|
+
*/
|
|
91
|
+
xAxis?: ChartXAxis;
|
|
92
|
+
/**
|
|
93
|
+
* Options for the the Y axis or multiple Y axes.
|
|
94
|
+
*/
|
|
95
|
+
yAxis?: ChartYAxis[];
|
|
96
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from './misc';
|
|
2
|
+
export * from './chart/axis';
|
|
3
|
+
export * from './chart/base';
|
|
4
|
+
export * from './chart/chart';
|
|
5
|
+
export * from './chart/legend';
|
|
6
|
+
export * from './chart/pie';
|
|
7
|
+
export * from './chart/scatter';
|
|
8
|
+
export * from './chart/bar-x';
|
|
9
|
+
export * from './chart/bar-y';
|
|
10
|
+
export * from './chart/area';
|
|
11
|
+
export * from './chart/line';
|
|
12
|
+
export * from './chart/series';
|
|
13
|
+
export * from './chart/split';
|
|
14
|
+
export * from './chart/title';
|
|
15
|
+
export * from './chart/tooltip';
|
|
16
|
+
export * from './chart/zoom';
|
|
17
|
+
export * from './chart/halo';
|
|
18
|
+
export * from './chart/treemap';
|
|
19
|
+
export * from './chart/waterfall';
|
|
20
|
+
export * from './chart/sankey';
|
|
21
|
+
export * from './chart/radar';
|
|
22
|
+
export * from './chart/heatmap';
|
|
23
|
+
export * from './chart/funnel';
|
|
24
|
+
export * from './chart/brush';
|
|
@@ -3,8 +3,8 @@ import { select } from 'd3-selection';
|
|
|
3
3
|
import get from 'lodash/get';
|
|
4
4
|
import isNil from 'lodash/isNil';
|
|
5
5
|
import sortBy from 'lodash/sortBy';
|
|
6
|
-
import { DEFAULT_AXIS_LABEL_FONT_SIZE, SERIES_TYPE } from '
|
|
7
|
-
import { getSeriesStackId } from '
|
|
6
|
+
import { DEFAULT_AXIS_LABEL_FONT_SIZE, SERIES_TYPE } from '../constants';
|
|
7
|
+
import { getSeriesStackId } from '../series/utils';
|
|
8
8
|
import { getWaterfallPointSubtotal } from './series/waterfall';
|
|
9
9
|
import { isSeriesWithNumericalXValues, isSeriesWithNumericalYValues } from './series-type-guards';
|
|
10
10
|
export const CHART_SERIES_WITH_VOLUME_ON_Y_AXIS = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AxisDomain } from 'd3-axis';
|
|
2
|
-
import type { PreparedAxis } from '../../hooks';
|
|
3
2
|
import type { CustomFormat, ValueFormat } from '../../types';
|
|
3
|
+
import type { PreparedAxis } from '../axes/types';
|
|
4
4
|
export declare function getFormattedValue(args: {
|
|
5
5
|
value: string | number | undefined | null;
|
|
6
6
|
format?: ValueFormat | CustomFormat;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { dateTimeUtc } from '@gravity-ui/date-utils';
|
|
2
2
|
import capitalize from 'lodash/capitalize';
|
|
3
|
-
import { DEFAULT_DATE_FORMAT } from '../../constants';
|
|
4
3
|
import { formatNumber, getDefaultUnit } from '../../libs';
|
|
4
|
+
import { DEFAULT_DATE_FORMAT } from '../constants';
|
|
5
5
|
import { DATETIME_LABEL_FORMATS, TIME_UNITS, getDefaultDateFormat, getDefaultTimeOnlyFormat, } from './time';
|
|
6
6
|
const LETTER_MOUNTH_AT_START_FORMAT_REGEXP = /^M{3,}/;
|
|
7
7
|
function getFormattedDate(args) {
|
|
@@ -28,8 +28,8 @@ function getClosestPointsByXValue(x, y, points) {
|
|
|
28
28
|
if (sorted.length === 0 || closestXIndex === -1) {
|
|
29
29
|
return [];
|
|
30
30
|
}
|
|
31
|
-
const closestX = sorted[closestXIndex].x;
|
|
32
|
-
const filtered = points.filter((p) => p.x === closestX);
|
|
31
|
+
const closestX = Math.round(sorted[closestXIndex].x);
|
|
32
|
+
const filtered = points.filter((p) => Math.round(p.x) === closestX);
|
|
33
33
|
const groupedBySeries = Object.values(groupBy(filtered, (p) => get(p.series, 'id'))).map((items) => {
|
|
34
34
|
const sortedByY = sort(items, (p) => p.y0);
|
|
35
35
|
const index = getClosestYIndex(sortedByY, y);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { PreparedXAxis, PreparedYAxis } from '../../hooks';
|
|
2
|
-
import type { ChartScale } from '../../hooks/useAxisScales/types';
|
|
3
1
|
import type { AxisPlotBand, AxisPlotLine } from '../../types';
|
|
2
|
+
import type { PreparedXAxis, PreparedYAxis } from '../axes/types';
|
|
3
|
+
import type { ChartScale } from '../scales/types';
|
|
4
4
|
export declare function getHoveredPlots(args: {
|
|
5
5
|
pointerX: number;
|
|
6
6
|
pointerY: number;
|
|
@@ -10,6 +10,8 @@ export * from './series-type-guards';
|
|
|
10
10
|
export * from './symbol';
|
|
11
11
|
export * from './text';
|
|
12
12
|
export * from './time';
|
|
13
|
-
export * from '
|
|
14
|
-
export * from '
|
|
13
|
+
export * from '../zoom/zoom';
|
|
14
|
+
export * from '../layout/chart-dimensions';
|
|
15
15
|
export * from './common';
|
|
16
|
+
export * from './misc';
|
|
17
|
+
export * from './dispatcher';
|
|
@@ -10,6 +10,8 @@ export * from './series-type-guards';
|
|
|
10
10
|
export * from './symbol';
|
|
11
11
|
export * from './text';
|
|
12
12
|
export * from './time';
|
|
13
|
-
export * from '
|
|
14
|
-
export * from '
|
|
13
|
+
export * from '../zoom/zoom';
|
|
14
|
+
export * from '../layout/chart-dimensions';
|
|
15
15
|
export * from './common';
|
|
16
|
+
export * from './misc';
|
|
17
|
+
export * from './dispatcher';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DashStyle } from 'src/constants';
|
|
1
|
+
import type { DashStyle } from 'src/core/constants';
|
|
2
2
|
export declare function getLineDashArray(dashStyle: DashStyle, strokeWidth?: number): string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { sort } from 'd3-array';
|
|
2
2
|
import { isEmpty } from 'lodash';
|
|
3
3
|
import get from 'lodash/get';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { getAxisCategories } from '~core/utils';
|
|
5
|
+
import { SERIES_TYPE } from '../../constants';
|
|
6
6
|
function applyAxisCategoriesOrder({ series, axis, key, }) {
|
|
7
7
|
var _a, _b;
|
|
8
8
|
const originalCategories = (_a = axis === null || axis === void 0 ? void 0 : axis.categories) !== null && _a !== void 0 ? _a : [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SymbolType } from '
|
|
1
|
+
import { SymbolType } from '../constants';
|
|
2
2
|
export declare const getSymbolType: (index: number) => SymbolType;
|
|
3
3
|
export declare const getSymbol: (symbolType: `${SymbolType}`) => import("d3-shape").SymbolType;
|
|
4
4
|
export declare function getSymbolBBoxWidth({ symbolSize, symbolType, }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { symbolCircle, symbolDiamond2, symbolSquare, symbolTriangle2 } from 'd3-shape';
|
|
2
|
-
import { SymbolType } from '
|
|
2
|
+
import { SymbolType } from '../constants';
|
|
3
3
|
export const getSymbolType = (index) => {
|
|
4
4
|
const scatterStyles = Object.values(SymbolType);
|
|
5
5
|
return scatterStyles[index % scatterStyles.length];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { bisector, tickStep } from 'd3-array';
|
|
2
2
|
import { utcDay, utcHour, utcMillisecond, utcMinute, utcMonth, utcSecond, utcMonday as utcWeek, utcYear, } from 'd3-time';
|
|
3
|
-
import { DAY, HOUR, MINUTE, MONTH, SECOND, WEEK, YEAR } from '
|
|
3
|
+
import { DAY, HOUR, MINUTE, MONTH, SECOND, WEEK, YEAR } from '../../constants';
|
|
4
4
|
const tickIntervals = [
|
|
5
5
|
[utcSecond, 1, SECOND],
|
|
6
6
|
[utcSecond, 5, 5 * SECOND],
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const TIME_UNITS: {
|
|
2
|
+
readonly millisecond: 1;
|
|
3
|
+
readonly second: 1000;
|
|
4
|
+
readonly minute: 60000;
|
|
5
|
+
readonly hour: 3600000;
|
|
6
|
+
readonly day: number;
|
|
7
|
+
readonly week: number;
|
|
8
|
+
readonly month: number;
|
|
9
|
+
readonly year: number;
|
|
10
|
+
};
|
|
11
|
+
export type TimeUnit = keyof typeof TIME_UNITS;
|
|
12
|
+
export declare const DATETIME_LABEL_FORMATS: Record<TimeUnit, string>;
|
|
13
|
+
export type DateTimeLabelFormats = Partial<Record<TimeUnit, string>>;
|
|
14
|
+
export declare function getDefaultDateFormat(range?: number, overrides?: DateTimeLabelFormats): string;
|
|
15
|
+
export declare function getDefaultTimeOnlyFormat(step: number): string;
|
|
@@ -23,14 +23,15 @@ function getTimeUnit(range) {
|
|
|
23
23
|
const index = units.findIndex((unit) => range < TIME_UNITS[unit]);
|
|
24
24
|
return index === -1 ? 'year' : units[index - 1];
|
|
25
25
|
}
|
|
26
|
-
export function getDefaultDateFormat(range) {
|
|
26
|
+
export function getDefaultDateFormat(range, overrides) {
|
|
27
|
+
const formats = Object.assign(Object.assign({}, DATETIME_LABEL_FORMATS), overrides);
|
|
27
28
|
if (range) {
|
|
28
29
|
const unit = getTimeUnit(range);
|
|
29
|
-
if (unit in
|
|
30
|
-
return
|
|
30
|
+
if (unit in formats) {
|
|
31
|
+
return formats[unit];
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
return
|
|
34
|
+
return formats.day;
|
|
34
35
|
}
|
|
35
36
|
export function getDefaultTimeOnlyFormat(step) {
|
|
36
37
|
if (step < TIME_UNITS.second) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { ChartSeries, ChartXAxis, ChartYAxis } from '../../types';
|
|
2
|
-
export declare function getDefaultTooltipHeaderFormat({ seriesData, yAxes, xAxis, }: {
|
|
1
|
+
import type { ChartSeries, ChartTooltip, ChartXAxis, ChartYAxis } from '../../types';
|
|
2
|
+
export declare function getDefaultTooltipHeaderFormat({ seriesData, yAxes, xAxis, dateTimeLabelFormats, }: {
|
|
3
3
|
seriesData: ChartSeries[];
|
|
4
4
|
yAxes?: ChartYAxis[];
|
|
5
5
|
xAxis?: ChartXAxis;
|
|
6
|
+
dateTimeLabelFormats?: ChartTooltip['dateTimeLabelFormats'];
|
|
6
7
|
}): import("../../types").ValueFormat | undefined;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { getDefaultValueFormat } from '../../components/Tooltip/DefaultTooltipContent/utils';
|
|
2
2
|
import { getMinSpaceBetween } from './array';
|
|
3
3
|
import { getDomainDataXBySeries, getDomainDataYBySeries } from './common';
|
|
4
|
-
export function getDefaultTooltipHeaderFormat({ seriesData, yAxes, xAxis, }) {
|
|
4
|
+
export function getDefaultTooltipHeaderFormat({ seriesData, yAxes, xAxis, dateTimeLabelFormats, }) {
|
|
5
5
|
if (seriesData.every((item) => ['pie', 'treemap', 'waterfall', 'sankey', 'radar', 'heatmap', 'funnel'].includes(item.type))) {
|
|
6
6
|
return undefined;
|
|
7
7
|
}
|
|
8
8
|
if (seriesData.some((item) => item.type === 'bar-y')) {
|
|
9
9
|
const domainData = getDomainDataYBySeries(seriesData);
|
|
10
10
|
const closestPointsRange = getMinSpaceBetween(domainData, (d) => d);
|
|
11
|
-
return getDefaultValueFormat({
|
|
11
|
+
return getDefaultValueFormat({
|
|
12
|
+
axis: yAxes === null || yAxes === void 0 ? void 0 : yAxes[0],
|
|
13
|
+
closestPointsRange,
|
|
14
|
+
dateTimeLabelFormats,
|
|
15
|
+
});
|
|
12
16
|
}
|
|
13
17
|
const domainData = getDomainDataXBySeries(seriesData);
|
|
14
18
|
const closestPointsRange = getMinSpaceBetween(domainData, (d) => d);
|
|
15
|
-
return getDefaultValueFormat({ axis: xAxis, closestPointsRange });
|
|
19
|
+
return getDefaultValueFormat({ axis: xAxis, closestPointsRange, dateTimeLabelFormats });
|
|
16
20
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
2
|
import isEmpty from 'lodash/isEmpty';
|
|
3
|
+
import { CHART_ERROR_CODE, ChartError } from '../../libs';
|
|
3
4
|
import { DEFAULT_AXIS_TYPE, SERIES_TYPE, TOOLTIP_TOTALS_BUILT_IN_AGGREGATION } from '../constants';
|
|
4
5
|
import { i18n } from '../i18n';
|
|
5
|
-
import { CHART_ERROR_CODE, ChartError } from '../libs';
|
|
6
6
|
import { validateAxes } from './validate-axes';
|
|
7
7
|
function getTypeOf(value) {
|
|
8
8
|
return typeof value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { CHART_ERROR_CODE, ChartError } from '../../libs';
|
|
1
2
|
import { AXIS_TYPE } from '../constants';
|
|
2
3
|
import { i18n } from '../i18n';
|
|
3
|
-
import { CHART_ERROR_CODE, ChartError } from '../libs';
|
|
4
4
|
const AVAILABLE_AXIS_TYPES = Object.values(AXIS_TYPE);
|
|
5
5
|
function validateCategories(axis) {
|
|
6
6
|
if (!axis.categories || !Array.isArray(axis.categories) || axis.categories.length === 0) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './zoom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './zoom';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RangeSliderState } from '../../hooks';
|
|
2
2
|
import type { ZoomState } from '../../hooks/useZoom/types';
|
|
3
3
|
import type { ChartXAxis, ChartYAxis } from '../../types';
|
|
4
|
+
import type { PreparedXAxis, PreparedYAxis } from '../axes/types';
|
|
5
|
+
import type { PreparedSeries } from '../series';
|
|
4
6
|
export declare function getZoomedSeriesData(args: {
|
|
5
7
|
seriesData: PreparedSeries[];
|
|
6
8
|
zoomState: Partial<ZoomState>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './useAxis';
|
|
2
|
-
export * from '
|
|
2
|
+
export * from '~core/axes/types';
|
|
3
3
|
export * from './useAxisScales';
|
|
4
|
-
export * from '
|
|
4
|
+
export * from '~core/scales/types';
|
|
5
5
|
export * from './useBrush';
|
|
6
6
|
export * from './useBrush/types';
|
|
7
7
|
export * from './useCrosshair';
|
|
@@ -9,10 +9,10 @@ export * from './usePrevious';
|
|
|
9
9
|
export * from './useRangeSlider';
|
|
10
10
|
export * from './useRangeSlider/types';
|
|
11
11
|
export * from './useSeries';
|
|
12
|
-
export * from '
|
|
12
|
+
export * from '~core/series/types';
|
|
13
13
|
export * from './useShapes';
|
|
14
|
-
export * from '
|
|
15
|
-
export * from '
|
|
14
|
+
export * from '~core/layout/split';
|
|
15
|
+
export * from '~core/layout/split-types';
|
|
16
16
|
export * from './useTooltip';
|
|
17
17
|
export * from './useZoom';
|
|
18
18
|
export * from './useZoom/types';
|
package/dist/cjs/hooks/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './useAxis';
|
|
2
|
-
export * from '
|
|
2
|
+
export * from '~core/axes/types';
|
|
3
3
|
export * from './useAxisScales';
|
|
4
|
-
export * from '
|
|
4
|
+
export * from '~core/scales/types';
|
|
5
5
|
export * from './useBrush';
|
|
6
6
|
export * from './useBrush/types';
|
|
7
7
|
export * from './useCrosshair';
|
|
@@ -9,10 +9,10 @@ export * from './usePrevious';
|
|
|
9
9
|
export * from './useRangeSlider';
|
|
10
10
|
export * from './useRangeSlider/types';
|
|
11
11
|
export * from './useSeries';
|
|
12
|
-
export * from '
|
|
12
|
+
export * from '~core/series/types';
|
|
13
13
|
export * from './useShapes';
|
|
14
|
-
export * from '
|
|
15
|
-
export * from '
|
|
14
|
+
export * from '~core/layout/split';
|
|
15
|
+
export * from '~core/layout/split-types';
|
|
16
16
|
export * from './useTooltip';
|
|
17
17
|
export * from './useZoom';
|
|
18
18
|
export * from './useZoom/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { AxesState } from '~core/axes/types';
|
|
2
|
+
import type { PreparedLegend, PreparedSeries, PreparedSeriesOptions } from '~core/series/types';
|
|
1
3
|
import type { ChartXAxis, ChartYAxis, LegendConfig } from '../../types';
|
|
2
4
|
import type { PreparedChart } from '../types';
|
|
3
|
-
import type { PreparedLegend, PreparedSeries, PreparedSeriesOptions } from '../useSeries/types';
|
|
4
|
-
import type { AxesState } from './types';
|
|
5
5
|
interface UseAxesProps {
|
|
6
6
|
height: number;
|
|
7
7
|
preparedChart: PreparedChart;
|
|
@@ -15,8 +15,8 @@ interface UseAxesProps {
|
|
|
15
15
|
yAxis?: ChartYAxis[];
|
|
16
16
|
}
|
|
17
17
|
export declare function getAxes(props: UseAxesProps): Promise<{
|
|
18
|
-
xAxis: import("
|
|
19
|
-
yAxis: import("
|
|
18
|
+
xAxis: import("~core/axes/types").PreparedXAxis | null;
|
|
19
|
+
yAxis: import("~core/axes/types").PreparedYAxis[];
|
|
20
20
|
}>;
|
|
21
21
|
export declare function useAxis(props: UseAxesProps): AxesState;
|
|
22
22
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import isEqual from 'lodash/isEqual';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { getPreparedXAxis } from '~core/axes/x-axis';
|
|
4
|
+
import { getPreparedYAxis } from '~core/axes/y-axis';
|
|
5
|
+
import { getWidthOccupiedByYAxis } from '~core/utils';
|
|
6
6
|
export async function getAxes(props) {
|
|
7
7
|
var _a, _b;
|
|
8
8
|
const { boundsHeight, height, preparedChart, legendConfig, preparedLegend, preparedSeries, width, xAxis, yAxis, } = props;
|