Browse Source

Fix padding of legend when x axis hidden - #582

pull/631/head
Masayuki Tanaka 10 years ago
parent
commit
f913da19af
  1. 2
      c3.js
  2. 2
      c3.min.js
  3. 2
      src/size.js

2
c3.js

@ -2421,7 +2421,7 @@
};
c3_chart_internal_fn.getHorizontalAxisHeight = function (axisId) {
var $$ = this, config = $$.config;
if (axisId === 'x' && !config.axis_x_show) { return 0; }
if (axisId === 'x' && !config.axis_x_show) { return 8; }
if (axisId === 'x' && config.axis_x_height) { return config.axis_x_height; }
if (axisId === 'y' && !config.axis_y_show) { return config.legend_show && !$$.isLegendRight && !$$.isLegendInset ? 10 : 1; }
if (axisId === 'y2' && !config.axis_y2_show) { return $$.rotated_padding_top; }

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

2
src/size.js

@ -75,7 +75,7 @@ c3_chart_internal_fn.getAxisWidthByAxisId = function (id) {
};
c3_chart_internal_fn.getHorizontalAxisHeight = function (axisId) {
var $$ = this, config = $$.config;
if (axisId === 'x' && !config.axis_x_show) { return 0; }
if (axisId === 'x' && !config.axis_x_show) { return 8; }
if (axisId === 'x' && config.axis_x_height) { return config.axis_x_height; }
if (axisId === 'y' && !config.axis_y_show) { return config.legend_show && !$$.isLegendRight && !$$.isLegendInset ? 10 : 1; }
if (axisId === 'y2' && !config.axis_y2_show) { return $$.rotated_padding_top; }

Loading…
Cancel
Save