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. Uneven tick distance in charts

Uneven tick distance in charts

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.0k 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.
  • cpperC Offline
    cpperC Offline
    cpper
    wrote on last edited by
    #1

    Hello :)
    Is it possible to have uneven distance between the tick marks in a chart(line series) ?
    I'm asking because I'd like to have the ticks in chart with a horizontal datetimeaxis placed at the same time (00:00).
    The number of ticks remains the same, but the mark are now positioned at the start of the day. I'd like to be able to do this, because I display daily records , and don't need to display the time in my chart, only the date. Therefore tick marks going somewhere between two recordings don't make any sense.
    Here is what I want to achieve. I also display the hours in this example, but in my program I only need the days and months.

    0_1504188021192_sdsd.png

    cpperC 1 Reply Last reply
    0
    • cpperC cpper

      Hello :)
      Is it possible to have uneven distance between the tick marks in a chart(line series) ?
      I'm asking because I'd like to have the ticks in chart with a horizontal datetimeaxis placed at the same time (00:00).
      The number of ticks remains the same, but the mark are now positioned at the start of the day. I'd like to be able to do this, because I display daily records , and don't need to display the time in my chart, only the date. Therefore tick marks going somewhere between two recordings don't make any sense.
      Here is what I want to achieve. I also display the hours in this example, but in my program I only need the days and months.

      0_1504188021192_sdsd.png

      cpperC Offline
      cpperC Offline
      cpper
      wrote on last edited by
      #2

      bump .

      1 Reply Last reply
      0
      • VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        don't need to display the time in my chart

        Then don't display it: axis->setFormat(chart->locale().dateFormat(QLocale::ShortFormat));

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        1
        • cpperC Offline
          cpperC Offline
          cpper
          wrote on last edited by
          #4

          Yes, I know that. I only displayed it in the example. I want to say that I have daily records of temperatures, so my chart doesn't keep track of the time of the day. Therefore I want to have tick marks going through 0:00( start of the day) to make sense.

          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