From 9154fe7e8554c8029bc9912149c9e6c5a79308d5 Mon Sep 17 00:00:00 2001 From: JakeSidSmith Date: Thu, 1 May 2014 15:42:20 +0100 Subject: [PATCH] Blergh --- c3.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/c3.js b/c3.js index 7e939a3..fcb4a4c 100644 --- a/c3.js +++ b/c3.js @@ -332,7 +332,12 @@ main : function () { return "translate(" + margin.left + "," + margin.top + ")"; }, context : function () { return "translate(" + margin2.left + "," + margin2.top + ")"; }, legend : function () { return "translate(" + margin3.left + "," + margin3.top + ")"; }, - x : function () { return "translate(0," + (__axis_rotated ? 0 : currentHeight - margin.bottom) + ")"; }, + x : function () { + if (__legend_show) { + return "translate(0," + (__axis_rotated ? 0 : height) + ")"; + } + return "translate(0," + (__axis_rotated ? 0 : currentHeight - margin.top) + ")"; + }, y : function () { return "translate(0," + (__axis_rotated ? height : 0) + ")"; }, y2 : function () { return "translate(" + (__axis_rotated ? 0 : width) + "," + (__axis_rotated ? 1 : 0) + ")"; }, subx : function () { return "translate(0," + (__axis_rotated ? 0 : height2) + ")"; },