-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add scale option #21
Comments
I'm not sure how much sense it would make to add any "computational" muscles to sparklines since you can always simply pass an alternative array of numbers. |
I just want it to scale the sparkline to 100, since it makes more sense when you're looking at multiple time-series if they all have the same scale :) |
Can you give an example, maybe, to illustrate more precisely? |
I have a script that outputs utilization information for databases. Here is the output, which I scale to help visualize the actual resource usage.
|
I see, thanks! But you still have only eight values (categories) per character (nine, if you would include blanks for 0), so it's nowhere as precise as the four digits in your percentage column, but well, that's the price to pay for ASCII. You could scale the numbers before sending them to sparklines, but that would be a challenge in something like bash, sure... Have you considered writing a little "adaptor" Python script doing this? It might be faster than getting the feature into sparklines, at least from my side, since I'm busy with lots of other things now. |
Would you consider a PR for adding a |
Sure! Just try to find a meaningful option name. And add a test, incl. Python 3! ;-) |
You can get the desired result by setting the |
@mkgs, heck, you're right! I should use my own stuff more often. ;-) $ sparklines 1 2 3 4 1 2 3 4
▁▃▆█▁▃▆█
$ sparklines -M 10 1 2 3 4 1 2 3 4
▁▂▃▃▁▂▃▃ |
Ah, looks like that exists, but isn't available in the current release? Would it be possible to make a release, as per #18? |
@josegonzalez I'd be happy to make a new release, but I usually wait for a few features to accumulate. In this case I think I'd like to see #9 and the newly created #24. |
hokay :) |
It would be great to be able to scale a series against a number. At the moment, I am adding a number to the end of the set, which makes everything scale against it, but also includes that number in the output.
The text was updated successfully, but these errors were encountered: