Cleaning data, updating scales and configuring tooltip