From 8b331c0a638879dbbe289c5b6c5d470790081743 Mon Sep 17 00:00:00 2001 From: Norbi <37236152+KatunaNorbert@users.noreply.github.com> Date: Wed, 16 Mar 2022 17:35:31 +0200 Subject: [PATCH] Fix/issue 1151 pool chart fill color (#1193) * added colours for dark and light mode and refetch on appearance change * keep same border colour --- .../Asset/AssetActions/Pool/Graph/index.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/Asset/AssetActions/Pool/Graph/index.tsx b/src/components/Asset/AssetActions/Pool/Graph/index.tsx index 9e6524a83..f799edc45 100644 --- a/src/components/Asset/AssetActions/Pool/Graph/index.tsx +++ b/src/components/Asset/AssetActions/Pool/Graph/index.tsx @@ -85,11 +85,18 @@ export default function Graph({ const newGraphData = { labels: timestamps, - datasets: [{ ...lineStyle, data, borderColor: `#8b98a9` }] + datasets: [ + { + ...lineStyle, + data, + borderColor: `#8b98a9`, + backgroundColor: darkMode.value ? '#201f1f' : '#f7f7f7' + } + ] } setGraphData(newGraphData) LoggerInstance.log('[pool graph] New graph data created:', newGraphData) - }, [poolSnapshots, graphType, currency, prices, locale]) + }, [poolSnapshots, graphType, currency, prices, locale, darkMode.value]) return (