Browse Source

Fix clip path for vertical axis - #718

pull/729/head
Masayuki Tanaka 10 years ago
parent
commit
12f7c8166e
  1. 4
      c3.js
  2. 2
      c3.min.js
  3. 4
      src/clip.js

4
c3.js

@ -4328,7 +4328,7 @@
return forHorizontal ? -(1 + left) : -(left - 1);
};
c3_chart_internal_fn.getAxisClipY = function (forHorizontal) {
return forHorizontal ? -20 : -4;
return forHorizontal ? -20 : -this.margin.top;
};
c3_chart_internal_fn.getXAxisClipX = function () {
var $$ = this;
@ -4354,7 +4354,7 @@
return forHorizontal ? $$.width + 2 + left + right : $$.margin.left + 20;
};
c3_chart_internal_fn.getAxisClipHeight = function (forHorizontal) {
return (forHorizontal ? this.margin.bottom : this.height) + 8;
return (forHorizontal ? this.margin.bottom : (this.margin.top + this.height)) + 8;
};
c3_chart_internal_fn.getXAxisClipWidth = function () {
var $$ = this;

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

4
src/clip.js

@ -11,7 +11,7 @@ c3_chart_internal_fn.getAxisClipX = function (forHorizontal) {
return forHorizontal ? -(1 + left) : -(left - 1);
};
c3_chart_internal_fn.getAxisClipY = function (forHorizontal) {
return forHorizontal ? -20 : -4;
return forHorizontal ? -20 : -this.margin.top;
};
c3_chart_internal_fn.getXAxisClipX = function () {
var $$ = this;
@ -37,7 +37,7 @@ c3_chart_internal_fn.getAxisClipWidth = function (forHorizontal) {
return forHorizontal ? $$.width + 2 + left + right : $$.margin.left + 20;
};
c3_chart_internal_fn.getAxisClipHeight = function (forHorizontal) {
return (forHorizontal ? this.margin.bottom : this.height) + 8;
return (forHorizontal ? this.margin.bottom : (this.margin.top + this.height)) + 8;
};
c3_chart_internal_fn.getXAxisClipWidth = function () {
var $$ = this;

Loading…
Cancel
Save