Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. ValueAxis tickCount to be dynamic

ValueAxis tickCount to be dynamic

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 3 Posters 960 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Natalya
    wrote on last edited by
    #1

    Hi everyone,

    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 = myVar and to myVar++ at every time a new data is received ?

    Thanks people :)

    JonBJ 1 Reply Last reply
    0
    • N Natalya

      Hi everyone,

      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 = myVar and to myVar++ at every time a new data is received ?

      Thanks people :)

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Natalya

      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 tickCount to call a function which returns the number of points in the series, not count it yourself.

      1 Reply Last reply
      0
      • N Offline
        N Offline
        Natalya
        wrote on last edited by
        #3

        @JonB Hi,
        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 :/

        1 Reply Last reply
        0
        • oria66O Offline
          oria66O Offline
          oria66
          wrote on last edited by
          #4

          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.

          The truth is out there

          1 Reply Last reply
          0
          • N Offline
            N Offline
            Natalya
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved