Implement a stack layout helper for transforming data to a valid stack and passing down to an area or bar chart.