@coinbase/cds-mobile-visualization 3.4.0-beta.23 → 3.4.0-beta.25

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dts/chart/CartesianChart.d.ts +19 -0
  3. package/dts/chart/CartesianChart.d.ts.map +1 -1
  4. package/dts/chart/Path.d.ts +2 -1
  5. package/dts/chart/Path.d.ts.map +1 -1
  6. package/dts/chart/bar/Bar.d.ts +18 -54
  7. package/dts/chart/bar/Bar.d.ts.map +1 -1
  8. package/dts/chart/bar/BarChart.d.ts +2 -2
  9. package/dts/chart/bar/BarPlot.d.ts.map +1 -1
  10. package/dts/chart/bar/BarStack.d.ts +4 -4
  11. package/dts/chart/bar/BarStack.d.ts.map +1 -1
  12. package/dts/chart/bar/DefaultBar.d.ts.map +1 -1
  13. package/dts/chart/bar/DefaultBarStack.d.ts.map +1 -1
  14. package/dts/chart/line/LineChart.d.ts +17 -3
  15. package/dts/chart/line/LineChart.d.ts.map +1 -1
  16. package/dts/chart/point/Point.d.ts +2 -1
  17. package/dts/chart/point/Point.d.ts.map +1 -1
  18. package/dts/chart/scrubber/Scrubber.d.ts +4 -2
  19. package/dts/chart/scrubber/Scrubber.d.ts.map +1 -1
  20. package/dts/chart/scrubber/ScrubberAccessibilityView.d.ts +12 -0
  21. package/dts/chart/scrubber/ScrubberAccessibilityView.d.ts.map +1 -0
  22. package/dts/chart/utils/bar.d.ts +155 -0
  23. package/dts/chart/utils/bar.d.ts.map +1 -1
  24. package/dts/chart/utils/chart.d.ts +2 -1
  25. package/dts/chart/utils/chart.d.ts.map +1 -1
  26. package/dts/chart/utils/path.d.ts.map +1 -1
  27. package/dts/sparkline/Sparkline.d.ts +2 -1
  28. package/dts/sparkline/Sparkline.d.ts.map +1 -1
  29. package/dts/sparkline/SparklineArea.d.ts +2 -1
  30. package/dts/sparkline/SparklineArea.d.ts.map +1 -1
  31. package/dts/sparkline/SparklineGradient.d.ts +2 -1
  32. package/dts/sparkline/SparklineGradient.d.ts.map +1 -1
  33. package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts +2 -1
  34. package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts.map +1 -1
  35. package/esm/chart/CartesianChart.js +39 -14
  36. package/esm/chart/__stories__/CartesianChart.stories.js +10 -0
  37. package/esm/chart/__stories__/ChartAccessibility.stories.js +721 -0
  38. package/esm/chart/area/__stories__/AreaChart.stories.js +17 -3
  39. package/esm/chart/axis/__stories__/Axis.stories.js +65 -48
  40. package/esm/chart/bar/Bar.js +8 -14
  41. package/esm/chart/bar/BarChart.js +7 -7
  42. package/esm/chart/bar/BarPlot.js +37 -46
  43. package/esm/chart/bar/BarStack.js +71 -604
  44. package/esm/chart/bar/DefaultBar.js +11 -18
  45. package/esm/chart/bar/DefaultBarStack.js +12 -21
  46. package/esm/chart/bar/__stories__/BarChart.stories.js +110 -6
  47. package/esm/chart/line/LineChart.js +22 -1
  48. package/esm/chart/line/__stories__/LineChart.stories.js +84 -46
  49. package/esm/chart/scrubber/ScrubberAccessibilityView.js +177 -0
  50. package/esm/chart/scrubber/__stories__/Scrubber.stories.js +57 -5
  51. package/esm/chart/utils/bar.js +775 -0
  52. package/esm/chart/utils/chart.js +2 -1
  53. package/esm/chart/utils/path.js +5 -12
  54. package/esm/sparkline/Sparkline.js +2 -1
  55. package/esm/sparkline/SparklineArea.js +2 -1
  56. package/esm/sparkline/SparklineGradient.js +2 -1
  57. package/esm/sparkline/sparkline-interactive/SparklineInteractive.js +2 -1
  58. package/package.json +5 -5
