diff --git a/src/config.js b/src/config.js index 6899cbd3a..1759728f7 100644 --- a/src/config.js +++ b/src/config.js @@ -111,6 +111,7 @@ c3_chart_internal_fn.getDefaultConfig = function () { axis_x_height: undefined, axis_x_extent: undefined, axis_x_label: {}, + axis_y_width: undefined, axis_y_show: true, axis_y_type: undefined, axis_y_max: undefined, @@ -121,7 +122,7 @@ c3_chart_internal_fn.getDefaultConfig = function () { axis_y_label: {}, axis_y_tick_format: undefined, axis_y_tick_outer: true, - axis_y_tick_values: null, + axis_y_tick_values: null, axis_y_tick_rotate: 0, axis_y_tick_count: undefined, axis_y_tick_time_value: undefined, diff --git a/src/size.js b/src/size.js index 445d11d33..9fdc2d010 100644 --- a/src/size.js +++ b/src/size.js @@ -88,8 +88,12 @@ c3_chart_internal_fn.getSvgLeft = function (withoutRecompute) { c3_chart_internal_fn.getAxisWidthByAxisId = function (id, withoutRecompute) { - var $$ = this, position = $$.axis.getLabelPositionById(id); - return $$.axis.getMaxTickWidth(id, withoutRecompute) + (position.isInner ? 20 : 40); + var $$ = this, position = $$.axis.getLabelPositionById(id), config = $$.config; + if(config.axis_y_width !== undefined) { + return config.axis_y_width + (position.isInner ? 20 : 40); + } else { + return $$.axis.getMaxTickWidth(id, withoutRecompute) + (position.isInner ? 20 : 40); + } }; c3_chart_internal_fn.getHorizontalAxisHeight = function (axisId) { var $$ = this, config = $$.config, h = 30;