diff --git a/packages/desktop-client/src/components/reports/Overview.js b/packages/desktop-client/src/components/reports/Overview.js index ef5f70d4841..d2237ac4704 100644 --- a/packages/desktop-client/src/components/reports/Overview.js +++ b/packages/desktop-client/src/components/reports/Overview.js @@ -16,7 +16,7 @@ import View from '../common/View'; import PrivacyFilter from '../PrivacyFilter'; import Change from './Change'; -import chartTheme from './chart-theme'; +import { chartTheme } from './chart-theme'; import Container from './Container'; import DateRange from './DateRange'; import { simpleCashFlow } from './graphs/cash-flow-spreadsheet'; @@ -195,7 +195,7 @@ function CashFlowCard() { colorScale={[chartTheme.colors.blue, chartTheme.colors.red]} width={100} height={height} - theme={theme} + theme={chartTheme} domain={{ x: [0, 100], y: [0, Math.max(income, expense, 100)], diff --git a/packages/desktop-client/src/components/reports/chart-theme.js b/packages/desktop-client/src/components/reports/chart-theme.js index fa9407aa81d..b8e1c2bd9ef 100644 --- a/packages/desktop-client/src/components/reports/chart-theme.js +++ b/packages/desktop-client/src/components/reports/chart-theme.js @@ -41,7 +41,7 @@ const axisBaseStyles = { tickLabels: baseLabelStyles, }; -const chartTheme = { +export const chartTheme = { colors: { ...colorFades, red: theme.reportsRed, @@ -111,4 +111,3 @@ const chartTheme = { }, }, }; -export default chartTheme; diff --git a/packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx b/packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx index 972ee4248c7..51263a18a8e 100644 --- a/packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx @@ -11,7 +11,7 @@ import { } from 'victory'; import { theme } from '../../../style'; -import chartTheme from '../chart-theme'; +import { chartTheme } from '../chart-theme'; import Container from '../Container'; import Tooltip from '../Tooltip'; diff --git a/packages/desktop-client/src/components/reports/graphs/CategorySpendingGraph.tsx b/packages/desktop-client/src/components/reports/graphs/CategorySpendingGraph.tsx index 675cbde2f85..a74c5ebf7b5 100644 --- a/packages/desktop-client/src/components/reports/graphs/CategorySpendingGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/CategorySpendingGraph.tsx @@ -3,7 +3,7 @@ import type { CSSProperties } from 'react'; import * as d from 'date-fns'; import { VictoryAxis, VictoryBar, VictoryChart, VictoryStack } from 'victory'; -import theme from '../chart-theme'; +import { chartTheme } from '../chart-theme'; import Container from '../Container'; import Tooltip from '../Tooltip'; @@ -38,7 +38,7 @@ function CategorySpendingGraph({ {(width, height, portalHost) => ( diff --git a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx index fe7aa760efb..5c58527bd1a 100644 --- a/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx @@ -11,7 +11,7 @@ import { } from 'victory'; import { type CSSProperties } from '../../../style'; -import chartTheme from '../chart-theme'; +import { chartTheme } from '../chart-theme'; import Container from '../Container'; import Tooltip from '../Tooltip'; diff --git a/packages/desktop-client/src/components/reports/graphs/common.tsx b/packages/desktop-client/src/components/reports/graphs/common.tsx index c88ccd2327b..1c983ebdc5a 100644 --- a/packages/desktop-client/src/components/reports/graphs/common.tsx +++ b/packages/desktop-client/src/components/reports/graphs/common.tsx @@ -1,6 +1,6 @@ import * as d from 'date-fns'; -import theme from '../chart-theme'; +import { chartTheme } from '../chart-theme'; type AreaProps = { start: string; @@ -47,8 +47,8 @@ export function Area({ start, end, scale, range }: AreaProps) { x2={0} y2={zero} > - - + + - - + +