@octanejs/recharts 0.1.50 → 0.1.52
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/package.json +5 -5
- package/src/animation/AnimationController.ts +1 -1
- package/src/animation/AnimationControllerImpl.ts +2 -2
- package/src/animation/AnimationHandle.ts +1 -1
- package/src/animation/CSSTransitionAnimate.tsrx +2 -8
- package/src/animation/matchBy.ts +1 -1
- package/src/cartesian/Area.tsrx +23 -19
- package/src/cartesian/AreaRevealShape.tsrx +2 -2
- package/src/cartesian/CartesianGrid.tsrx +6 -6
- package/src/cartesian/ErrorBar.tsrx +5 -5
- package/src/cartesian/Funnel.tsrx +30 -27
- package/src/cartesian/ReferenceLine.tsrx +10 -7
- package/src/cartesian/Scatter.tsrx +41 -33
- package/src/cartesian/ZAxis.tsrx +4 -4
- package/src/cartesian/getCartesianPosition.ts +2 -2
- package/src/cartesian/getEquidistantTicks.ts +2 -2
- package/src/cartesian/getTicks.ts +2 -2
- package/src/chart/AreaChart.tsrx +1 -1
- package/src/chart/ComposedChart.tsrx +1 -1
- package/src/chart/FunnelChart.tsrx +1 -1
- package/src/chart/PieChart.tsrx +1 -1
- package/src/chart/PolarChart.tsrx +3 -3
- package/src/chart/RadarChart.tsrx +1 -1
- package/src/chart/RadialBarChart.tsrx +1 -1
- package/src/chart/Sankey.tsrx +9 -9
- package/src/chart/ScatterChart.tsrx +1 -1
- package/src/chart/SunburstChart.tsrx +14 -8
- package/src/component/Cursor.tsrx +7 -7
- package/src/component/DefaultLegendContent.tsrx +5 -5
- package/src/component/DefaultTooltipContent.tsrx +2 -2
- package/src/component/Legend.tsrx +8 -8
- package/src/component/Tooltip.tsrx +12 -12
- package/src/component/TooltipBoundingBox.tsrx +2 -2
- package/src/context/legendPayloadContext.tsrx +1 -1
- package/src/context/tooltipContext.ts +2 -2
- package/src/context/useTooltipAxis.ts +1 -1
- package/src/hooks.ts +6 -6
- package/src/polar/Pie.tsrx +28 -28
- package/src/polar/PolarAngleAxis.tsrx +16 -16
- package/src/polar/PolarGrid.tsrx +3 -3
- package/src/polar/PolarRadiusAxis.tsrx +17 -17
- package/src/polar/Radar.tsrx +10 -10
- package/src/polar/RadialBar.tsrx +29 -29
- package/src/polar/defaultPolarAngleAxisProps.ts +1 -1
- package/src/polar/defaultPolarRadiusAxisProps.ts +1 -1
- package/src/state/ReportPolarOptions.tsrx +1 -1
- package/src/state/brushSlice.ts +2 -2
- package/src/state/cartesianAxisSlice.ts +4 -4
- package/src/state/chartDataSlice.ts +2 -2
- package/src/state/errorBarSlice.ts +4 -4
- package/src/state/eventSettingsSlice.ts +2 -2
- package/src/state/externalEventsMiddleware.ts +5 -5
- package/src/state/graphicalItemsSlice.ts +11 -11
- package/src/state/keyboardEventsMiddleware.ts +3 -3
- package/src/state/layoutSlice.ts +2 -2
- package/src/state/legendSlice.ts +3 -3
- package/src/state/mouseEventsMiddleware.ts +4 -4
- package/src/state/optionsSlice.ts +2 -2
- package/src/state/polarAxisSlice.ts +2 -2
- package/src/state/polarOptionsSlice.ts +1 -1
- package/src/state/referenceElementsSlice.ts +5 -5
- package/src/state/renderedTicksSlice.ts +4 -4
- package/src/state/rootPropsSlice.ts +4 -4
- package/src/state/selectors/areaSelectors.ts +7 -7
- package/src/state/selectors/axisSelectors.ts +22 -18
- package/src/state/selectors/barSelectors.ts +11 -11
- package/src/state/selectors/brushSelectors.ts +2 -2
- package/src/state/selectors/combiners/combineActiveLabel.ts +3 -3
- package/src/state/selectors/combiners/combineActiveTooltipIndex.ts +3 -3
- package/src/state/selectors/combiners/combineAllBarPositions.ts +3 -3
- package/src/state/selectors/combiners/combineAxisRangeWithReverse.ts +2 -2
- package/src/state/selectors/combiners/combineBarPosition.ts +3 -3
- package/src/state/selectors/combiners/combineBarSizeList.ts +5 -5
- package/src/state/selectors/combiners/combineCheckedDomain.ts +1 -1
- package/src/state/selectors/combiners/combineConfiguredScale.ts +4 -4
- package/src/state/selectors/combiners/combineCoordinateForDefaultIndex.ts +2 -2
- package/src/state/selectors/combiners/combineDisplayedStackedData.ts +4 -4
- package/src/state/selectors/combiners/combineInverseScaleFunction.ts +2 -2
- package/src/state/selectors/combiners/combineRealScaleType.ts +2 -2
- package/src/state/selectors/combiners/combineStackedData.ts +2 -2
- package/src/state/selectors/combiners/combineTooltipInteractionState.ts +5 -5
- package/src/state/selectors/combiners/combineTooltipPayload.ts +4 -4
- package/src/state/selectors/combiners/combineTooltipPayloadConfigurations.ts +4 -4
- package/src/state/selectors/containerSelectors.ts +2 -2
- package/src/state/selectors/dataSelectors.ts +2 -2
- package/src/state/selectors/funnelSelectors.ts +5 -5
- package/src/state/selectors/graphicalItemSelectors.ts +3 -3
- package/src/state/selectors/legendSelectors.ts +4 -4
- package/src/state/selectors/lineSelectors.ts +6 -6
- package/src/state/selectors/numberDomainEqualityCheck.ts +1 -1
- package/src/state/selectors/pickAxisId.ts +2 -2
- package/src/state/selectors/pickAxisType.ts +1 -1
- package/src/state/selectors/pieSelectors.ts +5 -5
- package/src/state/selectors/polarAxisSelectors.ts +6 -6
- package/src/state/selectors/polarGridSelectors.ts +3 -3
- package/src/state/selectors/polarScaleSelectors.ts +4 -4
- package/src/state/selectors/polarSelectors.ts +6 -6
- package/src/state/selectors/radarSelectors.ts +11 -11
- package/src/state/selectors/radialBarSelectors.ts +16 -16
- package/src/state/selectors/rootPropsSelectors.ts +4 -4
- package/src/state/selectors/scatterSelectors.ts +8 -8
- package/src/state/selectors/selectActivePropsFromChartPointer.ts +3 -3
- package/src/state/selectors/selectAllAxes.ts +2 -2
- package/src/state/selectors/selectChartOffset.ts +2 -2
- package/src/state/selectors/selectChartOffsetInternal.ts +4 -4
- package/src/state/selectors/selectTooltipAxisId.ts +2 -2
- package/src/state/selectors/selectTooltipAxisType.ts +1 -1
- package/src/state/selectors/selectTooltipEventType.ts +3 -3
- package/src/state/selectors/selectTooltipPayloadSearcher.ts +2 -2
- package/src/state/selectors/selectTooltipSettings.ts +2 -2
- package/src/state/selectors/selectTooltipState.ts +2 -2
- package/src/state/selectors/selectors.ts +5 -5
- package/src/state/selectors/tooltipSelectors.ts +16 -16
- package/src/state/selectors/touchSelectors.ts +4 -4
- package/src/state/store.ts +3 -3
- package/src/state/tooltipSlice.ts +5 -5
- package/src/state/touchEventsMiddleware.ts +4 -4
- package/src/state/types/AreaSettings.ts +5 -5
- package/src/state/types/BarSettings.ts +3 -3
- package/src/state/types/LineSettings.ts +3 -3
- package/src/state/types/PieSettings.ts +5 -5
- package/src/state/types/RadarSettings.ts +1 -1
- package/src/state/types/RadialBarSettings.ts +2 -2
- package/src/state/types/ScatterSettings.ts +4 -4
- package/src/state/types/StackedGraphicalItem.ts +3 -3
- package/src/state/zIndexSlice.ts +1 -1
- package/src/synchronisation/syncSelectors.ts +2 -2
- package/src/synchronisation/types.ts +2 -2
- package/src/util/CartesianUtils.ts +1 -1
- package/src/util/ChartUtils.ts +8 -8
- package/src/util/DOMUtils.ts +1 -1
- package/src/util/DataUtils.ts +1 -1
- package/src/util/Events.ts +3 -3
- package/src/util/FunnelUtils.tsrx +2 -2
- package/src/util/OctaneTypes.ts +7 -6
- package/src/util/PolarUtils.ts +1 -1
- package/src/util/RadialBarUtils.tsrx +2 -2
- package/src/util/ScatterUtils.tsrx +4 -4
- package/src/util/TickUtils.ts +1 -1
- package/src/util/axisPropsAreEqual.ts +3 -3
- package/src/util/cursor/getCursorPoints.ts +6 -6
- package/src/util/cursor/getCursorRectangle.ts +1 -1
- package/src/util/cursor/getRadialCursorPoints.ts +1 -1
- package/src/util/getActiveCoordinate.ts +2 -2
- package/src/util/getAxisTypeBasedOnLayout.ts +1 -1
- package/src/util/getRadiusAndStrokeWidthFromDot.ts +1 -1
- package/src/util/getRelativeCoordinate.ts +1 -1
- package/src/util/isDomainSpecifiedByUser.ts +1 -1
- package/src/util/scale/CartesianScaleHelper.ts +2 -2
- package/src/util/scale/CustomScaleDefinition.ts +1 -1
- package/src/util/scale/RechartsScale.ts +2 -2
- package/src/util/scale/createCategoricalInverse.ts +2 -2
- package/src/util/scale/getNiceTickValues.ts +2 -2
- package/src/util/stacks/getStackSeriesIdentifier.ts +2 -2
- package/src/util/stacks/stackTypes.ts +4 -4
- package/src/util/tooltip/translate.ts +1 -1
- package/src/util/types.ts +12 -12
- package/src/zIndex/zIndexSelectors.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
|
|
2
|
-
import { XAxisProps, YAxisProps } from '../index';
|
|
3
|
-
import { AxisDomain } from './types';
|
|
4
|
-
import { AxisRange } from '../state/selectors/axisSelectors';
|
|
2
|
+
import type { XAxisProps, YAxisProps } from '../index';
|
|
3
|
+
import type { AxisDomain } from './types';
|
|
4
|
+
import type { AxisRange } from '../state/selectors/axisSelectors';
|
|
5
5
|
import { propsAreEqual } from './propsAreEqual';
|
|
6
6
|
|
|
7
7
|
function shortArraysAreEqual(
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { polarToCartesian } from '../PolarUtils';
|
|
2
2
|
import {
|
|
3
|
-
Coordinate,
|
|
4
|
-
ChartOffsetInternal,
|
|
5
|
-
PolarCoordinate,
|
|
3
|
+
type Coordinate,
|
|
4
|
+
type ChartOffsetInternal,
|
|
5
|
+
type PolarCoordinate,
|
|
6
6
|
isPolarCoordinate,
|
|
7
|
-
CartesianLayout,
|
|
8
|
-
PolarLayout,
|
|
7
|
+
type CartesianLayout,
|
|
8
|
+
type PolarLayout,
|
|
9
9
|
} from '../types';
|
|
10
|
-
import { RadialCursorPoints, getRadialCursorPoints } from './getRadialCursorPoints';
|
|
10
|
+
import { type RadialCursorPoints, getRadialCursorPoints } from './getRadialCursorPoints';
|
|
11
11
|
|
|
12
12
|
export function getCursorPoints(
|
|
13
13
|
layout: CartesianLayout | PolarLayout,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
|
|
2
|
-
import {
|
|
2
|
+
import type {
|
|
3
3
|
AxisType,
|
|
4
4
|
CartesianLayout,
|
|
5
5
|
ChartOffsetInternal,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
TickItem,
|
|
12
12
|
} from './types';
|
|
13
13
|
import { polarToCartesian } from './PolarUtils';
|
|
14
|
-
import { AxisRange } from '../state/selectors/axisSelectors';
|
|
14
|
+
import type { AxisRange } from '../state/selectors/axisSelectors';
|
|
15
15
|
import { mathSign } from './DataUtils';
|
|
16
16
|
|
|
17
17
|
export const getActiveCartesianCoordinate = (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
|
|
2
|
-
import { AxisDomainTypeInput, AxisType, EvaluatedAxisDomainType, LayoutType } from './types';
|
|
2
|
+
import type { AxisDomainTypeInput, AxisType, EvaluatedAxisDomainType, LayoutType } from './types';
|
|
3
3
|
import { isCategoricalAxis } from './ChartUtils';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
|
|
2
|
-
import { ActiveDotType, DotType } from './types';
|
|
2
|
+
import type { ActiveDotType, DotType } from './types';
|
|
3
3
|
import { svgPropertiesNoEventsFromUnknown } from './svgPropertiesNoEvents';
|
|
4
4
|
|
|
5
5
|
export function getRadiusAndStrokeWidthFromDot(dot: ActiveDotType | DotType): {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
|
|
2
2
|
import { MAX_VALUE_REG, MIN_VALUE_REG } from './ChartUtils';
|
|
3
3
|
import { isNumber } from './DataUtils';
|
|
4
|
-
import { AxisDomain, NumberDomain } from './types';
|
|
4
|
+
import type { AxisDomain, NumberDomain } from './types';
|
|
5
5
|
import { isWellBehavedNumber } from './isWellBehavedNumber';
|
|
6
6
|
|
|
7
7
|
export function isWellFormedNumberDomain(v: unknown): v is NumberDomain {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BandPosition, RechartsScale } from './RechartsScale';
|
|
2
|
-
import { CategoricalDomainItem, Coordinate, NullableCoordinate } from '../types';
|
|
1
|
+
import type { BandPosition, RechartsScale } from './RechartsScale';
|
|
2
|
+
import type { CategoricalDomainItem, Coordinate, NullableCoordinate } from '../types';
|
|
3
3
|
|
|
4
4
|
export interface CartesianScaleHelper<
|
|
5
5
|
XDomain extends CategoricalDomainItem = CategoricalDomainItem,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
|
|
2
|
-
import { CustomScaleDefinition } from './CustomScaleDefinition';
|
|
3
|
-
import { CategoricalDomainItem } from '../types';
|
|
2
|
+
import type { CustomScaleDefinition } from './CustomScaleDefinition';
|
|
3
|
+
import type { CategoricalDomainItem } from '../types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* This is internal representation of scale used in Recharts.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
|
|
2
|
-
import { InverseScaleFunction } from '../../hooks';
|
|
3
|
-
import { CustomScaleDefinition } from './CustomScaleDefinition';
|
|
2
|
+
import type { InverseScaleFunction } from '../../hooks';
|
|
3
|
+
import type { CustomScaleDefinition } from './CustomScaleDefinition';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Binary search to find the index where x would fit in array a.
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import Decimal from 'decimal.js-light';
|
|
8
8
|
import { getDigitCount, rangeStep } from './util/arithmetic';
|
|
9
|
-
import { NumberDomain } from '../types';
|
|
10
|
-
import { NiceTicksAlgorithm } from '../../state/cartesianAxisSlice';
|
|
9
|
+
import type { NumberDomain } from '../types';
|
|
10
|
+
import type { NiceTicksAlgorithm } from '../../state/cartesianAxisSlice';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Calculate a interval of a minimum value and a maximum value
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
|
|
2
|
-
import { StackSeriesIdentifier } from './stackTypes';
|
|
3
|
-
import { MaybeStackedGraphicalItem } from '../../state/types/StackedGraphicalItem';
|
|
2
|
+
import type { StackSeriesIdentifier } from './stackTypes';
|
|
3
|
+
import type { MaybeStackedGraphicalItem } from '../../state/types/StackedGraphicalItem';
|
|
4
4
|
|
|
5
5
|
export function getStackSeriesIdentifier(
|
|
6
6
|
graphicalItem: MaybeStackedGraphicalItem,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
|
|
2
|
-
import { Series } from 'victory-vendor/d3-shape';
|
|
3
|
-
import { StackId } from '../ChartUtils';
|
|
4
|
-
import { GraphicalItemId } from '../../state/graphicalItemsSlice';
|
|
5
|
-
import { MaybeStackedGraphicalItem } from '../../state/types/StackedGraphicalItem';
|
|
2
|
+
import type { Series } from 'victory-vendor/d3-shape';
|
|
3
|
+
import type { StackId } from '../ChartUtils';
|
|
4
|
+
import type { GraphicalItemId } from '../../state/graphicalItemsSlice';
|
|
5
|
+
import type { MaybeStackedGraphicalItem } from '../../state/types/StackedGraphicalItem';
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
* So chart stacks come in layers:
|
|
@@ -2,7 +2,7 @@ import type { CSSProperties } from '../OctaneTypes';
|
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
|
|
4
4
|
import { isNumber } from '../DataUtils';
|
|
5
|
-
import { Coordinate, CartesianViewBox, AllowInDimension } from '../types';
|
|
5
|
+
import type { Coordinate, CartesianViewBox, AllowInDimension } from '../types';
|
|
6
6
|
|
|
7
7
|
export type Dimension2D = 'x' | 'y';
|
|
8
8
|
|
package/src/util/types.ts
CHANGED
|
@@ -10,26 +10,26 @@ import type {
|
|
|
10
10
|
import { isValidElement } from 'octane';
|
|
11
11
|
import type * as d3Scales from 'victory-vendor/d3-scale';
|
|
12
12
|
import type { Props as DotProps } from '../shape/Dot.tsrx';
|
|
13
|
-
import { AxisRange } from '../state/selectors/axisSelectors';
|
|
14
|
-
import { ExternalMouseEvents } from '../chart/types';
|
|
15
|
-
import { SyncMethod } from '../synchronisation/types';
|
|
13
|
+
import type { AxisRange } from '../state/selectors/axisSelectors';
|
|
14
|
+
import type { ExternalMouseEvents } from '../chart/types';
|
|
15
|
+
import type { SyncMethod } from '../synchronisation/types';
|
|
16
16
|
import { isEventKey, type EventKeysType } from './excludeEventProps';
|
|
17
|
-
import { DotPoint } from '../component/Dots.tsrx';
|
|
18
|
-
import { SVGPropsNoEvents } from './svgPropertiesNoEvents';
|
|
19
|
-
import { BaseValue } from '../cartesian/Area.tsrx';
|
|
20
|
-
import { ImplicitLabelType } from '../component/Label.tsrx';
|
|
21
|
-
import { CustomScaleDefinition } from './scale/CustomScaleDefinition';
|
|
22
|
-
import { ChartData } from '../state/chartDataSlice';
|
|
23
|
-
import {
|
|
17
|
+
import type { DotPoint } from '../component/Dots.tsrx';
|
|
18
|
+
import type { SVGPropsNoEvents } from './svgPropertiesNoEvents';
|
|
19
|
+
import type { BaseValue } from '../cartesian/Area.tsrx';
|
|
20
|
+
import type { ImplicitLabelType } from '../component/Label.tsrx';
|
|
21
|
+
import type { CustomScaleDefinition } from './scale/CustomScaleDefinition';
|
|
22
|
+
import type { ChartData } from '../state/chartDataSlice';
|
|
23
|
+
import type {
|
|
24
24
|
XAxisOrientation,
|
|
25
25
|
XAxisPadding,
|
|
26
26
|
YAxisOrientation,
|
|
27
27
|
YAxisPadding,
|
|
28
28
|
} from '../state/cartesianAxisSlice';
|
|
29
|
-
import { TextAnchor, TextVerticalAnchor } from '../component/Text.tsrx';
|
|
29
|
+
import type { TextAnchor, TextVerticalAnchor } from '../component/Text.tsrx';
|
|
30
30
|
import type { TickFormatter } from '../cartesian/CartesianAxis.tsrx';
|
|
31
31
|
import type { Props as TextProps } from '../component/Text.tsrx';
|
|
32
|
-
import { TypedDataKey } from './typedDataKey';
|
|
32
|
+
import type { TypedDataKey } from './typedDataKey';
|
|
33
33
|
import type { EasingInput } from '../animation/easing';
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Adapted from recharts@3.9.2, commit b3451050c027a23957ffa50a2665c9119df21e47.
|
|
2
2
|
import { createSelector } from 'reselect';
|
|
3
|
-
import { RechartsRootState } from '../state/store';
|
|
3
|
+
import type { RechartsRootState } from '../state/store';
|
|
4
4
|
import { arrayContentsAreEqualCheck } from '../state/selectors/arrayEqualityCheck';
|
|
5
5
|
|
|
6
6
|
import { DefaultZIndexes } from './DefaultZIndexes';
|