legend chart, view controller implemented