Rewrite the remaining chart functions into namespaced modules plus minor bug fix for the ticks.