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. ChartView/ValueAxis - How to NOT label the maximum value tick on the ValueAxis
Forum Updated to NodeBB v4.3 + New Features

ChartView/ValueAxis - How to NOT label the maximum value tick on the ValueAxis

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 314 Views 1 Watching
  • 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.
  • V Offline
    V Offline
    VFCraig
    wrote on last edited by
    #1

    I am developing on Windows for an embedded device that runs Linux. Our chart goes from -200 to 1000. On Windows, the maximum value (1000) has a gridline but no label. On the target platform, the maximum value has both a gridline and a label.

    It looks better without the label. Is there any way to turn off that label so we can get a consistent, and desired, display on both platforms? Is there a way to access the maximum label from the ValueAxis instance and set visible to, "false", for that individual label? Clumsy, yes, but...

    1 Reply Last reply
    0
    • fcarneyF Offline
      fcarneyF Offline
      fcarney
      wrote on last edited by
      #2

      I don't see any way to adjust this. I also don't see any examples of using AbstractAxis to create a custom axis type to display how you want. I looked at the code for ValueAxis and it is c++. I was hoping it was qml and based on AbstractAxis. Alas, it is not.

      C++ is a perfectly valid school of magic.

      1 Reply Last reply
      0
      • V Offline
        V Offline
        VFCraig
        wrote on last edited by
        #3

        If I set the maximum value for the axis to just slightly less than that of the next tick, for example 999 when the next tick should be at 1000, it will not show the top label. Sadly though, it also will not show the top grid line, which helps to frame the graph.

        1 Reply Last reply
        0
        • fcarneyF Offline
          fcarneyF Offline
          fcarney
          wrote on last edited by fcarney
          #4

          You could draw a line on top. Not ideal.

          Edit:
          Width of 1 rect with border.

          C++ is a perfectly valid school of magic.

          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