Move stacking to metadata and don't modify data.

Close #868.
NBD I like putting a space between the cast and the variable like 
<StackedPlotMetadata> super._getPlotMetadataForDataset(key);