Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New features #3

Open
arkihillel opened this issue Oct 20, 2017 · 6 comments
Open

New features #3

arkihillel opened this issue Oct 20, 2017 · 6 comments
Assignees

Comments

@arkihillel
Copy link

I like this simple, easy to use package that I use for node statistic clis.
I'm missing some nice to have options though:

Multiple series
Ability to see more than one series on the same chart

Colors
Ability to affect colors to lines. npm's colors may be used there

Max width
Some charts can be way larger than a terminal. Detecting the terminal length and sub-setting the series sent may be a good way to tackle this issue

@kroitor kroitor self-assigned this Oct 20, 2017
@kroitor
Copy link
Owner

kroitor commented Oct 20, 2017

Hi, @arkihillel !

Thanks for your feedback!

Multiple series
Colors

These two points I'm going to do hopefully soon (need a few days free of other tasks to do it).
Also, I highly recommend you to take a look at these awesome packages by @xpl:

Max width

This cannot be done robustly for all terminals, so it's a little beyond the scope of this small library (I'm trying to keep it simple). But I did use the ansicolor and blessed together with asciichart to render a dashboard and a chart inside it, like this one:

preview

You can use any curses-like library to do the same. Alignment, center, full-width, full-height, etc... So blessed takes care of that, and can crop or scroll the "inside" content according to your rules. It also detects resizes, mouse events and much more. Hope this answers your questions.

@joergd
Copy link

joergd commented Dec 18, 2017

Yes - multiple series (with different colours) would be tops!!

@theBliz
Copy link

theBliz commented Jan 23, 2020

@kroitor I'm using this package (awesome, thank you!) and would like to try having 2 lines in the same chart. I ended up looking at the packages you suggested but didn't understand how to use them for this purpose. Can you elaborate, please?

@kroitor
Copy link
Owner

kroitor commented Jan 23, 2020

@theBliz it's a bit tricky, since drawing two lines requires changing the algorithm a bit, to find proper min/max values. After that you can plot each line separately using the same min/max range and then merge the two chart layers one over another skipping the whitespaces for top layer "opacity". I hope to add that functionality to the lib soon.

@el3ment
Copy link

el3ment commented Apr 15, 2020

+1 vote for the multi-line chart! Adding color would also be pretty neat.

@crbyxwpzfl

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants