From 4b5e7e702d3b60509c519510dada1012d6615927 Mon Sep 17 00:00:00 2001 From: shaan Date: Sun, 15 Oct 2023 19:42:29 +0000 Subject: [PATCH] increase iterations, fix right text, and release notes --- .../src/components/reports/graphs/SankeyGraph.tsx | 7 ++++--- upcoming-release-notes/1739.md | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 upcoming-release-notes/1739.md diff --git a/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx b/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx index d2eaaa0bed3..89934ab5fa1 100644 --- a/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx @@ -22,8 +22,8 @@ const numberFormatterTooltip = (value: PotentialNumber): number | null => { return null; // or some default value for other cases }; -function SankeyNode({ x, y, width, height, index, payload, containerWidth }) { - const isOut = x + width + 6 > containerWidth; +function SankeyNode({ x, y, width, height, index, payload }) { + const isOut = x + width + 6 > width; let payloadValue = Math.round(payload.value / 1000).toString(); if (payload.value < 1000) { payloadValue = '<1k'; @@ -91,8 +91,9 @@ function SankeyGraph({ style, data, compact }: SankeyProps) { } + node={props => } sort={false} + iterations={1000} nodePadding={23} margin={{ left: 0, diff --git a/upcoming-release-notes/1739.md b/upcoming-release-notes/1739.md new file mode 100644 index 00000000000..e7b095813d0 --- /dev/null +++ b/upcoming-release-notes/1739.md @@ -0,0 +1,6 @@ +--- +category: Features +authors: [shaankhosla] +--- + +Added a Sankey chart report as an experimental feature. \ No newline at end of file