From 1ee66a900ae7ac5a937bd22ba1d02cafc2bd2ce6 Mon Sep 17 00:00:00 2001 From: Maurice Dalderup Date: Sun, 13 Jan 2019 15:31:34 +0100 Subject: [PATCH 1/3] chore(chart): update threshold --- .../BreakdownChart/BreakdownChart.js | 21 ++++++++++++------- .../Breakdown/SectionLabel/SectionLabel.js | 17 +++++++++++++-- static/splash.html | 2 +- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/renderer/account/components/AccountPanel/Breakdown/BreakdownChart/BreakdownChart.js b/src/renderer/account/components/AccountPanel/Breakdown/BreakdownChart/BreakdownChart.js index 2f8a9022f..e40240265 100644 --- a/src/renderer/account/components/AccountPanel/Breakdown/BreakdownChart/BreakdownChart.js +++ b/src/renderer/account/components/AccountPanel/Breakdown/BreakdownChart/BreakdownChart.js @@ -31,7 +31,10 @@ export default class BreakdownChart extends React.PureComponent { const data = this.getData(); return ( - + { return formatCurrency(value, this.props.currency); - } + }; } diff --git a/src/renderer/account/components/AccountPanel/Breakdown/SectionLabel/SectionLabel.js b/src/renderer/account/components/AccountPanel/Breakdown/SectionLabel/SectionLabel.js index c2bd52de1..7419d1f74 100644 --- a/src/renderer/account/components/AccountPanel/Breakdown/SectionLabel/SectionLabel.js +++ b/src/renderer/account/components/AccountPanel/Breakdown/SectionLabel/SectionLabel.js @@ -7,14 +7,27 @@ import styles from './SectionLabel.scss'; const RADIAN = Math.PI / 180; export default function SectionLabel(props) { - const { cx, cy, midAngle, outerRadius, percent, payload: { label } } = props; + const { + cx, + cy, + midAngle, + outerRadius, + percent, + payload: { label } + } = props; const radius = outerRadius + 25; const x = cx + radius * Math.cos(-midAngle * RADIAN); const y = cy + radius * Math.sin(-midAngle * RADIAN); return ( - + {`${(percent * 100).toFixed(0)}%`} diff --git a/static/splash.html b/static/splash.html index f15414c91..bcf5f44f0 100644 --- a/static/splash.html +++ b/static/splash.html @@ -22,7 +22,7 @@