Setting up chart for-loops