@gravity-ui/charts 1.42.1 → 1.42.3
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 +1 -1
- package/dist/cjs/components/AxisX/prepare-axis-data.js +2 -2
- package/dist/cjs/components/AxisY/AxisY.js +1 -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/utils.js +1 -1
- package/dist/cjs/components/ChartInner/index.js +2 -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 +1 -1
- 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 +14 -5
- package/dist/cjs/components/PlotTitle/index.d.ts +1 -1
- package/dist/cjs/components/RangeSlider/index.js +1 -1
- package/dist/cjs/components/Tooltip/DefaultTooltipContent/Row.js +1 -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.js +3 -3
- 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/x-axis.js +1 -1
- package/dist/cjs/core/axes/y-axis.js +1 -1
- package/dist/cjs/core/layout/split.js +1 -1
- package/dist/cjs/core/scales/utils.d.ts +1 -1
- package/dist/cjs/core/scales/utils.js +1 -1
- package/dist/cjs/core/scales/x-scale.js +1 -1
- package/dist/cjs/core/scales/y-scale.js +1 -1
- package/dist/cjs/core/series/prepare-area.js +1 -1
- package/dist/cjs/core/series/prepare-bar-x.js +1 -1
- package/dist/cjs/core/series/prepare-bar-y.js +1 -1
- package/dist/cjs/core/series/prepare-funnel.js +1 -1
- package/dist/cjs/core/series/prepare-heatmap.js +1 -1
- package/dist/cjs/core/series/prepare-legend.js +1 -1
- package/dist/cjs/core/series/prepare-line.js +1 -1
- package/dist/cjs/core/series/prepare-pie.js +1 -1
- package/dist/cjs/core/series/prepare-radar.js +1 -1
- package/dist/cjs/core/series/prepare-sankey.js +1 -1
- package/dist/cjs/core/series/prepare-scatter.js +1 -1
- package/dist/cjs/core/series/prepare-treemap.js +1 -1
- package/dist/cjs/core/series/prepare-waterfall.js +1 -1
- package/dist/cjs/core/series/utils.js +1 -1
- package/dist/cjs/core/utils/series/sorting.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 -1
- package/dist/cjs/hooks/useAxis/types.js +1 -1
- package/dist/cjs/hooks/useAxisScales/index.d.ts +3 -3
- 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 -1
- package/dist/cjs/hooks/useSeries/types.js +1 -1
- package/dist/cjs/hooks/useSeries/utils.d.ts +1 -1
- package/dist/cjs/hooks/useSeries/utils.js +1 -1
- package/dist/cjs/hooks/useShapes/area/index.js +1 -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 +1 -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 +1 -1
- package/dist/cjs/hooks/useShapes/funnel/prepare-data.js +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 +1 -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 +2 -2
- package/dist/cjs/hooks/useShapes/pie/index.js +1 -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 +2 -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 +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/types/chart-ui.d.ts +1 -1
- package/dist/cjs/types/index.d.ts +1 -1
- package/dist/cjs/types/index.js +1 -1
- package/dist/cjs/utils/chart-ui/pie-center-text.js +2 -2
- package/dist/esm/components/AxisX/AxisX.js +1 -1
- package/dist/esm/components/AxisX/prepare-axis-data.js +2 -2
- package/dist/esm/components/AxisY/AxisY.js +1 -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/utils.js +1 -1
- package/dist/esm/components/ChartInner/index.js +2 -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 +1 -1
- 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 +14 -5
- package/dist/esm/components/PlotTitle/index.d.ts +1 -1
- package/dist/esm/components/RangeSlider/index.js +1 -1
- package/dist/esm/components/Tooltip/DefaultTooltipContent/Row.js +1 -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.js +3 -3
- 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/x-axis.js +1 -1
- package/dist/esm/core/axes/y-axis.js +1 -1
- package/dist/esm/core/layout/split.js +1 -1
- package/dist/esm/core/scales/utils.d.ts +1 -1
- package/dist/esm/core/scales/utils.js +1 -1
- package/dist/esm/core/scales/x-scale.js +1 -1
- package/dist/esm/core/scales/y-scale.js +1 -1
- package/dist/esm/core/series/prepare-area.js +1 -1
- package/dist/esm/core/series/prepare-bar-x.js +1 -1
- package/dist/esm/core/series/prepare-bar-y.js +1 -1
- package/dist/esm/core/series/prepare-funnel.js +1 -1
- package/dist/esm/core/series/prepare-heatmap.js +1 -1
- package/dist/esm/core/series/prepare-legend.js +1 -1
- package/dist/esm/core/series/prepare-line.js +1 -1
- package/dist/esm/core/series/prepare-pie.js +1 -1
- package/dist/esm/core/series/prepare-radar.js +1 -1
- package/dist/esm/core/series/prepare-sankey.js +1 -1
- package/dist/esm/core/series/prepare-scatter.js +1 -1
- package/dist/esm/core/series/prepare-treemap.js +1 -1
- package/dist/esm/core/series/prepare-waterfall.js +1 -1
- package/dist/esm/core/series/utils.js +1 -1
- package/dist/esm/core/utils/series/sorting.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 -1
- package/dist/esm/hooks/useAxis/types.js +1 -1
- package/dist/esm/hooks/useAxisScales/index.d.ts +3 -3
- 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 -1
- package/dist/esm/hooks/useSeries/types.js +1 -1
- package/dist/esm/hooks/useSeries/utils.d.ts +1 -1
- package/dist/esm/hooks/useSeries/utils.js +1 -1
- package/dist/esm/hooks/useShapes/area/index.js +1 -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 +1 -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 +1 -1
- package/dist/esm/hooks/useShapes/funnel/prepare-data.js +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 +1 -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 +2 -2
- package/dist/esm/hooks/useShapes/pie/index.js +1 -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 +2 -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 +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/chart-ui.d.ts +1 -1
- package/dist/esm/types/index.d.ts +1 -1
- package/dist/esm/types/index.js +1 -1
- package/dist/esm/utils/chart-ui/pie-center-text.js +2 -2
- package/package.json +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AxesState } from '
|
|
2
|
-
import type { PreparedLegend, PreparedSeries, PreparedSeriesOptions } from '
|
|
1
|
+
import type { AxesState } from '../../core/axes/types';
|
|
2
|
+
import type { PreparedLegend, PreparedSeries, PreparedSeriesOptions } from '../../core/series/types';
|
|
3
3
|
import type { ChartXAxis, ChartYAxis, LegendConfig } from '../../types';
|
|
4
4
|
import type { PreparedChart } from '../types';
|
|
5
5
|
interface UseAxesProps {
|
|
@@ -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 { getPreparedXAxis } from '
|
|
4
|
-
import { getPreparedYAxis } from '
|
|
5
|
-
import { getWidthOccupiedByYAxis } from '
|
|
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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '../../core/axes/types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '../../core/axes/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ChartScale } from '
|
|
1
|
+
import type { ChartScale } from '../../core/scales/types';
|
|
2
2
|
import type { PreparedAxis, PreparedSeries, PreparedSplit, PreparedYAxis, RangeSliderState, ZoomState } from '../../hooks';
|
|
3
|
-
export { createXScale } from '
|
|
4
|
-
export { createYScale } from '
|
|
3
|
+
export { createXScale } from '../../core/scales/x-scale';
|
|
4
|
+
export { createYScale } from '../../core/scales/y-scale';
|
|
5
5
|
type Args = {
|
|
6
6
|
boundsWidth: number;
|
|
7
7
|
boundsHeight: number;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
|
-
import { clusterYAxes } from '
|
|
4
|
-
import { createXScale } from '
|
|
5
|
-
import { createYScale } from '
|
|
6
|
-
import { getAxisHeight, getOnlyVisibleSeries, isAxisRelatedSeries } from '
|
|
3
|
+
import { clusterYAxes } from '../../core/scales/utils';
|
|
4
|
+
import { createXScale } from '../../core/scales/x-scale';
|
|
5
|
+
import { createYScale } from '../../core/scales/y-scale';
|
|
6
|
+
import { getAxisHeight, getOnlyVisibleSeries, isAxisRelatedSeries } from '../../core/utils';
|
|
7
7
|
import { getTickValues } from '../../components/AxisY/utils';
|
|
8
|
-
export { createXScale } from '
|
|
9
|
-
export { createYScale } from '
|
|
8
|
+
export { createXScale } from '../../core/scales/x-scale';
|
|
9
|
+
export { createYScale } from '../../core/scales/y-scale';
|
|
10
10
|
export const createScales = (args) => {
|
|
11
11
|
const { boundsWidth, boundsHeight, isRangeSlider, rangeSliderState, series, split, xAxis, yAxis, zoomState, } = args;
|
|
12
12
|
// For range slider: always use all series regardless of visibility so the slider domain
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BrushBehavior } from 'd3-brush';
|
|
2
|
-
import type { ZoomType } from '
|
|
2
|
+
import type { ZoomType } from '../../core/constants';
|
|
3
3
|
import type { ChartBrush, DeepRequired } from '../../types';
|
|
4
4
|
export type BrushSelection = [number, number] | [[number, number], [number, number]];
|
|
5
5
|
export interface BrushArea {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { select } from 'd3-selection';
|
|
3
3
|
import { line } from 'd3-shape';
|
|
4
|
-
import { getAxisPlotsPosition, getLineDashArray } from '
|
|
4
|
+
import { getAxisPlotsPosition, getLineDashArray } from '../../core/utils';
|
|
5
5
|
import { getXValue, getYValue } from '../useShapes/utils';
|
|
6
6
|
import { useCrosshairHover } from './useCrosshairHover';
|
|
7
7
|
export const useCrosshair = (props) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { EventType } from '
|
|
2
|
+
import { EventType } from '../../core/utils';
|
|
3
3
|
export const useCrosshairHover = ({ dispatcher, enabled }) => {
|
|
4
4
|
const [{ hovered, pointerPosition }, setCrosshairState] = React.useState({});
|
|
5
5
|
React.useEffect(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PreparedSplit } from '
|
|
1
|
+
import type { PreparedSplit } from '../../core/layout/split-types';
|
|
2
2
|
import type { PreparedRangeSliderProps, UseRangeSliderProps } from './types';
|
|
3
3
|
export declare const EMPTY_PREPARED_SPLIT: PreparedSplit;
|
|
4
4
|
export declare function useRangeSlider(props: UseRangeSliderProps): PreparedRangeSliderProps;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { pointer } from 'd3-selection';
|
|
3
3
|
import { isEqual } from 'lodash';
|
|
4
|
-
import { SERIES_TYPE } from '
|
|
5
|
-
import { isBandScale } from '
|
|
4
|
+
import { SERIES_TYPE } from '../../core/constants';
|
|
5
|
+
import { isBandScale } from '../../core/utils';
|
|
6
6
|
import { useAxis } from '../useAxis';
|
|
7
7
|
import { useAxisScales } from '../useAxisScales';
|
|
8
8
|
import { getNormalizedSelection, isOneDimensionalSelection } from '../useBrush/utils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChartScale } from '
|
|
1
|
+
import type { ChartScale } from '../../core/scales/types';
|
|
2
2
|
import type { ChartXAxis, ChartYAxis, LegendConfig } from '../../types';
|
|
3
3
|
import type { PreparedChart } from '../types';
|
|
4
4
|
import type { PreparedRangeSlider, PreparedXAxis, PreparedYAxis } from '../useAxis/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChartScale } from '
|
|
1
|
+
import type { ChartScale } from '../../core/scales/types';
|
|
2
2
|
import type { PreparedChart } from '../types';
|
|
3
3
|
import type { PreparedRangeSlider } from '../useAxis/types';
|
|
4
4
|
import type { BrushSelection } from '../useBrush/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PreparedLegend, PreparedSeries } from '
|
|
1
|
+
import type { PreparedLegend, PreparedSeries } from '../../core/series/types';
|
|
2
2
|
import type { ChartData } from '../../types';
|
|
3
3
|
export declare const getVisibleSeries: ({ preparedSeries, activeLegendItems, }: {
|
|
4
4
|
preparedSeries: PreparedSeries[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { group } from 'd3-array';
|
|
2
2
|
import { scaleOrdinal } from 'd3-scale';
|
|
3
|
-
import { prepareSeries } from '
|
|
4
|
-
import { getSeriesNames } from '
|
|
3
|
+
import { prepareSeries } from '../../core/series/prepareSeries';
|
|
4
|
+
import { getSeriesNames } from '../../core/utils';
|
|
5
5
|
export const getVisibleSeries = ({ preparedSeries, activeLegendItems, }) => {
|
|
6
6
|
return preparedSeries.map((singleSeries) => {
|
|
7
7
|
if (singleSeries.legend.enabled) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '../../core/series/types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '../../core/series/types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '../../core/series/utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '../../core/series/utils';
|
|
@@ -3,7 +3,7 @@ import { color } from 'd3-color';
|
|
|
3
3
|
import { select } from 'd3-selection';
|
|
4
4
|
import { area as areaGenerator, line as lineGenerator } from 'd3-shape';
|
|
5
5
|
import get from 'lodash/get';
|
|
6
|
-
import { filterOverlappingLabels } from '
|
|
6
|
+
import { filterOverlappingLabels } from '../../../core/utils';
|
|
7
7
|
import { block } from '../../../utils';
|
|
8
8
|
import { HtmlLayer } from '../HtmlLayer';
|
|
9
9
|
import { getMarkerHaloVisibility, getMarkerVisibility, renderMarker, selectMarkerHalo, selectMarkerSymbol, setMarker, } from '../marker';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PreparedSplit } from '
|
|
2
|
-
import type { ChartScale } from '
|
|
1
|
+
import type { PreparedSplit } from '../../../core/layout/split-types';
|
|
2
|
+
import type { ChartScale } from '../../../core/scales/types';
|
|
3
3
|
import type { PreparedXAxis, PreparedYAxis } from '../../useAxis/types';
|
|
4
4
|
import type { PreparedAreaSeries } from '../../useSeries/types';
|
|
5
5
|
import type { PreparedAreaData } from './types';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { group } from 'd3-array';
|
|
2
2
|
import isNil from 'lodash/isNil';
|
|
3
3
|
import round from 'lodash/round';
|
|
4
|
-
import { getDataCategoryValue, getLabelsSize, getTextSizeFn } from '
|
|
5
|
-
import { getFormattedValue } from '
|
|
4
|
+
import { getDataCategoryValue, getLabelsSize, getTextSizeFn } from '../../../core/utils';
|
|
5
|
+
import { getFormattedValue } from '../../../core/utils/format';
|
|
6
6
|
import { getXValue, getYValue } from '../utils';
|
|
7
7
|
function getXValues(series, xAxis, xScale) {
|
|
8
8
|
const categories = xAxis.categories || [];
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { color } from 'd3-color';
|
|
3
3
|
import { select } from 'd3-selection';
|
|
4
4
|
import get from 'lodash/get';
|
|
5
|
-
import { filterOverlappingLabels } from '
|
|
5
|
+
import { filterOverlappingLabels } from '../../../core/utils';
|
|
6
6
|
import { block } from '../../../utils';
|
|
7
7
|
import { HtmlLayer } from '../HtmlLayer';
|
|
8
8
|
import { getRectPath } from '../utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PreparedSplit } from '
|
|
2
|
-
import type { ChartScale } from '
|
|
1
|
+
import type { PreparedSplit } from '../../../core/layout/split-types';
|
|
2
|
+
import type { ChartScale } from '../../../core/scales/types';
|
|
3
3
|
import type { PreparedXAxis, PreparedYAxis } from '../../useAxis/types';
|
|
4
4
|
import type { PreparedBarXSeries, PreparedSeriesOptions } from '../../useSeries/types';
|
|
5
5
|
import type { PreparedBarXData } from './types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ascending, descending, max, reverse, sort } from 'd3-array';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
|
-
import { getDataCategoryValue, getLabelsSize } from '
|
|
4
|
-
import { getFormattedValue } from '
|
|
3
|
+
import { getDataCategoryValue, getLabelsSize } from '../../../core/utils';
|
|
4
|
+
import { getFormattedValue } from '../../../core/utils/format';
|
|
5
5
|
import { MIN_BAR_GAP, MIN_BAR_GROUP_GAP, MIN_BAR_WIDTH } from '../../constants';
|
|
6
6
|
import { getSeriesStackId } from '../../useSeries/utils';
|
|
7
7
|
import { getBandSize } from '../../utils/get-band-size';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChartScale } from '
|
|
1
|
+
import type { ChartScale } from '../../../core/scales/types';
|
|
2
2
|
import type { PreparedXAxis, PreparedYAxis } from '../../useAxis/types';
|
|
3
3
|
import type { PreparedBarYSeries, PreparedSeriesOptions } from '../../useSeries/types';
|
|
4
4
|
import type { BarYShapesArgs } from './types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ascending, descending, sort } from 'd3-array';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
|
-
import { filterOverlappingLabels, getHtmlLabelConstraintedPosition, getLabelsSize, getSvgLabelConstraintedPosition, getTextSizeFn, } from '
|
|
4
|
-
import { getFormattedValue } from '
|
|
3
|
+
import { filterOverlappingLabels, getHtmlLabelConstraintedPosition, getLabelsSize, getSvgLabelConstraintedPosition, getTextSizeFn, } from '../../../core/utils';
|
|
4
|
+
import { getFormattedValue } from '../../../core/utils/format';
|
|
5
5
|
import { getBarYLayout, groupBarYDataByYValue } from '../../utils';
|
|
6
6
|
export async function prepareBarYData(args) {
|
|
7
7
|
var _a, _b;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { color } from 'd3-color';
|
|
3
3
|
import { select } from 'd3-selection';
|
|
4
|
-
import { getLineDashArray } from '
|
|
4
|
+
import { getLineDashArray } from '../../../core/utils';
|
|
5
5
|
import { block } from '../../../utils';
|
|
6
6
|
export { prepareFunnelData } from './prepare-data';
|
|
7
7
|
export * from './types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { path } from 'd3-path';
|
|
2
|
-
import { calculateNumericProperty, getFormattedValue, getTextSizeFn } from '
|
|
2
|
+
import { calculateNumericProperty, getFormattedValue, getTextSizeFn } from '../../../core/utils';
|
|
3
3
|
function getLineConnectorPaths(args) {
|
|
4
4
|
const { points } = args;
|
|
5
5
|
const leftPath = path();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChartScale } from '
|
|
1
|
+
import type { ChartScale } from '../../../core/scales/types';
|
|
2
2
|
import type { PreparedXAxis, PreparedYAxis } from '../../../hooks/useAxis/types';
|
|
3
3
|
import type { PreparedHeatmapSeries } from '../../useSeries/types';
|
|
4
4
|
import type { PreparedHeatmapData } from './types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getDomainDataXBySeries, getDomainDataYBySeries, getFormattedValue, getLabelsSize, getTextSizeFn, getTextWithElipsis, isBandScale, } from '
|
|
1
|
+
import { getDomainDataXBySeries, getDomainDataYBySeries, getFormattedValue, getLabelsSize, getTextSizeFn, getTextWithElipsis, isBandScale, } from '../../../core/utils';
|
|
2
2
|
import { getBandSize } from '../../../hooks/utils/get-band-size';
|
|
3
3
|
export async function prepareHeatmapData({ series, xAxis, xScale, yAxis, yScale, }) {
|
|
4
4
|
var _a, _b, _c, _d, _e;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Dispatch } from 'd3-dispatch';
|
|
3
|
-
import type { SeriesType } from '
|
|
4
|
-
import type { PreparedSplit } from '
|
|
5
|
-
import type { ChartScale } from '
|
|
3
|
+
import type { SeriesType } from '../../core/constants';
|
|
4
|
+
import type { PreparedSplit } from '../../core/layout/split-types';
|
|
5
|
+
import type { ChartScale } from '../../core/scales/types';
|
|
6
6
|
import type { PreparedXAxis, PreparedYAxis } from '../useAxis/types';
|
|
7
7
|
import type { PreparedSeries, PreparedSeriesOptions } from '../useSeries/types';
|
|
8
8
|
import type { ZoomState } from '../useZoom/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { group } from 'd3-array';
|
|
3
|
-
import { SERIES_TYPE } from '
|
|
4
|
-
import { getOnlyVisibleSeries } from '
|
|
3
|
+
import { SERIES_TYPE } from '../../core/constants';
|
|
4
|
+
import { getOnlyVisibleSeries } from '../../core/utils';
|
|
5
5
|
import { ChartError } from '../../libs';
|
|
6
6
|
import { AreaSeriesShapes } from './area';
|
|
7
7
|
import { prepareAreaData } from './area/prepare-data';
|
|
@@ -3,7 +3,7 @@ import { color } from 'd3-color';
|
|
|
3
3
|
import { select } from 'd3-selection';
|
|
4
4
|
import { line as lineGenerator } from 'd3-shape';
|
|
5
5
|
import get from 'lodash/get';
|
|
6
|
-
import { filterOverlappingLabels, getLineDashArray } from '
|
|
6
|
+
import { filterOverlappingLabels, getLineDashArray } from '../../../core/utils';
|
|
7
7
|
import { block } from '../../../utils';
|
|
8
8
|
import { HtmlLayer } from '../HtmlLayer';
|
|
9
9
|
import { getMarkerHaloVisibility, getMarkerVisibility, renderMarker, selectMarkerHalo, selectMarkerSymbol, setMarker, } from '../marker';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PreparedSplit } from '
|
|
2
|
-
import type { ChartScale } from '
|
|
1
|
+
import type { PreparedSplit } from '../../../core/layout/split-types';
|
|
2
|
+
import type { ChartScale } from '../../../core/scales/types';
|
|
3
3
|
import type { PreparedXAxis, PreparedYAxis } from '../../useAxis/types';
|
|
4
4
|
import type { PreparedLineSeries } from '../../useSeries/types';
|
|
5
5
|
import type { PreparedLineData } from './types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getLabelsSize, getTextSizeFn } from '
|
|
2
|
-
import { getFormattedValue } from '
|
|
1
|
+
import { getLabelsSize, getTextSizeFn } from '../../../core/utils';
|
|
2
|
+
import { getFormattedValue } from '../../../core/utils/format';
|
|
3
3
|
import { getXValue, getYValue } from '../utils';
|
|
4
4
|
async function getHtmlLabel(point, series, xMax) {
|
|
5
5
|
var _a;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DashStyle, LineCap, LineJoin } from '
|
|
1
|
+
import type { DashStyle, LineCap, LineJoin } from '../../../core/constants';
|
|
2
2
|
import type { HtmlItem, LabelData, LineSeriesData, LineSeriesLineBaseStyle } from '../../../types';
|
|
3
3
|
import type { PreparedLineSeries } from '../../useSeries/types';
|
|
4
4
|
export type PointData = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseType, Selection } from 'd3-selection';
|
|
2
|
-
import { SymbolType } from '
|
|
2
|
+
import { SymbolType } from '../../core/constants';
|
|
3
3
|
import type { MarkerData as AreaMarkerData } from './area/types';
|
|
4
4
|
import type { MarkerData as LineMarkerData } from './line/types';
|
|
5
5
|
import type { RadarMarkerData } from './radar/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { symbol } from 'd3-shape';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
|
-
import { SymbolType } from '
|
|
4
|
-
import { getSymbol } from '
|
|
3
|
+
import { SymbolType } from '../../core/constants';
|
|
4
|
+
import { getSymbol } from '../../core/utils';
|
|
5
5
|
import { block } from '../../utils';
|
|
6
6
|
const b = block('marker');
|
|
7
7
|
const haloClassName = b('halo');
|
|
@@ -3,7 +3,7 @@ import { color } from 'd3-color';
|
|
|
3
3
|
import { select } from 'd3-selection';
|
|
4
4
|
import { arc } from 'd3-shape';
|
|
5
5
|
import get from 'lodash/get';
|
|
6
|
-
import { setEllipsisForOverflowTexts } from '
|
|
6
|
+
import { setEllipsisForOverflowTexts } from '../../../core/utils';
|
|
7
7
|
import { block } from '../../../utils';
|
|
8
8
|
import { HtmlLayer } from '../HtmlLayer';
|
|
9
9
|
import { setActiveState } from '../utils';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { group, max } from 'd3-array';
|
|
2
2
|
import { arc, line as lineGenerator } from 'd3-shape';
|
|
3
3
|
import merge from 'lodash/merge';
|
|
4
|
-
import { DEFAULT_DATALABELS_STYLE } from '
|
|
5
|
-
import { calculateNumericProperty, getLabelsSize, getLeftPosition, getTextSizeFn, isLabelsOverlapping, } from '
|
|
6
|
-
import { getFormattedValue } from '
|
|
4
|
+
import { DEFAULT_DATALABELS_STYLE } from '../../../core/constants';
|
|
5
|
+
import { calculateNumericProperty, getLabelsSize, getLeftPosition, getTextSizeFn, isLabelsOverlapping, } from '../../../core/utils';
|
|
6
|
+
import { getFormattedValue } from '../../../core/utils/format';
|
|
7
7
|
import { getCurveFactory, getInscribedAngle, pieGenerator } from './utils';
|
|
8
8
|
const FULL_CIRCLE = Math.PI * 2;
|
|
9
9
|
const getCenter = (boundsWidth, boundsHeight, center) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { range } from 'd3-array';
|
|
2
2
|
import { scaleLinear } from 'd3-scale';
|
|
3
3
|
import { curveLinearClosed, line } from 'd3-shape';
|
|
4
|
-
import { getLabelsSize } from '
|
|
5
|
-
import { getFormattedValue } from '
|
|
4
|
+
import { getLabelsSize } from '../../../core/utils';
|
|
5
|
+
import { getFormattedValue } from '../../../core/utils/format';
|
|
6
6
|
export async function prepareRadarData(args) {
|
|
7
7
|
const { series: preparedSeries, boundsWidth, boundsHeight } = args;
|
|
8
8
|
const maxRadius = Math.min(boundsWidth, boundsHeight) / 2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sankey, sankeyLinkHorizontal } from 'd3-sankey';
|
|
2
|
-
import { getFormattedValue } from '
|
|
2
|
+
import { getFormattedValue } from '../../../core/utils/format';
|
|
3
3
|
export function prepareSankeyData(args) {
|
|
4
4
|
const { series, width, height } = args;
|
|
5
5
|
const htmlElements = [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChartScale } from '
|
|
1
|
+
import type { ChartScale } from '../../../core/scales/types';
|
|
2
2
|
import type { PreparedXAxis, PreparedYAxis } from '../../useAxis/types';
|
|
3
3
|
import type { PreparedScatterSeries } from '../../useSeries/types';
|
|
4
4
|
import type { PreparedScatterData } from './types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
|
-
import { getDataCategoryValue } from '
|
|
2
|
+
import { getDataCategoryValue } from '../../../core/utils';
|
|
3
3
|
import { getXValue, getYValue } from '../utils';
|
|
4
4
|
function getFilteredLinearScatterData(data) {
|
|
5
5
|
return data.filter((d) => typeof d.x === 'number' && typeof d.y === 'number');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ascending, descending, sort } from 'd3-array';
|
|
2
2
|
import { stratify, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, } from 'd3-hierarchy';
|
|
3
|
-
import { LayoutAlgorithm } from '
|
|
4
|
-
import { getLabelsSize, getTextSizeFn, getTextWithElipsis } from '
|
|
5
|
-
import { getFormattedValue } from '
|
|
3
|
+
import { LayoutAlgorithm } from '../../../core/constants';
|
|
4
|
+
import { getLabelsSize, getTextSizeFn, getTextWithElipsis } from '../../../core/utils';
|
|
5
|
+
import { getFormattedValue } from '../../../core/utils/format';
|
|
6
6
|
const DEFAULT_PADDING = 1;
|
|
7
7
|
async function getLabels(args) {
|
|
8
8
|
var _a;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseType } from 'd3-selection';
|
|
2
|
-
import type { ChartScale } from '
|
|
2
|
+
import type { ChartScale } from '../../core/scales/types';
|
|
3
3
|
import type { BasicInactiveState } from '../../types';
|
|
4
4
|
import type { PreparedXAxis, PreparedYAxis } from '../useAxis/types';
|
|
5
5
|
import type { ZoomState } from '../useZoom/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { path } from 'd3-path';
|
|
2
2
|
import { select } from 'd3-selection';
|
|
3
3
|
import get from 'lodash/get';
|
|
4
|
-
import { getDataCategoryValue } from '
|
|
4
|
+
import { getDataCategoryValue } from '../../core/utils';
|
|
5
5
|
const ONE_POINT_DOMAIN_DATA_CAPACITY = 3;
|
|
6
6
|
export function getXValue(args) {
|
|
7
7
|
const { point, points, xAxis, xScale } = args;
|
|
@@ -3,8 +3,8 @@ import { color } from 'd3-color';
|
|
|
3
3
|
import { select } from 'd3-selection';
|
|
4
4
|
import { line as lineGenerator } from 'd3-shape';
|
|
5
5
|
import get from 'lodash/get';
|
|
6
|
-
import { DASH_STYLE } from '
|
|
7
|
-
import { filterOverlappingLabels, getLineDashArray, getWaterfallPointColor } from '
|
|
6
|
+
import { DASH_STYLE } from '../../../core/constants';
|
|
7
|
+
import { filterOverlappingLabels, getLineDashArray, getWaterfallPointColor } from '../../../core/utils';
|
|
8
8
|
import { block } from '../../../utils';
|
|
9
9
|
import { HtmlLayer } from '../HtmlLayer';
|
|
10
10
|
export { prepareWaterfallData } from './prepare-data';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChartScale } from '
|
|
1
|
+
import type { ChartScale } from '../../../core/scales/types';
|
|
2
2
|
import type { PreparedXAxis, PreparedYAxis } from '../../useAxis/types';
|
|
3
3
|
import type { PreparedSeriesOptions, PreparedWaterfallSeries } from '../../useSeries/types';
|
|
4
4
|
import type { PreparedWaterfallData } from './types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
2
|
import sortBy from 'lodash/sortBy';
|
|
3
|
-
import { getLabelsSize } from '
|
|
4
|
-
import { getFormattedValue } from '
|
|
3
|
+
import { getLabelsSize } from '../../../core/utils';
|
|
4
|
+
import { getFormattedValue } from '../../../core/utils/format';
|
|
5
5
|
import { MIN_BAR_GAP, MIN_BAR_WIDTH } from '../../constants';
|
|
6
6
|
import { getXValue, getYValue } from '../utils';
|
|
7
7
|
async function getLabelData(d, plotHeight) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PreparedSplit } from '
|
|
2
|
-
import type { ChartScale } from '
|
|
1
|
+
import type { PreparedSplit } from '../../core/layout/split-types';
|
|
2
|
+
import type { ChartScale } from '../../core/scales/types';
|
|
3
3
|
import type { PreparedZoom } from '../types';
|
|
4
4
|
import type { PreparedXAxis, PreparedYAxis } from '../useAxis/types';
|
|
5
5
|
import type { ZoomState } from './types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BrushSelection } from 'd3-brush';
|
|
2
|
-
import type { ZoomType } from '
|
|
3
|
-
import type { ChartScale } from '
|
|
2
|
+
import type { ZoomType } from '../../core/constants';
|
|
3
|
+
import type { ChartScale } from '../../core/scales/types';
|
|
4
4
|
import type { PreparedXAxis, PreparedYAxis } from '../useAxis/types';
|
|
5
5
|
import type { ZoomState } from './types';
|
|
6
6
|
export declare function selectionToZoomBounds(args: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChartScale } from '
|
|
1
|
+
import type { ChartScale } from '../../core/scales/types';
|
|
2
2
|
import type { BarYSeries, BarYSeriesData } from '../../types';
|
|
3
3
|
import type { PreparedYAxis } from '../useAxis/types';
|
|
4
4
|
import type { PreparedBarYSeries, PreparedSeriesOptions } from '../useSeries/types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { max } from 'd3-array';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
|
-
import { getDataCategoryValue } from '
|
|
3
|
+
import { getDataCategoryValue } from '../../core/utils';
|
|
4
4
|
import { MIN_BAR_GAP, MIN_BAR_GROUP_GAP, MIN_BAR_WIDTH } from '../constants';
|
|
5
5
|
import { getSeriesStackId } from '../useSeries/utils';
|
|
6
6
|
import { getBandSize } from './get-band-size';
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CustomShapeRenderer } from './utils';
|
|
2
|
-
export { getFormattedValue } from '
|
|
3
|
-
export { getDefaultTooltipHeaderFormat } from '
|
|
2
|
+
export { getFormattedValue } from './core/utils';
|
|
3
|
+
export { getDefaultTooltipHeaderFormat } from './core/utils/tooltip';
|
|
4
4
|
export * from './components';
|
|
5
5
|
export * from './types';
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CustomShapeRenderer } from './utils';
|
|
2
|
-
export { getFormattedValue } from '
|
|
3
|
-
export { getDefaultTooltipHeaderFormat } from '
|
|
2
|
+
export { getFormattedValue } from './core/utils';
|
|
3
|
+
export { getDefaultTooltipHeaderFormat } from './core/utils/tooltip';
|
|
4
4
|
export * from './components';
|
|
5
5
|
export * from './types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '../core/types';
|
|
2
2
|
export * from './chart-ui';
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '../core/types';
|
|
2
2
|
export * from './chart-ui';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { select } from 'd3-selection';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
|
-
import { calculateNumericProperty } from '
|
|
4
|
-
import { getLabelsSize, handleOverflowingText } from '
|
|
3
|
+
import { calculateNumericProperty } from '../../core/utils/math';
|
|
4
|
+
import { getLabelsSize, handleOverflowingText } from '../../core/utils/text';
|
|
5
5
|
const MAX_FONT_SIZE = 64;
|
|
6
6
|
const MIN_FONT_SIZE = 8;
|
|
7
7
|
export function pieCenterText(text, options) {
|