Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QChart Time Series
Qt 6.12 LTS is out! See what's new in the release blog

QChart Time Series

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 998 Views
  • 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.
  • O Offline
    O Offline
    onurates
    wrote on last edited by VRonin
    #1

    Hi All,

    I am very new to qml programming and I have a problem with using datatimeaxis in qChart. I defined my axis like below :

    DateTimeAxis {
                       id:axisX
                       format: "hh:mm:ss"
                       tickCount: 5
                   }
    
                   ValueAxis {
                       id: axisY
                       min: -0.5
                       max: 1.5
                   }
    
                   LineSeries {
                       id: series1
                       name: "signal 1"
                       axisX: axisX
                       axisY: axisY
                   }
    

    I try to create a time series with timer. But I could not plot the x axis in the time domain. I could not find the right way to use Date() and convert it to hour:minute:second

    onTriggered: {
                read_ready = !read_read
                    var date = new Date()
                    *******series1.append(new Date()..howtodo?????, Math.random());*******
                    console.log("r1 :",date.toLocaleTimeString(Qt.locale("en_US"), "hh:mm:ss"))
                    console.log("r2 :",new Date().getTime())
    }
    

    Thank yo so much for your help and sorry for my poor english

    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
    • Unsolved