refresh legend