From e4150b0034b587fa2b96d6684fdc5ed9ec333e33 Mon Sep 17 00:00:00 2001 From: arrahimi Date: Sun, 6 Sep 2020 15:31:54 +0200 Subject: [PATCH] fixed issue --- Sources/SwiftUICharts/PieChart/PieChartCell.swift | 2 +- Sources/SwiftUICharts/PieChart/PieChartRow.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftUICharts/PieChart/PieChartCell.swift b/Sources/SwiftUICharts/PieChart/PieChartCell.swift index 0722e334..1d1a4cca 100644 --- a/Sources/SwiftUICharts/PieChart/PieChartCell.swift +++ b/Sources/SwiftUICharts/PieChart/PieChartCell.swift @@ -13,7 +13,7 @@ struct PieSlice: Identifiable { var startDeg: Double var endDeg: Double var value: Double - var label: String = "" + var label: String var normalizedValue: Double } diff --git a/Sources/SwiftUICharts/PieChart/PieChartRow.swift b/Sources/SwiftUICharts/PieChart/PieChartRow.swift index 83f993b6..0a97f1e5 100644 --- a/Sources/SwiftUICharts/PieChart/PieChartRow.swift +++ b/Sources/SwiftUICharts/PieChart/PieChartRow.swift @@ -29,7 +29,7 @@ public struct PieChartRow : View { let startDeg = lastEndDeg let endDeg = lastEndDeg + (normalized * 360) lastEndDeg = endDeg - tempSlices.append(PieSlice(startDeg: startDeg, endDeg: endDeg, value: slice.value, normalizedValue: normalized, label: slice.label)) + tempSlices.append(PieSlice(startDeg: startDeg, endDeg: endDeg, value: slice.value, label: slice.label, normalizedValue: normalized)) } return tempSlices }