Thank you for the library!

I build Qt from sources with "-no-feature-printsupport" option.

Let me suggest to check the Print support (v2.1.1):

diff --git a/src/3rdparty/qcustomplot/qcustomplot.h b/src/3rdparty/qcustomplot/qcustomplot.h
index 02ed8fb2..88759bd4 100644
--- a/src/3rdparty/qcustomplot/qcustomplot.h
+++ b/src/3rdparty/qcustomplot/qcustomplot.h
@@ -94,8 +94,10 @@
#else
# include <QtNumeric>
# include <QtWidgets/QWidget>
+#ifndef QT_NO_PRINTER
# include <QtPrintSupport/QtPrintSupport>
#endif
+#endif