@@ -3,6 +3,7 @@ import { useTheme } from '@coinbase/cds-mobile/hooks/useTheme';
3
3
  import { useCartesianChartContext } from '../ChartProvider';
4
4
  import { Path } from '../Path';
5
5
  import { defaultBarEnterTransition, getBarPath, withStaggerDelayTransition } from '../utils';
6
+ import { getNormalizedStagger } from '../utils/bar';
6
7
  import { defaultTransition, getTransition } from '../utils/transition';
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  /**
@@ -23,6 +24,7 @@ export const DefaultBar = /*#__PURE__*/memo(_ref => {
23
24
  stroke,
24
25
  strokeWidth,
25
26
  origin,
27
+ minSize = 1,
26
28
  transitions,
27
29
  transition
28
30
  } = _ref;
@@ -33,28 +35,19 @@ export const DefaultBar = /*#__PURE__*/memo(_ref => {
33
35
  } = useCartesianChartContext();
34
36
  const theme = useTheme();
35
37
  const defaultFill = fill || theme.color.fgPrimary;
36
-
37
- // For vertical layout, stagger by x (category axis). For horizontal, stagger by y (category axis).
38
- const normalizedStagger = useMemo(() => {
39
- const barsGrowVertically = layout !== 'horizontal';
40
- if (barsGrowVertically) {
41
- return drawingArea.width > 0 ? (x - drawingArea.x) / drawingArea.width : 0;
42
- }
43
- return drawingArea.height > 0 ? (y - drawingArea.y) / drawingArea.height : 0;
44
- }, [layout, x, y, drawingArea.x, drawingArea.y, drawingArea.width, drawingArea.height]);
38
+ const normalizedStagger = useMemo(() => getNormalizedStagger(layout, x, y, drawingArea), [layout, x, y, drawingArea]);
45
39
  const enterTransition = useMemo(() => withStaggerDelayTransition(getTransition(transitions == null ? void 0 : transitions.enter, animate, defaultBarEnterTransition), normalizedStagger), [transitions == null ? void 0 : transitions.enter, animate, normalizedStagger]);
46
40
  const updateTransition = useMemo(() => withStaggerDelayTransition(getTransition((transitions == null ? void 0 : transitions.update) !== undefined ? transitions.update : transition, animate, defaultTransition), normalizedStagger), [transitions == null ? void 0 : transitions.update, transition, animate, normalizedStagger]);
47
41
  const initialPath = useMemo(() => {
48
- if (!animate) return undefined;
49
- const minSize = 1;
50
- const barsGrowVertically = layout !== 'horizontal';
51
- const baseline = origin != null ? origin : barsGrowVertically ? y + height : x;
52
- const initialX = barsGrowVertically ? x : baseline;
53
- const initialY = barsGrowVertically ? baseline : y;
54
- const initialWidth = barsGrowVertically ? width : minSize;
55
- const initialHeight = barsGrowVertically ? minSize : height;
42
+ if (!animate) return;
43
+ const isHorizontalLayout = layout === 'horizontal';
44
+ const baseline = origin != null ? origin : isHorizontalLayout ? x : y + height;
45
+ const initialX = isHorizontalLayout ? baseline : x;
46
+ const initialY = isHorizontalLayout ? y : baseline;
47
+ const initialWidth = isHorizontalLayout ? minSize : width;
48
+ const initialHeight = isHorizontalLayout ? height : minSize;
56
49
  return getBarPath(initialX, initialY, initialWidth, initialHeight, borderRadius, !!roundTop, !!roundBottom, layout);
57
- }, [animate, layout, x, y, origin, width, height, borderRadius, roundTop, roundBottom]);
50
+ }, [animate, layout, x, y, origin, width, height, borderRadius, roundTop, roundBottom, minSize]);
58
51
  return /*#__PURE__*/_jsx(Path, {
59
52
  animate: animate,
60
53
  clipPath: null,
@@ -2,7 +2,7 @@ import { memo, useMemo } from 'react';
2
2
  import { Group } from '@shopify/react-native-skia';
3
3
  import { useCartesianChartContext } from '../ChartProvider';
4
4
  import { getBarPath } from '../utils';
5
- import { defaultBarEnterTransition, withStaggerDelayTransition } from '../utils/bar';
5
+ import { defaultBarEnterTransition, getNormalizedStagger, getStackInitialClipRect, withStaggerDelayTransition } from '../utils/bar';
6
6
  import { defaultTransition, getTransition, usePathTransition } from '../utils/transition';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  /**
@@ -18,7 +18,7 @@ export const DefaultBarStack = /*#__PURE__*/memo(_ref => {
18
18
  borderRadius = 4,
19
19
  roundTop = true,
20
20
  roundBottom = true,
21
- yOrigin,
21
+ origin,
22
22
  transitions,
23
23
  transition
24
24
  } = _ref;
@@ -27,15 +27,7 @@ export const DefaultBarStack = /*#__PURE__*/memo(_ref => {
27
27
  drawingArea,
28
28
  layout
29
29
  } = useCartesianChartContext();
30
-
31
- // For vertical layout, stagger by x (category axis). For horizontal, stagger by y (category axis).
32
- const normalizedStagger = useMemo(() => {
33
- const barsGrowVertically = layout !== 'horizontal';
34
- if (barsGrowVertically) {
35
- return drawingArea.width > 0 ? (x - drawingArea.x) / drawingArea.width : 0;
36
- }
37
- return drawingArea.height > 0 ? (y - drawingArea.y) / drawingArea.height : 0;
38
- }, [layout, x, y, drawingArea.x, drawingArea.y, drawingArea.width, drawingArea.height]);
30
+ const normalizedStagger = useMemo(() => getNormalizedStagger(layout, x, y, drawingArea), [layout, x, y, drawingArea]);
39
31
  const enterTransition = useMemo(() => withStaggerDelayTransition(getTransition(transitions == null ? void 0 : transitions.enter, animate, defaultBarEnterTransition), normalizedStagger), [animate, transitions == null ? void 0 : transitions.enter, normalizedStagger]);
40
32
  const updateTransition = useMemo(() => withStaggerDelayTransition(getTransition((transitions == null ? void 0 : transitions.update) !== undefined ? transitions.update : transition, animate, defaultTransition), normalizedStagger), [animate, transitions == null ? void 0 : transitions.update, transition, normalizedStagger]);
41
33
 
@@ -46,16 +38,15 @@ export const DefaultBarStack = /*#__PURE__*/memo(_ref => {
46
38
 
47
39
  // Initial clip path for entry animation (bar at baseline with minimal height)
48
40
  const initialPath = useMemo(() => {
49
- if (!animate) return undefined;
50
- const barsGrowVertically = layout !== 'horizontal';
51
- const baseline = yOrigin != null ? yOrigin : barsGrowVertically ? y + height : x;
52
- const minSize = 1;
53
- const initialX = barsGrowVertically ? x : baseline;
54
- const initialY = barsGrowVertically ? baseline : y;
55
- const initialWidth = barsGrowVertically ? width : minSize;
56
- const initialHeight = barsGrowVertically ? minSize : height;
57
- return getBarPath(initialX, initialY, initialWidth, initialHeight, borderRadius, roundTop, roundBottom, layout);
58
- }, [animate, layout, x, yOrigin, y, height, width, borderRadius, roundTop, roundBottom]);
41
+ if (!animate) return;
42
+ const initialClipRect = getStackInitialClipRect({
43
+ x,
44
+ y,
45
+ width,
46
+ height
47
+ }, layout, origin);
48
+ return getBarPath(initialClipRect.x, initialClipRect.y, initialClipRect.width, initialClipRect.height, borderRadius, roundTop, roundBottom, layout);
49
+ }, [animate, layout, x, y, height, width, borderRadius, roundTop, roundBottom, origin]);
59
50
  const animatedClipPath = usePathTransition({
60
51
  currentPath: targetPath,
61
52
  initialPath,
@@ -1,7 +1,8 @@
1
1
  const _excluded = ["children"],
2
2
  _excluded2 = ["animate"],
3
3
  _excluded3 = ["x", "y", "width", "height", "dataX"],
4
- _excluded4 = ["data", "height"];
4
+ _excluded4 = ["data", "height"],
5
+ _excluded5 = ["buy", "sell", "animate", "borderRadius", "height", "inset", "layout", "stackGap", "xAxis", "yAxis", "barMinSize"];
5
6
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
6
7
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
7
8
  import { memo, useCallback, useEffect, useId, useMemo, useState } from 'react';
@@ -17,6 +18,7 @@ import { Line as SkiaLine, Rect } from '@shopify/react-native-skia';
17
18
  import { XAxis, YAxis } from '../../axis';
18
19
  import { CartesianChart } from '../../CartesianChart';
19
20
  import { useCartesianChartContext } from '../../ChartProvider';
21
+ import { DefaultLegendEntry } from '../../legend';
20
22
  import { ReferenceLine, SolidLine } from '../../line';
21
23
  import { Scrubber } from '../../scrubber';
22
24
  import { getPointOnSerializableScale, unwrapAnimatedValue, useScrubberContext } from '../../utils';
@@ -125,6 +127,7 @@ const CustomBarStackComponent = /*#__PURE__*/memo(_ref => {
125
127
  }));
126
128
  });
127
129
  const MonthlyRewards = () => {
130
+ const theme = useTheme();
128
131
  const months = ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'];
129
132
  const purple = [null, 6, 8, 10, 7, 6, 6, 8, null, null, null, null];
130
133
  const blue = [null, 10, 12, 11, 10, 9, 10, 11, null, null, null, null];
@@ -134,19 +137,19 @@ const MonthlyRewards = () => {
134
137
  const series = [{
135
138
  id: 'purple',
136
139
  data: purple,
137
- color: '#b399ff'
140
+ color: "rgb(" + theme.spectrum.purple30 + ")"
138
141
  }, {
139
142
  id: 'blue',
140
143
  data: blue,
141
- color: '#4f7cff'
144
+ color: "rgb(" + theme.spectrum.blue30 + ")"
142
145
  }, {
143
146
  id: 'cyan',
144
147
  data: cyan,
145
- color: '#00c2df'
148
+ color: "rgb(" + theme.spectrum.teal30 + ")"
146
149
  }, {
147
150
  id: 'green',
148
151
  data: green,
149
- color: '#33c481'
152
+ color: "rgb(" + theme.spectrum.green30 + ")"
150
153
  }];
151
154
  return /*#__PURE__*/_jsxs(VStack, {
152
155
  gap: 2,
@@ -165,7 +168,7 @@ const MonthlyRewards = () => {
165
168
  tickLabelFormatter: index => {
166
169
  return months[index];
167
170
  },
168
- categoryPadding: 0.27
171
+ categoryPadding: 0.25
169
172
  }
170
173
  }), /*#__PURE__*/_jsx(Button, {
171
174
  onPress: () => setRoundBaseline(!roundBaseline),
@@ -801,11 +804,17 @@ const CandlesticksChart = /*#__PURE__*/memo(_ref8 => {
801
804
  day: 'numeric'
802
805
  });
803
806
  }, []);
807
+ const getScrubberAccessibilityLabel = useCallback(index => {
808
+ const candle = candlestickStockData[index];
809
+ return formatTime(index) + ": O " + formatThousandsPriceNumber(parseFloat(candle.open)) + " H " + formatThousandsPriceNumber(parseFloat(candle.high)) + " L " + formatThousandsPriceNumber(parseFloat(candle.low)) + " C " + formatThousandsPriceNumber(parseFloat(candle.close));
810
+ }, [formatTime, formatThousandsPriceNumber]);
804
811
  return /*#__PURE__*/_jsxs(CartesianChart, {
805
812
  enableScrubbing: true,
813
+ accessibilityLabel: "Candlestick chart with " + candlesData.length + " data points. Swipe to navigate.",
806
814
  animate: false,
807
815
  "aria-labelledby": infoTextId,
808
816
  borderRadius: 0,
817
+ getScrubberAccessibilityLabel: getScrubberAccessibilityLabel,
809
818
  height: 150,
810
819
  inset: {
811
820
  top: 8,
@@ -1055,6 +1064,98 @@ const HorizontalBarChart = () => {
1055
1064
  }
1056
1065
  });
1057
1066
  };
1067
+ function BuyVsSellExample() {
1068
+ function BuyVsSellLegend(_ref15) {
1069
+ let {
1070
+ buy,
1071
+ sell
1072
+ } = _ref15;
1073
+ const theme = useTheme();
1074
+ return /*#__PURE__*/_jsxs(HStack, {
1075
+ gap: 1,
1076
+ justifyContent: "space-between",
1077
+ children: [/*#__PURE__*/_jsx(DefaultLegendEntry, {
1078
+ color: theme.color.fgPositive,
1079
+ label: /*#__PURE__*/_jsxs(Text, {
1080
+ color: "fgMuted",
1081
+ font: "legal",
1082
+ children: [buy, "% bought"]
1083
+ }),
1084
+ seriesId: "buy"
1085
+ }), /*#__PURE__*/_jsx(DefaultLegendEntry, {
1086
+ color: theme.color.fgNegative,
1087
+ label: /*#__PURE__*/_jsxs(Text, {
1088
+ color: "fgMuted",
1089
+ font: "legal",
1090
+ children: [sell, "% sold"]
1091
+ }),
1092
+ seriesId: "sell"
1093
+ })]
1094
+ });
1095
+ }
1096
+ function BuyVsSellChart(_ref16) {
1097
+ let {
1098
+ buy,
1099
+ sell,
1100
+ animate = true,
1101
+ borderRadius = 3,
1102
+ height = 6,
1103
+ inset = 0,
1104
+ layout = 'horizontal',
1105
+ stackGap = 4,
1106
+ xAxis,
1107
+ yAxis,
1108
+ barMinSize = height
1109
+ } = _ref16,
1110
+ props = _objectWithoutPropertiesLoose(_ref16, _excluded5);
1111
+ const theme = useTheme();
1112
+ return /*#__PURE__*/_jsxs(VStack, {
1113
+ gap: 1.5,
1114
+ children: [/*#__PURE__*/_jsx(BarChart, _extends({
1115
+ roundBaseline: true,
1116
+ stacked: true,
1117
+ animate: animate,
1118
+ barMinSize: barMinSize,
1119
+ borderRadius: borderRadius,
1120
+ height: height,
1121
+ inset: inset,
1122
+ layout: layout,
1123
+ series: [{
1124
+ id: 'buy',
1125
+ data: [buy],
1126
+ color: theme.color.fgPositive,
1127
+ legendShape: 'circle'
1128
+ }, {
1129
+ id: 'sell',
1130
+ data: [sell],
1131
+ color: theme.color.fgNegative,
1132
+ legendShape: 'circle'
1133
+ }],
1134
+ stackGap: stackGap,
1135
+ transitions: {
1136
+ enter: {
1137
+ type: 'timing',
1138
+ duration: 5000,
1139
+ delay: 2000
1140
+ }
1141
+ },
1142
+ xAxis: _extends({
1143
+ domainLimit: 'strict'
1144
+ }, xAxis),
1145
+ yAxis: _extends({
1146
+ categoryPadding: 0
1147
+ }, yAxis)
1148
+ }, props)), /*#__PURE__*/_jsx(BuyVsSellLegend, {
1149
+ buy: buy,
1150
+ sell: sell
1151
+ })]
1152
+ });
1153
+ }
1154
+ return /*#__PURE__*/_jsx(BuyVsSellChart, {
1155
+ buy: 76,
1156
+ sell: 24
1157
+ });
1158
+ }
1058
1159
  const PopulationPyramid = () => {
1059
1160
  const theme = useTheme();
1060
1161
  const ageGroups = ['100+ yrs', '95-99 yrs', '90-94 yrs', '85-89 yrs', '80-84 yrs', '75-79 yrs', '70-74 yrs', '65-69 yrs', '60-64 yrs', '55-59 yrs', '50-54 yrs', '45-49 yrs', '40-44 yrs', '35-39 yrs', '30-34 yrs', '25-29 yrs', '20-24 yrs', '15-19 yrs', '10-14 yrs', '5-9 yrs', '0-4 yrs'];
@@ -1186,6 +1287,9 @@ function ExampleNavigator() {
1186
1287
  }, {
1187
1288
  title: 'Horizontal Layout',
1188
1289
  component: /*#__PURE__*/_jsx(HorizontalBarChart, {})
1290
+ }, {
1291
+ title: 'Buy vs Sell',
1292
+ component: /*#__PURE__*/_jsx(BuyVsSellExample, {})
1189
1293
  }, {
1190
1294
  title: 'Population Pyramid',
1191
1295
  component: /*#__PURE__*/_jsx(PopulationPyramid, {})
@@ -1,4 +1,4 @@
1
- const _excluded = ["series", "showArea", "areaType", "type", "LineComponent", "AreaComponent", "curve", "points", "strokeWidth", "strokeOpacity", "connectNulls", "transition", "transitions", "opacity", "showXAxis", "showYAxis", "xAxis", "yAxis", "inset", "children"],
1
+ const _excluded = ["series", "showArea", "areaType", "type", "LineComponent", "AreaComponent", "curve", "points", "strokeWidth", "strokeOpacity", "connectNulls", "transition", "transitions", "opacity", "showXAxis", "showYAxis", "xAxis", "yAxis", "inset", "scrubberAccessibilityLabelStep", "layout", "children"],
2
2
  _excluded2 = ["scaleType", "data", "categoryPadding", "domain", "domainLimit", "range", "id"],
3
3
  _excluded3 = ["scaleType", "data", "categoryPadding", "domain", "domainLimit", "range", "id"],
4
4
  _excluded4 = ["id", "data", "label", "color", "xAxisId", "yAxisId"];
@@ -10,6 +10,13 @@ import { YAxis } from '../axis/YAxis';
10
10
  import { CartesianChart } from '../CartesianChart';
11
11
  import { Line } from './Line';
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ const getDefaultScrubberAccessibilityStep = function (dataLength, sampleCount) {
14
+ if (sampleCount === void 0) {
15
+ sampleCount = 10;
16
+ }
17
+ if (dataLength <= 0) return 1;
18
+ return Math.max(1, Math.ceil(dataLength / sampleCount));
19
+ };
13
20
  export const LineChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
14
21
  let {
15
22
  series,
@@ -31,6 +38,8 @@ export const LineChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =
31
38
  xAxis,
32
39
  yAxis,
33
40
  inset,
41
+ scrubberAccessibilityLabelStep,
42
+ layout = 'vertical',
34
43
  children
35
44
  } = _ref,
36
45
  chartProps = _objectWithoutPropertiesLoose(_ref, _excluded);
@@ -88,9 +97,21 @@ export const LineChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =
88
97
  domainLimit: yDomainLimit,
89
98
  range: yRange
90
99
  };
100
+ const categoryAxisData = layout === 'horizontal' ? yData : xData;
101
+ const lineChartDataLength = useMemo(() => {
102
+ if (categoryAxisData && categoryAxisData.length > 0) return categoryAxisData.length;
103
+ if (!series || series.length === 0) return 0;
104
+ return series.reduce((max, s) => {
105
+ var _s$data$length, _s$data;
106
+ return Math.max(max, (_s$data$length = (_s$data = s.data) == null ? void 0 : _s$data.length) != null ? _s$data$length : 0);
107
+ }, 0);
108
+ }, [categoryAxisData, series]);
109
+ const resolvedScrubberAccessibilityLabelStep = useMemo(() => scrubberAccessibilityLabelStep != null ? scrubberAccessibilityLabelStep : getDefaultScrubberAccessibilityStep(lineChartDataLength), [scrubberAccessibilityLabelStep, lineChartDataLength]);
91
110
  return /*#__PURE__*/_jsxs(CartesianChart, _extends({}, chartProps, {
92
111
  ref: ref,
93
112
  inset: inset,
113
+ layout: layout,
114
+ scrubberAccessibilityLabelStep: resolvedScrubberAccessibilityLabelStep,
94
115
  series: chartSeries,
95
116
  xAxis: xAxisConfig,
96
117
  yAxis: yAxisConfig,