Switch graph/table format on button press