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