How to plot chart dynamically?
-
Hi
I wants to update my chart dynamically.
My code is not working
Below is my codeChartView { id:idChart title: "Line" width:400 height: 400 x:-200 backgroundColor: "transparent" titleColor: "white" y:40 visible: false antialiasing: true LineSeries { name: "LineSeries" id:idLine axisY: CategoryAxis { labelsColor: "white" min: 0 max: 200 CategoryRange { label: "50" endValue: 50 } CategoryRange { label: "100" endValue: 100 } CategoryRange { label: "150" endValue: 150 } CategoryRange { label: "200" endValue: 200 } } axisX: CategoryAxis { labelsColor: "white" id:idXaxis min: 0 max: 400 } } Component.onCompleted:{ manager.initialise(); manager.value(); } } Connections{ target: manager onSetmVal:{ aqIY[counter%6] = manager.getCurrentmValue(); timeX[counter%6] =manager.getCurrentTime(); var axisRange = 50*(counter%6); idXaxis.append(manager.getCurrentTime(),axisRange); idLine.append(manager.getCurrentTime(),manager.getCurrentmValue()); counter++; console.log("aqIY Val====",aqIY.length,"timeX",timeX,"aQI",aqIY) }
-
Hi @drd1988on. Check these posts:
https://forum.qt.io/topic/88318/chartview-with-a-circular-buffer
https://forum.qt.io/topic/93398/sliding-grid-for-chart.Good luck