chart: Continue refactoring

- Renamed some functions, variables and options.
- Requests now use promises.
- Series toggles now work.
- Added useful IDs to each series.