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. QML Chart Y-axis padding
QtWS25 Last Chance

QML Chart Y-axis padding

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

    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
    0
    • thomas.denicoloT Offline
      thomas.denicoloT Offline
      thomas.denicolo
      wrote on last edited by
      #2

      UP! Has anyone managed to solve this problem?

      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