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

Three unnecessary blank lines #113

Open
KonerDev opened this issue Jun 22, 2024 · 0 comments
Open

Three unnecessary blank lines #113

KonerDev opened this issue Jun 22, 2024 · 0 comments

Comments

@KonerDev
Copy link

When printing this chart without categories, there are three blank lines above the actual chart. This doesn't look good and is simply unnecessary:

from termgraph.module import Data, BarChart, Args, Colors

data = Data([[10], [50], [80], [100]], ["Label 1", "Label 2", "Label 3", "Label 4"])
chart = BarChart(
    data,
    Args(
        colors=[Colors.Red],
        suffix="%",
    ),
)

chart.draw()
$ py test.py



Label 1: ▇▇▇▇▇ 10.00%
Label 2: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 50.00%
Label 3: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 80.00%
Label 4: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 100.00%
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

1 participant