added legends for pie charts created via HTML table