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. Rubber band changed the axis range like silly
QtWS25 Last Chance

Rubber band changed the axis range like silly

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 583 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.
  • F Offline
    F Offline
    firsnur96
    wrote on last edited by
    #1

    Hi everyone.
    I have a chart. Im using rectangle rubber band for zoom into my chart.
    When i zoomed in, my axis range changed with silly numbers.
    Is there any way to prevent it?
    Also i zoom out with my mouse right clicked, axis get the silly ranges again

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you show the code you are using ?
      Can you provide a minimal compilable example that shows this behaviour ?
      Which version of Qt are you using ?
      On which platform ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      F 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Can you show the code you are using ?
        Can you provide a minimal compilable example that shows this behaviour ?
        Which version of Qt are you using ?
        On which platform ?

        F Offline
        F Offline
        firsnur96
        wrote on last edited by
        #3

        @SGaist Im on ubuntu 18.4 and im using the version 5.15 of qt

        here is my code

        ```
         chart->addAxis(axisX, Qt::AlignBottom);
        
        axisY->setTickCount(1);
        axisY->setRange(-2,+2);
        chart->addAxis(axisY, Qt::AlignLeft);
        
        chart->legend()->setAlignment(Qt::AlignRight);
        chart->legend()->setMarkerShape(QLegend::MarkerShapeCircle);
        chartView->setRenderHint(QPainter::Antialiasing);
        chartView->setRubberBand(QChartView::RectangleRubberBand);
        ```
        

        the first photo is before zoom in
        the second one is after zoom in with rubber band

        Screenshot from 2021-04-28 15-57-45.png

        Screenshot from 2021-04-28 15-58-11.png

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          The code looks good.

          Can you provide a minimal compilable example that shows this behaviour ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          F 1 Reply Last reply
          0
          • SGaistS SGaist

            The code looks good.

            Can you provide a minimal compilable example that shows this behaviour ?

            F Offline
            F Offline
            firsnur96
            wrote on last edited by
            #5

            @SGaist I was though screen shots are enough but if you say what kind of example should i show you i will show immediately

            jsulmJ 1 Reply Last reply
            0
            • F firsnur96

              @SGaist I was though screen shots are enough but if you say what kind of example should i show you i will show immediately

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @firsnur96 @SGaist means a small application which demonstrates the issue you have, so others can reproduce it.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              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