Database connection and initial design of chart layout