From 4caf20ca2533d15317c07b3c798c113ff124001c Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Thu, 19 Mar 2015 15:49:04 +0700 Subject: [PATCH] Dynamic SAC dot radius --- app/jsx/charts/sac/dot.jsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/jsx/charts/sac/dot.jsx b/app/jsx/charts/sac/dot.jsx index 7f3a9d4..f21efd1 100644 --- a/app/jsx/charts/sac/dot.jsx +++ b/app/jsx/charts/sac/dot.jsx @@ -1,8 +1,6 @@ var Dot = React.createClass({ mixins: [ChartAnimationMixin], - radius: 10, - getInitialState: function() { return {}; }, @@ -19,12 +17,21 @@ var Dot = React.createClass({ }, render: function() { + var radius, + val = ''+ this.props.value; + if (val.length === 1) { + radius = 8; + } else if (val.length === 2) { + radius = 9; + } else { + radius = 11; + } return ( + r={radius} />