Stacked Histogram: Added ability to dynamically generate distinct terms