In htop 2 and higher [1], you can enable graph history mode by pressing the space bar twice to change meter style on the relevant meter in the setup (F2). It works for CPU, RAM, load, swap…
gtop [2] does that too for CPU, RAM and network
[1] https://github.com/hishamhm/htop [2] https://github.com/aksakalli/gtop