Closed jordibruin closed 1 year ago
The 'Text("hello")' is how I got around the problem.
Fixed in main
branch.
Issue seems to stem from the chart not handling double values very well.
FYI, other charts (such as SoundBars) look like they have the same problem. Preview won't show.
ambiguous use of operator '-'
CompileDylibError: Failed to build SoundBars.swift
Compiling failed: ambiguous use of operator '-'
Swift-Charts-Examples/Swift Charts Examples/Charts/BarCharts/SoundBars.swift:71:30: error: ambiguous use of operator '-' .chartYScale(domain: -designTimeInteger("#8148.[2].[4].property.[0].[0].modifier[2].arg[0].value.[0]", fallback: 1)...designTimeInteger("#8148.[2].[4].property.[0].[0].modifier[2].arg[0].value.[1]", fallback: 1)) ^ Swift.Float16:3:31: note: found this candidate prefix public static func - (x: Float16) -> Float16 ^ Swift.Float:2:31: note: found this candidate prefix public static func - (x: Float) -> Float ^ Swift.Double:2:31: note: found this candidate prefix public static func - (x: Double) -> Double ^
FYI, other charts (such as SoundBars) look like they have the same problem. Preview won't show.
ambiguous use of operator '-'
CompileDylibError: Failed to build SoundBars.swift
Compiling failed: ambiguous use of operator '-'
Swift-Charts-Examples/Swift Charts Examples/Charts/BarCharts/SoundBars.swift:71:30: error: ambiguous use of operator '-' .chartYScale(domain: -designTimeInteger("#8148.[2].[4].property.[0].[0].modifier[2].arg[0].value.[0]", fallback: 1)...designTimeInteger("#8148.[2].[4].property.[0].[0].modifier[2].arg[0].value.[1]", fallback: 1)) ^ Swift.Float16:3:31: note: found this candidate prefix public static func - (x: Float16) -> Float16 ^ Swift.Float:2:31: note: found this candidate prefix public static func - (x: Float) -> Float ^ Swift.Double:2:31: note: found this candidate prefix public static func - (x: Double) -> Double ^
Soundbars previews fixed via https://github.com/jordibruin/Swift-Charts-Examples/commit/ef801a6958ba6ce413ae7b4a86094676c742a7e4
FYI, the preview for ContentView crashes.
Pyramid preview does not work:
Ongoing list of issues with broken previews:
Resolved
Resolved