dynamic graph from db