Skip to content

Commit

Permalink
Apply code review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
jcsmorais committed May 15, 2018
1 parent a6f2674 commit dbb9d9e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions spec/axis-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,13 +542,11 @@ describe('c3 chart axis', function () {
});
});

describe('with multiline.max', function() {
describe('with multilineMax', function() {
beforeAll(function() {
args.axis.x.tick = {
multiline: {
enabled: true,
max: 2,
}
multiline: true,
multilineMax: 2,
};
});

Expand Down
4 changes: 2 additions & 2 deletions src/axis.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ c3_axis_fn.getXAxis = function getXAxis(scale, orient, tickFormat, tickValues, w
axisParams = {
isCategory: $$.isCategorized(),
withOuterTick: withOuterTick,
tickMultiline: typeof config.axis_x_tick_multiline === 'object' ? Boolean(config.axis_x_tick_multiline.enabled) : config.axis_x_tick_multiline,
tickMultilineMax: typeof config.axis_x_tick_multiline === 'object' ? Number(config.axis_x_tick_multiline.max) : 0,
tickMultiline: config.axis_x_tick_multiline,
tickMultilineMax: config.axis_x_tick_multiline ? Number(config.axis_x_tick_multilineMax) : 0,
tickWidth: config.axis_x_tick_width,
tickTextRotate: withoutRotateTickText ? 0 : config.axis_x_tick_rotate,
withoutTransition: withoutTransition,
Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ c3_chart_internal_fn.getDefaultConfig = function () {
axis_x_tick_rotate: 0,
axis_x_tick_outer: true,
axis_x_tick_multiline: true,
axis_x_tick_multiline_max: 0,
axis_x_tick_multilineMax: 0,
axis_x_tick_width: null,
axis_x_max: undefined,
axis_x_min: undefined,
Expand Down

0 comments on commit dbb9d9e

Please sign in to comment.