Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/js/parts/Chart.js b/js/parts/Chart.js
- index 915ebca..5ab8428 100644
- --- a/js/parts/Chart.js
- +++ b/js/parts/Chart.js
- @@ -1219,6 +1219,14 @@
- x = pInt(style.left) + chart.plotLeft,
- y = pInt(style.top) + chart.plotTop + 12;
- + if(typeof style.left === 'string' && style.left.indexOf('%') !== -1){
- + x = style.left;
- + }
- +
- + if(typeof style.top === 'string' && style.top.indexOf('%') !== -1){
- + y = style.top;
- + }
- +
- // delete to prevent rewriting in IE
- delete style.left;
- delete style.top;
- diff --git a/js/parts/SvgRenderer.js b/js/parts/SvgRenderer.js
- index 49e95e8..a208b30 100644
- --- a/js/parts/SvgRenderer.js
- +++ b/js/parts/SvgRenderer.js
- @@ -1929,9 +1929,12 @@
- return renderer.html(str, x, y);
- }
- - x = mathRound(pick(x, 0));
- - y = mathRound(pick(y, 0));
- -
- +- if(!(typeof x === 'string' && x.indexOf('%') !== -1)){
- + x = mathRound(pick(x, 0));
- + }
- +- if(!(typeof y === 'string' && y.indexOf('%') !== -1)){
- + y = mathRound(pick(y, 0));
- + }
- wrapper = renderer.createElement('text')
- .attr({
- x: x,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement