-
Notifications
You must be signed in to change notification settings - Fork 786
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
BarChart widget style inconsistencies #285
Comments
Has this not been merged into upstream yet? I am facing these exact inconsistencies three years later. Thanks. |
I would consider this library unsupported considering no major activity has occurred in the last 4 years. It's a shame considering the amount of people who use it. The author should reassign rights to the Github project if they are not going to maintain it in the long term. |
Yeah. Anyways, thanks for your fix and I am using your version in my project. Looks a lot better now.
So i am just falling back to using just the numbers to be displayed within the bar. It would be nice to show the symbol as well, but i will have to look into fixing it. Thanks for your fix. |
There are a couple
BarChart
UI inconsistencies I found when using this library.Issue 1
The percent text value always starts from the bar center position.
While this looks great when working with one character
Data
values (as pictured in the termui example) it looks awkward when dealing with long values since items greater thanBarWidth / 2
end up bleeding into the next bar. The position should be calculated based on the character length andBarWidth
size available.Issue 2
The bar is not completely rendered when
Data
values< 2%
exist. I'm not sure this is intentional but the chart should maintain consistent sizing in regard to the bar width even if the value is1%
or less.Before
After
I have created a PR that contains changes to resolve the issues above. The overall goal is to have these items fixed upstream so I don't have to include a modified version of the
barchart.go
file in my project source.The text was updated successfully, but these errors were encountered: