Dropdown and visualization works at the same time
refactored js code
Refactoring and selectable metrics