add logic to handle displaying visualization in small devices