kroitor / asciichart

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

Small values all turns into 0s #65

Open JestDotty opened 3 years ago

JestDotty commented 3 years ago

reproducing:

const chart = require("asciichart")

const data = [
    [0, 0.1, 0.2, 0.3]
]
console.log('raw')
console.log(chart.plot(data))
console.log('turn into percents')
console.log(chart.plot(data.map(s=>s.map(v=>v*100 |0))))

output: image

hm, bit steep

suggestion/request: setting the step size (or better automatic detection)