js: moved code out of document.load event
dist: updated generated html
js: update chart when editing rows