You will need to change the line
var xoutput = Double(self.xaxis.text) ?? 0.0
to
var xoutput = Double(self.xaxis.text ?? "0") ?? 0.0
The self.xaxis.text field is optional
Topic:
Developer Tools & Services
SubTopic:
Xcode