我想从魔术记录中向我的快速图表数组添加数据
if let data = WeightTracker.mr_findAll() as? [WeightTracker] {
WeightArray = data
var x = [1.0, 2.0, 3.0, 4.0]
let y = [0.0, 10.0, 16.0, 45.0]
let formatter = WTRandomVC(lineChart: lineChartsView, xArray: x , yArray: y)
self.lineChartsView?.data?.setValueFormatter(formatter)
x.append(Double("\(String(describing: data.date))")!)
}