gtktsc / ascii-chart Goto Github PK
View Code? Open in Web Editor NEWSimple ascii chart generator
License: MIT License
Simple ascii chart generator
License: MIT License
hello, really happy with the library. Really graet job.
One suggestion could be to automatically wrap the colors.
Meaning, if I provide 3 in the colors array, that if I also have 6 series, the series 4-6 would get the same colors as 1-3. Do something like 'colors % colors.lenth
My particular use case is that I don't necessarily know how many series I have at compile time, so to have colors, I'd need to do some computing magic, when I could just supply a few colors and they would get repeated.
Thanks again and let me know if what I suggested wasn't clear.
Currently the package works as expected in commonjs module
but with esm, we have to use it like below
import plot from 'simple-ascii-chart';
plot.default( // plot.default instead of plot
[
[1, 1],
[2, 4],
[3, 4],
[4, 2],
[5, -1],
[6, 3],
[7, -1],
[8, 9],
],
{ title: 'Important data', width: 20, height: 8 }
)
);
Hi @gtktsc ,
Great library. I would have a feature request. I would need to format the label differently. I have bigger number (mostly y-axis) which are between 0 - 1000000. The actual formatter can only return a number again (so divide the number is the way is use it, but it is confusion to read). It would be great to have a string based formatter that I can translate i.e. 10000 to 10K as label. Directly built in would also be fine.
Greetings
Michael
Hey, This is the best terminal ascii chart!
I had a small issues/question.
Current Output
I wanted something like this, not exact but few things like
Great library! I can't wait to see where this goes. Thank you for making it!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.