Browse Source

Show 'outer' psitioned axis label even if legend is hidden - #788

pull/807/head
Masayuki Tanaka 10 years ago
parent
commit
f593343375
  1. 3
      c3.js
  2. 2
      c3.min.js
  3. 3
      src/clip.js

3
c3.js

@ -4410,7 +4410,8 @@
return forHorizontal ? $$.width + 2 + left + right : $$.margin.left + 20;
};
c3_chart_internal_fn.getAxisClipHeight = function (forHorizontal) {
return (forHorizontal ? this.margin.bottom : (this.margin.top + this.height)) + 8;
// less than 20 is not enough to show the axis label 'outer' without legend
return (forHorizontal ? this.margin.bottom : (this.margin.top + this.height)) + 20;
};
c3_chart_internal_fn.getXAxisClipWidth = function () {
var $$ = this;

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

3
src/clip.js

@ -37,7 +37,8 @@ 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.margin.top + this.height)) + 8;
// less than 20 is not enough to show the axis label 'outer' without legend
return (forHorizontal ? this.margin.bottom : (this.margin.top + this.height)) + 20;
};
c3_chart_internal_fn.getXAxisClipWidth = function () {
var $$ = this;

Loading…
Cancel
Save