How to update x axis from data array

I think you might need to start using the draw callback for the graph and update the labels while the screen is being drawn.
Here is my research into this (works for 8.3 and 8.4)