kroitor / asciichart

Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies
MIT License
1.87k stars 94 forks source link

Fix label padding for large numbers #4

Open brdu opened 6 years ago

brdu commented 6 years ago

Add this code to test.js to reproduce

var s3 = []
for (var i = 0; i < width; i++)
    s3[i] = (2000 * Math.cos (i * ((Math.PI * 8) / width))) + 10000 // values range from 9000 to 11000
console.log (asciichart.plot (s3, { height: 10, width: 60 }))
coveralls commented 6 years ago

Coverage Status

Coverage decreased (-3.2%) to 96.774% when pulling c1aef00f1b8fb8f6999c1760aeab9fddc0cf5ebd on brdu:bd_fix_labels into be5de292822a899dc3b2cdcbad689c42625ecd51 on kroitor:master.

kroitor commented 6 years ago

Thank you very much for this commit! I'll merge it asap!