add chart
modify sql to postgre
modify sqlite to postgre
fix layout issue