Skip to content

Commit

Permalink
Support Swift Charts (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryu0118 authored Jun 19, 2024
1 parent d3ab98d commit 6f2ed00
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Sources/Perception/WithPerceptionTracking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,16 @@
self.content = content
}
}

#if canImport(Charts)
import Charts

@available(macOS 13.0, *)
@available(iOS 16.0, *)
extension WithPerceptionTracking: ChartContent where Content: ChartContent {
public init(@ChartContentBuilder content: @escaping () -> Content) {
self.content = content
}
}
#endif
#endif

0 comments on commit 6f2ed00

Please sign in to comment.