Possible reapter bug
Unsolved
General and Desktop
-
Hello i am trying to use mchart(A QML wrapper for chart.js).
Now it needs to be passed a QList for the data i have multiple charts made by a reapter so i have stacked qlists like so:
QList<QList<qreal>>
Issue is when i use this i do the followingRepeater { id: repeater model: 4 Page { Component.onCompleted: { console.log(index) } MChart { width: parent.width + 60 height: 300 y: 290 anchors.horizontalCenter: parent.horizontalCenter type: MChart.Type.Line silent: true labels: serial.labels[index] data: [ MDataset { values: serial.chartData[index] fillColor: "#28bcd7" lineColor: "#4328d7" pointColor: "#2864d7" } ] } }
serial.chartData is QList<QVarient> where the QVarient is a QList<qreal>.
serial.labels is QList<QVarient> where the QVarient is a QList<QString>.
I get the errorReferenceError: index is not defined
at serial.labels[index]
how can this be i can use index before this, but when i use it here it doesn't work.
Is this a bug or am i doing something wrong?