fix the layout chart.html also to handle scope