seriesArray is generated with locally scoped vars