TMDM-7434: init impl for storing/retriving chart setting from db and code refactoring/cleanups

bugs(-not incremental update autoOnOffs and chart settings) need to be fixed