The ratio of the number of burgers with onions to the total number of burgers can be calculated as follows:
Number of burgers with onions = 8
Number of burgers without onions = 6
Total number of burgers = 8 (with onions) + 6 (without onions) = 14
So, the ratio of burgers with onions to the total number of burgers is 8:14, which can be simplified to 4:7.