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

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.14.0
    • Charts
    • None
    • 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

            e0348803 Miikka Heikkinen
            lano1106 Olivier Langlois
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes