You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when using the version of the master branch, and applying the demo code in the Readme, it raise error.
Description
Expected Behavior
It should show the chart as mentioned in the docs
Actual Behavior
error
cannot force unwrap value of non-optional type 'Int'
----------------------------------------
SchemeBuildError: Failed to build the scheme "ExpenseTracker"
cannot force unwrap value of non-optional type 'Int'
Compile LineChartView.swift (x86_64):
/Users/hatim.hoho/Library/Developer/Xcode/DerivedData/ExpenseTracker-hadicoqkbmqusxgevqqrsdohtnpk/SourcePackages/checkouts/ChartView/Sources/SwiftUICharts/LineChart/LineChartView.swift:84:50: error: cannot force unwrap value of non-optional type 'Int'
Text("\(rateValue!)%")
~~~~~~~~~^
/Users/hatim.hoho/Library/Developer/Xcode/DerivedData/ExpenseTracker-hadicoqkbmqusxgevqqrsdohtnpk/SourcePackages/checkouts/ChartView/Sources/SwiftUICharts/LineChart/LineChartView.swift:79:47: warning: left side of nil coalescing operator '??' has non-optional type 'Int', so the right side is never used
if (rateValue ?? 0 >= 0){
~~~~~~~~~ ^~~~~
/Users/hatim.hoho/Library/Developer/Xcode/DerivedData/ExpenseTracker-hadicoqkbmqusxgevqqrsdohtnpk/SourcePackages/checkouts/ChartView/Sources/SwiftUICharts/LineChart/LineChartView.swift:145:97: error: missing argument for parameter 'rateValue' in call
LineChartView(data: [8,23,54,32,12,37,7,23,43], title: "Line chart", legend: "Basic")
^
, rateValue: <#Int?#>
/Users/hatim.hoho/Library/Developer/Xcode/DerivedData/ExpenseTracker-hadicoqkbmqusxgevqqrsdohtnpk/SourcePackages/checkouts/ChartView/Sources/SwiftUICharts/LineChart/LineChartView.swift:36:12: note: 'init(data:title:legend:style:form:rateValue:dropShadow:valueSpecifier:)' declared here
public init(data: [Double],
^
/Users/hatim.hoho/Library/Developer/Xcode/DerivedData/ExpenseTracker-hadicoqkbmqusxgevqqrsdohtnpk/SourcePackages/checkouts/ChartView/Sources/SwiftUICharts/LineChart/LineChartView.swift:148:213: error: missing argument for parameter 'rateValue' in call
LineChartView(data: [282.502, 284.495, 283.51, 285.019, 285.197, 286.118, 288.737, 288.455, 289.391, 287.691, 285.878, 286.46, 286.252, 284.652, 284.129, 284.188], title: "Line chart", legend: "Basic")
^
, rateValue: <#Int?#>
/Users/hatim.hoho/Library/Developer/Xcode/DerivedData/ExpenseTracker-hadicoqkbmqusxgevqqrsdohtnpk/SourcePackages/checkouts/ChartView/Sources/SwiftUICharts/LineChart/LineChartView.swift:36:12: note: 'init(data:title:legend:style:form:rateValue:dropShadow:valueSpecifier:)' declared here
public init(data: [Double],
^
Possible Fix
use guard before the line where rateValue! is used
when using the version of the master branch, and applying the demo code in the Readme, it raise error.
Description
Expected Behavior
It should show the chart as mentioned in the docs
Actual Behavior
error
Possible Fix
use guard before the line where rateValue! is used
Steps to Reproduce
Your Environment
iMac late 2015
macOS Monterey
Xcode Version 13.3 (13E113)
master
The text was updated successfully, but these errors were encountered: