update legends