Browse Source

Fix x domain when only 1 data on category axis - #201

pull/213/merge
Masayuki Tanaka 11 years ago
parent
commit
ccfb296320
  1. 2
      c3.js
  2. 2
      c3.min.js

2
c3.js

@ -1345,7 +1345,7 @@
padding = getXDomainPadding(targets),
min = 0, max = 0;
// show center of x domain if min and max are the same
if ((firstX - lastX) === 0) {
if ((firstX - lastX) === 0 && !isCategorized) {
firstX = isTimeSeries ? new Date(firstX.getTime() * 0.5) : -0.5;
lastX = isTimeSeries ? new Date(lastX.getTime() * 1.5) : 0.5;
}

2
c3.min.js vendored

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