gizak / termui

Golang terminal dashboard
MIT License
13.06k stars 783 forks source link

custom axis formatters on plot #297

Open carlverge opened 3 years ago

carlverge commented 3 years ago

This adds options on Plots for custom formatting on X and Y axis labels. Example use-cases include timestamp formatters on the X axis, and percentage / bps formatters on the Y axis.

avivhaber commented 3 years ago

In the current code, it looks like 0 is hardcoded to be the first value on the x-axis. Code here. We should call XAxisFmter(0) in that spot to replace it

dcorbe commented 2 years ago

Hello!

Thank you for contributing to termui. I've merged this PR into a downstream fork at https://github.com/dcorbe/termui-dpc

This was done in response to the following issue: #304 (comment)

My intention is not to create a permanent fork for termui. I'm only trying to facilitate maintenance while the original author(s) are away. My hope is that my fork is eventually merged back into this repo along with your commits.

I would like to invite you to collaborate further. I would appreciate any help curating fixes and generally getting this project going in the right direction. Thanks again for your contribution!