Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-81305

After increasing QChart left margin, the previous area where the Y axis was isn't repainted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.0
    • Fix Version/s: None
    • Component/s: Charts
    • Labels:
      None
    • Platform/s:
      Linux/X11

      Description

      I'm having other issues by flipping the x_axis label format but here the function that I used for setting the left margin of 2 of my charts:

      /*
       * peerPlotAreaChanged()
       * 
       * https://forum.qt.io/topic/109997/i-had-an-incredible-hard-time-to-align-horizontally-3-charts-qt-5-13-2
       */
      void LinkedChart::peerPlotAreaChanged(const QRectF &pa)
      {
          if (!plotArea().isNull()) {
              QMargins curMargins = margins();
              qDebug() << name() << curMargins << pa << plotArea();
              curMargins.setLeft(curMargins.left()+pa.left()-plotArea().left());
              setMargins(curMargins);
          }
      }
      

      See the image attachment to see the result when the left margin increases

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            e0348803 Miikka Heikkinen
            Reporter:
            lano1106 Olivier Langlois
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes