mkaz / termgraph

a python command-line tool which draws basic graphs in the terminal
MIT License
3.15k stars 164 forks source link

disabling "cvt_to_readable" #98

Open ManiAm opened 2 years ago

ManiAm commented 2 years ago

Is there any ways to disable "cvt_to_readable": Return the number in a human readable format

It produces wrong numbers,

    args = {
        "stacked": False,
        "width": 50,
        "no_labels": False,
        "format": "{:>5.2f}",
        "suffix": " minutes",
        "vertical": False,
        "histogram": False,
        "no_values": False,
        "different_scale": False
    }

    chart(colors=[TERM_GRAPH_AVAILABLE_COLORS['blue']],
          data=data,
          args=args,
          labels=labels)

2022-07-09_0-27-22

where data is:

[ [0.42475755214691163], [0.1093926469484965], [0.04674157698949178], [0.031145751476287842], ]

gennaro-tedesco commented 2 years ago

I am having the same problem: essentially I have a file containing high precision numbers with many decimal places, and although the graph works correctly, the labels do not really show the numbers (or approximations thereof), rather conversions of them into some unit (as shown in the above screenshot).

I tried to specify the --format explicitly, but that only takes care of how many decimal places to carry with, leaving the display unit as they are.

This said, awesome library!

pelillian commented 2 years ago

+1 to this, would be very useful!