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. February is missing from QDateTime axis in QML chart view
Qt 6.11 is out! See what's new in the release blog

February is missing from QDateTime axis in QML chart view

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 617 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.
  • R Offline
    R Offline
    Refi
    wrote on last edited by
    #1

    I have created a QML chart

     ChartView {
    id: chart
    anchors.fill: parent
    antialiasing: true
    ValueAxis {
        id: axisY
        tickCount: 3
    }
    DateTimeAxis{
           id: xTime
           tickCount: 6
       }
    

    But February month is getting missed from X axis and one other month is getting doubles. How to show to show it correctly.
    Note : X axis values are added dynamiccaly

    0_1535644992892_8de66cba-ef48-40c1-a9e4-89b3f1770359-image.png

    JonBJ 1 Reply Last reply
    0
    • R Refi

      I have created a QML chart

       ChartView {
      id: chart
      anchors.fill: parent
      antialiasing: true
      ValueAxis {
          id: axisY
          tickCount: 3
      }
      DateTimeAxis{
             id: xTime
             tickCount: 6
         }
      

      But February month is getting missed from X axis and one other month is getting doubles. How to show to show it correctly.
      Note : X axis values are added dynamiccaly

      0_1535644992892_8de66cba-ef48-40c1-a9e4-89b3f1770359-image.png

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

      @Refi
      February is not a very nice month :)
      Seriously, I think you can assume those ticks are about every 30 days. Which can skip February, and fall twice in May.
      That must be what happens with the tickCount: 6 spread across about six months.
      I don't know how you do it, but you need to change that somehow e.g. to be on the 1st of every month, if you can.

      R 1 Reply Last reply
      0
      • JonBJ JonB

        @Refi
        February is not a very nice month :)
        Seriously, I think you can assume those ticks are about every 30 days. Which can skip February, and fall twice in May.
        That must be what happens with the tickCount: 6 spread across about six months.
        I don't know how you do it, but you need to change that somehow e.g. to be on the 1st of every month, if you can.

        R Offline
        R Offline
        Refi
        wrote on last edited by
        #3

        @JonB Thank you for your concern
        I am also appending at the beginning of each month to the chart. Tooltip on tick points are correct. On X axis Qt itself is doing the same as it like . How to adjust it manually

        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