From 37a3017c7f21fd2c9b0a539cdbd46be2bc7091b3 Mon Sep 17 00:00:00 2001 From: Aditya Balwani Date: Tue, 4 Oct 2016 00:14:14 -0400 Subject: [PATCH 1/4] Added wrapping for axis tick labels --- src/common/axes/AxisTicks.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/axes/AxisTicks.jsx b/src/common/axes/AxisTicks.jsx index f6ccd0e..bec67fe 100644 --- a/src/common/axes/AxisTicks.jsx +++ b/src/common/axes/AxisTicks.jsx @@ -221,7 +221,11 @@ module.exports = React.createClass({ textAnchor={textAnchor} {...optionalTextProps} > - {tickFormat(tick)} + {tickFormat(tick).split('\n').map((tickLabel, index) => ( + + {tickLabel} + + ))} )) From 9e42b69b52d2121b8a7fb65b0c0956c9f757e252 Mon Sep 17 00:00:00 2001 From: Aditya Balwani Date: Tue, 4 Oct 2016 00:24:35 -0400 Subject: [PATCH 2/4] Fixed issues with previous commit breaking y-axis tick label alignment --- src/common/axes/AxisTicks.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/axes/AxisTicks.jsx b/src/common/axes/AxisTicks.jsx index bec67fe..06e1570 100644 --- a/src/common/axes/AxisTicks.jsx +++ b/src/common/axes/AxisTicks.jsx @@ -222,7 +222,7 @@ module.exports = React.createClass({ {...optionalTextProps} > {tickFormat(tick).split('\n').map((tickLabel, index) => ( - + {tickLabel} ))} From ea16702319ba25684a454aade0f23a703fbdfbf3 Mon Sep 17 00:00:00 2001 From: Aditya Balwani Date: Fri, 7 Oct 2016 00:31:45 -0400 Subject: [PATCH 3/4] Fixed another alignment issue --- src/common/axes/AxisTicks.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/axes/AxisTicks.jsx b/src/common/axes/AxisTicks.jsx index 06e1570..a07b6dd 100644 --- a/src/common/axes/AxisTicks.jsx +++ b/src/common/axes/AxisTicks.jsx @@ -222,7 +222,7 @@ module.exports = React.createClass({ {...optionalTextProps} > {tickFormat(tick).split('\n').map((tickLabel, index) => ( - + {tickLabel} ))} From 4286f64f2a36515ae8400e17abe82a88834e6811 Mon Sep 17 00:00:00 2001 From: Aditya Balwani Date: Fri, 7 Oct 2016 00:40:41 -0400 Subject: [PATCH 4/4] Fixes for failing tests --- src/common/axes/AxisTicks.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/axes/AxisTicks.jsx b/src/common/axes/AxisTicks.jsx index a07b6dd..c10701c 100644 --- a/src/common/axes/AxisTicks.jsx +++ b/src/common/axes/AxisTicks.jsx @@ -221,8 +221,8 @@ module.exports = React.createClass({ textAnchor={textAnchor} {...optionalTextProps} > - {tickFormat(tick).split('\n').map((tickLabel, index) => ( - + {`${tickFormat(tick)}`.split('\n').map((tickLabel) => ( + {tickLabel} ))}