@ledgerhq/lumen-ui-rnative-visualization 0.1.18 → 0.1.20
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/module/lib/Components/Axis/XAxis/XAxis.js +2 -1
- package/dist/module/lib/Components/Axis/XAxis/XAxis.js.map +1 -1
- package/dist/module/lib/Components/Axis/XAxis/XAxis.test.js +14 -0
- package/dist/module/lib/Components/Axis/XAxis/XAxis.test.js.map +1 -1
- package/dist/module/lib/Components/Axis/YAxis/YAxis.js +2 -1
- package/dist/module/lib/Components/Axis/YAxis/YAxis.js.map +1 -1
- package/dist/module/lib/Components/Axis/YAxis/YAxis.test.js +14 -0
- package/dist/module/lib/Components/Axis/YAxis/YAxis.test.js.map +1 -1
- package/dist/module/lib/Components/CartesianChart/CartesianChart.js +2 -2
- package/dist/module/lib/Components/CartesianChart/CartesianChart.js.map +1 -1
- package/dist/module/lib/Components/CartesianChart/{RevealClip/RevealClipDefs.js → RevealAnimation/RevealAnimationProvider.js} +12 -11
- package/dist/module/lib/Components/CartesianChart/RevealAnimation/RevealAnimationProvider.js.map +1 -0
- package/dist/module/lib/Components/CartesianChart/{RevealClip/RevealClipDefs.test.js → RevealAnimation/RevealAnimationProvider.test.js} +51 -12
- package/dist/module/lib/Components/CartesianChart/RevealAnimation/RevealAnimationProvider.test.js.map +1 -0
- package/dist/module/lib/Components/CartesianChart/RevealAnimation/context.js +35 -0
- package/dist/module/lib/Components/CartesianChart/RevealAnimation/context.js.map +1 -0
- package/dist/module/lib/Components/CartesianChart/RevealAnimation/index.js +5 -0
- package/dist/module/lib/Components/CartesianChart/RevealAnimation/index.js.map +1 -0
- package/dist/module/lib/Components/CartesianChart/RevealAnimation/types.js.map +1 -0
- package/dist/module/lib/Components/CartesianChart/RevealAnimation/utils.js +64 -0
- package/dist/module/lib/Components/CartesianChart/RevealAnimation/utils.js.map +1 -0
- package/dist/module/lib/Components/CartesianChart/utils.js +1 -1
- package/dist/module/lib/Components/CartesianChart/utils.js.map +1 -1
- package/dist/module/lib/Components/Line/Line.js +6 -4
- package/dist/module/lib/Components/Line/Line.js.map +1 -1
- package/dist/module/lib/Components/Line/utils.js +19 -9
- package/dist/module/lib/Components/Line/utils.js.map +1 -1
- package/dist/module/lib/Components/Line/utils.test.js +22 -2
- package/dist/module/lib/Components/Line/utils.test.js.map +1 -1
- package/dist/module/lib/Components/LineChart/LineChart.js +23 -8
- package/dist/module/lib/Components/LineChart/LineChart.js.map +1 -1
- package/dist/module/lib/Components/LineChart/LineChart.test.js +69 -0
- package/dist/module/lib/Components/LineChart/LineChart.test.js.map +1 -1
- package/dist/module/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.js +2 -2
- package/dist/module/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.js.map +1 -1
- package/dist/module/lib/Components/Point/Point.js +6 -4
- package/dist/module/lib/Components/Point/Point.js.map +1 -1
- package/dist/module/lib/Components/Scrubber/ScrubberProvider.js +8 -1
- package/dist/module/lib/Components/Scrubber/ScrubberProvider.js.map +1 -1
- package/dist/module/lib/Components/Scrubber/ScrubberProvider.test.js +79 -1
- package/dist/module/lib/Components/Scrubber/ScrubberProvider.test.js.map +1 -1
- package/dist/typescript/src/lib/Components/Axis/Axis.types.d.ts +6 -0
- package/dist/typescript/src/lib/Components/Axis/Axis.types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Axis/XAxis/XAxis.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Axis/XAxis/XAxis.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Axis/YAxis/YAxis.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Axis/YAxis/YAxis.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/RevealAnimationProvider.d.ts +3 -0
- package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/RevealAnimationProvider.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/context.d.ts +22 -0
- package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/context.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/CartesianChart/{RevealClip → RevealAnimation}/types.d.ts +14 -1
- package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/utils.d.ts +33 -0
- package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/utils.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/CartesianChart/utils.d.ts +1 -1
- package/dist/typescript/src/lib/Components/CartesianChart/utils.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Line/Line.d.ts +1 -1
- package/dist/typescript/src/lib/Components/Line/Line.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Line/types.d.ts +7 -0
- package/dist/typescript/src/lib/Components/Line/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Line/utils.d.ts +8 -4
- package/dist/typescript/src/lib/Components/Line/utils.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/LineChart/LineChart.d.ts +1 -1
- package/dist/typescript/src/lib/Components/LineChart/LineChart.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/LineChart/types.d.ts +13 -1
- package/dist/typescript/src/lib/Components/LineChart/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Point/Point.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/Scrubber/ScrubberProvider.d.ts.map +1 -1
- package/dist/typescript/src/lib/utils/types.d.ts +7 -0
- package/dist/typescript/src/lib/utils/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/lib/Components/Axis/Axis.types.ts +6 -0
- package/src/lib/Components/Axis/XAxis/XAxis.test.tsx +12 -0
- package/src/lib/Components/Axis/XAxis/XAxis.tsx +16 -14
- package/src/lib/Components/Axis/YAxis/YAxis.test.tsx +12 -0
- package/src/lib/Components/Axis/YAxis/YAxis.tsx +16 -14
- package/src/lib/Components/CartesianChart/CartesianChart.tsx +3 -3
- package/src/lib/Components/CartesianChart/{RevealClip/RevealClipDefs.test.tsx → RevealAnimation/RevealAnimationProvider.test.tsx} +60 -17
- package/src/lib/Components/CartesianChart/{RevealClip/RevealClipDefs.tsx → RevealAnimation/RevealAnimationProvider.tsx} +10 -11
- package/src/lib/Components/CartesianChart/RevealAnimation/context.ts +39 -0
- package/src/lib/Components/CartesianChart/RevealAnimation/index.ts +2 -0
- package/src/lib/Components/CartesianChart/{RevealClip → RevealAnimation}/types.ts +15 -1
- package/src/lib/Components/CartesianChart/RevealAnimation/utils.ts +87 -0
- package/src/lib/Components/CartesianChart/utils.ts +2 -1
- package/src/lib/Components/Line/Line.tsx +13 -4
- package/src/lib/Components/Line/types.ts +7 -0
- package/src/lib/Components/Line/utils.test.ts +36 -2
- package/src/lib/Components/Line/utils.ts +24 -9
- package/src/lib/Components/LineChart/LineChart.test.tsx +71 -0
- package/src/lib/Components/LineChart/LineChart.tsx +21 -3
- package/src/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.tsx +2 -2
- package/src/lib/Components/LineChart/types.ts +15 -1
- package/src/lib/Components/Point/Point.tsx +7 -4
- package/src/lib/Components/Scrubber/ScrubberProvider.test.tsx +83 -1
- package/src/lib/Components/Scrubber/ScrubberProvider.tsx +15 -1
- package/src/lib/utils/types.ts +7 -0
- package/dist/module/lib/Components/CartesianChart/RevealClip/RevealClipDefs.js.map +0 -1
- package/dist/module/lib/Components/CartesianChart/RevealClip/RevealClipDefs.test.js.map +0 -1
- package/dist/module/lib/Components/CartesianChart/RevealClip/context.js +0 -8
- package/dist/module/lib/Components/CartesianChart/RevealClip/context.js.map +0 -1
- package/dist/module/lib/Components/CartesianChart/RevealClip/index.js +0 -5
- package/dist/module/lib/Components/CartesianChart/RevealClip/index.js.map +0 -1
- package/dist/module/lib/Components/CartesianChart/RevealClip/types.js.map +0 -1
- package/dist/module/lib/Components/CartesianChart/hooks/useDataFingerprint.js +0 -13
- package/dist/module/lib/Components/CartesianChart/hooks/useDataFingerprint.js.map +0 -1
- package/dist/module/lib/Components/CartesianChart/hooks/useRevealClipAnimation.js +0 -27
- package/dist/module/lib/Components/CartesianChart/hooks/useRevealClipAnimation.js.map +0 -1
- package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/RevealClipDefs.d.ts +0 -3
- package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/RevealClipDefs.d.ts.map +0 -1
- package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/context.d.ts +0 -7
- package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/context.d.ts.map +0 -1
- package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/index.d.ts +0 -3
- package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/index.d.ts.map +0 -1
- package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/types.d.ts.map +0 -1
- package/dist/typescript/src/lib/Components/CartesianChart/hooks/useDataFingerprint.d.ts +0 -9
- package/dist/typescript/src/lib/Components/CartesianChart/hooks/useDataFingerprint.d.ts.map +0 -1
- package/dist/typescript/src/lib/Components/CartesianChart/hooks/useRevealClipAnimation.d.ts +0 -14
- package/dist/typescript/src/lib/Components/CartesianChart/hooks/useRevealClipAnimation.d.ts.map +0 -1
- package/src/lib/Components/CartesianChart/RevealClip/context.ts +0 -13
- package/src/lib/Components/CartesianChart/RevealClip/index.ts +0 -2
- package/src/lib/Components/CartesianChart/hooks/useDataFingerprint.ts +0 -16
- package/src/lib/Components/CartesianChart/hooks/useRevealClipAnimation.ts +0 -43
- /package/dist/module/lib/Components/CartesianChart/{RevealClip → RevealAnimation}/types.js +0 -0
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { describe, expect, it, jest } from '@jest/globals';
|
|
3
|
+
import { beforeEach, describe, expect, it, jest } from '@jest/globals';
|
|
4
4
|
import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
|
|
5
5
|
import { ThemeProvider } from '@ledgerhq/lumen-ui-rnative';
|
|
6
6
|
import { fireEvent, render } from '@testing-library/react-native';
|
|
7
|
+
import * as Haptics from 'expo-haptics';
|
|
7
8
|
import { Pressable, Text } from 'react-native';
|
|
8
9
|
import { CartesianChart } from "../CartesianChart/index.js";
|
|
9
10
|
import { useScrubberContext } from "./context/index.js";
|
|
10
11
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
const impactAsyncMock = jest.mocked(Haptics.impactAsync);
|
|
11
13
|
const sampleSeries = [{
|
|
12
14
|
id: 's1',
|
|
13
15
|
stroke: '#7B61FF',
|
|
@@ -213,5 +215,81 @@ describe('ScrubberProvider', () => {
|
|
|
213
215
|
fireEvent.press(getByTestId('set-position'));
|
|
214
216
|
expect(onScrubberPositionChange).not.toHaveBeenCalled();
|
|
215
217
|
});
|
|
218
|
+
describe('haptic feedback', () => {
|
|
219
|
+
const ContextTrigger = () => {
|
|
220
|
+
const {
|
|
221
|
+
onScrubberPositionChange: updatePosition
|
|
222
|
+
} = useScrubberContext();
|
|
223
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
224
|
+
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
225
|
+
testID: "enter",
|
|
226
|
+
onPress: () => updatePosition(2)
|
|
227
|
+
}), /*#__PURE__*/_jsx(Pressable, {
|
|
228
|
+
testID: "move",
|
|
229
|
+
onPress: () => updatePosition(3)
|
|
230
|
+
}), /*#__PURE__*/_jsx(Pressable, {
|
|
231
|
+
testID: "exit",
|
|
232
|
+
onPress: () => updatePosition(undefined)
|
|
233
|
+
})]
|
|
234
|
+
});
|
|
235
|
+
};
|
|
236
|
+
const renderTrigger = (series = sampleSeries) => render(/*#__PURE__*/_jsx(Wrapper, {
|
|
237
|
+
children: /*#__PURE__*/_jsx(CartesianChart, {
|
|
238
|
+
series: series,
|
|
239
|
+
width: 400,
|
|
240
|
+
height: 200,
|
|
241
|
+
enableScrubbing: true,
|
|
242
|
+
children: /*#__PURE__*/_jsx(ContextTrigger, {})
|
|
243
|
+
})
|
|
244
|
+
}));
|
|
245
|
+
beforeEach(() => {
|
|
246
|
+
impactAsyncMock.mockClear();
|
|
247
|
+
});
|
|
248
|
+
it('triggers light haptic feedback once when entering from idle', () => {
|
|
249
|
+
const {
|
|
250
|
+
getByTestId
|
|
251
|
+
} = renderTrigger();
|
|
252
|
+
fireEvent.press(getByTestId('enter'));
|
|
253
|
+
expect(impactAsyncMock).toHaveBeenCalledTimes(1);
|
|
254
|
+
expect(impactAsyncMock).toHaveBeenCalledWith('light');
|
|
255
|
+
});
|
|
256
|
+
it('does not re-trigger haptic feedback while moving between indices', () => {
|
|
257
|
+
const {
|
|
258
|
+
getByTestId
|
|
259
|
+
} = renderTrigger();
|
|
260
|
+
fireEvent.press(getByTestId('enter'));
|
|
261
|
+
fireEvent.press(getByTestId('move'));
|
|
262
|
+
expect(impactAsyncMock).toHaveBeenCalledTimes(1);
|
|
263
|
+
});
|
|
264
|
+
it('does not trigger haptic feedback when exiting the scrubber', () => {
|
|
265
|
+
const {
|
|
266
|
+
getByTestId
|
|
267
|
+
} = renderTrigger();
|
|
268
|
+
fireEvent.press(getByTestId('enter'));
|
|
269
|
+
fireEvent.press(getByTestId('exit'));
|
|
270
|
+
expect(impactAsyncMock).toHaveBeenCalledTimes(1);
|
|
271
|
+
});
|
|
272
|
+
it('re-triggers haptic feedback when re-entering after an exit', () => {
|
|
273
|
+
const {
|
|
274
|
+
getByTestId
|
|
275
|
+
} = renderTrigger();
|
|
276
|
+
fireEvent.press(getByTestId('enter'));
|
|
277
|
+
fireEvent.press(getByTestId('exit'));
|
|
278
|
+
fireEvent.press(getByTestId('move'));
|
|
279
|
+
expect(impactAsyncMock).toHaveBeenCalledTimes(2);
|
|
280
|
+
});
|
|
281
|
+
it('does not trigger haptic feedback when dataLength is 0', () => {
|
|
282
|
+
const emptySeries = [{
|
|
283
|
+
id: 's1',
|
|
284
|
+
stroke: '#7B61FF',
|
|
285
|
+
data: []
|
|
286
|
+
}];
|
|
287
|
+
const {
|
|
288
|
+
getByTestId
|
|
289
|
+
} = renderTrigger(emptySeries);
|
|
290
|
+
fireEvent.press(getByTestId('enter'));
|
|
291
|
+
expect(impactAsyncMock).not.toHaveBeenCalled();
|
|
292
|
+
});
|
|
293
|
+
});
|
|
216
294
|
});
|
|
217
295
|
//# sourceMappingURL=ScrubberProvider.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["describe","expect","it","jest","ledgerLiveThemes","ThemeProvider","fireEvent","render","Pressable","Text","CartesianChart","useScrubberContext","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","sampleSeries","id","stroke","data","Wrapper","children","themes","colorScheme","ContextConsumer","scrubberPosition","enableScrubbing","testID","getByTestId","series","width","height","toBeTruthy","queryByTestId","toBeNull","props","toBe","onScrubberPositionChange","fn","ContextTrigger","updatePosition","onPress","undefined","press","toHaveBeenCalledWith","toHaveBeenCalledTimes","length","emptySeries","not","toHaveBeenCalled"],"sourceRoot":"../../../../../src","sources":["lib/Components/Scrubber/ScrubberProvider.test.tsx"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,EAAEC,IAAI,QAAQ,eAAe;
|
|
1
|
+
{"version":3,"names":["beforeEach","describe","expect","it","jest","ledgerLiveThemes","ThemeProvider","fireEvent","render","Haptics","Pressable","Text","CartesianChart","useScrubberContext","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","impactAsyncMock","mocked","impactAsync","sampleSeries","id","stroke","data","Wrapper","children","themes","colorScheme","ContextConsumer","scrubberPosition","enableScrubbing","testID","getByTestId","series","width","height","toBeTruthy","queryByTestId","toBeNull","props","toBe","onScrubberPositionChange","fn","ContextTrigger","updatePosition","onPress","undefined","press","toHaveBeenCalledWith","toHaveBeenCalledTimes","length","emptySeries","not","toHaveBeenCalled","renderTrigger","mockClear"],"sourceRoot":"../../../../../src","sources":["lib/Components/Scrubber/ScrubberProvider.test.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,EAAEC,IAAI,QAAQ,eAAe;AACtE,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,SAAS,EAAEC,MAAM,QAAQ,+BAA+B;AACjE,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC,SAASC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAE9C,SAASC,cAAc,QAAQ,4BAAmB;AAClD,SAASC,kBAAkB,QAAQ,oBAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/C,MAAMC,eAAe,GAAGhB,IAAI,CAACiB,MAAM,CAACZ,OAAO,CAACa,WAAW,CAAC;AAExD,MAAMC,YAAY,GAAG,CACnB;EAAEC,EAAE,EAAE,IAAI;EAAEC,MAAM,EAAE,SAAS;EAAEC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;AAAE,CAAC,CAC5D;AAED,MAAMC,OAAO,GAAGA,CAAC;EAAEC;AAAkC,CAAC,kBACpDb,IAAA,CAACT,aAAa;EAACuB,MAAM,EAAExB,gBAAiB;EAACyB,WAAW,EAAC,OAAO;EAAAF,QAAA,EACzDA;AAAQ,CACI,CAChB;AAED,MAAMG,eAAe,GAAGA,CAAA,KAAM;EAC5B,MAAM;IAAEC,gBAAgB;IAAEC;EAAgB,CAAC,GAAGpB,kBAAkB,CAAC,CAAC;EAClE,oBACEE,IAAA,CAACJ,IAAI;IAACuB,MAAM,EAAC,gBAAgB;IAAAN,QAAA,EAC1B,WAAWK,eAAe,QAAQD,gBAAgB,I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eAAe,CAAC,CAACmC,GAAG,CAACC,gBAAgB,CAAC,CAAC;IAChD,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -23,6 +23,12 @@ export type BaseAxisProps = {
|
|
|
23
23
|
* @default false
|
|
24
24
|
*/
|
|
25
25
|
showTickMark?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether to render the text labels at each tick position.
|
|
28
|
+
* When false, tick marks, grid lines, and the baseline still render.
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
showLabels?: boolean;
|
|
26
32
|
/**
|
|
27
33
|
* Explicit tick positions along the axis.
|
|
28
34
|
* When omitted, ticks are computed automatically from the scale.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Axis.types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Axis/Axis.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;IACxD;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IACtC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IAC3B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,CAAC,CAAC;IACpE;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"Axis.types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Axis/Axis.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;IACxD;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IACtC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IAC3B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,CAAC,CAAC;IACpE;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { XAxisProps } from './types';
|
|
2
2
|
export declare const DEFAULT_AXIS_HEIGHT = 28;
|
|
3
|
-
export declare const XAxis: ({ gridLineStyle, position, showGrid, showLine, showTickMark, ticks: ticksProp, tickLabelFormatter, }: XAxisProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
+
export declare const XAxis: ({ gridLineStyle, position, showGrid, showLine, showTickMark, showLabels, ticks: ticksProp, tickLabelFormatter, }: XAxisProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
//# sourceMappingURL=XAxis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XAxis.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/Axis/XAxis/XAxis.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAK1C,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,KAAK,GAAI,
|
|
1
|
+
{"version":3,"file":"XAxis.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/Axis/XAxis/XAxis.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAK1C,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,KAAK,GAAI,kHASnB,UAAU,mDAyFZ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { YAxisProps } from './types';
|
|
2
2
|
export declare const DEFAULT_AXIS_WIDTH = 40;
|
|
3
|
-
export declare const YAxis: ({ position, showGrid, showLine, showTickMark, gridLineStyle, ticks: ticksProp, tickLabelFormatter, }: YAxisProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
+
export declare const YAxis: ({ position, showGrid, showLine, showTickMark, showLabels, gridLineStyle, ticks: ticksProp, tickLabelFormatter, }: YAxisProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
//# sourceMappingURL=YAxis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YAxis.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/Axis/YAxis/YAxis.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAK1C,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,eAAO,MAAM,KAAK,GAAI,
|
|
1
|
+
{"version":3,"file":"YAxis.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/Axis/YAxis/YAxis.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAK1C,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,eAAO,MAAM,KAAK,GAAI,kHASnB,UAAU,mDAwFZ,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { RevealAnimationProps } from './types';
|
|
2
|
+
export declare function RevealAnimationProvider({ children, drawingArea, series, animate, transitions, }: RevealAnimationProps): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
3
|
+
//# sourceMappingURL=RevealAnimationProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RevealAnimationProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/CartesianChart/RevealAnimation/RevealAnimationProvider.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAOpD,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,WAAW,EACX,MAAM,EACN,OAAc,EACd,WAAW,GACZ,EAAE,oBAAoB,2WA0CtB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
2
|
+
import { useAnimatedProps } from 'react-native-reanimated';
|
|
3
|
+
import type { RevealAnimationContextValue } from './types';
|
|
4
|
+
export declare const RevealAnimationContext: import("react").Context<RevealAnimationContextValue | undefined>;
|
|
5
|
+
/**
|
|
6
|
+
* Clip-path attribute for path-based consumers (e.g. `Line`).
|
|
7
|
+
* Returns `undefined` when the reveal animation is disabled.
|
|
8
|
+
*/
|
|
9
|
+
export declare const usePathReveal: () => string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Raw shared opacity value for the point/accessory fade. Returns `undefined`
|
|
12
|
+
* when the reveal animation is disabled. Prefer {@link useRevealFadeProps} in
|
|
13
|
+
* components; this is the low-level primitive for custom needs.
|
|
14
|
+
*/
|
|
15
|
+
export declare const usePointReveal: () => SharedValue<number> | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Ready-to-use animated props for accessory components (e.g. `Point`) that
|
|
18
|
+
* fade in with the reveal instead of being clipped. Spread directly onto any
|
|
19
|
+
* animated SVG element via `animatedProps`
|
|
20
|
+
*/
|
|
21
|
+
export declare const useRevealFadeProps: () => ReturnType<typeof useAnimatedProps>;
|
|
22
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/CartesianChart/RevealAnimation/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAE3D,eAAO,MAAM,sBAAsB,kEAEvB,CAAC;AAEb;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAO,MAAM,GAAG,SAEzC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,QAAO,WAAW,CAAC,MAAM,CAAC,GAAG,SAEvD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,QAAO,UAAU,CAAC,OAAO,gBAAgB,CAMvE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/CartesianChart/RevealAnimation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/typescript/src/lib/Components/CartesianChart/{RevealClip → RevealAnimation}/types.d.ts
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
2
3
|
import type { DrawingArea, Series } from '../../../utils/types';
|
|
3
4
|
export type EnterTransitionConfig = {
|
|
4
5
|
/**
|
|
@@ -11,7 +12,7 @@ export type EnterTransitionConfig = {
|
|
|
11
12
|
*/
|
|
12
13
|
easing?: string;
|
|
13
14
|
};
|
|
14
|
-
export type
|
|
15
|
+
export type RevealAnimationProps = {
|
|
15
16
|
children: ReactNode;
|
|
16
17
|
/**
|
|
17
18
|
* The drawing area whose bounds define the clip rectangle.
|
|
@@ -35,4 +36,16 @@ export type RevealClipDefsProps = {
|
|
|
35
36
|
*/
|
|
36
37
|
series: Series[];
|
|
37
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Value shared by the reveal animation provider.
|
|
41
|
+
*
|
|
42
|
+
* - `clipPathAttr` drives the left-to-right clip wipe consumed by path-based
|
|
43
|
+
* components (e.g. `Line`, `LineChartEmptyState`).
|
|
44
|
+
* - `pointOpacity` is the shared opacity value for accessory components (e.g.
|
|
45
|
+
* `Point`) that must not be clipped, so they fade in after the wipe instead.
|
|
46
|
+
*/
|
|
47
|
+
export type RevealAnimationContextValue = {
|
|
48
|
+
clipPathAttr: string;
|
|
49
|
+
pointOpacity: SharedValue<number>;
|
|
50
|
+
};
|
|
38
51
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/CartesianChart/RevealAnimation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,qBAAqB,CAAA;KAAE,CAAC;IAChD;;;OAGG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACnC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useAnimatedProps, useSharedValue } from 'react-native-reanimated';
|
|
2
|
+
import type { DrawingArea, Series } from '../../../utils/types';
|
|
3
|
+
type RevealAnimationConfig = {
|
|
4
|
+
durationMs: number;
|
|
5
|
+
drawingArea: DrawingArea;
|
|
6
|
+
dataFingerprint: string;
|
|
7
|
+
};
|
|
8
|
+
type RevealAnimationResult = {
|
|
9
|
+
clipId: string;
|
|
10
|
+
animatedRectProps: ReturnType<typeof useAnimatedProps>;
|
|
11
|
+
pointOpacity: ReturnType<typeof useSharedValue<number>>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Drives the two reveal animations:
|
|
15
|
+
* - the left-to-right clip-path wipe (animated `Rect` width, including the
|
|
16
|
+
* {@link OVERFLOW_BUFFER} so edge content is revealed too), and
|
|
17
|
+
* - the point fade-in, delayed so points appear as the wipe finishes.
|
|
18
|
+
*
|
|
19
|
+
* On a data change the shared values are reset to `0` (hidden) *synchronously
|
|
20
|
+
* during render* — before the new line/points are committed and painted — so
|
|
21
|
+
* they never paint once at the previous cycle's end values (a visible flash).
|
|
22
|
+
* The effect then animates them back in.
|
|
23
|
+
*/
|
|
24
|
+
export declare const useRevealAnimation: ({ durationMs, drawingArea, dataFingerprint, }: RevealAnimationConfig) => RevealAnimationResult;
|
|
25
|
+
/**
|
|
26
|
+
* Stable signature of every series' data points, memoized on the `series`
|
|
27
|
+
* reference. Used to key the reveal provider so the reveal animation only
|
|
28
|
+
* replays when the underlying data actually changes — not on unrelated
|
|
29
|
+
* re-renders such as scrubbing or hover.
|
|
30
|
+
*/
|
|
31
|
+
export declare const useDataFingerprint: (series: Series[]) => string;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/CartesianChart/RevealAnimation/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,cAAc,EAGf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAShE,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;IACvD,YAAY,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;CACzD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAI,+CAIhC,qBAAqB,KAAG,qBA6B1B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,KAAG,MAKrD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChartInset } from '../../utils/types';
|
|
2
2
|
import type { CartesianChartProps } from './types';
|
|
3
|
-
export declare const DEFAULT_HEIGHT =
|
|
3
|
+
export declare const DEFAULT_HEIGHT = 228;
|
|
4
4
|
/**
|
|
5
5
|
* Internal buffer added around the drawing area so SVG content (labels, points,
|
|
6
6
|
* ticks) drawn at the edges is not clipped. The SVG canvas is enlarged by this
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/CartesianChart/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,UAK7B,CAAC;AACF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/CartesianChart/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,UAK7B,CAAC;AACF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,UAK1B,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,OAAO,mBAAmB,CAAC,OAAO,CAAC,KAClC,UAqBF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,SAAS,mBAAmB,CAAC,aAAa,CAAC,KAC1C,UAQF,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LineProps } from './types';
|
|
2
|
-
export declare const Line: ({ seriesId, stroke, showArea, areaType: _areaType, curve, }: LineProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
2
|
+
export declare const Line: ({ seriesId, stroke, showArea, areaType: _areaType, curve, connectNulls, }: LineProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
//# sourceMappingURL=Line.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Line/Line.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,eAAO,MAAM,IAAI,GAAI,
|
|
1
|
+
{"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Line/Line.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,eAAO,MAAM,IAAI,GAAI,2EAOlB,SAAS,mDAkFX,CAAC"}
|
|
@@ -28,5 +28,12 @@ export type LineProps = {
|
|
|
28
28
|
* @default 'bump'
|
|
29
29
|
*/
|
|
30
30
|
curve?: CurveType;
|
|
31
|
+
/**
|
|
32
|
+
* When true, skips null values and draws a continuous line across gaps.
|
|
33
|
+
* When false, null values create gaps in the line.
|
|
34
|
+
* When omitted, falls back to the `connectNulls` defined on the series.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
connectNulls?: boolean;
|
|
31
38
|
};
|
|
32
39
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Line/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Line/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ChartScaleFunction, CurveType, DrawingArea, NumericScale } from '../../utils/types';
|
|
2
|
-
type Point = [x: number, y: number];
|
|
2
|
+
type Point = [x: number, y: number | null];
|
|
3
3
|
/**
|
|
4
|
-
* Project series data into scaled [x, y] pixel coordinates
|
|
5
|
-
* non-finite entries.
|
|
4
|
+
* Project series data into scaled [x, y] pixel coordinates.
|
|
6
5
|
*
|
|
7
6
|
* When `xData` contains numeric values, those values are fed into the scale
|
|
8
7
|
* instead of the array index so the points honour a numeric X domain.
|
|
@@ -10,8 +9,13 @@ type Point = [x: number, y: number];
|
|
|
10
9
|
* When `xData` is provided, iteration is capped at `xData.length` so a series
|
|
11
10
|
* with more points than the axis has labels does not overflow past the right
|
|
12
11
|
* edge of the chart. The axis is treated as authoritative for the X domain.
|
|
12
|
+
*
|
|
13
|
+
* Non-finite values (e.g. `null`) are handled according to `connectNulls`:
|
|
14
|
+
* - `false` (default): kept as `[x, null]` holes so the line/area break into
|
|
15
|
+
* gaps via the generators' `.defined()` check.
|
|
16
|
+
* - `true`: skipped entirely so the line is drawn continuously across gaps.
|
|
13
17
|
*/
|
|
14
|
-
export declare const toScaledPoints: (data: (number | null)[], xScale: ChartScaleFunction, yScale: NumericScale, xData?: readonly (string | number)[]) => Point[] | null;
|
|
18
|
+
export declare const toScaledPoints: (data: (number | null)[], xScale: ChartScaleFunction, yScale: NumericScale, xData?: readonly (string | number)[], connectNulls?: boolean) => Point[] | null;
|
|
15
19
|
/**
|
|
16
20
|
* Build the SVG `d` attribute for the line stroke.
|
|
17
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Line/utils.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,YAAY,EACb,MAAM,mBAAmB,CAAC;AAE3B,KAAK,KAAK,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Line/utils.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,YAAY,EACb,MAAM,mBAAmB,CAAC;AAE3B,KAAK,KAAK,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;AAoB3C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,EACvB,QAAQ,kBAAkB,EAC1B,QAAQ,YAAY,EACpB,QAAQ,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EACpC,sBAAoB,KACnB,KAAK,EAAE,GAAG,IA4BZ,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,KAAK,EAAE,EACf,QAAQ,SAAS,KAChB,MAAM,GAAG,IAQX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,QAAQ,KAAK,EAAE,EACf,aAAa,WAAW,EACxB,QAAQ,SAAS,KAChB,MAAM,GAAG,IAWX,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LineChartProps } from './types';
|
|
2
|
-
export declare const LineChart: ({ series, showArea, areaType, showXAxis, showYAxis, xAxis, yAxis, width, height, inset, children, enableScrubbing, onScrubberPositionChange, animate, magnetRadius, loading, emptyLabel, }: Readonly<LineChartProps>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const LineChart: ({ series, showArea, areaType, showXAxis, showYAxis, xAxis, yAxis, width, height, inset, children, enableScrubbing, onScrubberPositionChange, animate, magnetRadius, loading, emptyLabel, connectNulls, }: Readonly<LineChartProps>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=LineChart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/LineChart/LineChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/LineChart/LineChart.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,SAAS,CAAC;AA0FjB,eAAO,MAAM,SAAS,GAAI,0MAmBvB,QAAQ,CAAC,cAAc,CAAC,4CAgF1B,CAAC"}
|
|
@@ -98,16 +98,28 @@ export type LineChartProps = {
|
|
|
98
98
|
* @default 'No data'
|
|
99
99
|
*/
|
|
100
100
|
emptyLabel?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Chart-wide override controlling how null values are handled across all lines.
|
|
103
|
+
* When true, skips null values and draws continuous lines across gaps.
|
|
104
|
+
* When false, null values create gaps in the lines.
|
|
105
|
+
* When omitted, each series' own `connectNulls` value is used (defaulting to `false`).
|
|
106
|
+
*/
|
|
107
|
+
connectNulls?: boolean;
|
|
101
108
|
};
|
|
102
109
|
/**
|
|
103
110
|
* Series-render fields shared by `LineChart` and its internal line
|
|
104
111
|
* sub-components. Derived from {@link LineChartProps} so the option types stay
|
|
105
112
|
* in sync.
|
|
106
113
|
*/
|
|
107
|
-
|
|
114
|
+
type LineSeriesRenderProps = Required<Pick<LineChartProps, 'series' | 'showArea' | 'areaType'>>;
|
|
115
|
+
export type LineChartLinesProps = LineSeriesRenderProps & Pick<LineChartProps, 'connectNulls'> & {
|
|
116
|
+
stroke?: string;
|
|
117
|
+
};
|
|
118
|
+
export type LineChartTransitionLinesProps = Omit<LineChartLinesProps, 'stroke'>;
|
|
108
119
|
export type LineChartContentProps = LineChartLinesProps & Required<Pick<LineChartProps, 'showXAxis' | 'showYAxis'>> & Pick<LineChartProps, 'children'> & {
|
|
109
120
|
xAxisConfig: XAxisProps;
|
|
110
121
|
yAxisConfig: YAxisProps;
|
|
111
122
|
isTransitionLoading: boolean;
|
|
112
123
|
};
|
|
124
|
+
export {};
|
|
113
125
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/LineChart/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/D;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/LineChart/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/D;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,KAAK,qBAAqB,GAAG,QAAQ,CACnC,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC,CACzD,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,GACrD,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,GAAG;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEJ,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;AAEhF,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,GACrD,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,WAAW,GAAG,WAAW,CAAC,CAAC,GACzD,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IACjC,WAAW,EAAE,UAAU,CAAC;IACxB,WAAW,EAAE,UAAU,CAAC;IACxB,mBAAmB,EAAE,OAAO,CAAC;CAC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Point/Point.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Point/Point.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAW3D,wBAAgB,UAAU,CAAC,EACzB,UAAqB,EACrB,GAAG,KAAK,EACT,EAAE,QAAQ,CAAC,eAAe,CAAC,2CAa3B;AAED,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,cAAc,EACd,aAAqB,EACrB,SAAiB,EACjB,cAAqB,EACrB,IAAmB,EACnB,OAAO,EACP,QAAgB,GACjB,EAAE,QAAQ,CAAC,UAAU,CAAC,kDA0DtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrubberProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Scrubber/ScrubberProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScrubberProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Scrubber/ScrubberProvider.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAUrD;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,KAAK,EACL,MAAM,EACN,eAAe,EACf,wBAAwB,EACxB,YAAgB,EAChB,KAAK,GACN,EAAE,QAAQ,CAAC,qBAAqB,CAAC,2CAwKjC"}
|
|
@@ -50,6 +50,13 @@ export type Series = {
|
|
|
50
50
|
* @default 'bump'
|
|
51
51
|
*/
|
|
52
52
|
curve?: CurveType;
|
|
53
|
+
/**
|
|
54
|
+
* When true, skips null values and draws a continuous line across gaps.
|
|
55
|
+
* When false (default), null values create gaps in the line.
|
|
56
|
+
* Overridden by the chart-level `connectNulls` prop when that is set.
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
connectNulls?: boolean;
|
|
53
60
|
};
|
|
54
61
|
export type NumericScale = ScaleLinear<number, number> | ScaleLogarithmic<number, number>;
|
|
55
62
|
export type CategoricalScale = ScaleBand<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,SAAS,GACT,UAAU,GACV,QAAQ,GACR,MAAM,GACN,WAAW,GACX,YAAY,CAAC;AAEjB,MAAM,MAAM,MAAM,GAAG;IACnB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;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AG,SAAS,CAAC;IAC3D;;OAEG;IACH,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IAC3D;;OAEG;IACH,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,CAAC;IAC3D;;OAEG;IACH,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,CAAC;IAC3D;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/lumen-ui-rnative-visualization",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"keywords": [
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@types/react": "^19.0.0",
|
|
47
47
|
"@ledgerhq/lumen-design-core": "0.1.17",
|
|
48
|
-
"@ledgerhq/lumen-ui-rnative": "0.1.
|
|
48
|
+
"@ledgerhq/lumen-ui-rnative": "0.1.43",
|
|
49
49
|
"react": "^19.0.0",
|
|
50
50
|
"react-native": "~0.79.7",
|
|
51
51
|
"react-native-svg": "^15.0.0",
|
|
@@ -24,6 +24,12 @@ export type BaseAxisProps = {
|
|
|
24
24
|
* @default false
|
|
25
25
|
*/
|
|
26
26
|
showTickMark?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to render the text labels at each tick position.
|
|
29
|
+
* When false, tick marks, grid lines, and the baseline still render.
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
showLabels?: boolean;
|
|
27
33
|
/**
|
|
28
34
|
* Explicit tick positions along the axis.
|
|
29
35
|
* When omitted, ticks are computed automatically from the scale.
|
|
@@ -75,6 +75,18 @@ describe('XAxis', () => {
|
|
|
75
75
|
getByText('4');
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
+
it('hides tick labels when showLabels is false but keeps tick marks', () => {
|
|
79
|
+
const { queryByText, toJSON } = renderXAxis({
|
|
80
|
+
ticks: [0, 2, 4],
|
|
81
|
+
showTickMark: true,
|
|
82
|
+
showLabels: false,
|
|
83
|
+
});
|
|
84
|
+
expect(queryByText('0')).toBeNull();
|
|
85
|
+
expect(queryByText('2')).toBeNull();
|
|
86
|
+
expect(queryByText('4')).toBeNull();
|
|
87
|
+
expect(toJSON()).toBeTruthy();
|
|
88
|
+
});
|
|
89
|
+
|
|
78
90
|
it('does not render axis when width is 0', () => {
|
|
79
91
|
const { queryByText } = render(
|
|
80
92
|
<ThemeProvider themes={ledgerLiveThemes} colorScheme='light'>
|
|
@@ -18,6 +18,7 @@ export const XAxis = ({
|
|
|
18
18
|
showGrid = false,
|
|
19
19
|
showLine = false,
|
|
20
20
|
showTickMark = false,
|
|
21
|
+
showLabels = true,
|
|
21
22
|
ticks: ticksProp,
|
|
22
23
|
tickLabelFormatter,
|
|
23
24
|
}: XAxisProps) => {
|
|
@@ -92,20 +93,21 @@ export const XAxis = ({
|
|
|
92
93
|
/>
|
|
93
94
|
))}
|
|
94
95
|
|
|
95
|
-
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
96
|
+
{showLabels &&
|
|
97
|
+
ticksData.map((tick, i) => (
|
|
98
|
+
<SvgText
|
|
99
|
+
key={`label-${tick.value}-${i}`}
|
|
100
|
+
x={tick.position}
|
|
101
|
+
y={labelY}
|
|
102
|
+
dy={labelDy}
|
|
103
|
+
textAnchor='middle'
|
|
104
|
+
fill={textFill}
|
|
105
|
+
fontSize={fontSize}
|
|
106
|
+
fontFamily={theme.fontFamilies.sans}
|
|
107
|
+
>
|
|
108
|
+
{tick.label}
|
|
109
|
+
</SvgText>
|
|
110
|
+
))}
|
|
109
111
|
</G>
|
|
110
112
|
);
|
|
111
113
|
};
|
|
@@ -75,6 +75,18 @@ describe('YAxis', () => {
|
|
|
75
75
|
getByText('50');
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
+
it('hides tick labels when showLabels is false but keeps tick marks', () => {
|
|
79
|
+
const { queryByText, toJSON } = renderYAxis({
|
|
80
|
+
ticks: [10, 30, 50],
|
|
81
|
+
showTickMark: true,
|
|
82
|
+
showLabels: false,
|
|
83
|
+
});
|
|
84
|
+
expect(queryByText('10')).toBeNull();
|
|
85
|
+
expect(queryByText('30')).toBeNull();
|
|
86
|
+
expect(queryByText('50')).toBeNull();
|
|
87
|
+
expect(toJSON()).toBeTruthy();
|
|
88
|
+
});
|
|
89
|
+
|
|
78
90
|
it('does not render axis when height is 0', () => {
|
|
79
91
|
const { queryByText } = render(
|
|
80
92
|
<ThemeProvider themes={ledgerLiveThemes} colorScheme='light'>
|