termgraph icon indicating copy to clipboard operation
termgraph copied to clipboard

Three unnecessary blank lines

Open KonerDev opened this issue 8 months ago • 0 comments

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%

KonerDev avatar Jun 22 '24 19:06 KonerDev