update diagram legend