Skip to content

Commit

Permalink
make folder export cohere nt with multi usage of computeAxisValue
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Sep 18, 2024
1 parent e665a1e commit 68a729e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ import {
useSeries,
CartesianContext,
CartesianProviderProps,
cartesianProviderUtils,
computeAxisValue,
useXExtremumGetter,
useYExtremumGetter,
ZoomAxisFilters,
} from '@mui/x-charts/internals';
import { useZoom } from '../ZoomProvider/useZoom';
import { createAxisFilterMapper, createGetAxisFilters } from './createAxisFilterMapper';

const { computeAxisValue } = cartesianProviderUtils;

export interface CartesianProviderProProps extends CartesianProviderProps {}

function CartesianProviderPro(props: CartesianProviderProProps) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use client';
import * as React from 'react';
import { computeAxisValue } from '../../internals/computeAxisValue';
import { useDrawingArea } from '../../hooks/useDrawingArea';
import { useSeries } from '../../hooks/useSeries';
import { CartesianContext } from './CartesianContext';
import { computeAxisValue } from '../computeAxisValue';
import { useXExtremumGetter } from '../PluginProvider/useXExtremumGetter';
import { useYExtremumGetter } from '../PluginProvider';
import { CartesianProviderProps } from './Cartesian.types';
Expand Down
8 changes: 0 additions & 8 deletions packages/x-charts/src/context/CartesianProvider/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import { computeAxisValue } from '../computeAxisValue';

export * from './CartesianProvider';
export * from './CartesianContext';
export * from './useCartesianContext';
export * from './Cartesian.types';

const cartesianProviderUtils = {
computeAxisValue,
};

export { cartesianProviderUtils };
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use client';
import * as React from 'react';
import { computeAxisValue } from '../../internals/computeAxisValue';
import { useDrawingArea } from '../../hooks/useDrawingArea';
import { useSeries } from '../../hooks/useSeries';
import { PolarContext } from './PolarContext';
import { computeAxisValue } from '../computeAxisValue';
import { useRadiusExtremumGetter } from '../PluginProvider/useRadiusExtremumGetter';
import { useRotationExtremumGetter } from '../PluginProvider/useRotationExtremumGetter';
import { PolarProviderProps } from './Polar.types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ import {
ChartsRotationAxisProps,
} from '../models/axis';
import { CartesianChartSeriesType } from '../models/seriesType/config';
import { getColorScale, getOrdinalColorScale } from '../internals/colorScale';
import { getColorScale, getOrdinalColorScale } from './colorScale';
import { getTickNumber } from '../hooks/useTicks';
import { getScale } from '../internals/getScale';
import { DrawingArea } from './DrawingProvider';
import { FormattedSeries } from './SeriesProvider';
import { zoomScaleRange } from './CartesianProvider/zoom';
import { ExtremumGetter } from './PluginProvider';
import { getScale } from './getScale';
import { DrawingArea } from '../context/DrawingProvider';
import { FormattedSeries } from '../context/SeriesProvider';
import { zoomScaleRange } from '../context/CartesianProvider/zoom';
import { ExtremumGetter } from '../context/PluginProvider';
import {
DefaultizedAxisConfig,
ZoomData,
ZoomOptions,
GetZoomAxisFilters,
} from './CartesianProvider/Cartesian.types';
import { getAxisExtremum } from './CartesianProvider/getAxisExtremum';
} from '../context/CartesianProvider/Cartesian.types';
import { getAxisExtremum } from '../context/CartesianProvider/getAxisExtremum';

function getRange(
drawingArea: DrawingArea,
Expand Down
1 change: 1 addition & 0 deletions packages/x-charts/src/internals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export * from './getSVGPoint';
export * from './isDefined';
export { unstable_cleanupDOM } from './domUtils';
export * from './getScale';
export * from './computeAxisValue';

// contexts

Expand Down

0 comments on commit 68a729e

Please sign in to comment.