From 8d095d1bb3c4d26894903b8af5bf1cfc0e62afe1 Mon Sep 17 00:00:00 2001 From: Alex P Date: Thu, 8 Feb 2018 11:12:19 -0800 Subject: [PATCH] Connect line graph prefix and suffix to child single stat --- ui/src/shared/components/LineGraph.js | 10 ++++++++++ ui/src/shared/components/SingleStat.js | 3 +++ 2 files changed, 13 insertions(+) diff --git a/ui/src/shared/components/LineGraph.js b/ui/src/shared/components/LineGraph.js index 58f063445c..9650a773c6 100644 --- a/ui/src/shared/components/LineGraph.js +++ b/ui/src/shared/components/LineGraph.js @@ -84,6 +84,14 @@ class LineGraph extends Component { ? SINGLE_STAT_LINE_COLORS : overrideLineColors + let prefix + let suffix + + if (axes) { + prefix = axes.y.prefix + suffix = axes.y.suffix + } + return (
{isRefreshing ? : null} @@ -108,6 +116,8 @@ class LineGraph extends Component { /> {showSingleStat ? + {prefix} {roundedValue} {suffix} {lineGraph &&
} @@ -98,6 +100,7 @@ SingleStat.propTypes = { value: string.isRequired, }).isRequired ), + prefix: string, suffix: string, lineGraph: bool, }