Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Sources/SwiftUICharts/Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,20 @@ public class ChartData: ObservableObject, Identifiable {
}
}

public struct PieChartData {
var label: String = ""
var value: Double

public init(value: Double) {
self.value = value
}

public init(label: String, value: Double) {
self.label = label
self.value = value
}
}

public class MultiLineChartData: ChartData {
var gradient: GradientColor

Expand Down
5 changes: 0 additions & 5 deletions Sources/SwiftUICharts/PieChart/PieChartRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@

import SwiftUI

public struct PieChartData {
var label: String = ""
var value: Double
}

public struct PieChartRow : View {
var data: [PieChartData]
var labeledData: [(String, Double)]?
Expand Down