Browse Source

Modify config logic

pull/200/merge
Masayuki Tanaka 11 years ago
parent
commit
d5181f1db7
  1. 4
      c3.js
  2. 2
      c3.min.js

4
c3.js

@ -91,7 +91,7 @@
// Check next key's value // Check next key's value
isLast = (i === keys.length - 1); isLast = (i === keys.length - 1);
nextTarget = target[keys[i]]; nextTarget = target[keys[i]];
if ((!isLast && typeof nextTarget !== 'object') || (isLast && typeof defaultValue !== 'object' && typeof nextTarget === 'object' && nextTarget !== null)) { if (!isLast && typeof nextTarget !== 'object') {
return defaultValue; return defaultValue;
} }
target = nextTarget; target = nextTarget;
@ -2048,7 +2048,7 @@
}; };
} }
function getBarW(axis, barTargetsNum) { function getBarW(axis, barTargetsNum) {
return __bar_width ? __bar_width : barTargetsNum ? (axis.tickOffset() * 2 * __bar_width_ratio) / barTargetsNum : 0; return typeof __bar_width === 'number' ? __bar_width : barTargetsNum ? (axis.tickOffset() * 2 * __bar_width_ratio) / barTargetsNum : 0;
} }
//-- Type --// //-- Type --//

2
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save