From fa5b4252c8820345a0a9896a4bf4eef89049efb0 Mon Sep 17 00:00:00 2001 From: yanofsky Date: Mon, 14 Mar 2016 16:16:29 -0700 Subject: [PATCH] maybe the most we should do for #187 --- src/js/charts/cb-xy/xy-config.js | 2 +- src/js/components/chart-xy/XYRenderer.jsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/js/charts/cb-xy/xy-config.js b/src/js/charts/cb-xy/xy-config.js index 956efa1d..be01870f 100644 --- a/src/js/charts/cb-xy/xy-config.js +++ b/src/js/charts/cb-xy/xy-config.js @@ -49,7 +49,7 @@ var display = { }, margin: { top: "0.8em", - right: "0.25em", + right: "1.25em", bottom: "0.15em", left: "0.25em" }, diff --git a/src/js/components/chart-xy/XYRenderer.jsx b/src/js/components/chart-xy/XYRenderer.jsx index 10f64e8f..56861e6b 100644 --- a/src/js/components/chart-xy/XYRenderer.jsx +++ b/src/js/components/chart-xy/XYRenderer.jsx @@ -671,9 +671,10 @@ var xy_render_options = { var width = bcr.width; var x = parseFloat(textNode.getAttribute("x")); var newX = x; - if (width + (-x) > chart.width - 12) { - newX = width - chart.width + chart.margin.left + 12; - maxTickText.attr("x", newX); + if(locationKey.primary == "left") { + if (width + (-x) > chart.width - 12) { + newX = width - chart.width + chart.margin.left + 12; + } } maxTick.select("rect").attr({ x: newX - width,