Save charts in a database instead of separate files

File saving remains as an export feature