fix legend w/ 'expand' mode which fails for a single item.
add test for legend w/ expand mode
Merge pull request #1864 from leejjoon/fix-legend-expand

fix legend w/ 'expand' mode which fails for a single item.