From b0dc4d78640ef90ff9968351da1e380df2b0b508 Mon Sep 17 00:00:00 2001 From: Cmdr McDonald Date: Fri, 24 Mar 2017 12:04:41 +0000 Subject: [PATCH] Shirnk large labels on vertical bar chart --- src/app/components/VerticalBarChart.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/components/VerticalBarChart.jsx b/src/app/components/VerticalBarChart.jsx index b8a709cf..1f2ecb94 100644 --- a/src/app/components/VerticalBarChart.jsx +++ b/src/app/components/VerticalBarChart.jsx @@ -98,8 +98,10 @@ const ValueLabel = React.createClass({ render() { const { x, y, payload, value } = this.props; + const em = value < 1000 ? '1em' : value < 1000 ? '0.8em' : '0.7em'; + return ( - {value} + {value} ); } });