Problem with chart

Sometimes chart won't load unless you refresh
Make the refresh button work