From 7f744f816120b03aff83555e95f455dbd68a2889 Mon Sep 17 00:00:00 2001 From: jasonwr Date: Thu, 15 Jun 2023 23:06:32 -0600 Subject: [PATCH 1/2] Update display value whenever the data prop changes. Signed-off-by: jasonwr --- src/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 58cda02..edf4f59 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -228,6 +228,10 @@ export const DonutChart = ({ }).start(); }, []); + useEffect(() => { + setDisplayValue(data[0]); + }, [data]); + const onUpdateDisplayValue = (value: DonutItem, index: number) => { setDisplayValue(value); animateOpacity.setValue(0); From 3831fd0b53060855a7fba50afa8d7d9348bcf72c Mon Sep 17 00:00:00 2001 From: jasonwr Date: Mon, 19 Jun 2023 10:10:14 -0600 Subject: [PATCH 2/2] Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1e3e8be..ded36b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-circular-chart", - "version": "1.0.9", + "version": "1.1.0", "description": "circular chart for react-native.", "main": "index.js", "module": "index.js",