Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. labels dissapear after calling setRange on the axis

labels dissapear after calling setRange on the axis

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 394 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    My application has several QChartView graphs with realtime data flowing in. The range of the numbers in the input data can change why a lot so I want to change the range on the Y axis so that the curves fit nicely in the window. For example, sometimes the values are very small (between -0.5 and 0.5) and when the data source is active, they can be between -2000 and 2000.

    I can reset the range by calling setRange on the AxisY attached to the QChart. However, after I do this, I the graphs no longer fit inside the visual area of the QChartView. It looks bad, but the labels are right. I have found that I can solve that problem by calling createDefaultAxes() on the QChartView object after I do the setRange on the axis. That makes my curves fit perfectly in their windows and everything looks great except that now the labels are all replaced with ellipses (...). I don't want that. I want to actually see the numbers.

    Help! how do I dynamically change the ranges of my axes, keeps my graphs constrained to their windows, and still get to actually read the range? What am I doing wrong?

    Thanks very much for you help,
    Mitra Kelly

    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