Fix graph and change to get data of database to energy and market only