Skip to content

Commit

Permalink
maybe the most we should do for #187
Browse files Browse the repository at this point in the history
  • Loading branch information
yanofsky committed Mar 14, 2016
1 parent c0848b4 commit fa5b425
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/js/charts/cb-xy/xy-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var display = {
},
margin: {
top: "0.8em",
right: "0.25em",
right: "1.25em",
bottom: "0.15em",
left: "0.25em"
},
Expand Down
7 changes: 4 additions & 3 deletions src/js/components/chart-xy/XYRenderer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fa5b425

Please sign in to comment.