Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

February is missing from QDateTime axis in QML chart view



  • 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



  • @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.



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


Log in to reply