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. QML. ChartView. Is it possible to increase distance between the axe and values?
Qt 6.12 LTS is out! See what's new in the release blog

QML. ChartView. Is it possible to increase distance between the axe and values?

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

    I have a ChartView:
    1e5b33cb-14ec-4e6a-835d-c5f21f53758b-image.png
    I wonder if it is possible to increase distance between X axes and its values (years)? I want to increase it.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sonicss
      wrote on last edited by
      #2

      set the ValueAxis's max value can modify the range of axis

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lemons
        wrote on last edited by
        #3

        @sonicss said in QML. ChartView. Is it possible to increase distance between the axe and values?:

        range

        You could add a "<br>" to the label format, or rotate the label:

        ValueAxis {
            // [...]  
            labelFormat: "<br>%.0f"
        }
        
        ValueAxis {
            // [...]  
            labelsAngle: -60
        }
        
        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