Fix auto scale domain on stacked plot.

It uses stacked logic in metadata.

Close #1340.