Update main.js

Graph update based on x and/or y axis changes done