added stackHist legend support