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
Sorry if this seems like a silly question, but I'm trying to run the MacOS playgrounds to understand how this works, but import Charts doesn't seem to do anything. I keep getting the following:
func generateLineData() -> LineChartData
^~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:59:27: error: use of undeclared type 'BarChartData'
func generateBarData() -> BarChartData
^~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:108:17: error: use of unresolved identifier 'CombinedChartView'
var chartView = CombinedChartView(frame: r)
^~~~~~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:113:40: error: use of unresolved identifier 'DrawOrder'
chartView.drawOrder = [DrawOrder.bar.rawValue, DrawOrder.bubble.rawValue, DrawOrder.candle.rawValue, DrawOrder.line.rawValue, DrawOrder.scatter.rawValue]
^~~~~~~~~
error: CombinedChart.xcplaygroundpage:113:64: error: use of unresolved identifier 'DrawOrder'
chartView.drawOrder = [DrawOrder.bar.rawValue, DrawOrder.bubble.rawValue, DrawOrder.candle.rawValue, DrawOrder.line.rawValue, DrawOrder.scatter.rawValue]
^~~~~~~~~
error: CombinedChart.xcplaygroundpage:113:91: error: use of unresolved identifier 'DrawOrder'
chartView.drawOrder = [DrawOrder.bar.rawValue, DrawOrder.bubble.rawValue, DrawOrder.candle.rawValue, DrawOrder.line.rawValue, DrawOrder.scatter.rawValue]
^~~~~~~~~
error: CombinedChart.xcplaygroundpage:113:118: error: use of unresolved identifier 'DrawOrder'
chartView.drawOrder = [DrawOrder.bar.rawValue, DrawOrder.bubble.rawValue, DrawOrder.candle.rawValue, DrawOrder.line.rawValue, DrawOrder.scatter.rawValue]
^~~~~~~~~
error: CombinedChart.xcplaygroundpage:113:143: error: use of unresolved identifier 'DrawOrder'
chartView.drawOrder = [DrawOrder.bar.rawValue, DrawOrder.bubble.rawValue, DrawOrder.candle.rawValue, DrawOrder.line.rawValue, DrawOrder.scatter.rawValue]
^~~~~~~~~
error: CombinedChart.xcplaygroundpage:26:16: error: use of unresolved identifier 'CombinedChartData'
let data = CombinedChartData()
^~~~~~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:36:20: error: use of unresolved identifier 'ChartDataEntry'
var entries = [ChartDataEntry]()
^~~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:39:24: error: use of unresolved identifier 'ChartDataEntry'
entries.append(ChartDataEntry(x: Double(index) + 0.5, y: (Double(arc4random_uniform(15) + 5))))
^~~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:42:15: error: use of unresolved identifier 'LineChartDataSet'
let set = LineChartDataSet(values: entries, label: "Line DataSet")
^~~~~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:50:21: error: use of unresolved identifier 'NSUIFont'
set.valueFont = NSUIFont.systemFont(ofSize: CGFloat(10.0))
^~~~~~~~
error: CombinedChart.xcplaygroundpage:54:16: error: use of unresolved identifier 'LineChartData'
let data = LineChartData()
^~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:62:21: error: use of unresolved identifier 'BarChartDataEntry'
var entries1 = [BarChartDataEntry]()
^~~~~~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:63:21: error: use of unresolved identifier 'BarChartDataEntry'
var entries2 = [BarChartDataEntry]()
^~~~~~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:67:25: error: use of unresolved identifier 'BarChartDataEntry'
entries1.append(BarChartDataEntry(x: 0.0, y: (Double(arc4random_uniform(25) + 25))))
^~~~~~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:71:25: error: use of unresolved identifier 'BarChartDataEntry'
entries2.append(BarChartDataEntry(x: 0.0, yValues: [Double(arc4random_uniform(13) + 12), Double(arc4random_uniform(13) + 12)]))
^~~~~~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:74:27: error: use of unresolved identifier 'BarChartDataSet'
let set1 = BarChartDataSet(values: entries1, label: "Bar 1")
^~~~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:77:27: error: use of unresolved identifier 'NSUIFont'
set1.valueFont = NSUIFont.systemFont(ofSize: CGFloat(10.0))
^~~~~~~~
error: CombinedChart.xcplaygroundpage:80:27: error: use of unresolved identifier 'BarChartDataSet'
let set2 = BarChartDataSet(values: entries2, label: "Bar 2")
^~~~~~~~~~~~~~~
error: CombinedChart.xcplaygroundpage:84:27: error: use of unresolved identifier 'NSUIFont'
set2.valueFont = NSUIFont.systemFont(ofSize: CGFloat(10.0))
^~~~~~~~
error: CombinedChart.xcplaygroundpage:95:16: error: use of unresolved identifier 'BarChartData'
let data = BarChartData(dataSets: [set1, set2])
^~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
Sorry if this seems like a silly question, but I'm trying to run the MacOS playgrounds to understand how this works, but
import Charts
doesn't seem to do anything. I keep getting the following:The text was updated successfully, but these errors were encountered: