From 4ab26690adc637baf91ad1ce117164852f404499 Mon Sep 17 00:00:00 2001 From: "v.trushin" Date: Tue, 26 Nov 2024 17:07:10 +0300 Subject: [PATCH] update uplot to 1.6.31 & fix bug --- statshouse-ui/package-lock.json | 15 ++++++++------- statshouse-ui/package.json | 2 +- .../src/components/UPlotWrapper/UPlotWrapper.tsx | 4 +--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/statshouse-ui/package-lock.json b/statshouse-ui/package-lock.json index 0177cab6b..30a6cf1dd 100644 --- a/statshouse-ui/package-lock.json +++ b/statshouse-ui/package-lock.json @@ -49,7 +49,7 @@ "remark-gfm": "^4.0.0", "sass": "^1.69.5", "typescript": "^4.9.5", - "uplot": "^1.6.27", + "uplot": "^1.6.31", "use-deep-compare-effect": "^1.8.1", "web-vitals": "^3.5.0", "zustand": "^4.5.0" @@ -19067,9 +19067,10 @@ } }, "node_modules/uplot": { - "version": "1.6.27", - "resolved": "https://registry.npmjs.org/uplot/-/uplot-1.6.27.tgz", - "integrity": "sha512-78U4ss5YeU65kQkOC/QAKiyII+4uo+TYUJJKvuxRzeSpk/s5sjpY1TL0agkmhHBBShpvLtmbHIEiM7+C5lBULg==" + "version": "1.6.31", + "resolved": "https://registry.npmjs.org/uplot/-/uplot-1.6.31.tgz", + "integrity": "sha512-sQZqSwVCbJGnFB4IQjQYopzj5CoTZJ4Br1fG/xdONimqgHmsacvCjNesdGDypNKFbrhLGIeshYhy89FxPF+H+w==", + "license": "MIT" }, "node_modules/uri-js": { "version": "4.4.1", @@ -33763,9 +33764,9 @@ "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==" }, "uplot": { - "version": "1.6.27", - "resolved": "https://registry.npmjs.org/uplot/-/uplot-1.6.27.tgz", - "integrity": "sha512-78U4ss5YeU65kQkOC/QAKiyII+4uo+TYUJJKvuxRzeSpk/s5sjpY1TL0agkmhHBBShpvLtmbHIEiM7+C5lBULg==" + "version": "1.6.31", + "resolved": "https://registry.npmjs.org/uplot/-/uplot-1.6.31.tgz", + "integrity": "sha512-sQZqSwVCbJGnFB4IQjQYopzj5CoTZJ4Br1fG/xdONimqgHmsacvCjNesdGDypNKFbrhLGIeshYhy89FxPF+H+w==" }, "uri-js": { "version": "4.4.1", diff --git a/statshouse-ui/package.json b/statshouse-ui/package.json index 5f86a63ce..cac2958d5 100644 --- a/statshouse-ui/package.json +++ b/statshouse-ui/package.json @@ -44,7 +44,7 @@ "remark-gfm": "^4.0.0", "sass": "^1.69.5", "typescript": "^4.9.5", - "uplot": "^1.6.27", + "uplot": "^1.6.31", "use-deep-compare-effect": "^1.8.1", "web-vitals": "^3.5.0", "zustand": "^4.5.0" diff --git a/statshouse-ui/src/components/UPlotWrapper/UPlotWrapper.tsx b/statshouse-ui/src/components/UPlotWrapper/UPlotWrapper.tsx index e9aaa912d..1121a86b0 100644 --- a/statshouse-ui/src/components/UPlotWrapper/UPlotWrapper.tsx +++ b/statshouse-ui/src/components/UPlotWrapper/UPlotWrapper.tsx @@ -237,9 +237,7 @@ export const _UPlotWrapper: React.FC = ({ const updateData = useCallback((data: uPlot.AlignedData) => { if (uRef.current) { - uRef.current.batch((u: uPlot) => { - u.setData(deepClone(data)); - }); + uRef.current.setData(deepClone(data)); } }, []);