Moved chart creation code into a separate module.