changeDirection method

void changeDirection()

Changes the axis that the UI displays the graphs

Implementation

void changeDirection(){
  axis = !axis;
  notifyListeners();
}