refactor chart.html