@redsift/charts 10.7.0 → 10.8.0
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/index.d.ts +9 -1
- package/index.js +48 -17
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ type AxisPosition = ValueOf<typeof AxisPosition>;
|
|
|
44
44
|
* Component props.
|
|
45
45
|
*/
|
|
46
46
|
interface AxisProps extends Omit<ComponentProps<'g'>, 'scale'> {
|
|
47
|
+
/** Disable animations. */
|
|
48
|
+
disableAnimations?: boolean;
|
|
47
49
|
format?: string;
|
|
48
50
|
legend?: string;
|
|
49
51
|
legendOffset?: number;
|
|
@@ -399,6 +401,8 @@ interface DataPointProps<T> extends Omit<ComponentProps<'g'>, 'onClick' | 'scale
|
|
|
399
401
|
color?: string;
|
|
400
402
|
/** Data. Also state to which the component should end the animation, if any. */
|
|
401
403
|
data: T;
|
|
404
|
+
/** Disable animations. */
|
|
405
|
+
disableAnimations?: boolean;
|
|
402
406
|
/** Id. Used for accessibility. */
|
|
403
407
|
id?: string;
|
|
404
408
|
/** Position in the list of siblings. Used for placement and selection. */
|
|
@@ -470,7 +474,7 @@ declare const StyledArc: styled_components.StyledComponent<_redsift_design_syste
|
|
|
470
474
|
/**
|
|
471
475
|
* Component props.
|
|
472
476
|
*/
|
|
473
|
-
interface ArcsProps extends Omit<ComponentProps<'g'>, 'onClick' | 'role'>, Pick<ArcProps, 'id' | 'labelDecorator' | 'onClick' | 'role' | 'hasStroke' | 'tooltipDecorator' | 'tooltipVariant'> {
|
|
477
|
+
interface ArcsProps extends Omit<ComponentProps<'g'>, 'onClick' | 'role'>, Pick<ArcProps, 'id' | 'disableAnimations' | 'labelDecorator' | 'onClick' | 'role' | 'hasStroke' | 'tooltipDecorator' | 'tooltipVariant'> {
|
|
474
478
|
/** Arc props. */
|
|
475
479
|
arcs: Omit<ArcProps, 'ref'>[];
|
|
476
480
|
/** Whether arcs have internal labels or not. */
|
|
@@ -539,6 +543,8 @@ interface ChartContainerProps extends Omit<ComponentProps<'div'>, 'title'>, Cont
|
|
|
539
543
|
chartRef?: RefObject<HTMLDivElement>;
|
|
540
544
|
/** Description. */
|
|
541
545
|
description?: string;
|
|
546
|
+
/** Disable animations. */
|
|
547
|
+
disableAnimations?: boolean;
|
|
542
548
|
/** Id. */
|
|
543
549
|
id?: string;
|
|
544
550
|
/** Method called when the Reset button is displayed (defines whether or not the button should be displayed). */
|
|
@@ -785,6 +791,8 @@ interface LineProps extends Omit<ComponentProps<'g'>, 'onClick' | 'role'>, Pick<
|
|
|
785
791
|
createLine: Line$1<LinePointDatum>;
|
|
786
792
|
/** Points used to compute the line path. */
|
|
787
793
|
data: LinePointDatum[];
|
|
794
|
+
/** Disable animations. */
|
|
795
|
+
disableAnimations?: boolean;
|
|
788
796
|
/** Previous data used for animation. */
|
|
789
797
|
previousData?: LinePointDatum[];
|
|
790
798
|
}
|
package/index.js
CHANGED
|
@@ -507,7 +507,7 @@ const config = (() => ({
|
|
|
507
507
|
immediate: false
|
|
508
508
|
}))();
|
|
509
509
|
|
|
510
|
-
const _excluded$p = ["className", "createArc", "hasStroke", "previousData"];
|
|
510
|
+
const _excluded$p = ["className", "createArc", "disableAnimations", "hasStroke", "previousData"];
|
|
511
511
|
const COMPONENT_NAME$c = 'Arc';
|
|
512
512
|
const CLASSNAME$c = 'redsift-arc';
|
|
513
513
|
const Arc = /*#__PURE__*/forwardRef((props, ref) => {
|
|
@@ -521,6 +521,7 @@ const Arc = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
521
521
|
const {
|
|
522
522
|
className,
|
|
523
523
|
createArc,
|
|
524
|
+
disableAnimations,
|
|
524
525
|
hasStroke,
|
|
525
526
|
previousData = {
|
|
526
527
|
data: {
|
|
@@ -556,7 +557,7 @@ const Arc = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
556
557
|
$hasStroke: Boolean(hasStroke),
|
|
557
558
|
$theme: theme
|
|
558
559
|
}), /*#__PURE__*/React__default.createElement(it.path, {
|
|
559
|
-
d: config.immediate ? createArc(data) : animatedProps.t.to(t => createArc(interpolator(t))),
|
|
560
|
+
d: config.immediate || disableAnimations ? createArc(data) : animatedProps.t.to(t => createArc(interpolator(t))),
|
|
560
561
|
fill: isDeselected ? 'var(--redsift-color-neutral-light-grey)' : color
|
|
561
562
|
}));
|
|
562
563
|
});
|
|
@@ -568,7 +569,7 @@ Arc.displayName = COMPONENT_NAME$c;
|
|
|
568
569
|
*/
|
|
569
570
|
const StyledArcs = styled.g``;
|
|
570
571
|
|
|
571
|
-
const _excluded$o = ["arcs", "className", "color", "hasLabels", "hasStroke", "id", "labelDecorator", "onClick", "role", "sliceProps", "tooltipVariant"];
|
|
572
|
+
const _excluded$o = ["arcs", "className", "color", "disableAnimations", "hasLabels", "hasStroke", "id", "labelDecorator", "onClick", "role", "sliceProps", "tooltipVariant"];
|
|
572
573
|
const COMPONENT_NAME$b = 'Arcs';
|
|
573
574
|
const CLASSNAME$b = 'redsift-arcs';
|
|
574
575
|
const Arcs = /*#__PURE__*/forwardRef((props, ref) => {
|
|
@@ -576,6 +577,7 @@ const Arcs = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
576
577
|
arcs,
|
|
577
578
|
className,
|
|
578
579
|
color,
|
|
580
|
+
disableAnimations,
|
|
579
581
|
hasLabels,
|
|
580
582
|
hasStroke,
|
|
581
583
|
id: propsId,
|
|
@@ -609,6 +611,7 @@ const Arcs = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
609
611
|
const arcId = (_arc$id = arc.id) !== null && _arc$id !== void 0 ? _arc$id : `id${id}__arc-${arcIndex}`;
|
|
610
612
|
return /*#__PURE__*/React__default.createElement(Arc, _extends({}, sliceProps, {
|
|
611
613
|
color: color,
|
|
614
|
+
disableAnimations: disableAnimations,
|
|
612
615
|
hasStroke: hasStroke,
|
|
613
616
|
labelDecorator: labelDecorator,
|
|
614
617
|
onClick: onClick,
|
|
@@ -636,7 +639,7 @@ const Arcs = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
636
639
|
className: `arc-label _${index}`,
|
|
637
640
|
key: `${arcId}-label`,
|
|
638
641
|
textAnchor: "middle",
|
|
639
|
-
transform: config.immediate ? `translate(${arc.createArc.centroid(arc.data)})` : animatedProps.t.to(t => `translate(${arc.createArc.centroid(interpolator(t))})`)
|
|
642
|
+
transform: config.immediate || disableAnimations ? `translate(${arc.createArc.centroid(arc.data)})` : animatedProps.t.to(t => `translate(${arc.createArc.centroid(interpolator(t))})`)
|
|
640
643
|
}, arcLabelDecorator ? arcLabelDecorator(arc.data) : arc.data.data.key);
|
|
641
644
|
})) : null);
|
|
642
645
|
});
|
|
@@ -811,13 +814,14 @@ const computeTicks = _ref => {
|
|
|
811
814
|
};
|
|
812
815
|
};
|
|
813
816
|
|
|
814
|
-
const _excluded$n = ["className", "length", "legend", "legendOffset", "legendPosition", "position", "scale", "tickPadding", "tickRotation", "tickSize", "tickValues", "tickFormat", "tickRemodelling", "variant", "x", "y"];
|
|
817
|
+
const _excluded$n = ["className", "disableAnimations", "length", "legend", "legendOffset", "legendPosition", "position", "scale", "tickPadding", "tickRotation", "tickSize", "tickValues", "tickFormat", "tickRemodelling", "variant", "x", "y"];
|
|
815
818
|
const COMPONENT_NAME$a = 'Axis';
|
|
816
819
|
const CLASSNAME$a = 'redsift-axis';
|
|
817
820
|
const getAxisType = position => [AxisPosition.top, AxisPosition.bottom].includes(position) ? 'x' : 'y';
|
|
818
821
|
const Axis = /*#__PURE__*/forwardRef((props, ref) => {
|
|
819
822
|
const {
|
|
820
823
|
className,
|
|
824
|
+
disableAnimations,
|
|
821
825
|
length,
|
|
822
826
|
legend,
|
|
823
827
|
legendOffset = -32,
|
|
@@ -958,9 +962,9 @@ const Axis = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
958
962
|
}) : null, variant === AxisVariant.default || variant === AxisVariant.line || variant === AxisVariant.lineTick ? /*#__PURE__*/React__default.createElement(it.line, {
|
|
959
963
|
className: `${Axis.className}__line`,
|
|
960
964
|
x1: 0,
|
|
961
|
-
x2: config.immediate ? axis === 'x' ? length : 0 : animatedProps.lineX2,
|
|
965
|
+
x2: config.immediate || disableAnimations ? axis === 'x' ? length : 0 : animatedProps.lineX2,
|
|
962
966
|
y1: 0,
|
|
963
|
-
y2: config.immediate ? axis === 'x' ? 0 : length : animatedProps.lineY2
|
|
967
|
+
y2: config.immediate || disableAnimations ? axis === 'x' ? 0 : length : animatedProps.lineY2
|
|
964
968
|
}) : null, legendNode);
|
|
965
969
|
});
|
|
966
970
|
Axis.className = CLASSNAME$a;
|
|
@@ -1042,7 +1046,7 @@ const StyledBar = styled(DataPoint)`
|
|
|
1042
1046
|
}}}
|
|
1043
1047
|
`;
|
|
1044
1048
|
|
|
1045
|
-
const _excluded$m = ["className", "gap", "height", "maxHeight", "orientation", "previousData", "scale", "scalePosition", "width"];
|
|
1049
|
+
const _excluded$m = ["className", "disableAnimations", "gap", "height", "maxHeight", "orientation", "previousData", "scale", "scalePosition", "width"];
|
|
1046
1050
|
const COMPONENT_NAME$9 = 'Bar';
|
|
1047
1051
|
const CLASSNAME$9 = 'redsift-bar';
|
|
1048
1052
|
const Bar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
@@ -1057,6 +1061,7 @@ const Bar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1057
1061
|
} = props;
|
|
1058
1062
|
const {
|
|
1059
1063
|
className,
|
|
1064
|
+
disableAnimations,
|
|
1060
1065
|
gap = 5,
|
|
1061
1066
|
height = 40,
|
|
1062
1067
|
maxHeight = 100,
|
|
@@ -1103,9 +1108,9 @@ const Bar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1103
1108
|
}), isHorizontal ? /*#__PURE__*/React__default.createElement(it.rect, {
|
|
1104
1109
|
height: height,
|
|
1105
1110
|
fill: isDeselected ? 'var(--redsift-color-neutral-light-grey)' : color,
|
|
1106
|
-
width: config.immediate ? scale(data.data.value) : animatedProps.t.to(t => scale(interpolator(t)))
|
|
1111
|
+
width: config.immediate || disableAnimations ? scale(data.data.value) : animatedProps.t.to(t => scale(interpolator(t)))
|
|
1107
1112
|
}) : /*#__PURE__*/React__default.createElement(it.rect, {
|
|
1108
|
-
height: config.immediate ? maxHeight - scale(getValue(data.data)) : animatedProps.t.to(t => Math.max(0, maxHeight - scale(interpolator(t)))),
|
|
1113
|
+
height: config.immediate || disableAnimations ? maxHeight - scale(getValue(data.data)) : animatedProps.t.to(t => Math.max(0, maxHeight - scale(interpolator(t)))),
|
|
1109
1114
|
fill: isDeselected ? 'var(--redsift-color-neutral-light-grey)' : color,
|
|
1110
1115
|
width: width
|
|
1111
1116
|
}), isHorizontal ? /*#__PURE__*/React__default.createElement("text", {
|
|
@@ -1556,7 +1561,7 @@ var intlMessages$3 = {
|
|
|
1556
1561
|
'fr-FR': frFR$3
|
|
1557
1562
|
};
|
|
1558
1563
|
|
|
1559
|
-
const _excluded$i = ["areXLabelsRotated", "barProps", "caping", "className", "data", "id", "isBarSelected", "getBarAnchorProps", "labelDecorator", "margins", "onBarClick", "orientation", "others", "size", "sortingMethod", "barRole", "colorTheme", "tooltipVariant", "xAxisVariant", "xAxisPlacement", "xAxisTickFormat", "xAxisTickPadding", "xAxisTickRotation", "xAxisTickSize", "xAxisTickValues", "yAxisVariant", "yAxisPlacement", "yAxisTickFormat", "yAxisTickPadding", "yAxisTickRotation", "yAxisTickSize", "yAxisTickValues"];
|
|
1564
|
+
const _excluded$i = ["areXLabelsRotated", "barProps", "caping", "className", "data", "disableAnimations", "id", "isBarSelected", "getBarAnchorProps", "labelDecorator", "margins", "onBarClick", "orientation", "others", "size", "sortingMethod", "barRole", "colorTheme", "tooltipVariant", "xAxisVariant", "xAxisPlacement", "xAxisTickFormat", "xAxisTickPadding", "xAxisTickRotation", "xAxisTickSize", "xAxisTickValues", "yAxisVariant", "yAxisPlacement", "yAxisTickFormat", "yAxisTickPadding", "yAxisTickRotation", "yAxisTickSize", "yAxisTickValues"];
|
|
1560
1565
|
const RenderedOrdinalBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
1561
1566
|
const {
|
|
1562
1567
|
areXLabelsRotated,
|
|
@@ -1564,6 +1569,7 @@ const RenderedOrdinalBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1564
1569
|
caping,
|
|
1565
1570
|
className,
|
|
1566
1571
|
data: propsData,
|
|
1572
|
+
disableAnimations,
|
|
1567
1573
|
id,
|
|
1568
1574
|
isBarSelected,
|
|
1569
1575
|
getBarAnchorProps,
|
|
@@ -1680,6 +1686,7 @@ const RenderedOrdinalBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1680
1686
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
1681
1687
|
transform: `translate(${margins.left},${margins.top})`
|
|
1682
1688
|
}, ['bottom', 'both'].includes(xAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
1689
|
+
disableAnimations: disableAnimations,
|
|
1683
1690
|
position: "bottom",
|
|
1684
1691
|
length: chartWidth,
|
|
1685
1692
|
scale: isHorizontal ? scale : scaleCategory,
|
|
@@ -1692,6 +1699,7 @@ const RenderedOrdinalBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1692
1699
|
tickFormat: xAxisTickFormat,
|
|
1693
1700
|
variant: xAxisVariant
|
|
1694
1701
|
}) : null, ['top', 'both'].includes(xAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
1702
|
+
disableAnimations: disableAnimations,
|
|
1695
1703
|
position: "top",
|
|
1696
1704
|
length: chartWidth,
|
|
1697
1705
|
scale: isHorizontal ? scale : scaleCategory,
|
|
@@ -1704,6 +1712,7 @@ const RenderedOrdinalBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1704
1712
|
tickFormat: xAxisTickFormat,
|
|
1705
1713
|
variant: xAxisVariant
|
|
1706
1714
|
}) : null, ['left', 'both'].includes(yAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
1715
|
+
disableAnimations: disableAnimations,
|
|
1707
1716
|
position: "left",
|
|
1708
1717
|
length: chartHeight,
|
|
1709
1718
|
scale: isHorizontal ? scaleCategory : scale,
|
|
@@ -1716,6 +1725,7 @@ const RenderedOrdinalBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1716
1725
|
tickFormat: yAxisTickFormat,
|
|
1717
1726
|
variant: yAxisVariant
|
|
1718
1727
|
}) : null, ['right', 'both'].includes(yAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
1728
|
+
disableAnimations: disableAnimations,
|
|
1719
1729
|
position: "right",
|
|
1720
1730
|
length: chartHeight,
|
|
1721
1731
|
scale: isHorizontal ? scaleCategory : scale,
|
|
@@ -1742,6 +1752,7 @@ const RenderedOrdinalBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1742
1752
|
return /*#__PURE__*/React__default.createElement(Bar, _extends({
|
|
1743
1753
|
color: colorScale === null || colorScale === void 0 ? void 0 : colorScale(to.data.key),
|
|
1744
1754
|
data: to,
|
|
1755
|
+
disableAnimations: disableAnimations,
|
|
1745
1756
|
gap: gap,
|
|
1746
1757
|
id: `id${id}__bar-${index}`,
|
|
1747
1758
|
index: index,
|
|
@@ -1967,7 +1978,7 @@ const Legend = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1967
1978
|
Legend.className = CLASSNAME$6;
|
|
1968
1979
|
Legend.displayName = COMPONENT_NAME$6;
|
|
1969
1980
|
|
|
1970
|
-
const _excluded$f = ["barProps", "className", "data", "id", "getBarAnchorProps", "isBarSelected", "labelDecorator", "legendDecorator", "legendVariant", "legendProps", "margins", "onBarClick", "size", "sortingMethod", "barRole", "colorTheme", "tooltipVariant", "xAxisVariant", "xAxisPlacement", "xAxisTickFormat", "xAxisTickPadding", "xAxisTickRotation", "xAxisTickSize", "xAxisTickValues", "xAxisMinValue", "xAxisMaxValue", "xAxisTickRemodelling", "yAxisVariant", "yAxisPlacement", "yAxisTickFormat", "yAxisTickPadding", "yAxisTickRotation", "yAxisTickSize", "yAxisTickValues", "yAxisMinValue", "yAxisMaxValue", "yAxisTickRemodelling", "xScaleType", "dateParser"],
|
|
1981
|
+
const _excluded$f = ["barProps", "className", "data", "disableAnimations", "id", "getBarAnchorProps", "isBarSelected", "labelDecorator", "legendDecorator", "legendVariant", "legendProps", "margins", "onBarClick", "size", "sortingMethod", "barRole", "colorTheme", "tooltipVariant", "xAxisVariant", "xAxisPlacement", "xAxisTickFormat", "xAxisTickPadding", "xAxisTickRotation", "xAxisTickSize", "xAxisTickValues", "xAxisMinValue", "xAxisMaxValue", "xAxisTickRemodelling", "yAxisVariant", "yAxisPlacement", "yAxisTickFormat", "yAxisTickPadding", "yAxisTickRotation", "yAxisTickSize", "yAxisTickValues", "yAxisMinValue", "yAxisMaxValue", "yAxisTickRemodelling", "xScaleType", "dateParser"],
|
|
1971
1982
|
_excluded2$3 = ["extraLegendItems"];
|
|
1972
1983
|
const getKey = datum => Array.isArray(datum.key) ? datum.key[0] : datum.key;
|
|
1973
1984
|
const filterData = (hasCategory, data, filterFn) => {
|
|
@@ -1988,6 +1999,7 @@ const RenderedLinearBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
1988
1999
|
barProps,
|
|
1989
2000
|
className,
|
|
1990
2001
|
data: propsData,
|
|
2002
|
+
disableAnimations,
|
|
1991
2003
|
id,
|
|
1992
2004
|
getBarAnchorProps,
|
|
1993
2005
|
isBarSelected,
|
|
@@ -2249,6 +2261,7 @@ const RenderedLinearBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2249
2261
|
return /*#__PURE__*/React__default.createElement(Bar, _extends({
|
|
2250
2262
|
color: colorScale === null || colorScale === void 0 ? void 0 : colorScale(to.data.category),
|
|
2251
2263
|
data: to,
|
|
2264
|
+
disableAnimations: disableAnimations,
|
|
2252
2265
|
gap: gap,
|
|
2253
2266
|
id: `id${id}__bar-${categoryIndex}.${index}`,
|
|
2254
2267
|
index: index,
|
|
@@ -2273,6 +2286,7 @@ const RenderedLinearBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2273
2286
|
transform: `translate(${margins.left},${margins.top})`,
|
|
2274
2287
|
"aria-hidden": "true"
|
|
2275
2288
|
}, ['bottom', 'both'].includes(xAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
2289
|
+
disableAnimations: disableAnimations,
|
|
2276
2290
|
position: "bottom",
|
|
2277
2291
|
length: chartWidth,
|
|
2278
2292
|
scale: scaleX,
|
|
@@ -2286,6 +2300,7 @@ const RenderedLinearBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2286
2300
|
tickRemodelling: xAxisTickRemodelling,
|
|
2287
2301
|
variant: xAxisVariant
|
|
2288
2302
|
}) : null, ['top', 'both'].includes(xAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
2303
|
+
disableAnimations: disableAnimations,
|
|
2289
2304
|
position: "top",
|
|
2290
2305
|
length: chartWidth,
|
|
2291
2306
|
scale: scaleX,
|
|
@@ -2299,6 +2314,7 @@ const RenderedLinearBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2299
2314
|
tickRemodelling: xAxisTickRemodelling,
|
|
2300
2315
|
variant: xAxisVariant
|
|
2301
2316
|
}) : null, ['left', 'both'].includes(yAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
2317
|
+
disableAnimations: disableAnimations,
|
|
2302
2318
|
position: "left",
|
|
2303
2319
|
length: chartHeight,
|
|
2304
2320
|
scale: scaleY,
|
|
@@ -2312,6 +2328,7 @@ const RenderedLinearBarChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2312
2328
|
tickRemodelling: yAxisTickRemodelling,
|
|
2313
2329
|
variant: yAxisVariant
|
|
2314
2330
|
}) : null, ['right', 'both'].includes(yAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
2331
|
+
disableAnimations: disableAnimations,
|
|
2315
2332
|
position: "right",
|
|
2316
2333
|
length: chartHeight,
|
|
2317
2334
|
scale: scaleY,
|
|
@@ -2546,7 +2563,7 @@ Dot.displayName = COMPONENT_NAME$4;
|
|
|
2546
2563
|
*/
|
|
2547
2564
|
const StyledLine = styled('g')``;
|
|
2548
2565
|
|
|
2549
|
-
const _excluded$c = ["className", "createLine", "previousData"];
|
|
2566
|
+
const _excluded$c = ["className", "createLine", "disableAnimations", "previousData"];
|
|
2550
2567
|
const COMPONENT_NAME$3 = 'Line';
|
|
2551
2568
|
const CLASSNAME$3 = 'redsift-line';
|
|
2552
2569
|
const Line = /*#__PURE__*/forwardRef((props, ref) => {
|
|
@@ -2559,6 +2576,7 @@ const Line = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2559
2576
|
const {
|
|
2560
2577
|
className,
|
|
2561
2578
|
createLine,
|
|
2579
|
+
disableAnimations,
|
|
2562
2580
|
previousData = []
|
|
2563
2581
|
} = props,
|
|
2564
2582
|
forwardedProps = _objectWithoutProperties(props, _excluded$c);
|
|
@@ -2579,7 +2597,7 @@ const Line = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2579
2597
|
ref: ref,
|
|
2580
2598
|
className: classNames(Line.className, className)
|
|
2581
2599
|
}), /*#__PURE__*/React__default.createElement(it.path, {
|
|
2582
|
-
d: config.immediate ? createLine(data) : animatedProps.t.to(t => createLine(interpolator(t))),
|
|
2600
|
+
d: config.immediate || disableAnimations ? createLine(data) : animatedProps.t.to(t => createLine(interpolator(t))),
|
|
2583
2601
|
fill: "none",
|
|
2584
2602
|
stroke: isDeselected ? 'var(--redsift-color-neutral-light-grey)' : color,
|
|
2585
2603
|
strokeWidth: 2
|
|
@@ -2808,13 +2826,14 @@ var intlMessages$2 = {
|
|
|
2808
2826
|
'fr-FR': frFR$2
|
|
2809
2827
|
};
|
|
2810
2828
|
|
|
2811
|
-
const _excluded$9 = ["className", "data", "dotRole", "getDotAnchorProps", "id", "isDotSelected", "labelDecorator", "legendDecorator", "legendVariant", "legendProps", "margins", "onDotClick", "size", "sortingMethod", "colorTheme", "tooltipDecorator", "tooltipVariant", "xAxisVariant", "xAxisPlacement", "xAxisTickFormat", "xAxisTickPadding", "xAxisTickRotation", "xAxisTickSize", "xAxisTickValues", "xAxisMinValue", "xAxisMaxValue", "xAxisTickRemodelling", "yAxisVariant", "yAxisPlacement", "yAxisTickFormat", "yAxisTickPadding", "yAxisTickRotation", "yAxisTickSize", "yAxisTickValues", "yAxisMinValue", "yAxisMaxValue", "yAxisTickRemodelling", "dateParser"],
|
|
2829
|
+
const _excluded$9 = ["className", "data", "dotRole", "disableAnimations", "getDotAnchorProps", "id", "isDotSelected", "labelDecorator", "legendDecorator", "legendVariant", "legendProps", "margins", "onDotClick", "size", "sortingMethod", "colorTheme", "tooltipDecorator", "tooltipVariant", "xAxisVariant", "xAxisPlacement", "xAxisTickFormat", "xAxisTickPadding", "xAxisTickRotation", "xAxisTickSize", "xAxisTickValues", "xAxisMinValue", "xAxisMaxValue", "xAxisTickRemodelling", "yAxisVariant", "yAxisPlacement", "yAxisTickFormat", "yAxisTickPadding", "yAxisTickRotation", "yAxisTickSize", "yAxisTickValues", "yAxisMinValue", "yAxisMaxValue", "yAxisTickRemodelling", "dateParser"],
|
|
2812
2830
|
_excluded2$2 = ["extraLegendItems"];
|
|
2813
2831
|
const RenderedLineChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
2814
2832
|
const {
|
|
2815
2833
|
className,
|
|
2816
2834
|
data: propsData,
|
|
2817
2835
|
dotRole,
|
|
2836
|
+
disableAnimations,
|
|
2818
2837
|
getDotAnchorProps,
|
|
2819
2838
|
id,
|
|
2820
2839
|
isDotSelected,
|
|
@@ -3052,6 +3071,7 @@ const RenderedLineChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3052
3071
|
return /*#__PURE__*/React__default.createElement(Line, {
|
|
3053
3072
|
color: colorScale === null || colorScale === void 0 ? void 0 : colorScale(line[0].category),
|
|
3054
3073
|
data: line.filter(point => point.y !== null),
|
|
3074
|
+
disableAnimations: disableAnimations,
|
|
3055
3075
|
createLine: createLine,
|
|
3056
3076
|
key: `line _${index}`
|
|
3057
3077
|
});
|
|
@@ -3093,6 +3113,7 @@ const RenderedLineChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3093
3113
|
}), /*#__PURE__*/React__default.createElement("g", {
|
|
3094
3114
|
transform: `translate(${margins.left},${margins.top})`
|
|
3095
3115
|
}, ['bottom', 'both'].includes(xAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
3116
|
+
disableAnimations: disableAnimations,
|
|
3096
3117
|
position: "bottom",
|
|
3097
3118
|
length: chartWidth,
|
|
3098
3119
|
scale: scaleX,
|
|
@@ -3106,6 +3127,7 @@ const RenderedLineChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3106
3127
|
tickRemodelling: xAxisTickRemodelling,
|
|
3107
3128
|
variant: xAxisVariant
|
|
3108
3129
|
}) : null, ['top', 'both'].includes(xAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
3130
|
+
disableAnimations: disableAnimations,
|
|
3109
3131
|
position: "top",
|
|
3110
3132
|
length: chartWidth,
|
|
3111
3133
|
scale: scaleX,
|
|
@@ -3119,6 +3141,7 @@ const RenderedLineChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3119
3141
|
tickRemodelling: xAxisTickRemodelling,
|
|
3120
3142
|
variant: xAxisVariant
|
|
3121
3143
|
}) : null, ['left', 'both'].includes(yAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
3144
|
+
disableAnimations: disableAnimations,
|
|
3122
3145
|
position: "left",
|
|
3123
3146
|
length: chartHeight,
|
|
3124
3147
|
scale: scaleY,
|
|
@@ -3132,6 +3155,7 @@ const RenderedLineChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3132
3155
|
tickRemodelling: yAxisTickRemodelling,
|
|
3133
3156
|
variant: yAxisVariant
|
|
3134
3157
|
}) : null, ['right', 'both'].includes(yAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
3158
|
+
disableAnimations: disableAnimations,
|
|
3135
3159
|
position: "right",
|
|
3136
3160
|
length: chartHeight,
|
|
3137
3161
|
scale: scaleY,
|
|
@@ -3547,13 +3571,14 @@ var intlMessages$1 = {
|
|
|
3547
3571
|
'fr-FR': frFR$1
|
|
3548
3572
|
};
|
|
3549
3573
|
|
|
3550
|
-
const _excluded$5 = ["caping", "className", "data", "getSliceAnchorProps", "id", "isHalf", "isSliceSelected", "labelDecorator", "legendDecorator", "legendVariant", "legendProps", "middleText", "onSliceClick", "others", "size", "sliceProps", "sliceRole", "sortingMethod", "subtext", "text", "colorTheme", "tooltipVariant", "variant"],
|
|
3574
|
+
const _excluded$5 = ["caping", "className", "data", "disableAnimations", "getSliceAnchorProps", "id", "isHalf", "isSliceSelected", "labelDecorator", "legendDecorator", "legendVariant", "legendProps", "middleText", "onSliceClick", "others", "size", "sliceProps", "sliceRole", "sortingMethod", "subtext", "text", "colorTheme", "tooltipVariant", "variant"],
|
|
3551
3575
|
_excluded2$1 = ["extraLegendItems"];
|
|
3552
3576
|
const RenderedPieChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
3553
3577
|
const {
|
|
3554
3578
|
caping,
|
|
3555
3579
|
className,
|
|
3556
3580
|
data: propsData,
|
|
3581
|
+
disableAnimations,
|
|
3557
3582
|
getSliceAnchorProps,
|
|
3558
3583
|
id,
|
|
3559
3584
|
isHalf,
|
|
@@ -3706,6 +3731,7 @@ const RenderedPieChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3706
3731
|
anchorProps: getSliceAnchorProps ? getSliceAnchorProps(to) : undefined
|
|
3707
3732
|
};
|
|
3708
3733
|
}),
|
|
3734
|
+
disableAnimations: disableAnimations,
|
|
3709
3735
|
hasLabels: legendVariant === PieChartLegendVariant.internal,
|
|
3710
3736
|
hasStroke: isSpaced,
|
|
3711
3737
|
labelDecorator: labelDecorator,
|
|
@@ -4039,7 +4065,7 @@ var mdiChevronDown = "M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z
|
|
|
4039
4065
|
var mdiChevronRight = "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z";
|
|
4040
4066
|
var mdiMouse = "M11,1.07C7.05,1.56 4,4.92 4,9H11M4,15A8,8 0 0,0 12,23A8,8 0 0,0 20,15V11H4M13,1.07V9H20C20,4.92 16.94,1.56 13,1.07Z";
|
|
4041
4067
|
|
|
4042
|
-
const _excluded$1 = ["isBrushable", "className", "data", "dotRole", "getDotAnchorProps", "hideControlKeyPanel", "id", "isDotSelected", "labelDecorator", "legendDecorator", "legendVariant", "legendProps", "margins", "onBrush", "onBrushEnd", "onDotClick", "size", "sortingMethod", "colorTheme", "tooltipDecorator", "tooltipVariant", "xAxisVariant", "xAxisPlacement", "xAxisTickFormat", "xAxisTickPadding", "xAxisTickRotation", "xAxisTickSize", "xAxisTickValues", "yAxisVariant", "yAxisPlacement", "yAxisTickFormat", "yAxisTickPadding", "yAxisTickRotation", "yAxisTickSize", "yAxisTickValues", "variant"],
|
|
4068
|
+
const _excluded$1 = ["isBrushable", "className", "data", "dotRole", "disableAnimations", "getDotAnchorProps", "hideControlKeyPanel", "id", "isDotSelected", "labelDecorator", "legendDecorator", "legendVariant", "legendProps", "margins", "onBrush", "onBrushEnd", "onDotClick", "size", "sortingMethod", "colorTheme", "tooltipDecorator", "tooltipVariant", "xAxisVariant", "xAxisPlacement", "xAxisTickFormat", "xAxisTickPadding", "xAxisTickRotation", "xAxisTickSize", "xAxisTickValues", "yAxisVariant", "yAxisPlacement", "yAxisTickFormat", "yAxisTickPadding", "yAxisTickRotation", "yAxisTickSize", "yAxisTickValues", "variant"],
|
|
4043
4069
|
_excluded2 = ["extraLegendItems"];
|
|
4044
4070
|
const RenderedScatterPlot = /*#__PURE__*/forwardRef((props, ref) => {
|
|
4045
4071
|
const {
|
|
@@ -4047,6 +4073,7 @@ const RenderedScatterPlot = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4047
4073
|
className,
|
|
4048
4074
|
data: propsData,
|
|
4049
4075
|
dotRole,
|
|
4076
|
+
disableAnimations,
|
|
4050
4077
|
getDotAnchorProps,
|
|
4051
4078
|
hideControlKeyPanel,
|
|
4052
4079
|
id,
|
|
@@ -4306,6 +4333,7 @@ const RenderedScatterPlot = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4306
4333
|
}))), /*#__PURE__*/React__default.createElement("g", {
|
|
4307
4334
|
transform: `translate(${margins.left},${margins.top})`
|
|
4308
4335
|
}, ['bottom', 'both'].includes(xAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
4336
|
+
disableAnimations: disableAnimations,
|
|
4309
4337
|
position: "bottom",
|
|
4310
4338
|
length: chartWidth,
|
|
4311
4339
|
scale: scaleX,
|
|
@@ -4318,6 +4346,7 @@ const RenderedScatterPlot = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4318
4346
|
tickFormat: xAxisTickFormat,
|
|
4319
4347
|
variant: xAxisVariant
|
|
4320
4348
|
}) : null, ['top', 'both'].includes(xAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
4349
|
+
disableAnimations: disableAnimations,
|
|
4321
4350
|
position: "top",
|
|
4322
4351
|
length: chartWidth,
|
|
4323
4352
|
scale: scaleX,
|
|
@@ -4330,6 +4359,7 @@ const RenderedScatterPlot = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4330
4359
|
tickFormat: xAxisTickFormat,
|
|
4331
4360
|
variant: xAxisVariant
|
|
4332
4361
|
}) : null, ['left', 'both'].includes(yAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
4362
|
+
disableAnimations: disableAnimations,
|
|
4333
4363
|
position: "left",
|
|
4334
4364
|
length: chartHeight,
|
|
4335
4365
|
scale: scaleY,
|
|
@@ -4342,6 +4372,7 @@ const RenderedScatterPlot = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4342
4372
|
tickFormat: yAxisTickFormat,
|
|
4343
4373
|
variant: yAxisVariant
|
|
4344
4374
|
}) : null, ['right', 'both'].includes(yAxisPlacement) ? /*#__PURE__*/React__default.createElement(Axis, {
|
|
4375
|
+
disableAnimations: disableAnimations,
|
|
4345
4376
|
position: "right",
|
|
4346
4377
|
length: chartHeight,
|
|
4347
4378
|
scale: scaleY,
|