Update chart1.html

Re-factored code to improve usability. Parametrized inputs with purpose to use later as plugin.