Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved QML Chart Y-axis padding

    QML and Qt Quick
    2
    2
    286
    Loading More Posts
    • 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.
    • J
      johnnyparafango last edited by

      I successfully achieved an auto-scalable Y Axis, changing its maximum value each time. The problem is that when max value changes magnitude, let say from 100 to 1000, the X axis shrinks to make spaces for new bigger (or smaller) labels.

      I tried to left-pad the label but it does not work with white spaces.

      E.g.

       ValueAxis {
            id: axisY
            labelFormat: "%05d" // zero padding, works
      }
       ValueAxis {
            id: axisY
            labelFormat: "%5d" // space padding, not works, only 1 space is printed
      }
      

      Is there anyone which achieved this?
      For me is ok also to add a fixed space between the axis title and the labels, if it is possible, without using the labelFormat property.

      1 Reply Last reply Reply Quote 0
      • thomas.denicolo
        thomas.denicolo last edited by

        UP! Has anyone managed to solve this problem?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post