Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
ValueAxis tickCount to be dynamic
I'm making my first app on Qt using QML, and I'm trying to create a chart that is dynamic.
I will get data at a stable frequency and I want to display it in my chart. To run my tests, I've simulated some, as if they were already received but I want to have 1 X axis (on the grid) for each point.
I know I can (and have to) use tickCount but how do I set it to the number of XYPoints that are in my Line series ? This number will change up to a few times per second... Do I have to do something like
tickCount = myVarand to
myVar++at every time a new data is received ?
Thanks people :)
JonB last edited by JonB
how do I set it to the number of XYPoints that are in my Line series
I don't use QML, but you can set the
tickCountto call a function which returns the number of points in the series, not count it yourself.
Thanks for your reply. How could I get the number of points in the series ? They can't have an Id, no I don't know how to do :/
oria66 last edited by
Hello @Natalya. I responded this kind of question in a past topic. See it here https://forum.qt.io/topic/88318/chartview-with-a-circular-buffer/2.
I have solved my problem !
I'm using an id for my SplineSeries, so that i can get the count, max and so many things to use for my tickCount and everything else ! The fact is that I was writing
id: "myId"and I understood the error as if I can't use an id here. I can, just without the
" "around the string.
Thanks everyone for your time, have fun.