Value and time from databes to plot