@gravity-ui/charts 1.42.1 → 1.42.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +3 -3
- 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/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 +3 -3
- 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/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,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 { getLineDashArray } from '
|
|
4
|
+
import { getLineDashArray } from '../../core/utils';
|
|
5
5
|
import { HtmlLayer } from '../../hooks/useShapes/HtmlLayer';
|
|
6
6
|
import { block } from '../../utils';
|
|
7
7
|
import './styles.css';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getUniqId } from '@gravity-ui/uikit';
|
|
2
|
-
import { calculateSin, formatAxisTickLabel, getBandsPosition, getLabelsSize, getMinSpaceBetween, getTextSizeFn, getTextWithElipsis, } from '
|
|
3
|
-
import { getXAxisTickValues } from '
|
|
2
|
+
import { calculateSin, formatAxisTickLabel, getBandsPosition, getLabelsSize, getMinSpaceBetween, getTextSizeFn, getTextWithElipsis, } from '../../core/utils';
|
|
3
|
+
import { getXAxisTickValues } from '../../core/utils/axis/x-axis';
|
|
4
4
|
import { getMultilineTitleContentRows } from '../utils/axis-title';
|
|
5
5
|
async function getSvgAxisLabel({ getTextSize, text, axis, top, left, labelMaxWidth, axisWidth, boundsOffsetLeft, boundsOffsetRight, }) {
|
|
6
6
|
var _a;
|
|
@@ -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 { getLineDashArray } from '
|
|
4
|
+
import { getLineDashArray } from '../../core/utils';
|
|
5
5
|
import { HtmlLayer } from '../../hooks/useShapes/HtmlLayer';
|
|
6
6
|
import { block } from '../../utils';
|
|
7
7
|
import './styles.css';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUniqId } from '@gravity-ui/uikit';
|
|
2
|
-
import { calculateCos, calculateSin, formatAxisTickLabel, getBandsPosition, getLabelsSize, getMinSpaceBetween, getTextSizeFn, getTextWithElipsis, wrapText, } from '
|
|
2
|
+
import { calculateCos, calculateSin, formatAxisTickLabel, getBandsPosition, getLabelsSize, getMinSpaceBetween, getTextSizeFn, getTextWithElipsis, wrapText, } from '../../core/utils';
|
|
3
3
|
import { prepareHtmlYAxisTitle, prepareSvgYAxisTitle } from './prepare-axis-title';
|
|
4
4
|
import { getTickValues } from './utils';
|
|
5
5
|
async function getSvgAxisLabel({ getTextSize, text, axis, top, left, labelMaxHeight, topOffset, }) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { calculateCos, calculateSin, getLabelsSize, getTextSizeFn, getTextWithElipsis, } from '
|
|
1
|
+
import { calculateCos, calculateSin, getLabelsSize, getTextSizeFn, getTextWithElipsis, } from '../../core/utils';
|
|
2
2
|
import { getMultilineTitleContentRows } from '../utils/axis-title';
|
|
3
3
|
export async function prepareSvgYAxisTitle({ axis, axisTop, axisHeight, axisWidth, axisLabelsWidth, }) {
|
|
4
4
|
if (!axis.title.text || axis.title.html) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getDomainDataYBySeries, getMinSpaceBetween, getTicksCountByPixelInterval, isBandScale, thinOut, } from '
|
|
1
|
+
import { getDomainDataYBySeries, getMinSpaceBetween, getTicksCountByPixelInterval, isBandScale, thinOut, } from '../../core/utils';
|
|
2
2
|
export function getTickValues({ scale, axis, labelLineHeight, series, }) {
|
|
3
3
|
if ('ticks' in scale && typeof scale.ticks === 'function') {
|
|
4
4
|
const range = scale.range();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ArrowRotateLeft } from '@gravity-ui/icons';
|
|
3
3
|
import { Button, ButtonIcon, useUniqId } from '@gravity-ui/uikit';
|
|
4
|
-
import { getPreparedRangeSlider } from '
|
|
5
|
-
import { EventType, getDispatcher, isBandScale } from '
|
|
4
|
+
import { getPreparedRangeSlider } from '../../core/axes/range-slider';
|
|
5
|
+
import { EventType, getDispatcher, isBandScale } from '../../core/utils';
|
|
6
6
|
import { useCrosshair, usePrevious } from '../../hooks';
|
|
7
7
|
import { getClipPathIdByBounds } from '../../hooks/useShapes/utils';
|
|
8
8
|
import { block } from '../../utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Dispatch } from 'd3-dispatch';
|
|
3
|
-
import type { ChartScale } from '
|
|
3
|
+
import type { ChartScale } from '../../core/scales/types';
|
|
4
4
|
import type { PreparedXAxis, PreparedYAxis, ShapeData } from '../../hooks';
|
|
5
5
|
import type { useChartInnerState } from './useChartInnerState';
|
|
6
6
|
type ChartInnerState = ReturnType<typeof useChartInnerState>;
|
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { pointer } from 'd3-selection';
|
|
3
3
|
import get from 'lodash/get';
|
|
4
4
|
import throttle from 'lodash/throttle';
|
|
5
|
-
import { IS_TOUCH_ENABLED } from '
|
|
6
|
-
import { EventType } from '
|
|
7
|
-
import { getClosestPoints } from '
|
|
8
|
-
import { getHoveredPlots } from '
|
|
5
|
+
import { IS_TOUCH_ENABLED } from '../../core/constants';
|
|
6
|
+
import { EventType } from '../../core/utils';
|
|
7
|
+
import { getClosestPoints } from '../../core/utils/get-closest-data';
|
|
8
|
+
import { getHoveredPlots } from '../../core/utils/get-hovered-plots';
|
|
9
9
|
export function useChartInnerHandlers(props) {
|
|
10
10
|
const { boundsHeight, boundsOffsetLeft, boundsOffsetTop, boundsWidth, dispatcher, shapesData, svgContainer, togglePinTooltip, tooltipPinned, unpinTooltip, xAxis, yAxis, xScale, yScale, tooltipThrottle, } = props;
|
|
11
11
|
const isOutsideBounds = React.useCallback((x, y) => {
|
|
@@ -29,7 +29,7 @@ export declare function useChartInnerProps(props: Props): {
|
|
|
29
29
|
legendConfig?: LegendConfig | undefined;
|
|
30
30
|
legendItems?: LegendItem[][] | undefined;
|
|
31
31
|
preparedLegend?: PreparedLegend | undefined;
|
|
32
|
-
preparedSeriesOptions?: import("
|
|
32
|
+
preparedSeriesOptions?: import("../../core/constants").SeriesOptionsDefaults | undefined;
|
|
33
33
|
preparedSplit?: PreparedSplit | undefined;
|
|
34
34
|
shapes?: React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | undefined;
|
|
35
35
|
xScale?: ChartScale | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import isEqual from 'lodash/isEqual';
|
|
3
|
-
import { DEFAULT_PALETTE, SERIES_TYPE } from '
|
|
4
|
-
import { getLegendComponents, getPreparedLegend } from '
|
|
5
|
-
import { getPreparedOptions } from '
|
|
6
|
-
import { getChartDimensions, getEffectiveXRange, getSortedSeriesData, getYAxisWidth, getZoomedSeriesData, isAxisRelatedSeries, } from '
|
|
3
|
+
import { DEFAULT_PALETTE, SERIES_TYPE } from '../../core/constants';
|
|
4
|
+
import { getLegendComponents, getPreparedLegend } from '../../core/series/prepare-legend';
|
|
5
|
+
import { getPreparedOptions } from '../../core/series/prepare-options';
|
|
6
|
+
import { getChartDimensions, getEffectiveXRange, getSortedSeriesData, getYAxisWidth, getZoomedSeriesData, isAxisRelatedSeries, } from '../../core/utils';
|
|
7
7
|
import { createScales, getAxes, getPreparedSeries, getShapes, getSplit, getVisibleSeries, useZoom, } from '../../hooks';
|
|
8
8
|
import { getActiveLegendItems, getAllLegendItems } from '../../hooks/useSeries/utils';
|
|
9
9
|
import { getNormalizedXAxis, getNormalizedYAxis, recalculateYAxisLabelsWidth } from './utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import isEqual from 'lodash/isEqual';
|
|
3
|
-
import { EventType, isMacintosh } from '
|
|
3
|
+
import { EventType, isMacintosh } from '../../core/utils';
|
|
4
4
|
export function useChartInnerState(props) {
|
|
5
5
|
var _a, _b;
|
|
6
6
|
const { dispatcher, preparedRangeSlider, tooltip } = props;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Dispatch } from 'd3-dispatch';
|
|
3
|
-
import type { ChartScale } from '
|
|
3
|
+
import type { ChartScale } from '../../core/scales/types';
|
|
4
4
|
import type { PreparedXAxis, PreparedYAxis, ShapeData } from '../../hooks';
|
|
5
5
|
type Props = {
|
|
6
6
|
boundsHeight: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
|
-
import { EventType } from '
|
|
4
|
-
import { getClosestPoints } from '
|
|
5
|
-
import { getHoveredPlots } from '
|
|
6
|
-
import { calculateNumericProperty } from '
|
|
3
|
+
import { EventType } from '../../core/utils';
|
|
4
|
+
import { getClosestPoints } from '../../core/utils/get-closest-data';
|
|
5
|
+
import { getHoveredPlots } from '../../core/utils/get-hovered-plots';
|
|
6
|
+
import { calculateNumericProperty } from '../../core/utils/math';
|
|
7
7
|
export function useDefaultState(props) {
|
|
8
8
|
const { boundsHeight, boundsOffsetLeft, boundsOffsetTop, boundsWidth, defaultState, dispatcher, shapesData, shapesReady, svgRef, xAxis, yAxis, xScale, yScale, } = props;
|
|
9
9
|
const appliedRef = React.useRef(false);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ChartScale } from '
|
|
2
|
-
import type { PreparedSeries } from '
|
|
1
|
+
import type { ChartScale } from '../../../core/scales/types';
|
|
2
|
+
import type { PreparedSeries } from '../../../core/series/types';
|
|
3
3
|
import type { PreparedYAxis } from '../../../hooks';
|
|
4
4
|
export declare function recalculateYAxisLabelsWidth(props: {
|
|
5
5
|
seriesData: PreparedSeries[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
|
-
import { getYAxisLabelMaxWidth } from '
|
|
2
|
+
import { getYAxisLabelMaxWidth } from '../../../core/axes/y-axis';
|
|
3
3
|
export async function recalculateYAxisLabelsWidth(props) {
|
|
4
4
|
const { seriesData, yAxis, yScale } = props;
|
|
5
5
|
const axisIndexesToRecalculateMap = new Map();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
|
-
import { getHorizontalSvgTextHeight } from '
|
|
2
|
+
import { getHorizontalSvgTextHeight } from '../../../core/utils';
|
|
3
3
|
const DEFAULT_TITLE_FONT_SIZE = '15px';
|
|
4
4
|
const TITLE_PADDINGS = 8 * 2;
|
|
5
5
|
export const getPreparedTitle = ({ title, }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
|
-
import { getDefaultTooltipHeaderFormat } from '
|
|
2
|
+
import { getDefaultTooltipHeaderFormat } from '../../../core/utils/tooltip';
|
|
3
3
|
export const getPreparedTooltip = (args) => {
|
|
4
4
|
var _a, _b;
|
|
5
5
|
const { tooltip, seriesData, yAxes, xAxis } = args;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ZoomType } from '
|
|
1
|
+
import type { ZoomType } from '../../../core/constants';
|
|
2
2
|
import type { PreparedZoom } from '../../../hooks/types';
|
|
3
3
|
import type { ChartSeries, ChartZoom } from '../../../types';
|
|
4
4
|
export declare function getZoomType(args: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import intersection from 'lodash/intersection';
|
|
2
2
|
import merge from 'lodash/merge';
|
|
3
|
-
import { SERIES_TYPE, ZOOM_TYPE, brushDefaults } from '
|
|
3
|
+
import { SERIES_TYPE, ZOOM_TYPE, brushDefaults } from '../../../core/constants';
|
|
4
4
|
function mapSeriesTypeToZoomType(seriesType) {
|
|
5
5
|
switch (seriesType) {
|
|
6
6
|
case SERIES_TYPE.Area: {
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { scaleLinear } from 'd3-scale';
|
|
3
3
|
import { select } from 'd3-selection';
|
|
4
4
|
import { symbol } from 'd3-shape';
|
|
5
|
-
import { CONTINUOUS_LEGEND_SIZE } from '
|
|
6
|
-
import { createGradientRect, getContinuesColorFn, getLabelsSize, getSymbol, getUniqId, } from '
|
|
7
|
-
import { axisBottom } from '
|
|
5
|
+
import { CONTINUOUS_LEGEND_SIZE } from '../../core/constants';
|
|
6
|
+
import { createGradientRect, getContinuesColorFn, getLabelsSize, getSymbol, getUniqId, } from '../../core/utils';
|
|
7
|
+
import { axisBottom } from '../../core/utils/axis-generators';
|
|
8
8
|
import { formatNumber } from '../../libs';
|
|
9
9
|
import { block } from '../../utils';
|
|
10
10
|
import { appendLinePathElement } from '../utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useUniqId } from '@gravity-ui/uikit';
|
|
3
|
-
import { isBandScale } from '
|
|
3
|
+
import { isBandScale } from '../../core/utils';
|
|
4
4
|
import { useBrush, useRangeSlider } from '../../hooks';
|
|
5
5
|
import { block } from '../../utils';
|
|
6
6
|
import { getInitialRangeSliderState } from '../utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { getFormattedValue } from '
|
|
2
|
+
import { getFormattedValue } from '../../../core/utils/format';
|
|
3
3
|
import { block } from '../../../utils';
|
|
4
4
|
import { getBuiltInAggregatedValue, getBuiltInAggregationLabel } from './utils';
|
|
5
5
|
const b = block('tooltip');
|
|
@@ -3,8 +3,8 @@ import { Divider } from '@gravity-ui/uikit';
|
|
|
3
3
|
import parse from 'html-react-parser';
|
|
4
4
|
import get from 'lodash/get';
|
|
5
5
|
import isEqual from 'lodash/isEqual';
|
|
6
|
-
import { i18n } from '
|
|
7
|
-
import { getFormattedValue } from '
|
|
6
|
+
import { i18n } from '../../../core/i18n';
|
|
7
|
+
import { getFormattedValue } from '../../../core/utils/format';
|
|
8
8
|
import { usePrevious } from '../../../hooks';
|
|
9
9
|
import { block } from '../../../utils';
|
|
10
10
|
import { Row } from './Row';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { create } from 'd3-selection';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
|
-
import { i18n } from '
|
|
4
|
-
import { getDataCategoryValue, getDefaultDateFormat } from '
|
|
5
|
-
import { getFormattedValue } from '
|
|
3
|
+
import { i18n } from '../../../core/i18n';
|
|
4
|
+
import { getDataCategoryValue, getDefaultDateFormat } from '../../../core/utils';
|
|
5
|
+
import { getFormattedValue } from '../../../core/utils/format';
|
|
6
6
|
import { appendLinePathElement } from '../../utils';
|
|
7
7
|
function getRowData(fieldName, data, axis) {
|
|
8
8
|
switch (axis === null || axis === void 0 ? void 0 : axis.type) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { select } from 'd3-selection';
|
|
3
3
|
import debounce from 'lodash/debounce';
|
|
4
|
-
import { i18nFactory } from '
|
|
5
|
-
import { getUniqId } from '
|
|
6
|
-
import { validateData } from '
|
|
4
|
+
import { i18nFactory } from '../core/i18n';
|
|
5
|
+
import { getUniqId } from '../core/utils';
|
|
6
|
+
import { validateData } from '../core/validation';
|
|
7
7
|
import { ChartInner } from './ChartInner';
|
|
8
8
|
export * from './Tooltip/ChartTooltipContent';
|
|
9
9
|
export const Chart = React.forwardRef(function Chart(props, forwardedRef) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getTextSizeFn, getTextWithElipsis, wrapText } from '
|
|
1
|
+
import { getTextSizeFn, getTextWithElipsis, wrapText } from '../../core/utils';
|
|
2
2
|
export async function getMultilineTitleContentRows({ axis, titleMaxWidth, }) {
|
|
3
3
|
const titleContent = [];
|
|
4
4
|
const getTitleTextSize = getTextSizeFn({ style: axis.title.style });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DashStyle } from '
|
|
1
|
+
import type { DashStyle } from '../../core/constants';
|
|
2
2
|
import type { ChartScaleLinear, ChartScaleTime } from '../../hooks';
|
|
3
3
|
import type { ChartAxisRangeSlider } from '../../types';
|
|
4
4
|
export declare function getInitialRangeSliderState(args: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { duration } from '@gravity-ui/date-utils';
|
|
2
2
|
import { select } from 'd3-selection';
|
|
3
3
|
import { line as lineGenerator } from 'd3-shape';
|
|
4
|
-
import { getLineDashArray, isTimeScale } from '
|
|
4
|
+
import { getLineDashArray, isTimeScale } from '../../core/utils';
|
|
5
5
|
export function getInitialRangeSliderState(args) {
|
|
6
6
|
const { defaultRange, xScale } = args;
|
|
7
7
|
let minRange;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
|
-
import { TIME_UNITS, calculateCos, calculateNumericProperty, calculateSin, formatAxisTickLabel, getDefaultDateFormat, getHorizontalHtmlTextHeight, getHorizontalSvgTextHeight, getLabelsSize, getMinSpaceBetween, getTextSizeFn, isAxisRelatedSeries, wrapText, } from '
|
|
2
|
+
import { TIME_UNITS, calculateCos, calculateNumericProperty, calculateSin, formatAxisTickLabel, getDefaultDateFormat, getHorizontalHtmlTextHeight, getHorizontalSvgTextHeight, getLabelsSize, getMinSpaceBetween, getTextSizeFn, isAxisRelatedSeries, wrapText, } from '../utils';
|
|
3
3
|
import { DASH_STYLE, DEFAULT_AXIS_LABEL_FONT_SIZE, SERIES_TYPE, axisCrosshairDefaults, axisLabelsDefaults, axisTickMarksDefaults, xAxisTitleDefaults, } from '../constants';
|
|
4
4
|
import { createXScale } from '../scales/x-scale';
|
|
5
5
|
import { getXAxisTickValues } from '../utils/axis/x-axis';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
|
-
import { calculateNumericProperty, formatAxisTickLabel, getDefaultDateFormat, getDefaultMinYAxisValue, getHorizontalHtmlTextHeight, getHorizontalSvgTextHeight, getLabelsSize, getMinSpaceBetween, getTextSizeFn, isAxisRelatedSeries, shouldSyncAxisWithPrimary, wrapText, } from '
|
|
2
|
+
import { calculateNumericProperty, formatAxisTickLabel, getDefaultDateFormat, getDefaultMinYAxisValue, getHorizontalHtmlTextHeight, getHorizontalSvgTextHeight, getLabelsSize, getMinSpaceBetween, getTextSizeFn, isAxisRelatedSeries, shouldSyncAxisWithPrimary, wrapText, } from '../utils';
|
|
3
3
|
import { getTickValues } from '../../components/AxisY/utils';
|
|
4
4
|
import { DASH_STYLE, DEFAULT_AXIS_LABEL_FONT_SIZE, DEFAULT_AXIS_TYPE, SERIES_TYPE, axisCrosshairDefaults, axisLabelsDefaults, axisTickMarksDefaults, yAxisTitleDefaults, } from '../constants';
|
|
5
5
|
import { createYScale } from '../scales/y-scale';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
2
|
import isEmpty from 'lodash/isEmpty';
|
|
3
|
-
import { calculateNumericProperty, getHorizontalSvgTextHeight } from '
|
|
3
|
+
import { calculateNumericProperty, getHorizontalSvgTextHeight } from '../utils';
|
|
4
4
|
const DEFAULT_TITLE_FONT_SIZE = '15px';
|
|
5
5
|
const TITLE_TOP_BOTTOM_PADDING = 8;
|
|
6
6
|
function preparePlotTitle(args) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AxisDirection } from '
|
|
1
|
+
import type { AxisDirection } from '../utils';
|
|
2
2
|
import type { ChartAxis, ChartSeries } from '../../types';
|
|
3
3
|
import type { PreparedAxis, PreparedYAxis } from '../axes/types';
|
|
4
4
|
import type { PreparedSeries } from '../series';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
|
-
import { getDataCategoryValue, isSeriesWithCategoryValues } from '
|
|
2
|
+
import { getDataCategoryValue, isSeriesWithCategoryValues } from '../utils';
|
|
3
3
|
import { SERIES_TYPE } from '../constants';
|
|
4
4
|
const MARKER_SERIES_TYPES = [SERIES_TYPE.Area, SERIES_TYPE.Line, SERIES_TYPE.Scatter];
|
|
5
5
|
function getNormilizedMinMax(args) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { extent } from 'd3-array';
|
|
2
2
|
import { scaleBand, scaleLinear, scaleLog, scaleUtc } from 'd3-scale';
|
|
3
3
|
import get from 'lodash/get';
|
|
4
|
-
import { getDefaultMaxXAxisValue, getDefaultMinXAxisValue, getDomainDataXBySeries, getEffectiveXRange, } from '
|
|
4
|
+
import { getDefaultMaxXAxisValue, getDefaultMinXAxisValue, getDomainDataXBySeries, getEffectiveXRange, } from '../utils';
|
|
5
5
|
import { getBandSize } from '../../hooks/utils/get-band-size';
|
|
6
6
|
import { DEFAULT_AXIS_TYPE, SERIES_TYPE } from '../constants';
|
|
7
7
|
import { checkIsPointDomain, filterCategoriesByVisibleSeries, getMinMaxPropsOrState, hasOnlyMarkerSeries, validateArrayData, } from './utils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { extent, tickStep, ticks } from 'd3-array';
|
|
2
2
|
import { scaleBand, scaleLinear, scaleLog, scaleUtc } from 'd3-scale';
|
|
3
3
|
import get from 'lodash/get';
|
|
4
|
-
import { CHART_SERIES_WITH_VOLUME_ON_Y_AXIS, getDomainDataYBySeries, shouldSyncAxisWithPrimary, } from '
|
|
4
|
+
import { CHART_SERIES_WITH_VOLUME_ON_Y_AXIS, getDomainDataYBySeries, shouldSyncAxisWithPrimary, } from '../utils';
|
|
5
5
|
import { getTickValues } from '../../components/AxisY/utils';
|
|
6
6
|
import { getBandSize } from '../../hooks/utils/get-band-size';
|
|
7
7
|
import { SERIES_TYPE } from '../constants';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
2
|
import merge from 'lodash/merge';
|
|
3
|
-
import { getUniqId } from '
|
|
3
|
+
import { getUniqId } from '../utils';
|
|
4
4
|
import { DEFAULT_DATALABELS_STYLE, seriesRangeSliderOptionsDefaults } from '../constants';
|
|
5
5
|
import { DEFAULT_DATALABELS_PADDING, DEFAULT_HALO_OPTIONS, DEFAULT_POINT_MARKER_OPTIONS, } from './constants';
|
|
6
6
|
import { getSeriesStackId, prepareLegendSymbol } from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
|
-
import { getUniqId } from '
|
|
2
|
+
import { getUniqId } from '../utils';
|
|
3
3
|
import { DEFAULT_DATALABELS_STYLE, seriesRangeSliderOptionsDefaults } from '../constants';
|
|
4
4
|
import { DEFAULT_DATALABELS_PADDING } from './constants';
|
|
5
5
|
import { getSeriesStackId, prepareLegendSymbol } from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
|
-
import { getLabelsSize, getUniqId } from '
|
|
2
|
+
import { getLabelsSize, getUniqId } from '../utils';
|
|
3
3
|
import { DEFAULT_DATALABELS_STYLE } from '../constants';
|
|
4
4
|
import { getFormattedValue } from '../utils/format';
|
|
5
5
|
import { getSeriesStackId, prepareLegendSymbol } from './utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { scaleOrdinal } from 'd3-scale';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
|
-
import { getUniqId } from '
|
|
3
|
+
import { getUniqId } from '../utils';
|
|
4
4
|
import { DEFAULT_DATALABELS_STYLE } from '../constants';
|
|
5
5
|
import { prepareLegendSymbol } from './utils';
|
|
6
6
|
export function prepareFunnelSeries(args) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
|
-
import { getUniqId } from '
|
|
2
|
+
import { getUniqId } from '../utils';
|
|
3
3
|
import { DEFAULT_DATALABELS_STYLE } from '../constants';
|
|
4
4
|
import { DEFAULT_DATALABELS_PADDING } from './constants';
|
|
5
5
|
import { prepareLegendSymbol } from './utils';
|
|
@@ -2,7 +2,7 @@ import { groupBy } from 'lodash';
|
|
|
2
2
|
import clone from 'lodash/clone';
|
|
3
3
|
import get from 'lodash/get';
|
|
4
4
|
import merge from 'lodash/merge';
|
|
5
|
-
import { getDefaultColorStops, getDomainForContinuousColorScale, getLabelsSize, getTextSizeFn, getTextWithElipsis, } from '
|
|
5
|
+
import { getDefaultColorStops, getDomainForContinuousColorScale, getLabelsSize, getTextSizeFn, getTextWithElipsis, } from '../utils';
|
|
6
6
|
import { CONTINUOUS_LEGEND_SIZE, legendDefaults } from '../constants';
|
|
7
7
|
export async function getPreparedLegend(args) {
|
|
8
8
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
2
|
import merge from 'lodash/merge';
|
|
3
|
-
import { getUniqId } from '
|
|
3
|
+
import { getUniqId } from '../utils';
|
|
4
4
|
import { DASH_STYLE, DEFAULT_DATALABELS_STYLE, LineCap, LineJoin, seriesRangeSliderOptionsDefaults, } from '../constants';
|
|
5
5
|
import { DEFAULT_DATALABELS_PADDING, DEFAULT_HALO_OPTIONS, DEFAULT_LEGEND_SYMBOL_PADDING, DEFAULT_POINT_MARKER_OPTIONS, } from './constants';
|
|
6
6
|
export const DEFAULT_LEGEND_SYMBOL_SIZE = 16;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { scaleOrdinal } from 'd3-scale';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
|
-
import { getUniqId } from '
|
|
3
|
+
import { getUniqId } from '../utils';
|
|
4
4
|
import { DEFAULT_DATALABELS_STYLE } from '../constants';
|
|
5
5
|
import { DEFAULT_DATALABELS_PADDING } from './constants';
|
|
6
6
|
import { prepareLegendSymbol } from './utils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { scaleOrdinal } from 'd3-scale';
|
|
2
2
|
import get from 'lodash/get';
|
|
3
3
|
import merge from 'lodash/merge';
|
|
4
|
-
import { getUniqId } from '
|
|
4
|
+
import { getUniqId } from '../utils';
|
|
5
5
|
import { DEFAULT_DATALABELS_STYLE } from '../constants';
|
|
6
6
|
import { DEFAULT_DATALABELS_PADDING, DEFAULT_HALO_OPTIONS, DEFAULT_POINT_MARKER_OPTIONS, } from './constants';
|
|
7
7
|
import { prepareLegendSymbol } from './utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
2
|
import merge from 'lodash/merge';
|
|
3
|
-
import { getSymbolType, getUniqId } from '
|
|
3
|
+
import { getSymbolType, getUniqId } from '../utils';
|
|
4
4
|
import { seriesRangeSliderOptionsDefaults } from '../constants';
|
|
5
5
|
import { DEFAULT_HALO_OPTIONS, DEFAULT_POINT_MARKER_OPTIONS } from './constants';
|
|
6
6
|
import { prepareLegendSymbol } from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
|
-
import { getUniqId } from '
|
|
2
|
+
import { getUniqId } from '../utils';
|
|
3
3
|
import { DEFAULT_DATALABELS_STYLE, LayoutAlgorithm } from '../constants';
|
|
4
4
|
import { DEFAULT_DATALABELS_PADDING } from './constants';
|
|
5
5
|
import { prepareLegendSymbol } from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
|
-
import { getUniqId } from '
|
|
2
|
+
import { getUniqId } from '../utils';
|
|
3
3
|
import { DEFAULT_DATALABELS_STYLE } from '../constants';
|
|
4
4
|
import { DEFAULT_DATALABELS_PADDING } from './constants';
|
|
5
5
|
import { prepareLegendSymbol } from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import memoize from 'lodash/memoize';
|
|
2
|
-
import { getSymbolBBoxWidth } from '
|
|
2
|
+
import { getSymbolBBoxWidth } from '../utils';
|
|
3
3
|
import { SymbolType } from '../constants';
|
|
4
4
|
import { getUniqId } from '../utils/misc';
|
|
5
5
|
import { DEFAULT_LEGEND_SYMBOL_PADDING, DEFAULT_LEGEND_SYMBOL_SIZE } from './constants';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { sort } from 'd3-array';
|
|
2
2
|
import { isEmpty } from 'lodash';
|
|
3
3
|
import get from 'lodash/get';
|
|
4
|
-
import { getAxisCategories } from '
|
|
4
|
+
import { getAxisCategories } from '../../utils';
|
|
5
5
|
import { SERIES_TYPE } from '../../constants';
|
|
6
6
|
function applyAxisCategoriesOrder({ series, axis, key, }) {
|
|
7
7
|
var _a, _b;
|
|
@@ -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,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';
|