Improvements to chart creation script