Chart from Firestore

let db = Firestore.firestore()
let dollars1 = [10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0]
let dollars2 = [20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0]
let dollars3 = [30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0]
let months = [“Jan”,“Feb”,“Mar”,“Apr”,“May”,“June”]

var entries = ChartDataEntry
for i in months.count
{
entries.append(ChartDataEntry(x: Double(i), y: dollars1[i]))
}
let set1: LineChartDataSet = LineChartDataSet(entries: entries1, label: “First Set”)
set1.axisDependency = .left // Line will correlate with left axis values
set1.setColor(UIColor.red.withAlphaComponent(0.5))
set1.setCircleColor(UIColor.red)
set1.lineWidth = 2.0
set1.circleRadius = 6.0
set1.fillAlpha = 65 / 255.0
set1.fillColor = UIColor.red
set1.highlightColor = UIColor.white
set1.drawCircleHoleEnabled = true

.......

let data = LineChartData(dataSets: [set1,set2,set3])
lineChart.data = data

I made a line chart as above.
However, when I try to make a lineChart by a list from Firestore, I frustrated.

I tried as the below. There was error message!
<Initializer ‘init(_:)’ requires that ‘Query’ conform to ‘BinaryInteger’>

I have thought that I should make a list.

let xAxis = db.collection(“honeyComb00001_01”).order(by: “createdAt”, descending: false ).whereField(“createdAt”, isEqualTo: ( Any ). self )

for i in Array(arrayLiteral: xAxis)
{
entries1.append(ChartDataEntry(x: Double(i), y: <#T##Double#>))
}

Is there any idea for that? I will be very appreciated.

my cloudFirestore is as the below.

collection.
sensors

+add document
002exdw473n18ecer

field
temp:23
humid:45