Chart { ForEach(todaySamplesDistribution, id: \.self){ type in if (type.total != 0){ SectorMark(angle: .value("mL", type.total), innerRadius: .ratio(0.65), angularInset: 2.0) .foregroundStyle(by: .value("Type", type.name)) .annotation(position: .overlay) { Text("\(type.total)") .font(.headline) .foregroundStyle(.white) .padding(.bottom, 5) } } } }.frame(height: 300) .chartLegend(position: .bottom, alignment: .top) .padding()