mkaz/termgraph

Overwrite labels

Opened this issue ยท 1 comments

nbara commented

Hi, thanks a ton for this nifty package !

It'd be useful if we could overwrite the individual bar labels.

echo "Label,3,9,1" | termgraph --custom-tick "๐Ÿ˜€" --no-label  --row-values {three, nine, whatever}

Would output:

๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€ three
๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€ nine
๐Ÿ˜€ whatever

Alternatively, one could provide custom suffixes for each row (currently one can only append a single suffix to all rows).

This would be doubly cool if there was a way to automatically convert the labels into human readable format. EG: 13659757713600 bytes shows a label like 13.6T