I'm trying to plot the three load averages from /proc/loadavg in Linux via the NewPlot() method. The rendering works fine as long as the three plots are inside the intial area set by the SetRect() method. Once the plot lines go beyond that, the x-axis stops updating, i.e. I don't see the incoming data points being plotted inside the widget, the y-axis still updates though. I'm pretty sure this is not a bug but some issue with my code, grateful for any help.
I'm trying to plot the three load averages from
/proc/loadavg
in Linux via theNewPlot()
method. The rendering works fine as long as the three plots are inside the intial area set by theSetRect()
method. Once the plot lines go beyond that, the x-axis stops updating, i.e. I don't see the incoming data points being plotted inside the widget, the y-axis still updates though. I'm pretty sure this is not a bug but some issue with my code, grateful for any help.Here's my code: https://gist.github.com/tjskrp/ea3020cfbc039db9974811922a987266
go version go1.12.1 linux/amd64