Comparing version 0.2.0 to 0.2.2
@@ -157,6 +157,6 @@ // Generated by CoffeeScript 1.6.3 | ||
_ref = minMaxBkt(bkt), min = _ref.min, max = _ref.max; | ||
if (maxY) { | ||
if (maxY != null) { | ||
max = maxY; | ||
} | ||
if (minY) { | ||
if (minY != null) { | ||
min = minY; | ||
@@ -166,3 +166,3 @@ } | ||
return { | ||
bkt: normalizeBkt(bkt, min, diff, h), | ||
bkt: normalizeBkt(bkt, min, diff, h - 1), | ||
min: min, | ||
@@ -184,12 +184,12 @@ max: max, | ||
_ref5 = pointsMinMaxUniqueX(points), minX = _ref5.minX, maxX = _ref5.maxX, minY = _ref5.minY, maxY = _ref5.maxY, uniqueX = _ref5.uniqueX; | ||
if (options.minX) { | ||
if (options.minX != null) { | ||
minX = options.minX; | ||
} | ||
if (options.maxX) { | ||
if (options.maxX != null) { | ||
maxX = options.maxX; | ||
} | ||
if (options.minY) { | ||
if (options.minY != null) { | ||
minY = options.minY; | ||
} | ||
if (options.maxY) { | ||
if (options.maxY != null) { | ||
maxY = options.maxY; | ||
@@ -204,4 +204,4 @@ } | ||
width -= lblYW; | ||
numBkts = Math.min(uniqueX, width - lblYW); | ||
bktW = Math.floor((width - lblYW) / numBkts); | ||
numBkts = Math.min(uniqueX, width); | ||
bktW = Math.floor(width / numBkts); | ||
if (xFractions == null) { | ||
@@ -223,3 +223,3 @@ xFractions = minMax(0, 8, Math.log(numBkts / diffX * 5) / Math.LN10); | ||
lblXI = 1; | ||
while (lblXN * lblXW >= numBkts * bktW) { | ||
while ((lblXN + 1) * lblXW >= numBkts * bktW) { | ||
lblXN = Math.floor(lblXN / 2); | ||
@@ -226,0 +226,0 @@ lblXI *= 2; |
{ | ||
"name": "babar", | ||
"version": "0.2.0", | ||
"version": "0.2.2", | ||
"description": "CLI bar charts", | ||
@@ -5,0 +5,0 @@ "main": "lib/babar.js", |
@@ -65,2 +65,3 @@ # Babar | ||
* **color="cyan"**: specify a color ('yellow', 'cyan', 'white', 'magenta', 'green', 'red', 'grey', 'blue', or 'ascii') | ||
* **grid="black"**: specify a color ('yellow', 'cyan', 'white', 'magenta', 'green', 'red', 'grey', 'blue') | ||
* **width=80**: output will fit in specified width | ||
@@ -67,0 +68,0 @@ * **height=15**: output will fit in specified height |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30883
283
99
1