I see, so someone can do a stacked and a compact chart, yes the case will only do one or the other.

You could do the same as before:

stacked = '.mc-stacked' if $1.include? 'stacked'
compact = '.compact' if $1.include? 'compact'
negative = '.mc-negative' if $1.include? 'negative'

[
  '{:',
  '.js-barchart-table', 
  stacked, 
  compact, 
  negative, 
  '.left-key', 
  '.mc-auto-outdent',
  '}'
].join(' ')