diff --git a/src/charts/animations/axisanimation.cpp b/src/charts/animations/axisanimation.cpp
index 0fa520cb..c2be86eb 100644
--- a/src/charts/animations/axisanimation.cpp
+++ b/src/charts/animations/axisanimation.cpp
@@ -154,7 +154,7 @@ void AxisAnimation::updateCurrentValue(const QVariant &value)
     if (state() != QAbstractAnimation::Stopped) { //workaround
         QVector<qreal> vector = qvariant_cast<QVector<qreal> >(value);
         m_axis ? m_axis->setLayout(vector) : m_axis2->setLayout(vector);
-        m_axis ? m_axis->updateGeometry() : m_axis2->updateGeometry();
+        m_axis ? m_axis->updateGeometry() : void(0)/* TODO m_axis2->updateGeometry()*/;
     }
 
 }
diff --git a/src/charts/axis/barcategoryaxis/chartbarcategoryaxisx2.cpp b/src/charts/axis/barcategoryaxis/chartbarcategoryaxisx2.cpp
index 0d9cca5c..59342a01 100644
--- a/src/charts/axis/barcategoryaxis/chartbarcategoryaxisx2.cpp
+++ b/src/charts/axis/barcategoryaxis/chartbarcategoryaxisx2.cpp
@@ -36,7 +36,7 @@
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-ChartBarCategoryAxisX2::ChartBarCategoryAxisX2(QBarCategoryAxis *axis, QGraphicsItem* item)
+ChartBarCategoryAxisX2::ChartBarCategoryAxisX2(QBarCategoryAxis *axis, QQuickItem* item)
     : HorizontalAxis2(axis, item, true),
       m_categoriesAxis(axis)
 {
@@ -104,7 +104,7 @@ void ChartBarCategoryAxisX2::updateGeometry()
 
 void ChartBarCategoryAxisX2::handleCategoriesChanged()
 {
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if(presenter()) presenter()->layout()->invalidate();
 }
 
diff --git a/src/charts/axis/barcategoryaxis/chartbarcategoryaxisx2_p.h b/src/charts/axis/barcategoryaxis/chartbarcategoryaxisx2_p.h
index 97aac49e..998eca2d 100644
--- a/src/charts/axis/barcategoryaxis/chartbarcategoryaxisx2_p.h
+++ b/src/charts/axis/barcategoryaxis/chartbarcategoryaxisx2_p.h
@@ -51,7 +51,7 @@ class QT_CHARTS_PRIVATE_EXPORT ChartBarCategoryAxisX2 : public HorizontalAxis2
 {
     Q_OBJECT
 public:
-    ChartBarCategoryAxisX2(QBarCategoryAxis *axis, QGraphicsItem* item = 0);
+    ChartBarCategoryAxisX2(QBarCategoryAxis *axis, QQuickItem* item = 0);
     ~ChartBarCategoryAxisX2();
 
     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const;
diff --git a/src/charts/axis/barcategoryaxis/chartbarcategoryaxisy2.cpp b/src/charts/axis/barcategoryaxis/chartbarcategoryaxisy2.cpp
index 471f8a74..ba4676d3 100644
--- a/src/charts/axis/barcategoryaxis/chartbarcategoryaxisy2.cpp
+++ b/src/charts/axis/barcategoryaxis/chartbarcategoryaxisy2.cpp
@@ -36,7 +36,7 @@
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-ChartBarCategoryAxisY2::ChartBarCategoryAxisY2(QBarCategoryAxis *axis, QGraphicsItem* item)
+ChartBarCategoryAxisY2::ChartBarCategoryAxisY2(QBarCategoryAxis *axis, QQuickItem* item)
     : VerticalAxis2(axis, item, true),
       m_categoriesAxis(axis)
 {
@@ -103,7 +103,7 @@ void ChartBarCategoryAxisY2::updateGeometry()
 
 void ChartBarCategoryAxisY2::handleCategoriesChanged()
 {
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if(presenter()) presenter()->layout()->invalidate();
 }
 
diff --git a/src/charts/axis/barcategoryaxis/chartbarcategoryaxisy2_p.h b/src/charts/axis/barcategoryaxis/chartbarcategoryaxisy2_p.h
index cc30bef8..41b79191 100644
--- a/src/charts/axis/barcategoryaxis/chartbarcategoryaxisy2_p.h
+++ b/src/charts/axis/barcategoryaxis/chartbarcategoryaxisy2_p.h
@@ -51,7 +51,7 @@ class QT_CHARTS_PRIVATE_EXPORT ChartBarCategoryAxisY2 : public VerticalAxis2
 {
     Q_OBJECT
 public:
-    ChartBarCategoryAxisY2(QBarCategoryAxis *axis, QGraphicsItem* item = 0);
+    ChartBarCategoryAxisY2(QBarCategoryAxis *axis, QQuickItem* item = 0);
     ~ChartBarCategoryAxisY2();
 
     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const;
diff --git a/src/charts/axis/barcategoryaxis/qbarcategoryaxis.cpp b/src/charts/axis/barcategoryaxis/qbarcategoryaxis.cpp
index 4196f845..713a40a7 100644
--- a/src/charts/axis/barcategoryaxis/qbarcategoryaxis.cpp
+++ b/src/charts/axis/barcategoryaxis/qbarcategoryaxis.cpp
@@ -585,7 +585,7 @@ void QBarCategoryAxisPrivate::initializeGraphics(QGraphicsItem* parent)
     QAbstractAxisPrivate::initializeGraphics(parent);
 }
 
-void QBarCategoryAxisPrivate::initializeGraphics2(QGraphicsItem* parent)
+void QBarCategoryAxisPrivate::initializeGraphics2(QQuickItem* parent)
 {
     Q_Q(QBarCategoryAxis);
     ChartAxisElement2* axis(nullptr);
@@ -595,7 +595,7 @@ void QBarCategoryAxisPrivate::initializeGraphics2(QGraphicsItem* parent)
         axis = new ChartBarCategoryAxisX2(q,parent);
 
     m_item2.reset(axis);
-    QAbstractAxisPrivate::initializeGraphics(parent);
+    QAbstractAxisPrivate::initializeGraphics2(parent);
 }
 
 void QBarCategoryAxisPrivate::updateCategoryDomain()
diff --git a/src/charts/axis/barcategoryaxis/qbarcategoryaxis_p.h b/src/charts/axis/barcategoryaxis/qbarcategoryaxis_p.h
index 468025e9..de17803d 100644
--- a/src/charts/axis/barcategoryaxis/qbarcategoryaxis_p.h
+++ b/src/charts/axis/barcategoryaxis/qbarcategoryaxis_p.h
@@ -57,7 +57,7 @@ public:
 
 public:
     void initializeGraphics(QGraphicsItem* parent);
-    void initializeGraphics2(QGraphicsItem* parent);
+    void initializeGraphics2(QQuickItem* parent);
     void initializeDomain(AbstractDomain *domain);
     void updateCategoryDomain();
 
diff --git a/src/charts/axis/cartesianchartaxis2.cpp b/src/charts/axis/cartesianchartaxis2.cpp
index 80eb7630..e0f34ab8 100644
--- a/src/charts/axis/cartesianchartaxis2.cpp
+++ b/src/charts/axis/cartesianchartaxis2.cpp
@@ -42,7 +42,7 @@
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-CartesianChartAxis2::CartesianChartAxis2(QAbstractAxis *axis, QGraphicsItem *item , bool intervalAxis)
+CartesianChartAxis2::CartesianChartAxis2(QAbstractAxis *axis, QQuickItem *item , bool intervalAxis)
     : ChartAxisElement2(axis, item, intervalAxis)
 {
     Q_ASSERT(item);
@@ -55,151 +55,153 @@ CartesianChartAxis2::~CartesianChartAxis2()
 
 void CartesianChartAxis2::createItems(int count)
 {
-    if (arrowItems().size() == 0) {
-        QGraphicsLineItem *arrow = new LineArrowItem2(this, this);
-        arrow->setPen(axis()->linePen());
-        arrowGroup()->addToGroup(arrow);
-    }
-
-    if (intervalAxis() && gridItems().size() == 0) {
-        for (int i = 0 ; i < 2 ; i  ++){
-            QGraphicsLineItem *item = new QGraphicsLineItem(this);
-            item->setPen(axis()->gridLinePen());
-            gridGroup()->addToGroup(item);
-            QGraphicsRectItem *shades = new QGraphicsRectItem(this);
-            shades->setPen(axis()->shadesPen());
-            shades->setBrush(axis()->shadesBrush());
-            shadeGroup()->addToGroup(shades);
-        }
-    }
-
-    QGraphicsTextItem *title = titleItem();
-    title->setFont(axis()->titleFont());
-    title->setDefaultTextColor(axis()->titleBrush().color());
-    title->setHtml(axis()->titleText());
-
-    for (int i = 0; i < count; ++i) {
-        QGraphicsLineItem *arrow = new QGraphicsLineItem(this);
-        QGraphicsLineItem *grid = new QGraphicsLineItem(this);
-        QGraphicsTextItem *label = new QGraphicsTextItem(this);
-        label->document()->setDocumentMargin(ChartPresenter2::textMargin());
-        arrow->setPen(axis()->linePen());
-        grid->setPen(axis()->gridLinePen());
-        label->setFont(axis()->labelsFont());
-        label->setDefaultTextColor(axis()->labelsBrush().color());
-        label->setRotation(axis()->labelsAngle());
-        arrowGroup()->addToGroup(arrow);
-        gridGroup()->addToGroup(grid);
-        labelGroup()->addToGroup(label);
-
-        if (gridItems().size() == 1 || (((gridItems().size() + 1) % 2) && gridItems().size() > 0)) {
-            QGraphicsRectItem *shades = new QGraphicsRectItem(this);
-            shades->setPen(axis()->shadesPen());
-            shades->setBrush(axis()->shadesBrush());
-            shadeGroup()->addToGroup(shades);
-        }
-    }
+    // TODO
+//    if (arrowItems().size() == 0) {
+//        QGraphicsLineItem *arrow = new LineArrowItem2(this, this);
+//        arrow->setPen(axis()->linePen());
+//        arrowGroup()->addToGroup(arrow);
+//    }
+
+//    if (intervalAxis() && gridItems().size() == 0) {
+//        for (int i = 0 ; i < 2 ; i  ++){
+//            QGraphicsLineItem *item = new QGraphicsLineItem(this);
+//            item->setPen(axis()->gridLinePen());
+//            gridGroup()->addToGroup(item);
+//            QGraphicsRectItem *shades = new QGraphicsRectItem(this);
+//            shades->setPen(axis()->shadesPen());
+//            shades->setBrush(axis()->shadesBrush());
+//            shadeGroup()->addToGroup(shades);
+//        }
+//    }
+
+//    QGraphicsTextItem *title = titleItem();
+//    title->setFont(axis()->titleFont());
+//    title->setDefaultTextColor(axis()->titleBrush().color());
+//    title->setHtml(axis()->titleText());
+
+//    for (int i = 0; i < count; ++i) {
+//        QGraphicsLineItem *arrow = new QGraphicsLineItem(this);
+//        QGraphicsLineItem *grid = new QGraphicsLineItem(this);
+//        QGraphicsTextItem *label = new QGraphicsTextItem(this);
+//        label->document()->setDocumentMargin(ChartPresenter2::textMargin());
+//        arrow->setPen(axis()->linePen());
+//        grid->setPen(axis()->gridLinePen());
+//        label->setFont(axis()->labelsFont());
+//        label->setDefaultTextColor(axis()->labelsBrush().color());
+//        label->setRotation(axis()->labelsAngle());
+//        arrowGroup()->addToGroup(arrow);
+//        gridGroup()->addToGroup(grid);
+//        labelGroup()->addToGroup(label);
+
+//        if (gridItems().size() == 1 || (((gridItems().size() + 1) % 2) && gridItems().size() > 0)) {
+//            QGraphicsRectItem *shades = new QGraphicsRectItem(this);
+//            shades->setPen(axis()->shadesPen());
+//            shades->setBrush(axis()->shadesBrush());
+//            shadeGroup()->addToGroup(shades);
+//        }
+//    }
 }
 
 void CartesianChartAxis2::updateMinorTickItems()
 {
-    int currentCount = minorArrowItems().size();
-    int expectedCount = 0;
-    if (axis()->type() == QAbstractAxis::AxisTypeValue) {
-        QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
-        if (valueAxis->tickType() == QValueAxis::TicksFixed) {
-            expectedCount = valueAxis->minorTickCount() * (valueAxis->tickCount() - 1);
-            expectedCount = qMax(expectedCount, 0);
-        } else {
-            const qreal interval = valueAxis->tickInterval();
-            qreal firstMajorTick = valueAxis->tickAnchor();
-            const qreal max = valueAxis->max();
-            const qreal min = valueAxis->min();
-            const int _minorTickCount = valueAxis->minorTickCount();
-
-            if (min < firstMajorTick)
-                firstMajorTick = firstMajorTick - qCeil((firstMajorTick - min) / interval) * interval;
-            else
-                firstMajorTick = firstMajorTick + int((min - firstMajorTick) / interval) * interval;
-
-            const qreal deltaMinor = interval / qreal(_minorTickCount + 1);
-            qreal minorTick = firstMajorTick + deltaMinor;
-            int minorCounter = 0;
-
-            while (minorTick < min) {
-                minorTick += deltaMinor;
-                minorCounter++;
-            }
-
-            QVector<qreal> points;
-
-            // Calculate the points on axis value space. Conversion to graphical points
-            // will be done on axis specific geometry update function
-            while (minorTick <= max || qFuzzyCompare(minorTick, max)) {
-                if (minorCounter < _minorTickCount) {
-                    expectedCount++;
-                    minorCounter++;
-                    points << (minorTick - min);
-                } else {
-                    minorCounter = 0;
-                }
-                minorTick += deltaMinor;
-            }
-
-            setDynamicMinorTickLayout(points);
-        }
-    } else if (axis()->type() == QAbstractAxis::AxisTypeLogValue) {
-        QLogValueAxis *logValueAxis = qobject_cast<QLogValueAxis *>(axis());
-
-        int minorTickCount = logValueAxis->minorTickCount();
-        if (minorTickCount < 0)
-            minorTickCount = qMax(int(qFloor(logValueAxis->base()) - 2.0), 0);
-
-        expectedCount = minorTickCount * (logValueAxis->tickCount() + 1);
-        expectedCount = qMax(expectedCount, logValueAxis->minorTickCount());
-    } else {
-        // minor ticks are not supported
-        return;
-    }
-
-    int diff = expectedCount - currentCount;
-    if (diff > 0) {
-        for (int i = 0; i < diff; ++i) {
-            QGraphicsLineItem *minorGridLineItem = new QGraphicsLineItem(this);
-            minorGridLineItem->setPen(axis()->minorGridLinePen());
-            minorGridGroup()->addToGroup(minorGridLineItem);
-
-            QGraphicsLineItem *minorArrowLineItem = new QGraphicsLineItem(this);
-            minorArrowLineItem->setPen(axis()->linePen());
-            minorArrowGroup()->addToGroup(minorArrowLineItem);
-        }
-    } else {
-        QList<QGraphicsItem *> minorGridItemsList = minorGridItems();
-        QList<QGraphicsItem *> minorArrowItemsList = minorArrowItems();
-        for (int i = 0; i > diff; --i) {
-            if (!minorGridItemsList.isEmpty())
-                delete minorGridItemsList.takeLast();
-
-            if (!minorArrowItemsList.isEmpty())
-                delete minorArrowItemsList.takeLast();
-        }
-    }
+    // TODO!!
+//    int currentCount = minorArrowItems().size();
+//    int expectedCount = 0;
+//    if (axis()->type() == QAbstractAxis::AxisTypeValue) {
+//        QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
+//        if (valueAxis->tickType() == QValueAxis::TicksFixed) {
+//            expectedCount = valueAxis->minorTickCount() * (valueAxis->tickCount() - 1);
+//            expectedCount = qMax(expectedCount, 0);
+//        } else {
+//            const qreal interval = valueAxis->tickInterval();
+//            qreal firstMajorTick = valueAxis->tickAnchor();
+//            const qreal max = valueAxis->max();
+//            const qreal min = valueAxis->min();
+//            const int _minorTickCount = valueAxis->minorTickCount();
+
+//            if (min < firstMajorTick)
+//                firstMajorTick = firstMajorTick - qCeil((firstMajorTick - min) / interval) * interval;
+//            else
+//                firstMajorTick = firstMajorTick + int((min - firstMajorTick) / interval) * interval;
+
+//            const qreal deltaMinor = interval / qreal(_minorTickCount + 1);
+//            qreal minorTick = firstMajorTick + deltaMinor;
+//            int minorCounter = 0;
+
+//            while (minorTick < min) {
+//                minorTick += deltaMinor;
+//                minorCounter++;
+//            }
+
+//            QVector<qreal> points;
+
+//            // Calculate the points on axis value space. Conversion to graphical points
+//            // will be done on axis specific geometry update function
+//            while (minorTick <= max || qFuzzyCompare(minorTick, max)) {
+//                if (minorCounter < _minorTickCount) {
+//                    expectedCount++;
+//                    minorCounter++;
+//                    points << (minorTick - min);
+//                } else {
+//                    minorCounter = 0;
+//                }
+//                minorTick += deltaMinor;
+//            }
+
+//            setDynamicMinorTickLayout(points);
+//        }
+//    } else if (axis()->type() == QAbstractAxis::AxisTypeLogValue) {
+//        QLogValueAxis *logValueAxis = qobject_cast<QLogValueAxis *>(axis());
+
+//        int minorTickCount = logValueAxis->minorTickCount();
+//        if (minorTickCount < 0)
+//            minorTickCount = qMax(int(qFloor(logValueAxis->base()) - 2.0), 0);
+
+//        expectedCount = minorTickCount * (logValueAxis->tickCount() + 1);
+//        expectedCount = qMax(expectedCount, logValueAxis->minorTickCount());
+//    } else {
+//        // minor ticks are not supported
+//        return;
+//    }
+
+//    int diff = expectedCount - currentCount;
+//    if (diff > 0) {
+//        for (int i = 0; i < diff; ++i) {
+//            QGraphicsLineItem *minorGridLineItem = new QGraphicsLineItem(this);
+//            minorGridLineItem->setPen(axis()->minorGridLinePen());
+//            minorGridGroup()->addToGroup(minorGridLineItem);
+
+//            QGraphicsLineItem *minorArrowLineItem = new QGraphicsLineItem(this);
+//            minorArrowLineItem->setPen(axis()->linePen());
+//            minorArrowGroup()->addToGroup(minorArrowLineItem);
+//        }
+//    } else {
+//        QList<QQuickItem *> minorGridItemsList = minorGridItems();
+//        QList<QQuickItem *> minorArrowItemsList = minorArrowItems();
+//        for (int i = 0; i > diff; --i) {
+//            if (!minorGridItemsList.isEmpty())
+//                delete minorGridItemsList.takeLast();
+
+//            if (!minorArrowItemsList.isEmpty())
+//                delete minorArrowItemsList.takeLast();
+//        }
+//    }
 }
 
 void CartesianChartAxis2::deleteItems(int count)
 {
-    QList<QGraphicsItem *> lines = gridItems();
-    QList<QGraphicsItem *> labels = labelItems();
-    QList<QGraphicsItem *> shades = shadeItems();
-    QList<QGraphicsItem *> axis = arrowItems();
-
-    for (int i = 0; i < count; ++i) {
-        if (lines.size() == 1 || (((lines.size() + 1) % 2) && lines.size() > 0))
-            delete(shades.takeLast());
-        delete(lines.takeLast());
-        delete(labels.takeLast());
-        delete(axis.takeLast());
-    }
+//    QList<QQuickItem *> lines = gridItems();
+//    QList<QQuickItem *> labels = labelItems();
+//    QList<QQuickItem *> shades = shadeItems();
+//    QList<QQuickItem *> axis = arrowItems();
+
+//    for (int i = 0; i < count; ++i) {
+//        if (lines.size() == 1 || (((lines.size() + 1) % 2) && lines.size() > 0))
+//            delete(shades.takeLast());
+//        delete(lines.takeLast());
+//        delete(labels.takeLast());
+//        delete(axis.takeLast());
+//    }
 }
 
 void CartesianChartAxis2::updateLayout(QVector<qreal> &layout)
@@ -256,7 +258,8 @@ void CartesianChartAxis2::setGeometry(const QRectF &axis, const QRectF &grid)
     setAxisGeometry(axis);
 
     if (isEmpty()) {
-        prepareGeometryChange();
+        // TODO
+//        prepareGeometryChange();
         return;
     }
 
@@ -273,58 +276,58 @@ QSizeF CartesianChartAxis2::sizeHint(Qt::SizeHint which, const QSizeF &constrain
 
 void CartesianChartAxis2::handleArrowPenChanged(const QPen &pen)
 {
-    foreach (QGraphicsItem *item, arrowItems())
-        static_cast<QGraphicsLineItem *>(item)->setPen(pen);
+//    foreach (QQuickItem *item, arrowItems())
+//        static_cast<QGraphicsLineItem *>(item)->setPen(pen);
 }
 
 void CartesianChartAxis2::handleGridPenChanged(const QPen &pen)
 {
-    foreach (QGraphicsItem *item, gridItems())
-        static_cast<QGraphicsLineItem *>(item)->setPen(pen);
+//    foreach (QQuickItem *item, gridItems())
+//        static_cast<QGraphicsLineItem *>(item)->setPen(pen);
 }
 
 void CartesianChartAxis2::handleMinorArrowPenChanged(const QPen &pen)
 {
-    foreach (QGraphicsItem *item, minorArrowItems())
-        static_cast<QGraphicsLineItem *>(item)->setPen(pen);
+//    foreach (QQuickItem *item, minorArrowItems())
+//        static_cast<QGraphicsLineItem *>(item)->setPen(pen);
 }
 
 void CartesianChartAxis2::handleMinorGridPenChanged(const QPen &pen)
 {
-    foreach (QGraphicsItem *item, minorGridItems())
-        static_cast<QGraphicsLineItem *>(item)->setPen(pen);
+//    foreach (QQuickItem *item, minorGridItems())
+//        static_cast<QGraphicsLineItem *>(item)->setPen(pen);
 }
 
 void CartesianChartAxis2::handleGridLineColorChanged(const QColor &color)
 {
-    foreach (QGraphicsItem *item, gridItems()) {
-        QGraphicsLineItem *lineItem = static_cast<QGraphicsLineItem *>(item);
-        QPen pen = lineItem->pen();
-        pen.setColor(color);
-        lineItem->setPen(pen);
-    }
+//    foreach (QQuickItem *item, gridItems()) {
+//        QGraphicsLineItem *lineItem = static_cast<QGraphicsLineItem *>(item);
+//        QPen pen = lineItem->pen();
+//        pen.setColor(color);
+//        lineItem->setPen(pen);
+//    }
 }
 
 void CartesianChartAxis2::handleMinorGridLineColorChanged(const QColor &color)
 {
-    foreach (QGraphicsItem *item, minorGridItems()) {
-        QGraphicsLineItem *lineItem = static_cast<QGraphicsLineItem *>(item);
-        QPen pen = lineItem->pen();
-        pen.setColor(color);
-        lineItem->setPen(pen);
-    }
+//    foreach (QQuickItem *item, minorGridItems()) {
+//        QGraphicsLineItem *lineItem = static_cast<QGraphicsLineItem *>(item);
+//        QPen pen = lineItem->pen();
+//        pen.setColor(color);
+//        lineItem->setPen(pen);
+//    }
 }
 
 void CartesianChartAxis2::handleShadesBrushChanged(const QBrush &brush)
 {
-    foreach (QGraphicsItem *item, shadeItems())
-        static_cast<QGraphicsRectItem *>(item)->setBrush(brush);
+//    foreach (QQuickItem *item, shadeItems())
+//        static_cast<QGraphicsRectItem *>(item)->setBrush(brush);
 }
 
 void CartesianChartAxis2::handleShadesPenChanged(const QPen &pen)
 {
-    foreach (QGraphicsItem *item, shadeItems())
-        static_cast<QGraphicsRectItem *>(item)->setPen(pen);
+//    foreach (QQuickItem *item, shadeItems())
+//        static_cast<QGraphicsRectItem *>(item)->setPen(pen);
 }
 
 QT_CHARTS_END_NAMESPACE
diff --git a/src/charts/axis/cartesianchartaxis2_p.h b/src/charts/axis/cartesianchartaxis2_p.h
index e7ce49d1..c5f02f45 100644
--- a/src/charts/axis/cartesianchartaxis2_p.h
+++ b/src/charts/axis/cartesianchartaxis2_p.h
@@ -50,10 +50,10 @@ class QAbstractAxis;
 class QT_CHARTS_PRIVATE_EXPORT CartesianChartAxis2 : public ChartAxisElement2
 {
     Q_OBJECT
-    Q_INTERFACES(QGraphicsLayoutItem)
+//    Q_INTERFACES(QGraphicsLayoutItem)
 public:
 
-    CartesianChartAxis2(QAbstractAxis *axis, QGraphicsItem *item = 0, bool intervalAxis = false);
+    CartesianChartAxis2(QAbstractAxis *axis, QQuickItem *item = 0, bool intervalAxis = false);
     ~CartesianChartAxis2();
 
     void setGeometry(const QRectF &axis, const QRectF &grid);
diff --git a/src/charts/axis/chartaxiselement2.cpp b/src/charts/axis/chartaxiselement2.cpp
index 2b47a2ee..871b9a82 100644
--- a/src/charts/axis/chartaxiselement2.cpp
+++ b/src/charts/axis/chartaxiselement2.cpp
@@ -55,35 +55,34 @@ public:
 };
 static StaticLabelFormatMatcherDeleter staticLabelFormatMatcherDeleter;
 
-ChartAxisElement2::ChartAxisElement2(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis)
+ChartAxisElement2::ChartAxisElement2(QAbstractAxis *axis, QQuickItem *item, bool intervalAxis)
     : ChartElement2(item),
       m_axis(axis),
       m_animation(0),
-      m_grid(new QGraphicsItemGroup(item)),
-      m_arrow(new QGraphicsItemGroup(item)),
-      m_minorGrid(new QGraphicsItemGroup(item)),
-      m_minorArrow(new QGraphicsItemGroup(item)),
-      m_shades(new QGraphicsItemGroup(item)),
-      m_labels(new QGraphicsItemGroup(item)),
-      m_title(new QGraphicsTextItem(item)),
+//      m_grid(new QQuickItemGroup(item)),
+//      m_arrow(new QQuickItemGroup(item)),
+//      m_minorGrid(new QQuickItemGroup(item)),
+//      m_minorArrow(new QQuickItemGroup(item)),
+//      m_shades(new QQuickItemGroup(item)),
+//      m_labels(new QQuickItemGroup(item)),
+//      m_title(new QGraphicsTextItem(item)),
       m_intervalAxis(intervalAxis)
-
 {
     //initial initialization
-    m_arrow->setHandlesChildEvents(false);
-    m_arrow->setZValue(ChartPresenter2::AxisZValue);
-    m_minorArrow->setHandlesChildEvents(false);
-    m_minorArrow->setZValue(ChartPresenter2::AxisZValue);
-    m_labels->setZValue(ChartPresenter2::AxisZValue);
-    m_shades->setZValue(ChartPresenter2::ShadesZValue);
-    m_grid->setZValue(ChartPresenter2::GridZValue);
-    m_minorGrid->setZValue(ChartPresenter2::GridZValue);
-    m_title->setZValue(ChartPresenter2::GridZValue);
-    m_title->document()->setDocumentMargin(ChartPresenter2::textMargin());
+//    m_arrow->setHandlesChildEvents(false);
+//    m_arrow->setZValue(ChartPresenter2::AxisZValue);
+//    m_minorArrow->setHandlesChildEvents(false);
+//    m_minorArrow->setZValue(ChartPresenter2::AxisZValue);
+//    m_labels->setZValue(ChartPresenter2::AxisZValue);
+//    m_shades->setZValue(ChartPresenter2::ShadesZValue);
+//    m_grid->setZValue(ChartPresenter2::GridZValue);
+//    m_minorGrid->setZValue(ChartPresenter2::GridZValue);
+//    m_title->setZValue(ChartPresenter2::GridZValue);
+//    m_title->document()->setDocumentMargin(ChartPresenter2::textMargin());
     handleVisibleChanged(axis->isVisible());
     connectSlots();
 
-    setFlag(QGraphicsItem::ItemHasNoContents, true);
+    setFlag(QQuickItem::ItemHasContents, false);
 }
 
 ChartAxisElement2::~ChartAxisElement2()
@@ -133,123 +132,123 @@ void ChartAxisElement2::connectSlots()
 
 void ChartAxisElement2::handleArrowVisibleChanged(bool visible)
 {
-    m_arrow->setVisible(visible);
+//    m_arrow->setVisible(visible);
 }
 
 void ChartAxisElement2::handleMinorArrowVisibleChanged(bool visible)
 {
-    m_minorArrow->setVisible(visible);
+//    m_minorArrow->setVisible(visible);
 }
 
 void ChartAxisElement2::handleGridVisibleChanged(bool visible)
 {
-    m_grid->setVisible(visible);
+//    m_grid->setVisible(visible);
 }
 
 void ChartAxisElement2::handleMinorGridVisibleChanged(bool visible)
 {
-    m_minorGrid->setVisible(visible);
+//    m_minorGrid->setVisible(visible);
 }
 
 void ChartAxisElement2::handleLabelsPositionChanged()
 {
-    QGraphicsLayoutItem::updateGeometry();
-    presenter()->layout()->invalidate();
+//    QGraphicsLayoutItem::updateGeometry();
+//    presenter()->layout()->invalidate();
 }
 
 void ChartAxisElement2::handleLabelsVisibleChanged(bool visible)
 {
-    QGraphicsLayoutItem::updateGeometry();
-    presenter()->layout()->invalidate();
-    m_labels->setVisible(visible);
+//    QGraphicsLayoutItem::updateGeometry();
+//    presenter()->layout()->invalidate();
+//    m_labels->setVisible(visible);
 }
 
 void ChartAxisElement2::handleShadesVisibleChanged(bool visible)
 {
-    m_shades->setVisible(visible);
+//    m_shades->setVisible(visible);
 }
 
 void ChartAxisElement2::handleTitleVisibleChanged(bool visible)
 {
-    QGraphicsLayoutItem::updateGeometry();
-    presenter()->layout()->invalidate();
-    m_title->setVisible(visible);
+//    QGraphicsLayoutItem::updateGeometry();
+//    presenter()->layout()->invalidate();
+//    m_title->setVisible(visible);
 }
 
 void ChartAxisElement2::handleLabelsAngleChanged(int angle)
 {
-    foreach (QGraphicsItem *item, m_labels->childItems())
-        item->setRotation(angle);
+//    foreach (QQuickItem *item, m_labels->childItems())
+//        item->setRotation(angle);
 
-    QGraphicsLayoutItem::updateGeometry();
-    presenter()->layout()->invalidate();
+//    QGraphicsLayoutItem::updateGeometry();
+//    presenter()->layout()->invalidate();
 }
 
 void ChartAxisElement2::handleLabelsBrushChanged(const QBrush &brush)
 {
-    foreach (QGraphicsItem *item, m_labels->childItems())
-        static_cast<QGraphicsTextItem *>(item)->setDefaultTextColor(brush.color());
+//    foreach (QQuickItem *item, m_labels->childItems())
+//        static_cast<QGraphicsTextItem *>(item)->setDefaultTextColor(brush.color());
 }
 
 void ChartAxisElement2::handleLabelsFontChanged(const QFont &font)
 {
-    foreach (QGraphicsItem *item, m_labels->childItems())
-        static_cast<QGraphicsTextItem *>(item)->setFont(font);
-    QGraphicsLayoutItem::updateGeometry();
-    presenter()->layout()->invalidate();
+//    foreach (QQuickItem *item, m_labels->childItems())
+//        static_cast<QGraphicsTextItem *>(item)->setFont(font);
+//    QGraphicsLayoutItem::updateGeometry();
+//    presenter()->layout()->invalidate();
 }
 
 void ChartAxisElement2::handleTitleTextChanged(const QString &title)
 {
-    QGraphicsLayoutItem::updateGeometry();
-    presenter()->layout()->invalidate();
-    if (title.isEmpty() || !m_title->isVisible())
-        m_title->setHtml(title);
+//    QGraphicsLayoutItem::updateGeometry();
+//    presenter()->layout()->invalidate();
+//    if (title.isEmpty() || !m_title->isVisible())
+//        m_title->setHtml(title);
 }
 
 void ChartAxisElement2::handleTitleBrushChanged(const QBrush &brush)
 {
-    m_title->setDefaultTextColor(brush.color());
+//    m_title->setDefaultTextColor(brush.color());
 }
 
 void ChartAxisElement2::handleTitleFontChanged(const QFont &font)
 {
-    if (m_title->font() != font) {
-        m_title->setFont(font);
-        QGraphicsLayoutItem::updateGeometry();
-        presenter()->layout()->invalidate();
-    }
+//    if (m_title->font() != font) {
+//        m_title->setFont(font);
+//        QGraphicsLayoutItem::updateGeometry();
+//        presenter()->layout()->invalidate();
+//    }
 }
 
 void ChartAxisElement2::handleVisibleChanged(bool visible)
 {
     setVisible(visible);
-    if (!visible) {
-        m_grid->setVisible(visible);
-        m_arrow->setVisible(visible);
-        m_minorGrid->setVisible(visible);
-        m_minorArrow->setVisible(visible);
-        m_shades->setVisible(visible);
-        m_labels->setVisible(visible);
-        m_title->setVisible(visible);
-    } else {
-        m_grid->setVisible(axis()->isGridLineVisible());
-        m_arrow->setVisible(axis()->isLineVisible());
-        m_minorGrid->setVisible(axis()->isMinorGridLineVisible());
-        m_minorArrow->setVisible(axis()->isLineVisible());
-        m_shades->setVisible(axis()->shadesVisible());
-        m_labels->setVisible(axis()->labelsVisible());
-        m_title->setVisible(axis()->isTitleVisible());
-    }
-    if (presenter()) {
-        if (visible) {
-            QSizeF before = effectiveSizeHint(Qt::PreferredSize);
-            QSizeF after = sizeHint(Qt::PreferredSize);
-            if (before != after)
-                QGraphicsLayoutItem::updateGeometry();
-        }
-        presenter()->layout()->invalidate();
-    }
+//    if (!visible) {
+////        m_grid->setVisible(visible);
+////        m_arrow->setVisible(visible);
+////        m_minorGrid->setVisible(visible);
+////        m_minorArrow->setVisible(visible);
+////        m_shades->setVisible(visible);
+////        m_labels->setVisible(visible);
+//        m_title->setVisible(visible);
+//    } else {
+////        m_grid->setVisible(axis()->isGridLineVisible());
+////        m_arrow->setVisible(axis()->isLineVisible());
+////        m_minorGrid->setVisible(axis()->isMinorGridLineVisible());
+////        m_minorArrow->setVisible(axis()->isLineVisible());
+////        m_shades->setVisible(axis()->shadesVisible());
+////        m_labels->setVisible(axis()->labelsVisible());
+//        m_title->setVisible(axis()->isTitleVisible());
+//    }
+//    if (presenter()) {
+//        if (visible) {
+////            QSizeF before = effectiveSizeHint(Qt::PreferredSize);
+////            QSizeF after = sizeHint(Qt::PreferredSize);
+////            if (before != after)
+////                QGraphicsLayoutItem::updateGeometry();
+//        }
+//        presenter()->layout()->invalidate();
+//    }
 }
 
 void ChartAxisElement2::handleRangeChanged(qreal min, qreal max)
@@ -258,18 +257,18 @@ void ChartAxisElement2::handleRangeChanged(qreal min, qreal max)
     Q_UNUSED(max);
 
     if (!isEmpty()) {
-        QVector<qreal> layout = calculateLayout();
-        updateLayout(layout);
-        QSizeF before = effectiveSizeHint(Qt::PreferredSize);
-        QSizeF after = sizeHint(Qt::PreferredSize);
-
-        if (before != after) {
-            QGraphicsLayoutItem::updateGeometry();
-            // We don't want to call invalidate on layout, since it will change minimum size of
-            // component, which we would like to avoid since it causes nasty flips when scrolling
-            // or zooming, instead recalculate layout and use plotArea for extra space.
-            presenter()->layout()->setGeometry(presenter()->layout()->geometry());
-        }
+//        QVector<qreal> layout = calculateLayout();
+//        updateLayout(layout);
+//        QSizeF before = effectiveSizeHint(Qt::PreferredSize);
+//        QSizeF after = sizeHint(Qt::PreferredSize);
+
+//        if (before != after) {
+//            QGraphicsLayoutItem::updateGeometry();
+//            // We don't want to call invalidate on layout, since it will change minimum size of
+//            // component, which we would like to avoid since it causes nasty flips when scrolling
+//            // or zooming, instead recalculate layout and use plotArea for extra space.
+//            presenter()->layout()->setGeometry(presenter()->layout()->geometry());
+//        }
     }
 }
 
@@ -277,8 +276,8 @@ void ChartAxisElement2::handleReverseChanged(bool reverse)
 {
     Q_UNUSED(reverse);
 
-    QGraphicsLayoutItem::updateGeometry();
-    presenter()->layout()->invalidate();
+//    QGraphicsLayoutItem::updateGeometry();
+//    presenter()->layout()->invalidate();
 }
 
 bool ChartAxisElement2::isEmpty()
diff --git a/src/charts/axis/chartaxiselement2_p.h b/src/charts/axis/chartaxiselement2_p.h
index cd5c676f..245010f7 100644
--- a/src/charts/axis/chartaxiselement2_p.h
+++ b/src/charts/axis/chartaxiselement2_p.h
@@ -43,7 +43,8 @@
 #include <QtCharts/private/qchartglobal_p.h>
 #include <QtCharts/private/chartelement2_p.h>
 #include <private/axisanimation_p.h>
-#include <QtWidgets/QGraphicsItem>
+#include <QQuickItem>
+#include <QQuickPaintedItem>
 #include <QtWidgets/QGraphicsLayoutItem>
 #include <QtCharts/QValueAxis>
 #include <QtGui/QFont>
@@ -53,13 +54,13 @@ QT_CHARTS_BEGIN_NAMESPACE
 class ChartPresenter;
 class QAbstractAxis;
 
-class QT_CHARTS_PRIVATE_EXPORT ChartAxisElement2 : public ChartElement2, public QGraphicsLayoutItem
+class QT_CHARTS_PRIVATE_EXPORT ChartAxisElement2 : public ChartElement2//, public QGraphicsLayoutItem
 {
     Q_OBJECT
 
-    using QGraphicsLayoutItem::setGeometry;
+//    using QGraphicsLayoutItem::setGeometry;
 public:
-    ChartAxisElement2(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis = false);
+    ChartAxisElement2(QAbstractAxis *axis, QQuickItem *item, bool intervalAxis = false);
     ~ChartAxisElement2();
 
     virtual QRectF gridGeometry() const = 0;
@@ -115,19 +116,20 @@ protected:
     virtual QVector<qreal> calculateLayout() const = 0;
     virtual void updateLayout(QVector<qreal> &layout) = 0;
 
-    QList<QGraphicsItem *> gridItems() { return m_grid->childItems(); }
-    QList<QGraphicsItem *> minorGridItems() { return m_minorGrid->childItems(); }
-    QList<QGraphicsItem *> labelItems() { return m_labels->childItems(); }
-    QList<QGraphicsItem *> shadeItems() { return m_shades->childItems(); }
-    QList<QGraphicsItem *> arrowItems() { return m_arrow->childItems(); }
-    QList<QGraphicsItem *> minorArrowItems() { return m_minorArrow->childItems(); }
-    QGraphicsTextItem *titleItem() const { return m_title.data(); }
-    QGraphicsItemGroup *gridGroup() { return m_grid.data(); }
-    QGraphicsItemGroup *minorGridGroup() { return m_minorGrid.data(); }
-    QGraphicsItemGroup *labelGroup() { return m_labels.data(); }
-    QGraphicsItemGroup *shadeGroup() { return m_shades.data(); }
-    QGraphicsItemGroup *arrowGroup() { return m_arrow.data(); }
-    QGraphicsItemGroup *minorArrowGroup() { return m_minorArrow.data(); }
+//    QList<QQuickItem *> gridItems() { return m_grid->childItems(); }
+//    QList<QQuickItem *> minorGridItems() { return m_minorGrid->childItems(); }
+//    QList<QQuickItem *> labelItems() { return m_labels->childItems(); }
+//    QList<QQuickItem *> shadeItems() { return m_shades->childItems(); }
+//    QList<QQuickItem *> arrowItems() { return m_arrow->childItems(); }
+//    QList<QQuickItem *> minorArrowItems() { return m_minorArrow->childItems(); }
+    QQuickPaintedItem *titleItem() const { return m_title.data(); }
+    // TODO
+//    QQuickItemGroup *gridGroup() { return m_grid.data(); }
+//    QQuickItemGroup *minorGridGroup() { return m_minorGrid.data(); }
+//    QQuickItemGroup *labelGroup() { return m_labels.data(); }
+//    QQuickItemGroup *shadeGroup() { return m_shades.data(); }
+//    QQuickItemGroup *arrowGroup() { return m_arrow.data(); }
+//    QQuickItemGroup *minorArrowGroup() { return m_minorArrow.data(); }
 
 public Q_SLOTS:
     void handleVisibleChanged(bool visible);
@@ -171,13 +173,13 @@ private:
     QVector<qreal> m_dynamicMinorTickLayout;
     QStringList m_labelsList;
     QRectF m_axisRect;
-    QScopedPointer<QGraphicsItemGroup> m_grid;
-    QScopedPointer<QGraphicsItemGroup> m_arrow;
-    QScopedPointer<QGraphicsItemGroup> m_minorGrid;
-    QScopedPointer<QGraphicsItemGroup> m_minorArrow;
-    QScopedPointer<QGraphicsItemGroup> m_shades;
-    QScopedPointer<QGraphicsItemGroup> m_labels;
-    QScopedPointer<QGraphicsTextItem> m_title;
+//    QScopedPointer<QQuickItemGroup> m_grid;
+//    QScopedPointer<QQuickItemGroup> m_arrow;
+//    QScopedPointer<QQuickItemGroup> m_minorGrid;
+//    QScopedPointer<QQuickItemGroup> m_minorArrow;
+//    QScopedPointer<QQuickItemGroup> m_shades;
+//    QScopedPointer<QQuickItemGroup> m_labels;
+    QScopedPointer<QQuickPaintedItem> m_title;
     bool m_intervalAxis;
 };
 
diff --git a/src/charts/axis/horizontalaxis2.cpp b/src/charts/axis/horizontalaxis2.cpp
index ad590e2e..a6e5c07f 100644
--- a/src/charts/axis/horizontalaxis2.cpp
+++ b/src/charts/axis/horizontalaxis2.cpp
@@ -35,7 +35,7 @@
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-HorizontalAxis2::HorizontalAxis2(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis)
+HorizontalAxis2::HorizontalAxis2(QAbstractAxis *axis, QQuickItem *item, bool intervalAxis)
     : CartesianChartAxis2(axis, item, intervalAxis)
 {
 }
@@ -74,443 +74,443 @@ QSizeF HorizontalAxis2::sizeHint(Qt::SizeHint which, const QSizeF &constraint) c
 
 void HorizontalAxis2::updateGeometry()
 {
-    const QVector<qreal> &layout = ChartAxisElement2::layout();
-    const QVector<qreal> &dynamicMinorTicklayout = ChartAxisElement2::dynamicMinorTicklayout();
-
-    if (layout.isEmpty() && dynamicMinorTicklayout.isEmpty()
-            && axis()->type() != QAbstractAxis::AxisTypeLogValue) {
-        return;
-    }
-
-    QStringList labelList = labels();
-
-    QList<QGraphicsItem *> labels = labelItems();
-    QList<QGraphicsItem *> arrow = arrowItems();
-    QGraphicsTextItem *title = titleItem();
-
-    Q_ASSERT(labels.size() == labelList.size());
-    Q_ASSERT(layout.size() == labelList.size());
-
-    const QRectF &axisRect = axisGeometry();
-    const QRectF &gridRect = gridGeometry();
-
-    //arrow
-    QGraphicsLineItem *arrowItem = static_cast<QGraphicsLineItem *>(arrow.at(0));
-
-    if (axis()->alignment() == Qt::AlignTop)
-        arrowItem->setLine(gridRect.left(), axisRect.bottom(), gridRect.right(), axisRect.bottom());
-    else if (axis()->alignment() == Qt::AlignBottom)
-        arrowItem->setLine(gridRect.left(), axisRect.top(), gridRect.right(), axisRect.top());
-
-    qreal width = 0;
-    const QLatin1String ellipsis("...");
-
-    //title
-    QRectF titleBoundingRect;
-    QString titleText = axis()->titleText();
-    qreal availableSpace = axisRect.height() - labelPadding();
-    if (!titleText.isEmpty() && titleItem()->isVisible()) {
-        availableSpace -= titlePadding() * 2.0;
-        qreal minimumLabelHeight = ChartPresenter2::textBoundingRect(axis()->labelsFont(),
-                                                                    QStringLiteral("...")).height();
-        qreal titleSpace = availableSpace - minimumLabelHeight;
-        title->setHtml(ChartPresenter2::truncatedText(axis()->titleFont(), titleText, qreal(0.0),
-                                                     gridRect.width(), titleSpace,
-                                                     titleBoundingRect));
-        title->setTextWidth(titleBoundingRect.width());
-
-        titleBoundingRect = title->boundingRect();
-
-        QPointF center = gridRect.center() - titleBoundingRect.center();
-        if (axis()->alignment() == Qt::AlignTop)
-            title->setPos(center.x(), axisRect.top() + titlePadding());
-        else  if (axis()->alignment() == Qt::AlignBottom)
-            title->setPos(center.x(), axisRect.bottom() - titleBoundingRect.height() - titlePadding());
-
-        availableSpace -= titleBoundingRect.height();
-    }
-
-    QList<QGraphicsItem *> lines = gridItems();
-    QList<QGraphicsItem *> shades = shadeItems();
-
-    for (int i = 0; i < layout.size(); ++i) {
-        //items
-        QGraphicsLineItem *gridItem = static_cast<QGraphicsLineItem*>(lines.at(i));
-        QGraphicsLineItem *tickItem = static_cast<QGraphicsLineItem*>(arrow.at(i + 1));
-        QGraphicsTextItem *labelItem = static_cast<QGraphicsTextItem *>(labels.at(i));
-
-        //grid line
-        if (axis()->isReverse()) {
-            gridItem->setLine(gridRect.right() - layout[i] + gridRect.left(), gridRect.top(),
-                    gridRect.right() - layout[i] + gridRect.left(), gridRect.bottom());
-        } else {
-            gridItem->setLine(layout[i], gridRect.top(), layout[i], gridRect.bottom());
-        }
-
-        //label text wrapping
-        QString text;
-        if (axis()->isReverse() && axis()->type() != QAbstractAxis::AxisTypeCategory)
-            text = labelList.at(labelList.count() - i - 1);
-        else
-            text = labelList.at(i);
-
-        QRectF boundingRect;
-        // don't truncate empty labels
-        if (text.isEmpty()) {
-            labelItem->setHtml(text);
-        } else  {
-            qreal labelWidth = axisRect.width() / layout.count() - (2 * labelPadding());
-            QString truncatedText = ChartPresenter2::truncatedText(axis()->labelsFont(), text,
-                                                                  axis()->labelsAngle(),
-                                                                  labelWidth,
-                                                                  availableSpace, boundingRect);
-            labelItem->setTextWidth(ChartPresenter2::textBoundingRect(axis()->labelsFont(),
-                                                                     truncatedText).width());
-            labelItem->setHtml(truncatedText);
-        }
-
-        //label transformation origin point
-        const QRectF& rect = labelItem->boundingRect();
-        QPointF center = rect.center();
-        labelItem->setTransformOriginPoint(center.x(), center.y());
-        qreal heightDiff = rect.height() - boundingRect.height();
-        qreal widthDiff = rect.width() - boundingRect.width();
-
-        //ticks and label position
-        QPointF labelPos;
-        if (axis()->alignment() == Qt::AlignTop) {
-            if (axis()->isReverse()) {
-                labelPos = QPointF(gridRect.right() - layout[layout.size() - i - 1]
-                        + gridRect.left() - center.x(),
-                        axisRect.bottom() - rect.height()
-                        + (heightDiff / 2.0) - labelPadding());
-                tickItem->setLine(gridRect.right() + gridRect.left() - layout[i],
-                                  axisRect.bottom(),
-                                  gridRect.right() + gridRect.left() - layout[i],
-                                  axisRect.bottom() - labelPadding());
-            } else {
-                labelPos = QPointF(layout[i] - center.x(), axisRect.bottom() - rect.height()
-                                  + (heightDiff / 2.0) - labelPadding());
-                tickItem->setLine(layout[i], axisRect.bottom(),
-                                  layout[i], axisRect.bottom() - labelPadding());
-            }
-        } else if (axis()->alignment() == Qt::AlignBottom) {
-            if (axis()->isReverse()) {
-                labelPos = QPointF(gridRect.right() - layout[layout.size() - i - 1]
-                        + gridRect.left() - center.x(),
-                        axisRect.top() - (heightDiff / 2.0) + labelPadding());
-                tickItem->setLine(gridRect.right() + gridRect.left() - layout[i], axisRect.top(),
-                                  gridRect.right() + gridRect.left() - layout[i],
-                                  axisRect.top() + labelPadding());
-            } else {
-                labelPos = QPointF(layout[i] - center.x(), axisRect.top() - (heightDiff / 2.0)
-                                  + labelPadding());
-                tickItem->setLine(layout[i], axisRect.top(),
-                                  layout[i], axisRect.top() + labelPadding());
-            }
-        }
-
-        //label in between
-        bool forceHide = false;
-        if (intervalAxis() && (i + 1) != layout.size()) {
-            qreal leftBound;
-            qreal rightBound;
-            if (axis()->isReverse()) {
-                leftBound = qMax(gridRect.right() + gridRect.left() - layout[i + 1],
-                        gridRect.left());
-                rightBound = qMin(gridRect.right() + gridRect.left() - layout[i], gridRect.right());
-            } else {
-                leftBound = qMax(layout[i], gridRect.left());
-                rightBound = qMin(layout[i + 1], gridRect.right());
-            }
-            const qreal delta = rightBound - leftBound;
-            if (axis()->type() != QAbstractAxis::AxisTypeCategory) {
-                // Hide label in case visible part of the category at the grid edge is too narrow
-                if (delta < boundingRect.width()
-                    && (leftBound == gridRect.left() || rightBound == gridRect.right())) {
-                    forceHide = true;
-                } else {
-                    labelPos.setX(leftBound + (delta / 2.0) - center.x());
-                }
-            } else {
-                QCategoryAxis *categoryAxis = static_cast<QCategoryAxis *>(axis());
-                if (categoryAxis->labelsPosition() == QCategoryAxis::AxisLabelsPositionCenter) {
-                    if (delta < boundingRect.width()
-                        && (leftBound == gridRect.left() || rightBound == gridRect.right())) {
-                        forceHide = true;
-                    } else {
-                        labelPos.setX(leftBound + (delta / 2.0) - center.x());
-                    }
-                } else if (categoryAxis->labelsPosition()
-                           == QCategoryAxis::AxisLabelsPositionOnValue) {
-                    if (axis()->isReverse())
-                        labelPos.setX(leftBound - center.x());
-                    else
-                        labelPos.setX(rightBound - center.x());
-                }
-            }
-        }
-
-        // Round to full pixel via QPoint to avoid one pixel clipping on the edge in some cases
-        labelItem->setPos(labelPos.toPoint());
-
-        //label overlap detection - compensate one pixel for rounding errors
-        if ((labelItem->pos().x() < width && labelItem->toPlainText() == ellipsis) || forceHide ||
-            (labelItem->pos().x() + (widthDiff / 2.0)) < (axisRect.left() - 1.0) ||
-            (labelItem->pos().x() + (widthDiff / 2.0) - 1.0) > axisRect.right()) {
-            labelItem->setVisible(false);
-        } else {
-            labelItem->setVisible(true);
-            width = boundingRect.width() + labelItem->pos().x();
-        }
-
-        //shades
-        QGraphicsRectItem *shadeItem = 0;
-        if (i == 0)
-            shadeItem = static_cast<QGraphicsRectItem *>(shades.at(0));
-        else if (i % 2)
-            shadeItem = static_cast<QGraphicsRectItem *>(shades.at((i / 2) + 1));
-        if (shadeItem) {
-            qreal leftBound;
-            qreal rightBound;
-            if (i == 0) {
-                if (axis()->isReverse()) {
-                    leftBound = gridRect.right() + gridRect.left() - layout[i];
-                    rightBound = gridRect.right();
-                } else {
-                    leftBound = gridRect.left();
-                    rightBound = layout[0];
-                }
-            } else {
-                if (axis()->isReverse()) {
-                    rightBound = gridRect.right() + gridRect.left() - layout[i];
-                    if (i == layout.size() - 1) {
-                        leftBound = gridRect.left();
-                    } else {
-                        leftBound = qMax(gridRect.right() + gridRect.left() - layout[i + 1],
-                                gridRect.left());
-                    }
-                } else {
-                    leftBound = layout[i];
-                    if (i == layout.size() - 1)
-                        rightBound = gridRect.right();
-                    else
-                        rightBound = qMin(layout[i + 1], gridRect.right());
-                }
-            }
-            if (leftBound < gridRect.left())
-                leftBound = gridRect.left();
-            if (rightBound > gridRect.right())
-                rightBound = gridRect.right();
-            shadeItem->setRect(leftBound, gridRect.top(), rightBound - leftBound,
-                               gridRect.height());
-            if (shadeItem->rect().width() <= 0.0)
-                shadeItem->setVisible(false);
-            else
-                shadeItem->setVisible(true);
-        }
-
-        // check if the grid line and the axis tick should be shown
-        const bool gridLineVisible = (gridItem->line().p1().x() >= gridRect.left()
-                                      && gridItem->line().p1().x() <= gridRect.right());
-        gridItem->setVisible(gridLineVisible);
-        tickItem->setVisible(gridLineVisible);
-    }
-
-    updateMinorTickGeometry();
-
-    // begin/end grid line in case labels between
-    if (intervalAxis()) {
-        QGraphicsLineItem *gridLine;
-        gridLine = static_cast<QGraphicsLineItem *>(lines.at(layout.size()));
-        gridLine->setLine(gridRect.right(), gridRect.top(), gridRect.right(), gridRect.bottom());
-        gridLine->setVisible(true);
-        gridLine = static_cast<QGraphicsLineItem*>(lines.at(layout.size()+1));
-        gridLine->setLine(gridRect.left(), gridRect.top(), gridRect.left(), gridRect.bottom());
-        gridLine->setVisible(true);
-    }
+//    const QVector<qreal> &layout = ChartAxisElement2::layout();
+//    const QVector<qreal> &dynamicMinorTicklayout = ChartAxisElement2::dynamicMinorTicklayout();
+
+//    if (layout.isEmpty() && dynamicMinorTicklayout.isEmpty()
+//            && axis()->type() != QAbstractAxis::AxisTypeLogValue) {
+//        return;
+//    }
+
+//    QStringList labelList = labels();
+
+//    QList<QQuickItem *> labels = labelItems();
+//    QList<QQuickItem *> arrow = arrowItems();
+//    QGraphicsTextItem *title = titleItem();
+
+//    Q_ASSERT(labels.size() == labelList.size());
+//    Q_ASSERT(layout.size() == labelList.size());
+
+//    const QRectF &axisRect = axisGeometry();
+//    const QRectF &gridRect = gridGeometry();
+
+//    //arrow
+//    QGraphicsLineItem *arrowItem = static_cast<QGraphicsLineItem *>(arrow.at(0));
+
+//    if (axis()->alignment() == Qt::AlignTop)
+//        arrowItem->setLine(gridRect.left(), axisRect.bottom(), gridRect.right(), axisRect.bottom());
+//    else if (axis()->alignment() == Qt::AlignBottom)
+//        arrowItem->setLine(gridRect.left(), axisRect.top(), gridRect.right(), axisRect.top());
+
+//    qreal width = 0;
+//    const QLatin1String ellipsis("...");
+
+//    //title
+//    QRectF titleBoundingRect;
+//    QString titleText = axis()->titleText();
+//    qreal availableSpace = axisRect.height() - labelPadding();
+//    if (!titleText.isEmpty() && titleItem()->isVisible()) {
+//        availableSpace -= titlePadding() * 2.0;
+//        qreal minimumLabelHeight = ChartPresenter2::textBoundingRect(axis()->labelsFont(),
+//                                                                    QStringLiteral("...")).height();
+//        qreal titleSpace = availableSpace - minimumLabelHeight;
+//        title->setHtml(ChartPresenter2::truncatedText(axis()->titleFont(), titleText, qreal(0.0),
+//                                                     gridRect.width(), titleSpace,
+//                                                     titleBoundingRect));
+//        title->setTextWidth(titleBoundingRect.width());
+
+//        titleBoundingRect = title->boundingRect();
+
+//        QPointF center = gridRect.center() - titleBoundingRect.center();
+//        if (axis()->alignment() == Qt::AlignTop)
+//            title->setPos(center.x(), axisRect.top() + titlePadding());
+//        else  if (axis()->alignment() == Qt::AlignBottom)
+//            title->setPos(center.x(), axisRect.bottom() - titleBoundingRect.height() - titlePadding());
+
+//        availableSpace -= titleBoundingRect.height();
+//    }
+
+//    QList<QQuickItem *> lines = gridItems();
+//    QList<QQuickItem *> shades = shadeItems();
+
+//    for (int i = 0; i < layout.size(); ++i) {
+//        //items
+//        QGraphicsLineItem *gridItem = static_cast<QGraphicsLineItem*>(lines.at(i));
+//        QGraphicsLineItem *tickItem = static_cast<QGraphicsLineItem*>(arrow.at(i + 1));
+//        QGraphicsTextItem *labelItem = static_cast<QGraphicsTextItem *>(labels.at(i));
+
+//        //grid line
+//        if (axis()->isReverse()) {
+//            gridItem->setLine(gridRect.right() - layout[i] + gridRect.left(), gridRect.top(),
+//                    gridRect.right() - layout[i] + gridRect.left(), gridRect.bottom());
+//        } else {
+//            gridItem->setLine(layout[i], gridRect.top(), layout[i], gridRect.bottom());
+//        }
+
+//        //label text wrapping
+//        QString text;
+//        if (axis()->isReverse() && axis()->type() != QAbstractAxis::AxisTypeCategory)
+//            text = labelList.at(labelList.count() - i - 1);
+//        else
+//            text = labelList.at(i);
+
+//        QRectF boundingRect;
+//        // don't truncate empty labels
+//        if (text.isEmpty()) {
+//            labelItem->setHtml(text);
+//        } else  {
+//            qreal labelWidth = axisRect.width() / layout.count() - (2 * labelPadding());
+//            QString truncatedText = ChartPresenter2::truncatedText(axis()->labelsFont(), text,
+//                                                                  axis()->labelsAngle(),
+//                                                                  labelWidth,
+//                                                                  availableSpace, boundingRect);
+//            labelItem->setTextWidth(ChartPresenter2::textBoundingRect(axis()->labelsFont(),
+//                                                                     truncatedText).width());
+//            labelItem->setHtml(truncatedText);
+//        }
+
+//        //label transformation origin point
+//        const QRectF& rect = labelItem->boundingRect();
+//        QPointF center = rect.center();
+//        labelItem->setTransformOriginPoint(center.x(), center.y());
+//        qreal heightDiff = rect.height() - boundingRect.height();
+//        qreal widthDiff = rect.width() - boundingRect.width();
+
+//        //ticks and label position
+//        QPointF labelPos;
+//        if (axis()->alignment() == Qt::AlignTop) {
+//            if (axis()->isReverse()) {
+//                labelPos = QPointF(gridRect.right() - layout[layout.size() - i - 1]
+//                        + gridRect.left() - center.x(),
+//                        axisRect.bottom() - rect.height()
+//                        + (heightDiff / 2.0) - labelPadding());
+//                tickItem->setLine(gridRect.right() + gridRect.left() - layout[i],
+//                                  axisRect.bottom(),
+//                                  gridRect.right() + gridRect.left() - layout[i],
+//                                  axisRect.bottom() - labelPadding());
+//            } else {
+//                labelPos = QPointF(layout[i] - center.x(), axisRect.bottom() - rect.height()
+//                                  + (heightDiff / 2.0) - labelPadding());
+//                tickItem->setLine(layout[i], axisRect.bottom(),
+//                                  layout[i], axisRect.bottom() - labelPadding());
+//            }
+//        } else if (axis()->alignment() == Qt::AlignBottom) {
+//            if (axis()->isReverse()) {
+//                labelPos = QPointF(gridRect.right() - layout[layout.size() - i - 1]
+//                        + gridRect.left() - center.x(),
+//                        axisRect.top() - (heightDiff / 2.0) + labelPadding());
+//                tickItem->setLine(gridRect.right() + gridRect.left() - layout[i], axisRect.top(),
+//                                  gridRect.right() + gridRect.left() - layout[i],
+//                                  axisRect.top() + labelPadding());
+//            } else {
+//                labelPos = QPointF(layout[i] - center.x(), axisRect.top() - (heightDiff / 2.0)
+//                                  + labelPadding());
+//                tickItem->setLine(layout[i], axisRect.top(),
+//                                  layout[i], axisRect.top() + labelPadding());
+//            }
+//        }
+
+//        //label in between
+//        bool forceHide = false;
+//        if (intervalAxis() && (i + 1) != layout.size()) {
+//            qreal leftBound;
+//            qreal rightBound;
+//            if (axis()->isReverse()) {
+//                leftBound = qMax(gridRect.right() + gridRect.left() - layout[i + 1],
+//                        gridRect.left());
+//                rightBound = qMin(gridRect.right() + gridRect.left() - layout[i], gridRect.right());
+//            } else {
+//                leftBound = qMax(layout[i], gridRect.left());
+//                rightBound = qMin(layout[i + 1], gridRect.right());
+//            }
+//            const qreal delta = rightBound - leftBound;
+//            if (axis()->type() != QAbstractAxis::AxisTypeCategory) {
+//                // Hide label in case visible part of the category at the grid edge is too narrow
+//                if (delta < boundingRect.width()
+//                    && (leftBound == gridRect.left() || rightBound == gridRect.right())) {
+//                    forceHide = true;
+//                } else {
+//                    labelPos.setX(leftBound + (delta / 2.0) - center.x());
+//                }
+//            } else {
+//                QCategoryAxis *categoryAxis = static_cast<QCategoryAxis *>(axis());
+//                if (categoryAxis->labelsPosition() == QCategoryAxis::AxisLabelsPositionCenter) {
+//                    if (delta < boundingRect.width()
+//                        && (leftBound == gridRect.left() || rightBound == gridRect.right())) {
+//                        forceHide = true;
+//                    } else {
+//                        labelPos.setX(leftBound + (delta / 2.0) - center.x());
+//                    }
+//                } else if (categoryAxis->labelsPosition()
+//                           == QCategoryAxis::AxisLabelsPositionOnValue) {
+//                    if (axis()->isReverse())
+//                        labelPos.setX(leftBound - center.x());
+//                    else
+//                        labelPos.setX(rightBound - center.x());
+//                }
+//            }
+//        }
+
+//        // Round to full pixel via QPoint to avoid one pixel clipping on the edge in some cases
+//        labelItem->setPos(labelPos.toPoint());
+
+//        //label overlap detection - compensate one pixel for rounding errors
+//        if ((labelItem->pos().x() < width && labelItem->toPlainText() == ellipsis) || forceHide ||
+//            (labelItem->pos().x() + (widthDiff / 2.0)) < (axisRect.left() - 1.0) ||
+//            (labelItem->pos().x() + (widthDiff / 2.0) - 1.0) > axisRect.right()) {
+//            labelItem->setVisible(false);
+//        } else {
+//            labelItem->setVisible(true);
+//            width = boundingRect.width() + labelItem->pos().x();
+//        }
+
+//        //shades
+//        QGraphicsRectItem *shadeItem = 0;
+//        if (i == 0)
+//            shadeItem = static_cast<QGraphicsRectItem *>(shades.at(0));
+//        else if (i % 2)
+//            shadeItem = static_cast<QGraphicsRectItem *>(shades.at((i / 2) + 1));
+//        if (shadeItem) {
+//            qreal leftBound;
+//            qreal rightBound;
+//            if (i == 0) {
+//                if (axis()->isReverse()) {
+//                    leftBound = gridRect.right() + gridRect.left() - layout[i];
+//                    rightBound = gridRect.right();
+//                } else {
+//                    leftBound = gridRect.left();
+//                    rightBound = layout[0];
+//                }
+//            } else {
+//                if (axis()->isReverse()) {
+//                    rightBound = gridRect.right() + gridRect.left() - layout[i];
+//                    if (i == layout.size() - 1) {
+//                        leftBound = gridRect.left();
+//                    } else {
+//                        leftBound = qMax(gridRect.right() + gridRect.left() - layout[i + 1],
+//                                gridRect.left());
+//                    }
+//                } else {
+//                    leftBound = layout[i];
+//                    if (i == layout.size() - 1)
+//                        rightBound = gridRect.right();
+//                    else
+//                        rightBound = qMin(layout[i + 1], gridRect.right());
+//                }
+//            }
+//            if (leftBound < gridRect.left())
+//                leftBound = gridRect.left();
+//            if (rightBound > gridRect.right())
+//                rightBound = gridRect.right();
+//            shadeItem->setRect(leftBound, gridRect.top(), rightBound - leftBound,
+//                               gridRect.height());
+//            if (shadeItem->rect().width() <= 0.0)
+//                shadeItem->setVisible(false);
+//            else
+//                shadeItem->setVisible(true);
+//        }
+
+//        // check if the grid line and the axis tick should be shown
+//        const bool gridLineVisible = (gridItem->line().p1().x() >= gridRect.left()
+//                                      && gridItem->line().p1().x() <= gridRect.right());
+//        gridItem->setVisible(gridLineVisible);
+//        tickItem->setVisible(gridLineVisible);
+//    }
+
+//    updateMinorTickGeometry();
+
+//    // begin/end grid line in case labels between
+//    if (intervalAxis()) {
+//        QGraphicsLineItem *gridLine;
+//        gridLine = static_cast<QGraphicsLineItem *>(lines.at(layout.size()));
+//        gridLine->setLine(gridRect.right(), gridRect.top(), gridRect.right(), gridRect.bottom());
+//        gridLine->setVisible(true);
+//        gridLine = static_cast<QGraphicsLineItem*>(lines.at(layout.size()+1));
+//        gridLine->setLine(gridRect.left(), gridRect.top(), gridRect.left(), gridRect.bottom());
+//        gridLine->setVisible(true);
+//    }
 }
 
 void HorizontalAxis2::updateMinorTickGeometry()
 {
-    if (!axis())
-        return;
-
-    QVector<qreal> layout = ChartAxisElement2::layout();
-    int minorTickCount = 0;
-    qreal tickSpacing = 0.0;
-    QVector<qreal> minorTickSpacings;
-    switch (axis()->type()) {
-    case QAbstractAxis::AxisTypeValue: {
-        const QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
-
-        minorTickCount = valueAxis->minorTickCount();
-
-        if (valueAxis->tickType() == QValueAxis::TicksFixed) {
-            if (valueAxis->tickCount() >= 2)
-                tickSpacing = layout.at(0) - layout.at(1);
-
-            for (int i = 0; i < minorTickCount; ++i) {
-                const qreal ratio = (1.0 / qreal(minorTickCount + 1)) * qreal(i + 1);
-                minorTickSpacings.append(tickSpacing * ratio);
-            }
-        }
-        break;
-    }
-    case QAbstractAxis::AxisTypeLogValue: {
-        const QLogValueAxis *logValueAxis = qobject_cast<QLogValueAxis *>(axis());
-        const qreal base = logValueAxis->base();
-        const qreal logBase = qLn(base);
-
-        minorTickCount = logValueAxis->minorTickCount();
-        if (minorTickCount < 0)
-            minorTickCount = qMax(int(qFloor(base) - 2.0), 0);
-
-        // Two "virtual" ticks are required to make sure that all minor ticks
-        // are displayed properly (even for the partially visible segments of
-        // the chart).
-        if (layout.size() >= 2) {
-            // Calculate tickSpacing as a difference between visible ticks
-            // whenever it is possible. Virtual ticks will not be correctly
-            // positioned when the layout is animating.
-            tickSpacing = layout.at(0) - layout.at(1);
-            layout.prepend(layout.at(0) + tickSpacing);
-            layout.append(layout.at(layout.size() - 1) - tickSpacing);
-        } else {
-            const qreal logMax = qLn(logValueAxis->max());
-            const qreal logMin = qLn(logValueAxis->min());
-            const qreal logExtraMaxTick = qLn(qPow(base, qFloor(logMax / logBase) + 1.0));
-            const qreal logExtraMinTick = qLn(qPow(base, qCeil(logMin / logBase) - 1.0));
-            const qreal edge = gridGeometry().left();
-            const qreal delta = gridGeometry().width() / qAbs(logMax - logMin);
-            const qreal extraMaxTick = edge + (logExtraMaxTick - qMin(logMin, logMax)) * delta;
-            const qreal extraMinTick = edge + (logExtraMinTick - qMin(logMin, logMax)) * delta;
-
-            // Calculate tickSpacing using one (if layout.size() == 1) or two
-            // (if layout.size() == 0) "virtual" ticks. In both cases animation
-            // will not work as expected. This should be fixed later.
-            layout.prepend(extraMinTick);
-            layout.append(extraMaxTick);
-            tickSpacing = layout.at(0) - layout.at(1);
-        }
-
-        const qreal minorTickStepValue = qFabs(base - 1.0) / qreal(minorTickCount + 1);
-        for (int i = 0; i < minorTickCount; ++i) {
-            const qreal x = minorTickStepValue * qreal(i + 1) + 1.0;
-            const qreal minorTickSpacing = tickSpacing * (qLn(x) / logBase);
-            minorTickSpacings.append(minorTickSpacing);
-        }
-        break;
-    }
-    default:
-        // minor ticks are not supported
-        break;
-    }
-
-    const QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
-    if (valueAxis && valueAxis->tickType() == QValueAxis::TicksDynamic) {
-        const QVector<qreal> dynamicMinorTicklayout = ChartAxisElement2::dynamicMinorTicklayout();
-        const QRectF &gridRect = gridGeometry();
-        const qreal deltaX = gridRect.width() / (valueAxis->max() - valueAxis->min());
-        const qreal leftPos = gridRect.left();
-        const qreal rightPos = gridRect.right();
-
-        for (int i = 0; i < dynamicMinorTicklayout.size(); i++) {
-            QGraphicsLineItem *minorGridLineItem =
-                    static_cast<QGraphicsLineItem *>(minorGridItems().value(i));
-            QGraphicsLineItem *minorArrowLineItem =
-                    static_cast<QGraphicsLineItem *>(minorArrowItems().value(i));
-            if (!minorGridLineItem || !minorArrowLineItem)
-                continue;
-
-            qreal minorGridLineItemX = 0.0;
-            if (axis()->isReverse())
-                minorGridLineItemX = rightPos - dynamicMinorTicklayout.at(i) * deltaX;
-            else
-                minorGridLineItemX = dynamicMinorTicklayout.at(i) * deltaX + leftPos;
-
-            qreal minorArrowLineItemY1;
-            qreal minorArrowLineItemY2;
-            switch (axis()->alignment()) {
-            case Qt::AlignTop:
-                minorArrowLineItemY1 = gridGeometry().bottom();
-                minorArrowLineItemY2 = gridGeometry().bottom() - labelPadding() / 2.0;
-                break;
-            case Qt::AlignBottom:
-                minorArrowLineItemY1 = gridGeometry().top();
-                minorArrowLineItemY2 = gridGeometry().top() + labelPadding() / 2.0;
-                break;
-            default:
-                minorArrowLineItemY1 = 0.0;
-                minorArrowLineItemY2 = 0.0;
-                break;
-            }
-
-            minorGridLineItem->setLine(minorGridLineItemX, gridGeometry().top(),
-                                       minorGridLineItemX, gridGeometry().bottom());
-            minorArrowLineItem->setLine(minorGridLineItemX, minorArrowLineItemY1,
-                                        minorGridLineItemX, minorArrowLineItemY2);
-
-            // check if the minor grid line and the minor axis arrow should be shown
-            bool minorGridLineVisible = (minorGridLineItemX >= gridGeometry().left()
-                                         && minorGridLineItemX <= gridGeometry().right());
-            minorGridLineItem->setVisible(minorGridLineVisible);
-            minorArrowLineItem->setVisible(minorGridLineVisible);
-        }
-    } else {
-        if (minorTickCount < 1 || tickSpacing == 0.0 || minorTickSpacings.count() != minorTickCount)
-            return;
-
-        for (int i = 0; i < layout.size() - 1; ++i) {
-            for (int j = 0; j < minorTickCount; ++j) {
-                const int minorItemIndex = i * minorTickCount + j;
-                QGraphicsLineItem *minorGridLineItem =
-                        static_cast<QGraphicsLineItem *>(minorGridItems().value(minorItemIndex));
-                QGraphicsLineItem *minorArrowLineItem =
-                        static_cast<QGraphicsLineItem *>(minorArrowItems().value(minorItemIndex));
-                if (!minorGridLineItem || !minorArrowLineItem)
-                    continue;
-
-                const qreal minorTickSpacing = minorTickSpacings.value(j, 0.0);
-
-                qreal minorGridLineItemX = 0.0;
-                if (axis()->isReverse()) {
-                    minorGridLineItemX = qFloor(gridGeometry().left() + gridGeometry().right()
-                                                - layout.at(i) + minorTickSpacing);
-                } else {
-                    minorGridLineItemX = qCeil(layout.at(i) - minorTickSpacing);
-                }
-
-                qreal minorArrowLineItemY1;
-                qreal minorArrowLineItemY2;
-                switch (axis()->alignment()) {
-                case Qt::AlignTop:
-                    minorArrowLineItemY1 = gridGeometry().bottom();
-                    minorArrowLineItemY2 = gridGeometry().bottom() - labelPadding() / 2.0;
-                    break;
-                case Qt::AlignBottom:
-                    minorArrowLineItemY1 = gridGeometry().top();
-                    minorArrowLineItemY2 = gridGeometry().top() + labelPadding() / 2.0;
-                    break;
-                default:
-                    minorArrowLineItemY1 = 0.0;
-                    minorArrowLineItemY2 = 0.0;
-                    break;
-                }
-
-                minorGridLineItem->setLine(minorGridLineItemX, gridGeometry().top(),
-                                           minorGridLineItemX, gridGeometry().bottom());
-                minorArrowLineItem->setLine(minorGridLineItemX, minorArrowLineItemY1,
-                                            minorGridLineItemX, minorArrowLineItemY2);
-
-                // check if the minor grid line and the minor axis arrow should be shown
-                bool minorGridLineVisible = (minorGridLineItemX >= gridGeometry().left()
-                                             && minorGridLineItemX <= gridGeometry().right());
-                minorGridLineItem->setVisible(minorGridLineVisible);
-                minorArrowLineItem->setVisible(minorGridLineVisible);
-            }
-        }
-    }
+//    if (!axis())
+//        return;
+
+//    QVector<qreal> layout = ChartAxisElement2::layout();
+//    int minorTickCount = 0;
+//    qreal tickSpacing = 0.0;
+//    QVector<qreal> minorTickSpacings;
+//    switch (axis()->type()) {
+//    case QAbstractAxis::AxisTypeValue: {
+//        const QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
+
+//        minorTickCount = valueAxis->minorTickCount();
+
+//        if (valueAxis->tickType() == QValueAxis::TicksFixed) {
+//            if (valueAxis->tickCount() >= 2)
+//                tickSpacing = layout.at(0) - layout.at(1);
+
+//            for (int i = 0; i < minorTickCount; ++i) {
+//                const qreal ratio = (1.0 / qreal(minorTickCount + 1)) * qreal(i + 1);
+//                minorTickSpacings.append(tickSpacing * ratio);
+//            }
+//        }
+//        break;
+//    }
+//    case QAbstractAxis::AxisTypeLogValue: {
+//        const QLogValueAxis *logValueAxis = qobject_cast<QLogValueAxis *>(axis());
+//        const qreal base = logValueAxis->base();
+//        const qreal logBase = qLn(base);
+
+//        minorTickCount = logValueAxis->minorTickCount();
+//        if (minorTickCount < 0)
+//            minorTickCount = qMax(int(qFloor(base) - 2.0), 0);
+
+//        // Two "virtual" ticks are required to make sure that all minor ticks
+//        // are displayed properly (even for the partially visible segments of
+//        // the chart).
+//        if (layout.size() >= 2) {
+//            // Calculate tickSpacing as a difference between visible ticks
+//            // whenever it is possible. Virtual ticks will not be correctly
+//            // positioned when the layout is animating.
+//            tickSpacing = layout.at(0) - layout.at(1);
+//            layout.prepend(layout.at(0) + tickSpacing);
+//            layout.append(layout.at(layout.size() - 1) - tickSpacing);
+//        } else {
+//            const qreal logMax = qLn(logValueAxis->max());
+//            const qreal logMin = qLn(logValueAxis->min());
+//            const qreal logExtraMaxTick = qLn(qPow(base, qFloor(logMax / logBase) + 1.0));
+//            const qreal logExtraMinTick = qLn(qPow(base, qCeil(logMin / logBase) - 1.0));
+//            const qreal edge = gridGeometry().left();
+//            const qreal delta = gridGeometry().width() / qAbs(logMax - logMin);
+//            const qreal extraMaxTick = edge + (logExtraMaxTick - qMin(logMin, logMax)) * delta;
+//            const qreal extraMinTick = edge + (logExtraMinTick - qMin(logMin, logMax)) * delta;
+
+//            // Calculate tickSpacing using one (if layout.size() == 1) or two
+//            // (if layout.size() == 0) "virtual" ticks. In both cases animation
+//            // will not work as expected. This should be fixed later.
+//            layout.prepend(extraMinTick);
+//            layout.append(extraMaxTick);
+//            tickSpacing = layout.at(0) - layout.at(1);
+//        }
+
+//        const qreal minorTickStepValue = qFabs(base - 1.0) / qreal(minorTickCount + 1);
+//        for (int i = 0; i < minorTickCount; ++i) {
+//            const qreal x = minorTickStepValue * qreal(i + 1) + 1.0;
+//            const qreal minorTickSpacing = tickSpacing * (qLn(x) / logBase);
+//            minorTickSpacings.append(minorTickSpacing);
+//        }
+//        break;
+//    }
+//    default:
+//        // minor ticks are not supported
+//        break;
+//    }
+
+//    const QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
+//    if (valueAxis && valueAxis->tickType() == QValueAxis::TicksDynamic) {
+//        const QVector<qreal> dynamicMinorTicklayout = ChartAxisElement2::dynamicMinorTicklayout();
+//        const QRectF &gridRect = gridGeometry();
+//        const qreal deltaX = gridRect.width() / (valueAxis->max() - valueAxis->min());
+//        const qreal leftPos = gridRect.left();
+//        const qreal rightPos = gridRect.right();
+
+//        for (int i = 0; i < dynamicMinorTicklayout.size(); i++) {
+//            QGraphicsLineItem *minorGridLineItem =
+//                    static_cast<QGraphicsLineItem *>(minorGridItems().value(i));
+//            QGraphicsLineItem *minorArrowLineItem =
+//                    static_cast<QGraphicsLineItem *>(minorArrowItems().value(i));
+//            if (!minorGridLineItem || !minorArrowLineItem)
+//                continue;
+
+//            qreal minorGridLineItemX = 0.0;
+//            if (axis()->isReverse())
+//                minorGridLineItemX = rightPos - dynamicMinorTicklayout.at(i) * deltaX;
+//            else
+//                minorGridLineItemX = dynamicMinorTicklayout.at(i) * deltaX + leftPos;
+
+//            qreal minorArrowLineItemY1;
+//            qreal minorArrowLineItemY2;
+//            switch (axis()->alignment()) {
+//            case Qt::AlignTop:
+//                minorArrowLineItemY1 = gridGeometry().bottom();
+//                minorArrowLineItemY2 = gridGeometry().bottom() - labelPadding() / 2.0;
+//                break;
+//            case Qt::AlignBottom:
+//                minorArrowLineItemY1 = gridGeometry().top();
+//                minorArrowLineItemY2 = gridGeometry().top() + labelPadding() / 2.0;
+//                break;
+//            default:
+//                minorArrowLineItemY1 = 0.0;
+//                minorArrowLineItemY2 = 0.0;
+//                break;
+//            }
+
+//            minorGridLineItem->setLine(minorGridLineItemX, gridGeometry().top(),
+//                                       minorGridLineItemX, gridGeometry().bottom());
+//            minorArrowLineItem->setLine(minorGridLineItemX, minorArrowLineItemY1,
+//                                        minorGridLineItemX, minorArrowLineItemY2);
+
+//            // check if the minor grid line and the minor axis arrow should be shown
+//            bool minorGridLineVisible = (minorGridLineItemX >= gridGeometry().left()
+//                                         && minorGridLineItemX <= gridGeometry().right());
+//            minorGridLineItem->setVisible(minorGridLineVisible);
+//            minorArrowLineItem->setVisible(minorGridLineVisible);
+//        }
+//    } else {
+//        if (minorTickCount < 1 || tickSpacing == 0.0 || minorTickSpacings.count() != minorTickCount)
+//            return;
+
+//        for (int i = 0; i < layout.size() - 1; ++i) {
+//            for (int j = 0; j < minorTickCount; ++j) {
+//                const int minorItemIndex = i * minorTickCount + j;
+//                QGraphicsLineItem *minorGridLineItem =
+//                        static_cast<QGraphicsLineItem *>(minorGridItems().value(minorItemIndex));
+//                QGraphicsLineItem *minorArrowLineItem =
+//                        static_cast<QGraphicsLineItem *>(minorArrowItems().value(minorItemIndex));
+//                if (!minorGridLineItem || !minorArrowLineItem)
+//                    continue;
+
+//                const qreal minorTickSpacing = minorTickSpacings.value(j, 0.0);
+
+//                qreal minorGridLineItemX = 0.0;
+//                if (axis()->isReverse()) {
+//                    minorGridLineItemX = qFloor(gridGeometry().left() + gridGeometry().right()
+//                                                - layout.at(i) + minorTickSpacing);
+//                } else {
+//                    minorGridLineItemX = qCeil(layout.at(i) - minorTickSpacing);
+//                }
+
+//                qreal minorArrowLineItemY1;
+//                qreal minorArrowLineItemY2;
+//                switch (axis()->alignment()) {
+//                case Qt::AlignTop:
+//                    minorArrowLineItemY1 = gridGeometry().bottom();
+//                    minorArrowLineItemY2 = gridGeometry().bottom() - labelPadding() / 2.0;
+//                    break;
+//                case Qt::AlignBottom:
+//                    minorArrowLineItemY1 = gridGeometry().top();
+//                    minorArrowLineItemY2 = gridGeometry().top() + labelPadding() / 2.0;
+//                    break;
+//                default:
+//                    minorArrowLineItemY1 = 0.0;
+//                    minorArrowLineItemY2 = 0.0;
+//                    break;
+//                }
+
+//                minorGridLineItem->setLine(minorGridLineItemX, gridGeometry().top(),
+//                                           minorGridLineItemX, gridGeometry().bottom());
+//                minorArrowLineItem->setLine(minorGridLineItemX, minorArrowLineItemY1,
+//                                            minorGridLineItemX, minorArrowLineItemY2);
+
+//                // check if the minor grid line and the minor axis arrow should be shown
+//                bool minorGridLineVisible = (minorGridLineItemX >= gridGeometry().left()
+//                                             && minorGridLineItemX <= gridGeometry().right());
+//                minorGridLineItem->setVisible(minorGridLineVisible);
+//                minorArrowLineItem->setVisible(minorGridLineVisible);
+//            }
+//        }
+//    }
 }
 
 QT_CHARTS_END_NAMESPACE
diff --git a/src/charts/axis/horizontalaxis2_p.h b/src/charts/axis/horizontalaxis2_p.h
index 550a78e4..26a93b27 100644
--- a/src/charts/axis/horizontalaxis2_p.h
+++ b/src/charts/axis/horizontalaxis2_p.h
@@ -47,7 +47,7 @@ QT_CHARTS_BEGIN_NAMESPACE
 class QT_CHARTS_PRIVATE_EXPORT HorizontalAxis2 : public CartesianChartAxis2
 {
 public:
-    HorizontalAxis2(QAbstractAxis *axis, QGraphicsItem *item = nullptr, bool intervalAxis = false);
+    HorizontalAxis2(QAbstractAxis *axis, QQuickItem *item = nullptr, bool intervalAxis = false);
     ~HorizontalAxis2();
 
     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
diff --git a/src/charts/axis/linearrowitem2_p.h b/src/charts/axis/linearrowitem2_p.h
index 89f5a90c..3b86383d 100644
--- a/src/charts/axis/linearrowitem2_p.h
+++ b/src/charts/axis/linearrowitem2_p.h
@@ -46,21 +46,21 @@
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-class QT_CHARTS_PRIVATE_EXPORT LineArrowItem2: public QGraphicsLineItem
+class QT_CHARTS_PRIVATE_EXPORT LineArrowItem2: public QQuickPaintedItem
 {
 public:
-    explicit LineArrowItem2(ChartAxisElement2 *axis, QGraphicsItem *parent = 0)
-        : QGraphicsLineItem(parent),
+    explicit LineArrowItem2(ChartAxisElement2 *axis, QQuickItem *parent = 0)
+        : QQuickPaintedItem(parent),
           m_axis(axis),
           m_axisOrientation(axis->axis()->orientation())
     {
     }
 
 protected:
-    void mousePressEvent(QGraphicsSceneMouseEvent *event)
+    void mousePressEvent(QMouseEvent *event)
     {
         m_axis->axisSelected();
-        QGraphicsLineItem::mousePressEvent(event);
+        QQuickPaintedItem::mousePressEvent(event);
     }
 
     QRectF boundingRect() const
@@ -70,9 +70,9 @@ protected:
 
     QPainterPath shape() const
     {
-        QPainterPath path = QGraphicsLineItem::shape();
-        QRectF rect = path.boundingRect();
-        path.addRect(rect.adjusted(0, 0, m_axisOrientation != Qt::Horizontal ? 8 : 0, m_axisOrientation != Qt::Vertical ? 8 : 0));
+        QPainterPath path;// = QGraphicsLineItem::shape();
+//        QRectF rect = path.boundingRect();
+//        path.addRect(rect.adjusted(0, 0, m_axisOrientation != Qt::Horizontal ? 8 : 0, m_axisOrientation != Qt::Vertical ? 8 : 0));
         return path;
     }
 
diff --git a/src/charts/axis/polarchartaxis2.cpp b/src/charts/axis/polarchartaxis2.cpp
index af6092ab..91189203 100644
--- a/src/charts/axis/polarchartaxis2.cpp
+++ b/src/charts/axis/polarchartaxis2.cpp
@@ -34,7 +34,7 @@
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-PolarChartAxis2::PolarChartAxis2(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis)
+PolarChartAxis2::PolarChartAxis2(QAbstractAxis *axis, QQuickItem *item, bool intervalAxis)
     : ChartAxisElement2(axis, item, intervalAxis)
 {
 }
@@ -50,7 +50,7 @@ void PolarChartAxis2::setGeometry(const QRectF &axis, const QRectF &grid)
     setAxisGeometry(axis);
 
     if (isEmpty()) {
-        prepareGeometryChange();
+//        prepareGeometryChange();
         return;
     }
 
@@ -83,8 +83,8 @@ void PolarChartAxis2::updateLayout(QVector<qreal> &layout)
         // axes lingering in wrong position compared to series plot before animation can kick in.
         // Note that the position mismatch still exists even with this update, but it will be
         // far less ugly.
-        if (ChartAxisElement2::layout().size() != 0)
-            updateGeometry();
+//        if (ChartAxisElement2::layout().size() != 0)
+//            updateGeometry();
     }
 
     if (diff > 0)
@@ -99,7 +99,7 @@ void PolarChartAxis2::updateLayout(QVector<qreal> &layout)
         presenter()->startAnimation(animation());
     } else {
         setLayout(layout);
-        updateGeometry();
+//        updateGeometry();
     }
 }
 
@@ -110,30 +110,30 @@ bool PolarChartAxis2::isEmpty()
 
 void PolarChartAxis2::deleteItems(int count)
 {
-    QList<QGraphicsItem *> gridLines = gridItems();
-    QList<QGraphicsItem *> labels = labelItems();
-    QList<QGraphicsItem *> shades = shadeItems();
-    QList<QGraphicsItem *> axis = arrowItems();
-
-    for (int i = 0; i < count; ++i) {
-        if (gridItems().size() == 1 || (((gridLines.size() + 1) % 2) && gridLines.size() > 0))
-            delete(shades.takeLast());
-        delete(gridLines.takeLast());
-        delete(labels.takeLast());
-        delete(axis.takeLast());
-    }
+//    QList<QQuickItem *> gridLines = gridItems();
+//    QList<QQuickItem *> labels = labelItems();
+//    QList<QQuickItem *> shades = shadeItems();
+//    QList<QQuickItem *> axis = arrowItems();
+
+//    for (int i = 0; i < count; ++i) {
+//        if (gridItems().size() == 1 || (((gridLines.size() + 1) % 2) && gridLines.size() > 0))
+//            delete(shades.takeLast());
+//        delete(gridLines.takeLast());
+//        delete(labels.takeLast());
+//        delete(axis.takeLast());
+//    }
 }
 
 void PolarChartAxis2::handleShadesBrushChanged(const QBrush &brush)
 {
-    foreach (QGraphicsItem *item, shadeItems())
-        static_cast<QGraphicsPathItem *>(item)->setBrush(brush);
+//    foreach (QQuickItem *item, shadeItems())
+//        static_cast<QGraphicsPathItem *>(item)->setBrush(brush);
 }
 
 void PolarChartAxis2::handleShadesPenChanged(const QPen &pen)
 {
-    foreach (QGraphicsItem *item, shadeItems())
-        static_cast<QGraphicsPathItem *>(item)->setPen(pen);
+//    foreach (QQuickItem *item, shadeItems())
+//        static_cast<QGraphicsPathItem *>(item)->setPen(pen);
 }
 
 QT_CHARTS_END_NAMESPACE
diff --git a/src/charts/axis/polarchartaxis2_p.h b/src/charts/axis/polarchartaxis2_p.h
index 26244ff1..135fabb8 100644
--- a/src/charts/axis/polarchartaxis2_p.h
+++ b/src/charts/axis/polarchartaxis2_p.h
@@ -47,9 +47,9 @@ QT_CHARTS_BEGIN_NAMESPACE
 class QT_CHARTS_PRIVATE_EXPORT PolarChartAxis2 : public ChartAxisElement2
 {
     Q_OBJECT
-    Q_INTERFACES(QGraphicsLayoutItem)
+//    Q_INTERFACES(QGraphicsLayoutItem)
 public:
-    PolarChartAxis2(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis = false);
+    PolarChartAxis2(QAbstractAxis *axis, QQuickItem *item, bool intervalAxis = false);
     ~PolarChartAxis2();
 
     void setGeometry(const QRectF &axis, const QRectF &grid);
diff --git a/src/charts/axis/qabstractaxis_p.h b/src/charts/axis/qabstractaxis_p.h
index 072dfe89..182809e5 100644
--- a/src/charts/axis/qabstractaxis_p.h
+++ b/src/charts/axis/qabstractaxis_p.h
@@ -77,7 +77,7 @@ public:
 
     virtual void initializeDomain(AbstractDomain *domain) = 0;
     virtual void initializeGraphics(QGraphicsItem *parent) = 0;
-    virtual void initializeGraphics2(QGraphicsItem *parent) { Q_ASSERT(false); }
+    virtual void initializeGraphics2(QQuickItem *parent) { /*Q_ASSERT(false);*/ }
     virtual void initializeTheme(ChartTheme* theme, bool forced = false);
     virtual void initializeAnimations(QChart::AnimationOptions options, int duration,
                                       QEasingCurve &curve);
diff --git a/src/charts/axis/valueaxis/chartvalueaxisx2.cpp b/src/charts/axis/valueaxis/chartvalueaxisx2.cpp
index c824a716..714869f4 100644
--- a/src/charts/axis/valueaxis/chartvalueaxisx2.cpp
+++ b/src/charts/axis/valueaxis/chartvalueaxisx2.cpp
@@ -39,7 +39,7 @@
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-ChartValueAxisX2::ChartValueAxisX2(QValueAxis *axis, QGraphicsItem *item )
+ChartValueAxisX2::ChartValueAxisX2(QValueAxis *axis, QQuickItem *item )
     : HorizontalAxis2(axis, item),
       m_axis(axis)
 {
@@ -112,14 +112,14 @@ void ChartValueAxisX2::updateGeometry()
 void ChartValueAxisX2::handleTickCountChanged(int tick)
 {
     Q_UNUSED(tick);
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if (presenter()) presenter()->layout()->invalidate();
 }
 
 void ChartValueAxisX2::handleMinorTickCountChanged(int tick)
 {
     Q_UNUSED(tick);
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if (presenter())
         presenter()->layout()->invalidate();
 }
@@ -127,28 +127,28 @@ void ChartValueAxisX2::handleMinorTickCountChanged(int tick)
 void ChartValueAxisX2::handleLabelFormatChanged(const QString &format)
 {
     Q_UNUSED(format);
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if (presenter()) presenter()->layout()->invalidate();
 }
 
 void ChartValueAxisX2::handleTickIntervalChanged(qreal interval)
 {
     Q_UNUSED(interval)
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if (presenter()) presenter()->layout()->invalidate();
 }
 
 void ChartValueAxisX2::handleTickAnchorChanged(qreal anchor)
 {
     Q_UNUSED(anchor)
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if (presenter()) presenter()->layout()->invalidate();
 }
 
 void ChartValueAxisX2::handleTickTypeChanged(QValueAxis::TickType type)
 {
     Q_UNUSED(type)
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if (presenter()) presenter()->layout()->invalidate();
 }
 
diff --git a/src/charts/axis/valueaxis/chartvalueaxisx2_p.h b/src/charts/axis/valueaxis/chartvalueaxisx2_p.h
index 106b922a..c4a8351f 100644
--- a/src/charts/axis/valueaxis/chartvalueaxisx2_p.h
+++ b/src/charts/axis/valueaxis/chartvalueaxisx2_p.h
@@ -50,7 +50,7 @@ class QT_CHARTS_PRIVATE_EXPORT ChartValueAxisX2 : public HorizontalAxis2
 {
     Q_OBJECT
 public:
-    ChartValueAxisX2(QValueAxis *axis, QGraphicsItem *item = 0);
+    ChartValueAxisX2(QValueAxis *axis, QQuickItem *item = 0);
     ~ChartValueAxisX2();
 
     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const;
diff --git a/src/charts/axis/valueaxis/chartvalueaxisy2.cpp b/src/charts/axis/valueaxis/chartvalueaxisy2.cpp
index f0151f84..6d31175e 100644
--- a/src/charts/axis/valueaxis/chartvalueaxisy2.cpp
+++ b/src/charts/axis/valueaxis/chartvalueaxisy2.cpp
@@ -38,7 +38,7 @@
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-ChartValueAxisY2::ChartValueAxisY2(QValueAxis *axis, QGraphicsItem *item)
+ChartValueAxisY2::ChartValueAxisY2(QValueAxis *axis, QQuickItem *item)
     : VerticalAxis2(axis, item),
       m_axis(axis)
 {
@@ -113,14 +113,14 @@ void ChartValueAxisY2::updateGeometry()
 void ChartValueAxisY2::handleTickCountChanged(int tick)
 {
     Q_UNUSED(tick);
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if (presenter()) presenter()->layout()->invalidate();
 }
 
 void ChartValueAxisY2::handleMinorTickCountChanged(int tick)
 {
     Q_UNUSED(tick);
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if (presenter())
         presenter()->layout()->invalidate();
 }
@@ -128,28 +128,28 @@ void ChartValueAxisY2::handleMinorTickCountChanged(int tick)
 void ChartValueAxisY2::handleLabelFormatChanged(const QString &format)
 {
     Q_UNUSED(format);
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if (presenter()) presenter()->layout()->invalidate();
 }
 
 void ChartValueAxisY2::handleTickIntervalChanged(qreal interval)
 {
     Q_UNUSED(interval)
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if (presenter()) presenter()->layout()->invalidate();
 }
 
 void ChartValueAxisY2::handleTickAnchorChanged(qreal anchor)
 {
     Q_UNUSED(anchor)
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if (presenter()) presenter()->layout()->invalidate();
 }
 
 void ChartValueAxisY2::handleTickTypeChanged(QValueAxis::TickType type)
 {
     Q_UNUSED(type)
-    QGraphicsLayoutItem::updateGeometry();
+//    QGraphicsLayoutItem::updateGeometry();
     if (presenter()) presenter()->layout()->invalidate();
 }
 
diff --git a/src/charts/axis/valueaxis/chartvalueaxisy2_p.h b/src/charts/axis/valueaxis/chartvalueaxisy2_p.h
index 58fce6a6..2d8d606b 100644
--- a/src/charts/axis/valueaxis/chartvalueaxisy2_p.h
+++ b/src/charts/axis/valueaxis/chartvalueaxisy2_p.h
@@ -50,7 +50,7 @@ class QT_CHARTS_PRIVATE_EXPORT ChartValueAxisY2 : public VerticalAxis2
 {
     Q_OBJECT
 public:
-    ChartValueAxisY2(QValueAxis *axis, QGraphicsItem *item = 0);
+    ChartValueAxisY2(QValueAxis *axis, QQuickItem *item = 0);
     ~ChartValueAxisY2();
 
     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const;
diff --git a/src/charts/axis/valueaxis/qvalueaxis.cpp b/src/charts/axis/valueaxis/qvalueaxis.cpp
index 622cf294..e34002a9 100644
--- a/src/charts/axis/valueaxis/qvalueaxis.cpp
+++ b/src/charts/axis/valueaxis/qvalueaxis.cpp
@@ -548,7 +548,7 @@ void QValueAxisPrivate::initializeGraphics(QGraphicsItem *parent)
     QAbstractAxisPrivate::initializeGraphics(parent);
 }
 
-void QValueAxisPrivate::initializeGraphics2(QGraphicsItem *parent)
+void QValueAxisPrivate::initializeGraphics2(QQuickItem *parent)
 {
     Q_Q(QValueAxis);
     ChartAxisElement2 *axis(0);
@@ -568,7 +568,7 @@ void QValueAxisPrivate::initializeGraphics2(QGraphicsItem *parent)
 //    }
 
     m_item2.reset(axis);
-    QAbstractAxisPrivate::initializeGraphics(parent);
+    QAbstractAxisPrivate::initializeGraphics2(parent);
 }
 
 
diff --git a/src/charts/axis/valueaxis/qvalueaxis_p.h b/src/charts/axis/valueaxis/qvalueaxis_p.h
index fbfd2d32..b7759f66 100644
--- a/src/charts/axis/valueaxis/qvalueaxis_p.h
+++ b/src/charts/axis/valueaxis/qvalueaxis_p.h
@@ -54,7 +54,7 @@ public:
 
 public:
     void initializeGraphics(QGraphicsItem* parent);
-    void initializeGraphics2(QGraphicsItem* parent);
+    void initializeGraphics2(QQuickItem* parent);
     void initializeDomain(AbstractDomain *domain);
 
     qreal min() { return m_min; }
diff --git a/src/charts/axis/verticalaxis2.cpp b/src/charts/axis/verticalaxis2.cpp
index e2c8c960..5f480b2c 100644
--- a/src/charts/axis/verticalaxis2.cpp
+++ b/src/charts/axis/verticalaxis2.cpp
@@ -35,7 +35,7 @@
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-VerticalAxis2::VerticalAxis2(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis)
+VerticalAxis2::VerticalAxis2(QAbstractAxis *axis, QQuickItem *item, bool intervalAxis)
     : CartesianChartAxis2(axis, item, intervalAxis)
 {
 }
@@ -74,462 +74,465 @@ QSizeF VerticalAxis2::sizeHint(Qt::SizeHint which, const QSizeF &constraint) con
 
 void VerticalAxis2::updateGeometry()
 {
-    const QVector<qreal> &layout = ChartAxisElement2::layout();
-    const QVector<qreal> &dynamicMinorTicklayout = ChartAxisElement2::dynamicMinorTicklayout();
 
-    if (layout.isEmpty() && dynamicMinorTicklayout.isEmpty()
-            && axis()->type() != QAbstractAxis::AxisTypeLogValue) {
-        return;
-    }
-
-    QStringList labelList = labels();
-
-    QList<QGraphicsItem *> labels = labelItems();
-    QList<QGraphicsItem *> arrow = arrowItems();
-    QGraphicsTextItem *title = titleItem();
-
-    Q_ASSERT(labels.size() == labelList.size());
-    Q_ASSERT(layout.size() == labelList.size());
-
-    const QRectF &axisRect = axisGeometry();
-    const QRectF &gridRect = gridGeometry();
-
-    qreal height = axisRect.bottom();
-
-    //arrow
-    QGraphicsLineItem *arrowItem = static_cast<QGraphicsLineItem*>(arrow.at(0));
-
-    //arrow position
-    if (axis()->alignment() == Qt::AlignLeft)
-        arrowItem->setLine(axisRect.right(), gridRect.top(), axisRect.right(), gridRect.bottom());
-    else if (axis()->alignment() == Qt::AlignRight)
-        arrowItem->setLine(axisRect.left(), gridRect.top(), axisRect.left(), gridRect.bottom());
-
-    //title
-    QRectF titleBoundingRect;
-    QString titleText = axis()->titleText();
-    qreal availableSpace = axisRect.height() - labelPadding();
-    if (!titleText.isEmpty() && titleItem()->isVisible()) {
-        availableSpace -= titlePadding() * 2.0;
-        qreal minimumLabelWidth = ChartPresenter2::textBoundingRect(axis()->labelsFont(),
-                                                                   QStringLiteral("...")).width();
-        qreal titleSpace = availableSpace - minimumLabelWidth;
-        title->setHtml(ChartPresenter2::truncatedText(axis()->titleFont(), titleText, qreal(90.0),
-                                                     titleSpace, gridRect.height(),
-                                                     titleBoundingRect));
-        title->setTextWidth(titleBoundingRect.height());
-
-        titleBoundingRect = title->boundingRect();
-
-        QPointF center = gridRect.center() - titleBoundingRect.center();
-        if (axis()->alignment() == Qt::AlignLeft) {
-            title->setPos(axisRect.left() - titleBoundingRect.width() / 2.0
-                          + titleBoundingRect.height() / 2.0 + titlePadding(), center.y());
-        } else if (axis()->alignment() == Qt::AlignRight) {
-            title->setPos(axisRect.right() - titleBoundingRect.width() / 2.0
-                          - titleBoundingRect.height() / 2.0 - titlePadding(), center.y());
-        }
-
-        title->setTransformOriginPoint(titleBoundingRect.center());
-        title->setRotation(270);
-
-        availableSpace -= titleBoundingRect.height();
-    }
-
-    QList<QGraphicsItem *> lines = gridItems();
-    QList<QGraphicsItem *> shades = shadeItems();
-
-    for (int i = 0; i < layout.size(); ++i) {
-        //items
-        QGraphicsLineItem *gridItem = static_cast<QGraphicsLineItem *>(lines.at(i));
-        QGraphicsLineItem *tickItem = static_cast<QGraphicsLineItem *>(arrow.at(i + 1));
-        QGraphicsTextItem *labelItem = static_cast<QGraphicsTextItem *>(labels.at(i));
-
-        //grid line
-        if (axis()->isReverse()) {
-            gridItem->setLine(gridRect.left(), gridRect.top() + gridRect.bottom() - layout[i],
-                              gridRect.right(), gridRect.top() + gridRect.bottom() - layout[i]);
-        } else {
-            gridItem->setLine(gridRect.left(), layout[i], gridRect.right(), layout[i]);
-        }
-
-        //label text wrapping
-        QString text;
-        if (axis()->isReverse() && axis()->type() != QAbstractAxis::AxisTypeCategory)
-            text = labelList.at(labelList.count() - i - 1);
-        else
-            text = labelList.at(i);
-
-        QRectF boundingRect;
-        // don't truncate empty labels
-        if (text.isEmpty()) {
-            labelItem->setHtml(text);
-        } else {
-            qreal labelHeight = (axisRect.height() / layout.count()) - (2 * labelPadding());
-            QString truncatedText = ChartPresenter2::truncatedText(axis()->labelsFont(), text,
-                                                                  axis()->labelsAngle(),
-                                                                  availableSpace,
-                                                                  labelHeight, boundingRect);
-            labelItem->setTextWidth(ChartPresenter2::textBoundingRect(axis()->labelsFont(),
-                                                                     truncatedText).width());
-            labelItem->setHtml(truncatedText);
-        }
-
-        //label transformation origin point
-        const QRectF &rect = labelItem->boundingRect();
-        QPointF center = rect.center();
-        labelItem->setTransformOriginPoint(center.x(), center.y());
-        qreal widthDiff = rect.width() - boundingRect.width();
-        qreal heightDiff = rect.height() - boundingRect.height();
-
-        //ticks and label position
-        QPointF labelPos;
-        if (axis()->alignment() == Qt::AlignLeft) {
-            if (axis()->isReverse()) {
-                labelPos = QPointF(axisRect.right() - rect.width() + (widthDiff / 2.0)
-                                  - labelPadding(),
-                                  gridRect.top() + gridRect.bottom()
-                                  - layout[layout.size() - i - 1] - center.y());
-                tickItem->setLine(axisRect.right() - labelPadding(),
-                                  gridRect.top() + gridRect.bottom() - layout[i],
-                                  axisRect.right(),
-                                  gridRect.top() + gridRect.bottom() - layout[i]);
-            } else {
-                labelPos = QPointF(axisRect.right() - rect.width() + (widthDiff / 2.0)
-                                  - labelPadding(),
-                                  layout[i] - center.y());
-                tickItem->setLine(axisRect.right() - labelPadding(), layout[i],
-                                  axisRect.right(), layout[i]);
-            }
-        } else if (axis()->alignment() == Qt::AlignRight) {
-            if (axis()->isReverse()) {
-                tickItem->setLine(axisRect.left(),
-                                  gridRect.top() + gridRect.bottom() - layout[i],
-                                  axisRect.left() + labelPadding(),
-                                  gridRect.top() + gridRect.bottom() - layout[i]);
-                labelPos = QPointF(axisRect.left() + labelPadding() - (widthDiff / 2.0),
-                                  gridRect.top() + gridRect.bottom()
-                                  - layout[layout.size() - i - 1] - center.y());
-            } else {
-                labelPos = QPointF(axisRect.left() + labelPadding() - (widthDiff / 2.0),
-                                  layout[i] - center.y());
-                tickItem->setLine(axisRect.left(), layout[i],
-                                  axisRect.left() + labelPadding(), layout[i]);
-            }
-        }
-
-        //label in between
-        bool forceHide = false;
-        bool labelOnValue = false;
-        if (intervalAxis() && (i + 1) != layout.size()) {
-            qreal lowerBound;
-            qreal upperBound;
-            if (axis()->isReverse()) {
-                lowerBound = qMax(gridRect.top() + gridRect.bottom() - layout[i + 1],
-                        gridRect.top());
-                upperBound = qMin(gridRect.top() + gridRect.bottom() - layout[i],
-                                  gridRect.bottom());
-            } else {
-                lowerBound = qMin(layout[i], gridRect.bottom());
-                upperBound = qMax(layout[i + 1], gridRect.top());
-            }
-            const qreal delta = lowerBound - upperBound;
-            if (axis()->type() != QAbstractAxis::AxisTypeCategory) {
-                // Hide label in case visible part of the category at the grid edge is too narrow
-                if (delta < boundingRect.height()
-                    && (lowerBound == gridRect.bottom() || upperBound == gridRect.top())) {
-                    forceHide = true;
-                } else {
-                    labelPos.setY(lowerBound - (delta / 2.0) - center.y());
-                }
-            } else {
-                QCategoryAxis *categoryAxis = static_cast<QCategoryAxis *>(axis());
-                if (categoryAxis->labelsPosition() == QCategoryAxis::AxisLabelsPositionCenter) {
-                    if (delta < boundingRect.height()
-                        && (lowerBound == gridRect.bottom() || upperBound == gridRect.top())) {
-                        forceHide = true;
-                    } else {
-                        labelPos.setY(lowerBound - (delta / 2.0) - center.y());
-                    }
-                } else if (categoryAxis->labelsPosition()
-                           == QCategoryAxis::AxisLabelsPositionOnValue) {
-                    labelOnValue = true;
-                    if (axis()->isReverse()) {
-                        labelPos.setY(gridRect.top() + gridRect.bottom()
-                                          - layout[i + 1] - center.y());
-                    } else {
-                        labelPos.setY(upperBound - center.y());
-                    }
-                }
-            }
-        }
-
-        // Round to full pixel via QPoint to avoid one pixel clipping on the edge in some cases
-        labelItem->setPos(labelPos.toPoint());
-
-        //label overlap detection - compensate one pixel for rounding errors
-        if (axis()->isReverse()) {
-            if (forceHide)
-                labelItem->setVisible(false);
-        } else if (labelItem->pos().y() + boundingRect.height() > height || forceHide ||
-            ((labelItem->pos().y() + (heightDiff / 2.0) - 1.0) > axisRect.bottom()
-             && !labelOnValue) ||
-            (labelItem->pos().y() + (heightDiff / 2.0) < (axisRect.top() - 1.0) && !labelOnValue)) {
-            labelItem->setVisible(false);
-        }
-        else {
-            labelItem->setVisible(true);
-            height=labelItem->pos().y();
-        }
-
-        //shades
-        QGraphicsRectItem *shadeItem = 0;
-        if (i == 0)
-            shadeItem = static_cast<QGraphicsRectItem *>(shades.at(0));
-        else if (i % 2)
-            shadeItem = static_cast<QGraphicsRectItem *>(shades.at((i / 2) + 1));
-        if (shadeItem) {
-            qreal lowerBound;
-            qreal upperBound;
-            if (i == 0) {
-                if (axis()->isReverse()) {
-                    upperBound = gridRect.top();
-                    lowerBound = gridRect.top() + gridRect.bottom() - layout[i];
-                } else {
-                    lowerBound = gridRect.bottom();
-                    upperBound = layout[0];
-                }
-            } else {
-                if (axis()->isReverse()) {
-                        upperBound = gridRect.top() + gridRect.bottom() - layout[i];
-                    if (i == layout.size() - 1) {
-                        lowerBound = gridRect.bottom();
-                    } else {
-                        lowerBound = qMax(gridRect.top() + gridRect.bottom() - layout[i + 1],
-                                gridRect.top());
-                    }
-                } else {
-                    lowerBound = layout[i];
-                    if (i == layout.size() - 1)
-                        upperBound = gridRect.top();
-                    else
-                        upperBound = qMax(layout[i + 1], gridRect.top());
-                }
-
-            }
-            if (lowerBound > gridRect.bottom())
-                lowerBound = gridRect.bottom();
-            if (upperBound < gridRect.top())
-                upperBound = gridRect.top();
-            shadeItem->setRect(gridRect.left(), upperBound, gridRect.width(),
-                               lowerBound - upperBound);
-            if (shadeItem->rect().height() <= 0.0)
-                shadeItem->setVisible(false);
-            else
-                shadeItem->setVisible(true);
-        }
-
-        // check if the grid line and the axis tick should be shown
-        const bool gridLineVisible = (gridItem->line().p1().y() >= gridRect.top()
-                                      && gridItem->line().p1().y() <= gridRect.bottom());
-        gridItem->setVisible(gridLineVisible);
-        tickItem->setVisible(gridLineVisible);
-    }
-
-    updateMinorTickGeometry();
-
-    // begin/end grid line in case labels between
-    if (intervalAxis()) {
-        QGraphicsLineItem *gridLine;
-        gridLine = static_cast<QGraphicsLineItem *>(lines.at(layout.size()));
-        gridLine->setLine(gridRect.left(), gridRect.top(), gridRect.right(), gridRect.top());
-        gridLine->setVisible(true);
-        gridLine = static_cast<QGraphicsLineItem*>(lines.at(layout.size() + 1));
-        gridLine->setLine(gridRect.left(), gridRect.bottom(), gridRect.right(), gridRect.bottom());
-        gridLine->setVisible(true);
-    }
+    // TODO!!!!
+//    const QVector<qreal> &layout = ChartAxisElement2::layout();
+//    const QVector<qreal> &dynamicMinorTicklayout = ChartAxisElement2::dynamicMinorTicklayout();
+
+//    if (layout.isEmpty() && dynamicMinorTicklayout.isEmpty()
+//            && axis()->type() != QAbstractAxis::AxisTypeLogValue) {
+//        return;
+//    }
+
+//    QStringList labelList = labels();
+
+//    QList<QQuickItem *> labels = labelItems();
+//    QList<QQuickItem *> arrow = arrowItems();
+//    QGraphicsTextItem *title = titleItem();
+
+//    Q_ASSERT(labels.size() == labelList.size());
+//    Q_ASSERT(layout.size() == labelList.size());
+
+//    const QRectF &axisRect = axisGeometry();
+//    const QRectF &gridRect = gridGeometry();
+
+//    qreal height = axisRect.bottom();
+
+//    //arrow
+//    QGraphicsLineItem *arrowItem = static_cast<QGraphicsLineItem*>(arrow.at(0));
+
+//    //arrow position
+//    if (axis()->alignment() == Qt::AlignLeft)
+//        arrowItem->setLine(axisRect.right(), gridRect.top(), axisRect.right(), gridRect.bottom());
+//    else if (axis()->alignment() == Qt::AlignRight)
+//        arrowItem->setLine(axisRect.left(), gridRect.top(), axisRect.left(), gridRect.bottom());
+
+//    //title
+//    QRectF titleBoundingRect;
+//    QString titleText = axis()->titleText();
+//    qreal availableSpace = axisRect.height() - labelPadding();
+//    if (!titleText.isEmpty() && titleItem()->isVisible()) {
+//        availableSpace -= titlePadding() * 2.0;
+//        qreal minimumLabelWidth = ChartPresenter2::textBoundingRect(axis()->labelsFont(),
+//                                                                   QStringLiteral("...")).width();
+//        qreal titleSpace = availableSpace - minimumLabelWidth;
+//        title->setHtml(ChartPresenter2::truncatedText(axis()->titleFont(), titleText, qreal(90.0),
+//                                                     titleSpace, gridRect.height(),
+//                                                     titleBoundingRect));
+//        title->setTextWidth(titleBoundingRect.height());
+
+//        titleBoundingRect = title->boundingRect();
+
+//        QPointF center = gridRect.center() - titleBoundingRect.center();
+//        if (axis()->alignment() == Qt::AlignLeft) {
+//            title->setPos(axisRect.left() - titleBoundingRect.width() / 2.0
+//                          + titleBoundingRect.height() / 2.0 + titlePadding(), center.y());
+//        } else if (axis()->alignment() == Qt::AlignRight) {
+//            title->setPos(axisRect.right() - titleBoundingRect.width() / 2.0
+//                          - titleBoundingRect.height() / 2.0 - titlePadding(), center.y());
+//        }
+
+//        title->setTransformOriginPoint(titleBoundingRect.center());
+//        title->setRotation(270);
+
+//        availableSpace -= titleBoundingRect.height();
+//    }
+
+//    QList<QQuickItem *> lines = gridItems();
+//    QList<QQuickItem *> shades = shadeItems();
+
+//    for (int i = 0; i < layout.size(); ++i) {
+//        //items
+//        QGraphicsLineItem *gridItem = static_cast<QGraphicsLineItem *>(lines.at(i));
+//        QGraphicsLineItem *tickItem = static_cast<QGraphicsLineItem *>(arrow.at(i + 1));
+//        QGraphicsTextItem *labelItem = static_cast<QGraphicsTextItem *>(labels.at(i));
+
+//        //grid line
+//        if (axis()->isReverse()) {
+//            gridItem->setLine(gridRect.left(), gridRect.top() + gridRect.bottom() - layout[i],
+//                              gridRect.right(), gridRect.top() + gridRect.bottom() - layout[i]);
+//        } else {
+//            gridItem->setLine(gridRect.left(), layout[i], gridRect.right(), layout[i]);
+//        }
+
+//        //label text wrapping
+//        QString text;
+//        if (axis()->isReverse() && axis()->type() != QAbstractAxis::AxisTypeCategory)
+//            text = labelList.at(labelList.count() - i - 1);
+//        else
+//            text = labelList.at(i);
+
+//        QRectF boundingRect;
+//        // don't truncate empty labels
+//        if (text.isEmpty()) {
+//            labelItem->setHtml(text);
+//        } else {
+//            qreal labelHeight = (axisRect.height() / layout.count()) - (2 * labelPadding());
+//            QString truncatedText = ChartPresenter2::truncatedText(axis()->labelsFont(), text,
+//                                                                  axis()->labelsAngle(),
+//                                                                  availableSpace,
+//                                                                  labelHeight, boundingRect);
+//            labelItem->setTextWidth(ChartPresenter2::textBoundingRect(axis()->labelsFont(),
+//                                                                     truncatedText).width());
+//            labelItem->setHtml(truncatedText);
+//        }
+
+//        //label transformation origin point
+//        const QRectF &rect = labelItem->boundingRect();
+//        QPointF center = rect.center();
+//        labelItem->setTransformOriginPoint(center.x(), center.y());
+//        qreal widthDiff = rect.width() - boundingRect.width();
+//        qreal heightDiff = rect.height() - boundingRect.height();
+
+//        //ticks and label position
+//        QPointF labelPos;
+//        if (axis()->alignment() == Qt::AlignLeft) {
+//            if (axis()->isReverse()) {
+//                labelPos = QPointF(axisRect.right() - rect.width() + (widthDiff / 2.0)
+//                                  - labelPadding(),
+//                                  gridRect.top() + gridRect.bottom()
+//                                  - layout[layout.size() - i - 1] - center.y());
+//                tickItem->setLine(axisRect.right() - labelPadding(),
+//                                  gridRect.top() + gridRect.bottom() - layout[i],
+//                                  axisRect.right(),
+//                                  gridRect.top() + gridRect.bottom() - layout[i]);
+//            } else {
+//                labelPos = QPointF(axisRect.right() - rect.width() + (widthDiff / 2.0)
+//                                  - labelPadding(),
+//                                  layout[i] - center.y());
+//                tickItem->setLine(axisRect.right() - labelPadding(), layout[i],
+//                                  axisRect.right(), layout[i]);
+//            }
+//        } else if (axis()->alignment() == Qt::AlignRight) {
+//            if (axis()->isReverse()) {
+//                tickItem->setLine(axisRect.left(),
+//                                  gridRect.top() + gridRect.bottom() - layout[i],
+//                                  axisRect.left() + labelPadding(),
+//                                  gridRect.top() + gridRect.bottom() - layout[i]);
+//                labelPos = QPointF(axisRect.left() + labelPadding() - (widthDiff / 2.0),
+//                                  gridRect.top() + gridRect.bottom()
+//                                  - layout[layout.size() - i - 1] - center.y());
+//            } else {
+//                labelPos = QPointF(axisRect.left() + labelPadding() - (widthDiff / 2.0),
+//                                  layout[i] - center.y());
+//                tickItem->setLine(axisRect.left(), layout[i],
+//                                  axisRect.left() + labelPadding(), layout[i]);
+//            }
+//        }
+
+//        //label in between
+//        bool forceHide = false;
+//        bool labelOnValue = false;
+//        if (intervalAxis() && (i + 1) != layout.size()) {
+//            qreal lowerBound;
+//            qreal upperBound;
+//            if (axis()->isReverse()) {
+//                lowerBound = qMax(gridRect.top() + gridRect.bottom() - layout[i + 1],
+//                        gridRect.top());
+//                upperBound = qMin(gridRect.top() + gridRect.bottom() - layout[i],
+//                                  gridRect.bottom());
+//            } else {
+//                lowerBound = qMin(layout[i], gridRect.bottom());
+//                upperBound = qMax(layout[i + 1], gridRect.top());
+//            }
+//            const qreal delta = lowerBound - upperBound;
+//            if (axis()->type() != QAbstractAxis::AxisTypeCategory) {
+//                // Hide label in case visible part of the category at the grid edge is too narrow
+//                if (delta < boundingRect.height()
+//                    && (lowerBound == gridRect.bottom() || upperBound == gridRect.top())) {
+//                    forceHide = true;
+//                } else {
+//                    labelPos.setY(lowerBound - (delta / 2.0) - center.y());
+//                }
+//            } else {
+//                QCategoryAxis *categoryAxis = static_cast<QCategoryAxis *>(axis());
+//                if (categoryAxis->labelsPosition() == QCategoryAxis::AxisLabelsPositionCenter) {
+//                    if (delta < boundingRect.height()
+//                        && (lowerBound == gridRect.bottom() || upperBound == gridRect.top())) {
+//                        forceHide = true;
+//                    } else {
+//                        labelPos.setY(lowerBound - (delta / 2.0) - center.y());
+//                    }
+//                } else if (categoryAxis->labelsPosition()
+//                           == QCategoryAxis::AxisLabelsPositionOnValue) {
+//                    labelOnValue = true;
+//                    if (axis()->isReverse()) {
+//                        labelPos.setY(gridRect.top() + gridRect.bottom()
+//                                          - layout[i + 1] - center.y());
+//                    } else {
+//                        labelPos.setY(upperBound - center.y());
+//                    }
+//                }
+//            }
+//        }
+
+//        // Round to full pixel via QPoint to avoid one pixel clipping on the edge in some cases
+//        labelItem->setPos(labelPos.toPoint());
+
+//        //label overlap detection - compensate one pixel for rounding errors
+//        if (axis()->isReverse()) {
+//            if (forceHide)
+//                labelItem->setVisible(false);
+//        } else if (labelItem->pos().y() + boundingRect.height() > height || forceHide ||
+//            ((labelItem->pos().y() + (heightDiff / 2.0) - 1.0) > axisRect.bottom()
+//             && !labelOnValue) ||
+//            (labelItem->pos().y() + (heightDiff / 2.0) < (axisRect.top() - 1.0) && !labelOnValue)) {
+//            labelItem->setVisible(false);
+//        }
+//        else {
+//            labelItem->setVisible(true);
+//            height=labelItem->pos().y();
+//        }
+
+//        //shades
+//        QGraphicsRectItem *shadeItem = 0;
+//        if (i == 0)
+//            shadeItem = static_cast<QGraphicsRectItem *>(shades.at(0));
+//        else if (i % 2)
+//            shadeItem = static_cast<QGraphicsRectItem *>(shades.at((i / 2) + 1));
+//        if (shadeItem) {
+//            qreal lowerBound;
+//            qreal upperBound;
+//            if (i == 0) {
+//                if (axis()->isReverse()) {
+//                    upperBound = gridRect.top();
+//                    lowerBound = gridRect.top() + gridRect.bottom() - layout[i];
+//                } else {
+//                    lowerBound = gridRect.bottom();
+//                    upperBound = layout[0];
+//                }
+//            } else {
+//                if (axis()->isReverse()) {
+//                        upperBound = gridRect.top() + gridRect.bottom() - layout[i];
+//                    if (i == layout.size() - 1) {
+//                        lowerBound = gridRect.bottom();
+//                    } else {
+//                        lowerBound = qMax(gridRect.top() + gridRect.bottom() - layout[i + 1],
+//                                gridRect.top());
+//                    }
+//                } else {
+//                    lowerBound = layout[i];
+//                    if (i == layout.size() - 1)
+//                        upperBound = gridRect.top();
+//                    else
+//                        upperBound = qMax(layout[i + 1], gridRect.top());
+//                }
+
+//            }
+//            if (lowerBound > gridRect.bottom())
+//                lowerBound = gridRect.bottom();
+//            if (upperBound < gridRect.top())
+//                upperBound = gridRect.top();
+//            shadeItem->setRect(gridRect.left(), upperBound, gridRect.width(),
+//                               lowerBound - upperBound);
+//            if (shadeItem->rect().height() <= 0.0)
+//                shadeItem->setVisible(false);
+//            else
+//                shadeItem->setVisible(true);
+//        }
+
+//        // check if the grid line and the axis tick should be shown
+//        const bool gridLineVisible = (gridItem->line().p1().y() >= gridRect.top()
+//                                      && gridItem->line().p1().y() <= gridRect.bottom());
+//        gridItem->setVisible(gridLineVisible);
+//        tickItem->setVisible(gridLineVisible);
+//    }
+
+//    updateMinorTickGeometry();
+
+//    // begin/end grid line in case labels between
+//    if (intervalAxis()) {
+//        QGraphicsLineItem *gridLine;
+//        gridLine = static_cast<QGraphicsLineItem *>(lines.at(layout.size()));
+//        gridLine->setLine(gridRect.left(), gridRect.top(), gridRect.right(), gridRect.top());
+//        gridLine->setVisible(true);
+//        gridLine = static_cast<QGraphicsLineItem*>(lines.at(layout.size() + 1));
+//        gridLine->setLine(gridRect.left(), gridRect.bottom(), gridRect.right(), gridRect.bottom());
+//        gridLine->setVisible(true);
+//    }
 }
 
 void VerticalAxis2::updateMinorTickGeometry()
 {
-    if (!axis())
-        return;
-
-    QVector<qreal> layout = ChartAxisElement2::layout();
-    int minorTickCount = 0;
-    qreal tickSpacing = 0.0;
-    QVector<qreal> minorTickSpacings;
-    switch (axis()->type()) {
-    case QAbstractAxis::AxisTypeValue: {
-        const QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
-
-        minorTickCount = valueAxis->minorTickCount();
-
-        if (valueAxis->tickType() == QValueAxis::TicksFixed) {
-            if (valueAxis->tickCount() >= 2)
-                tickSpacing = layout.at(0) - layout.at(1);
-
-            for (int i = 0; i < minorTickCount; ++i) {
-                const qreal ratio = (1.0 / qreal(minorTickCount + 1)) * qreal(i + 1);
-                minorTickSpacings.append(tickSpacing * ratio);
-            }
-        }
-        break;
-    }
-    case QAbstractAxis::AxisTypeLogValue: {
-        const QLogValueAxis *logValueAxis = qobject_cast<QLogValueAxis *>(axis());
-        const qreal base = logValueAxis->base();
-        const qreal logBase = qLn(base);
-
-        minorTickCount = logValueAxis->minorTickCount();
-        if (minorTickCount < 0)
-            minorTickCount = qMax(int(qFloor(base) - 2.0), 0);
-
-        // Two "virtual" ticks are required to make sure that all minor ticks
-        // are displayed properly (even for the partially visible segments of
-        // the chart).
-        if (layout.size() >= 2) {
-            // Calculate tickSpacing as a difference between visible ticks
-            // whenever it is possible. Virtual ticks will not be correctly
-            // positioned when the layout is animating.
-            tickSpacing = layout.at(0) - layout.at(1);
-            layout.prepend(layout.at(0) + tickSpacing);
-            layout.append(layout.at(layout.size() - 1) - tickSpacing);
-        } else {
-            const qreal logMax = qLn(logValueAxis->max());
-            const qreal logMin = qLn(logValueAxis->min());
-            const qreal logExtraMaxTick = qLn(qPow(base, qFloor(logMax / logBase) + 1.0));
-            const qreal logExtraMinTick = qLn(qPow(base, qCeil(logMin / logBase) - 1.0));
-            const qreal edge = gridGeometry().bottom();
-            const qreal delta = gridGeometry().height() / qAbs(logMax - logMin);
-            const qreal extraMaxTick = edge - (logExtraMaxTick - qMin(logMin, logMax)) * delta;
-            const qreal extraMinTick = edge - (logExtraMinTick - qMin(logMin, logMax)) * delta;
-
-            // Calculate tickSpacing using one (if layout.size() == 1) or two
-            // (if layout.size() == 0) "virtual" ticks. In both cases animation
-            // will not work as expected. This should be fixed later.
-            layout.prepend(extraMinTick);
-            layout.append(extraMaxTick);
-            tickSpacing = layout.at(0) - layout.at(1);
-        }
-
-        const qreal minorTickStepValue = qFabs(base - 1.0) / qreal(minorTickCount + 1);
-        for (int i = 0; i < minorTickCount; ++i) {
-            const qreal x = minorTickStepValue * qreal(i + 1) + 1.0;
-            const qreal minorTickSpacing = tickSpacing * (qLn(x) / logBase);
-            minorTickSpacings.append(minorTickSpacing);
-        }
-        break;
-    }
-    default:
-        // minor ticks are not supported
-        break;
-    }
-
-    const QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
-    if (valueAxis && valueAxis->tickType() == QValueAxis::TicksDynamic) {
-        const QVector<qreal> dynamicMinorTicklayout = ChartAxisElement2::dynamicMinorTicklayout();
-        const QRectF &gridRect = gridGeometry();
-        const qreal deltaY = gridRect.height() / (valueAxis->max() - valueAxis->min());
-        const qreal bottomPos = gridRect.bottom();
-        const qreal topPos = gridRect.top();
-
-        for (int i = 0; i < dynamicMinorTicklayout.size(); i++) {
-            QGraphicsLineItem *minorGridLineItem =
-                    static_cast<QGraphicsLineItem *>(minorGridItems().value(i));
-            QGraphicsLineItem *minorArrowLineItem =
-                    static_cast<QGraphicsLineItem *>(minorArrowItems().value(i));
-            if (!minorGridLineItem || !minorArrowLineItem)
-                continue;
-
-            qreal minorGridLineItemY = 0.0;
-            if (axis()->isReverse())
-                minorGridLineItemY = topPos + dynamicMinorTicklayout.at(i) * deltaY;
-            else
-                minorGridLineItemY = bottomPos - dynamicMinorTicklayout.at(i) * deltaY;
-
-            qreal minorArrowLineItemX1;
-            qreal minorArrowLineItemX2;
-            switch (axis()->alignment()) {
-            case Qt::AlignLeft:
-                minorArrowLineItemX1 = gridGeometry().left() - labelPadding() / 2.0;
-                minorArrowLineItemX2 = gridGeometry().left();
-                break;
-            case Qt::AlignRight:
-                minorArrowLineItemX1 = gridGeometry().right();
-                minorArrowLineItemX2 = gridGeometry().right() + labelPadding() / 2.0;
-                break;
-            default:
-                minorArrowLineItemX1 = 0.0;
-                minorArrowLineItemX2 = 0.0;
-                break;
-            }
-
-            minorGridLineItem->setLine(gridGeometry().left(), minorGridLineItemY,
-                                       gridGeometry().right(), minorGridLineItemY);
-            minorArrowLineItem->setLine(minorArrowLineItemX1, minorGridLineItemY,
-                                        minorArrowLineItemX2, minorGridLineItemY);
-
-            // check if the minor grid line and the minor axis arrow should be shown
-            bool minorGridLineVisible = (minorGridLineItemY >= gridGeometry().top()
-                                         && minorGridLineItemY <= gridGeometry().bottom());
-            minorGridLineItem->setVisible(minorGridLineVisible);
-            minorArrowLineItem->setVisible(minorGridLineVisible);
-        }
-    } else {
-        if (minorTickCount < 1 || tickSpacing == 0.0 || minorTickSpacings.count() != minorTickCount)
-            return;
-
-        for (int i = 0; i < layout.size() - 1; ++i) {
-            for (int j = 0; j < minorTickCount; ++j) {
-                const int minorItemIndex = i * minorTickCount + j;
-                QGraphicsLineItem *minorGridLineItem =
-                        static_cast<QGraphicsLineItem *>(minorGridItems().value(minorItemIndex));
-                QGraphicsLineItem *minorArrowLineItem =
-                        static_cast<QGraphicsLineItem *>(minorArrowItems().value(minorItemIndex));
-                if (!minorGridLineItem || !minorArrowLineItem)
-                    continue;
-
-                const qreal minorTickSpacing = minorTickSpacings.value(j, 0.0);
-
-                qreal minorGridLineItemY = 0.0;
-                if (axis()->isReverse()) {
-                    minorGridLineItemY = qFloor(gridGeometry().top() + gridGeometry().bottom()
-                                                - layout.at(i) + minorTickSpacing);
-                } else {
-                    minorGridLineItemY = qCeil(layout.at(i) - minorTickSpacing);
-                }
-
-                qreal minorArrowLineItemX1;
-                qreal minorArrowLineItemX2;
-                switch (axis()->alignment()) {
-                case Qt::AlignLeft:
-                    minorArrowLineItemX1 = gridGeometry().left() - labelPadding() / 2.0;
-                    minorArrowLineItemX2 = gridGeometry().left();
-                    break;
-                case Qt::AlignRight:
-                    minorArrowLineItemX1 = gridGeometry().right();
-                    minorArrowLineItemX2 = gridGeometry().right() + labelPadding() / 2.0;
-                    break;
-                default:
-                    minorArrowLineItemX1 = 0.0;
-                    minorArrowLineItemX2 = 0.0;
-                    break;
-                }
-
-                minorGridLineItem->setLine(gridGeometry().left(), minorGridLineItemY,
-                                           gridGeometry().right(), minorGridLineItemY);
-                minorArrowLineItem->setLine(minorArrowLineItemX1, minorGridLineItemY,
-                                            minorArrowLineItemX2, minorGridLineItemY);
-
-                // check if the minor grid line and the minor axis arrow should be shown
-                bool minorGridLineVisible = (minorGridLineItemY >= gridGeometry().top()
-                                             && minorGridLineItemY <= gridGeometry().bottom());
-                minorGridLineItem->setVisible(minorGridLineVisible);
-                minorArrowLineItem->setVisible(minorGridLineVisible);
-            }
-        }
-    }
+    // TODO!!
+//    if (!axis())
+//        return;
+
+//    QVector<qreal> layout = ChartAxisElement2::layout();
+//    int minorTickCount = 0;
+//    qreal tickSpacing = 0.0;
+//    QVector<qreal> minorTickSpacings;
+//    switch (axis()->type()) {
+//    case QAbstractAxis::AxisTypeValue: {
+//        const QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
+
+//        minorTickCount = valueAxis->minorTickCount();
+
+//        if (valueAxis->tickType() == QValueAxis::TicksFixed) {
+//            if (valueAxis->tickCount() >= 2)
+//                tickSpacing = layout.at(0) - layout.at(1);
+
+//            for (int i = 0; i < minorTickCount; ++i) {
+//                const qreal ratio = (1.0 / qreal(minorTickCount + 1)) * qreal(i + 1);
+//                minorTickSpacings.append(tickSpacing * ratio);
+//            }
+//        }
+//        break;
+//    }
+//    case QAbstractAxis::AxisTypeLogValue: {
+//        const QLogValueAxis *logValueAxis = qobject_cast<QLogValueAxis *>(axis());
+//        const qreal base = logValueAxis->base();
+//        const qreal logBase = qLn(base);
+
+//        minorTickCount = logValueAxis->minorTickCount();
+//        if (minorTickCount < 0)
+//            minorTickCount = qMax(int(qFloor(base) - 2.0), 0);
+
+//        // Two "virtual" ticks are required to make sure that all minor ticks
+//        // are displayed properly (even for the partially visible segments of
+//        // the chart).
+//        if (layout.size() >= 2) {
+//            // Calculate tickSpacing as a difference between visible ticks
+//            // whenever it is possible. Virtual ticks will not be correctly
+//            // positioned when the layout is animating.
+//            tickSpacing = layout.at(0) - layout.at(1);
+//            layout.prepend(layout.at(0) + tickSpacing);
+//            layout.append(layout.at(layout.size() - 1) - tickSpacing);
+//        } else {
+//            const qreal logMax = qLn(logValueAxis->max());
+//            const qreal logMin = qLn(logValueAxis->min());
+//            const qreal logExtraMaxTick = qLn(qPow(base, qFloor(logMax / logBase) + 1.0));
+//            const qreal logExtraMinTick = qLn(qPow(base, qCeil(logMin / logBase) - 1.0));
+//            const qreal edge = gridGeometry().bottom();
+//            const qreal delta = gridGeometry().height() / qAbs(logMax - logMin);
+//            const qreal extraMaxTick = edge - (logExtraMaxTick - qMin(logMin, logMax)) * delta;
+//            const qreal extraMinTick = edge - (logExtraMinTick - qMin(logMin, logMax)) * delta;
+
+//            // Calculate tickSpacing using one (if layout.size() == 1) or two
+//            // (if layout.size() == 0) "virtual" ticks. In both cases animation
+//            // will not work as expected. This should be fixed later.
+//            layout.prepend(extraMinTick);
+//            layout.append(extraMaxTick);
+//            tickSpacing = layout.at(0) - layout.at(1);
+//        }
+
+//        const qreal minorTickStepValue = qFabs(base - 1.0) / qreal(minorTickCount + 1);
+//        for (int i = 0; i < minorTickCount; ++i) {
+//            const qreal x = minorTickStepValue * qreal(i + 1) + 1.0;
+//            const qreal minorTickSpacing = tickSpacing * (qLn(x) / logBase);
+//            minorTickSpacings.append(minorTickSpacing);
+//        }
+//        break;
+//    }
+//    default:
+//        // minor ticks are not supported
+//        break;
+//    }
+
+//    const QValueAxis *valueAxis = qobject_cast<QValueAxis *>(axis());
+//    if (valueAxis && valueAxis->tickType() == QValueAxis::TicksDynamic) {
+//        const QVector<qreal> dynamicMinorTicklayout = ChartAxisElement2::dynamicMinorTicklayout();
+//        const QRectF &gridRect = gridGeometry();
+//        const qreal deltaY = gridRect.height() / (valueAxis->max() - valueAxis->min());
+//        const qreal bottomPos = gridRect.bottom();
+//        const qreal topPos = gridRect.top();
+
+//        for (int i = 0; i < dynamicMinorTicklayout.size(); i++) {
+//            QGraphicsLineItem *minorGridLineItem =
+//                    static_cast<QGraphicsLineItem *>(minorGridItems().value(i));
+//            QGraphicsLineItem *minorArrowLineItem =
+//                    static_cast<QGraphicsLineItem *>(minorArrowItems().value(i));
+//            if (!minorGridLineItem || !minorArrowLineItem)
+//                continue;
+
+//            qreal minorGridLineItemY = 0.0;
+//            if (axis()->isReverse())
+//                minorGridLineItemY = topPos + dynamicMinorTicklayout.at(i) * deltaY;
+//            else
+//                minorGridLineItemY = bottomPos - dynamicMinorTicklayout.at(i) * deltaY;
+
+//            qreal minorArrowLineItemX1;
+//            qreal minorArrowLineItemX2;
+//            switch (axis()->alignment()) {
+//            case Qt::AlignLeft:
+//                minorArrowLineItemX1 = gridGeometry().left() - labelPadding() / 2.0;
+//                minorArrowLineItemX2 = gridGeometry().left();
+//                break;
+//            case Qt::AlignRight:
+//                minorArrowLineItemX1 = gridGeometry().right();
+//                minorArrowLineItemX2 = gridGeometry().right() + labelPadding() / 2.0;
+//                break;
+//            default:
+//                minorArrowLineItemX1 = 0.0;
+//                minorArrowLineItemX2 = 0.0;
+//                break;
+//            }
+
+//            minorGridLineItem->setLine(gridGeometry().left(), minorGridLineItemY,
+//                                       gridGeometry().right(), minorGridLineItemY);
+//            minorArrowLineItem->setLine(minorArrowLineItemX1, minorGridLineItemY,
+//                                        minorArrowLineItemX2, minorGridLineItemY);
+
+//            // check if the minor grid line and the minor axis arrow should be shown
+//            bool minorGridLineVisible = (minorGridLineItemY >= gridGeometry().top()
+//                                         && minorGridLineItemY <= gridGeometry().bottom());
+//            minorGridLineItem->setVisible(minorGridLineVisible);
+//            minorArrowLineItem->setVisible(minorGridLineVisible);
+//        }
+//    } else {
+//        if (minorTickCount < 1 || tickSpacing == 0.0 || minorTickSpacings.count() != minorTickCount)
+//            return;
+
+//        for (int i = 0; i < layout.size() - 1; ++i) {
+//            for (int j = 0; j < minorTickCount; ++j) {
+//                const int minorItemIndex = i * minorTickCount + j;
+//                QGraphicsLineItem *minorGridLineItem =
+//                        static_cast<QGraphicsLineItem *>(minorGridItems().value(minorItemIndex));
+//                QGraphicsLineItem *minorArrowLineItem =
+//                        static_cast<QGraphicsLineItem *>(minorArrowItems().value(minorItemIndex));
+//                if (!minorGridLineItem || !minorArrowLineItem)
+//                    continue;
+
+//                const qreal minorTickSpacing = minorTickSpacings.value(j, 0.0);
+
+//                qreal minorGridLineItemY = 0.0;
+//                if (axis()->isReverse()) {
+//                    minorGridLineItemY = qFloor(gridGeometry().top() + gridGeometry().bottom()
+//                                                - layout.at(i) + minorTickSpacing);
+//                } else {
+//                    minorGridLineItemY = qCeil(layout.at(i) - minorTickSpacing);
+//                }
+
+//                qreal minorArrowLineItemX1;
+//                qreal minorArrowLineItemX2;
+//                switch (axis()->alignment()) {
+//                case Qt::AlignLeft:
+//                    minorArrowLineItemX1 = gridGeometry().left() - labelPadding() / 2.0;
+//                    minorArrowLineItemX2 = gridGeometry().left();
+//                    break;
+//                case Qt::AlignRight:
+//                    minorArrowLineItemX1 = gridGeometry().right();
+//                    minorArrowLineItemX2 = gridGeometry().right() + labelPadding() / 2.0;
+//                    break;
+//                default:
+//                    minorArrowLineItemX1 = 0.0;
+//                    minorArrowLineItemX2 = 0.0;
+//                    break;
+//                }
+
+//                minorGridLineItem->setLine(gridGeometry().left(), minorGridLineItemY,
+//                                           gridGeometry().right(), minorGridLineItemY);
+//                minorArrowLineItem->setLine(minorArrowLineItemX1, minorGridLineItemY,
+//                                            minorArrowLineItemX2, minorGridLineItemY);
+
+//                // check if the minor grid line and the minor axis arrow should be shown
+//                bool minorGridLineVisible = (minorGridLineItemY >= gridGeometry().top()
+//                                             && minorGridLineItemY <= gridGeometry().bottom());
+//                minorGridLineItem->setVisible(minorGridLineVisible);
+//                minorArrowLineItem->setVisible(minorGridLineVisible);
+//            }
+//        }
+//    }
 }
 
 QT_CHARTS_END_NAMESPACE
diff --git a/src/charts/axis/verticalaxis2_p.h b/src/charts/axis/verticalaxis2_p.h
index b372c777..601a0afc 100644
--- a/src/charts/axis/verticalaxis2_p.h
+++ b/src/charts/axis/verticalaxis2_p.h
@@ -47,7 +47,7 @@ QT_CHARTS_BEGIN_NAMESPACE
 class QT_CHARTS_PRIVATE_EXPORT VerticalAxis2 : public CartesianChartAxis2
 {
 public:
-    VerticalAxis2(QAbstractAxis *axis, QGraphicsItem *item = nullptr, bool intervalAxis = false);
+    VerticalAxis2(QAbstractAxis *axis, QQuickItem *item = nullptr, bool intervalAxis = false);
     ~VerticalAxis2();
 
     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
diff --git a/src/charts/barchart/abstractbarchartitem2.cpp b/src/charts/barchart/abstractbarchartitem2.cpp
index 8d574dfa..ff914874 100644
--- a/src/charts/barchart/abstractbarchartitem2.cpp
+++ b/src/charts/barchart/abstractbarchartitem2.cpp
@@ -45,7 +45,7 @@
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-AbstractBarChartItem2::AbstractBarChartItem2(QAbstractBarSeries *series, QGraphicsItem* item) :
+AbstractBarChartItem2::AbstractBarChartItem2(QAbstractBarSeries *series, QQuickItem* item) :
     ChartItem2(series->d_func(),item),
     m_animation(0),
     m_series(series),
@@ -58,7 +58,7 @@ AbstractBarChartItem2::AbstractBarChartItem2(QAbstractBarSeries *series, QGraphi
 {
     setAcceptedMouseButtons(0);
     setFlag(ItemClipsChildrenToShape);
-    setFlag(QGraphicsItem::ItemIsSelectable);
+//    setFlag(QQuickItem::ItemIsSelectable);
     connect(series->d_func(), SIGNAL(updatedLayout()), this, SLOT(handleLayoutChanged()));
     connect(series->d_func(), SIGNAL(updatedBars()), this, SLOT(handleUpdatedBars()));
     connect(series->d_func(), SIGNAL(labelsVisibleChanged(bool)), this, SLOT(handleLabelsVisibleChanged(bool)));
@@ -91,7 +91,7 @@ AbstractBarChartItem2::AbstractBarChartItem2(QAbstractBarSeries *series, QGraphi
         connect(series->chart2()->d_ptr->m_dataset, &ChartDataSet::seriesRemoved,
                 this, &AbstractBarChartItem2::handleSeriesRemoved);
     }
-    setZValue(ChartPresenter2::BarSeriesZValue);
+//    setZValue(ChartPresenter2::BarSeriesZValue);
     calculateSeriesPositionAdjustmentAndWidth();
     handleDataStructureChanged();
 }
@@ -195,7 +195,7 @@ void AbstractBarChartItem2::handleDomainUpdated()
     QRectF rect(QPointF(0,0),domain()->size());
 
     if(m_rect != rect){
-        prepareGeometryChange();
+//        prepareGeometryChange();
         m_rect = rect;
     }
 
@@ -256,7 +256,7 @@ void AbstractBarChartItem2::handleVisibleChanged()
 
 void AbstractBarChartItem2::handleOpacityChanged()
 {
-    foreach (QGraphicsItem *item, childItems())
+    foreach (QQuickItem *item, childItems())
         item->setOpacity(m_series->opacity());
 }
 
@@ -380,7 +380,7 @@ void AbstractBarChartItem2::positionLabels()
             }
 
             label->setPos(xPos, yPos);
-            label->setZValue(zValue() + 1);
+//            label->setZValue(zValue() + 1);
         }
     }
 }
@@ -501,7 +501,7 @@ void AbstractBarChartItem2::positionLabelsVertical()
             }
 
             label->setPos(xPos, yPos);
-            label->setZValue(zValue() + 1);
+//            label->setZValue(zValue() + 1);
         }
     }
 }
@@ -520,10 +520,10 @@ void AbstractBarChartItem2::createLabelItems()
         for (int j = 0; j < bars.size(); j++) {
             QGraphicsTextItem *label = bars.at(j)->labelItem();
             if (!label) {
-                QGraphicsTextItem *newLabel = new QGraphicsTextItem(this);
-                newLabel->setAcceptHoverEvents(false);
-                newLabel->document()->setDocumentMargin(ChartPresenter2::textMargin());
-                bars.at(j)->setLabelItem(newLabel);
+//                QGraphicsTextItem *newLabel = new QGraphicsTextItem(this);
+//                newLabel->setAcceptHoverEvents(false);
+//                newLabel->document()->setDocumentMargin(ChartPresenter2::textMargin());
+//                bars.at(j)->setLabelItem(newLabel);
             }
         }
     }
@@ -578,118 +578,119 @@ QString AbstractBarChartItem2::generateLabelText(int set, int category, qreal va
 
 void AbstractBarChartItem2::updateBarItems()
 {
-    int min(0);
-    int max(0);
-    if (m_orientation == Qt::Vertical) {
-        min = qFloor(domain()->minX()) - 1;
-        max = qCeil(domain()->maxX()) + 1;
-    } else {
-        min = qFloor(domain()->minY()) - 1;
-        max = qCeil(domain()->maxY()) + 1;
-    }
-
-    int lastBarIndex = m_series->d_func()->categoryCount() - 1;
-
-    if (lastBarIndex < 0) {
-        // Indicate invalid categories by negatives
-        // Last should be one less than the first to make loops work right in case of no categories
-        m_firstCategory = -1;
-        m_lastCategory = -2;
-        m_categoryCount = 0;
-    } else {
-        m_firstCategory = qMax(qMin(min, lastBarIndex), 0);
-        m_lastCategory = qMax(qMin(max, lastBarIndex), m_firstCategory);
-        m_categoryCount = m_lastCategory - m_firstCategory + 1;
-    }
-
-    QList<QBarSet *> newSets = m_series->barSets();
-    QList<QBarSet *> oldSets = m_barMap.keys();
-
-    Q_ASSERT(newSets.size() == oldSets.size());
-
-    int layoutSize = m_categoryCount * newSets.size();
-
-    QVector<QRectF> oldLayout = m_layout;
-    if (layoutSize != m_layout.size())
-        m_layout.resize(layoutSize);
-
-    // Create new graphic items for bars or remove excess ones
-    int layoutIndex = 0;
-    for (int s = 0; s < newSets.size(); s++) {
-        QBarSet *set = newSets.at(s);
-        QList<Bar *> bars = m_barMap.value(set);
-        int addCount = m_categoryCount - bars.size();
-        if (addCount > 0) {
-            for (int c = 0; c < addCount; c++) {
-                Bar *bar = new Bar(set, this);
-                bars.append(bar);
-                connect(bar, &Bar::clicked, m_series, &QAbstractBarSeries::clicked);
-                connect(bar, &Bar::hovered, m_series, &QAbstractBarSeries::hovered);
-                connect(bar, &Bar::pressed, m_series, &QAbstractBarSeries::pressed);
-                connect(bar, &Bar::released, m_series, &QAbstractBarSeries::released);
-                connect(bar, &Bar::doubleClicked, m_series, &QAbstractBarSeries::doubleClicked);
-
-                connect(bar, &Bar::clicked, set, &QBarSet::clicked);
-                connect(bar, &Bar::hovered, set, &QBarSet::hovered);
-                connect(bar, &Bar::pressed, set, &QBarSet::pressed);
-                connect(bar, &Bar::released, set, &QBarSet::released);
-                connect(bar, &Bar::doubleClicked, set, &QBarSet::doubleClicked);
-
-                m_labelItemsMissing = true;
-            }
-        }
-        // Update bar indexes
-        QHash<int, Bar*> indexMap;
-        QVector<Bar *> unassignedBars(m_categoryCount, nullptr);
-        int unassignedIndex(0);
-        QList<Bar *> newBars;
-        newBars.reserve(m_categoryCount);
-        for (int c = 0; c < bars.size(); c++) {
-            Bar *bar = bars.at(c);
-            if (bar->index() < m_firstCategory || bar->index() > m_lastCategory) {
-                // Delete excess unassigned bars first
-                if (addCount < 0) {
-                    addCount++;
-                    delete bar;
-                    bar = nullptr;
-                } else {
-                    unassignedBars[unassignedIndex++] = bar;
-                    bar->setLayoutIndex(layoutIndex);
-                    newBars.append(bar);
-                    layoutIndex++;
-                }
-            } else {
-                indexMap.insert(bar->index(), bar);
-                newBars.append(bar);
-                m_layout[layoutIndex] = oldLayout.at(bar->layoutIndex());
-                bar->setLayoutIndex(layoutIndex);
-                layoutIndex++;
-            }
-        }
-        unassignedIndex = 0;
-        for (int c = m_firstCategory; c <= m_lastCategory; c++) {
-            Bar *bar = indexMap.value(c);
-            if (!bar) {
-                bar = unassignedBars.at(unassignedIndex++);
-                bar->setIndex(c);
-                indexMap.insert(bar->index(), bar);
-            }
-        }
-
-        m_indexForBarMap.insert(set, indexMap);
-
-        if (m_animation) {
-            for (int i = 0; i < unassignedIndex; i++) {
-                Bar *bar = unassignedBars.at(i);
-                initializeLayout(s, bar->index(), bar->layoutIndex(), m_resetAnimation);
-                bar->setRect(m_layout.at(bar->layoutIndex()));
-                // Make bar initially hidden to avoid artifacts, layout setting will show it
-                bar->setVisible(false);
-            }
-        }
-
-        m_barMap.insert(set, newBars);
-    }
+    // TODO!!
+//    int min(0);
+//    int max(0);
+//    if (m_orientation == Qt::Vertical) {
+//        min = qFloor(domain()->minX()) - 1;
+//        max = qCeil(domain()->maxX()) + 1;
+//    } else {
+//        min = qFloor(domain()->minY()) - 1;
+//        max = qCeil(domain()->maxY()) + 1;
+//    }
+
+//    int lastBarIndex = m_series->d_func()->categoryCount() - 1;
+
+//    if (lastBarIndex < 0) {
+//        // Indicate invalid categories by negatives
+//        // Last should be one less than the first to make loops work right in case of no categories
+//        m_firstCategory = -1;
+//        m_lastCategory = -2;
+//        m_categoryCount = 0;
+//    } else {
+//        m_firstCategory = qMax(qMin(min, lastBarIndex), 0);
+//        m_lastCategory = qMax(qMin(max, lastBarIndex), m_firstCategory);
+//        m_categoryCount = m_lastCategory - m_firstCategory + 1;
+//    }
+
+//    QList<QBarSet *> newSets = m_series->barSets();
+//    QList<QBarSet *> oldSets = m_barMap.keys();
+
+//    Q_ASSERT(newSets.size() == oldSets.size());
+
+//    int layoutSize = m_categoryCount * newSets.size();
+
+//    QVector<QRectF> oldLayout = m_layout;
+//    if (layoutSize != m_layout.size())
+//        m_layout.resize(layoutSize);
+
+//    // Create new graphic items for bars or remove excess ones
+//    int layoutIndex = 0;
+//    for (int s = 0; s < newSets.size(); s++) {
+//        QBarSet *set = newSets.at(s);
+//        QList<Bar *> bars = m_barMap.value(set);
+//        int addCount = m_categoryCount - bars.size();
+//        if (addCount > 0) {
+//            for (int c = 0; c < addCount; c++) {
+//                Bar *bar = new Bar(set, this);
+//                bars.append(bar);
+//                connect(bar, &Bar::clicked, m_series, &QAbstractBarSeries::clicked);
+//                connect(bar, &Bar::hovered, m_series, &QAbstractBarSeries::hovered);
+//                connect(bar, &Bar::pressed, m_series, &QAbstractBarSeries::pressed);
+//                connect(bar, &Bar::released, m_series, &QAbstractBarSeries::released);
+//                connect(bar, &Bar::doubleClicked, m_series, &QAbstractBarSeries::doubleClicked);
+
+//                connect(bar, &Bar::clicked, set, &QBarSet::clicked);
+//                connect(bar, &Bar::hovered, set, &QBarSet::hovered);
+//                connect(bar, &Bar::pressed, set, &QBarSet::pressed);
+//                connect(bar, &Bar::released, set, &QBarSet::released);
+//                connect(bar, &Bar::doubleClicked, set, &QBarSet::doubleClicked);
+
+//                m_labelItemsMissing = true;
+//            }
+//        }
+//        // Update bar indexes
+//        QHash<int, Bar*> indexMap;
+//        QVector<Bar *> unassignedBars(m_categoryCount, nullptr);
+//        int unassignedIndex(0);
+//        QList<Bar *> newBars;
+//        newBars.reserve(m_categoryCount);
+//        for (int c = 0; c < bars.size(); c++) {
+//            Bar *bar = bars.at(c);
+//            if (bar->index() < m_firstCategory || bar->index() > m_lastCategory) {
+//                // Delete excess unassigned bars first
+//                if (addCount < 0) {
+//                    addCount++;
+//                    delete bar;
+//                    bar = nullptr;
+//                } else {
+//                    unassignedBars[unassignedIndex++] = bar;
+//                    bar->setLayoutIndex(layoutIndex);
+//                    newBars.append(bar);
+//                    layoutIndex++;
+//                }
+//            } else {
+//                indexMap.insert(bar->index(), bar);
+//                newBars.append(bar);
+//                m_layout[layoutIndex] = oldLayout.at(bar->layoutIndex());
+//                bar->setLayoutIndex(layoutIndex);
+//                layoutIndex++;
+//            }
+//        }
+//        unassignedIndex = 0;
+//        for (int c = m_firstCategory; c <= m_lastCategory; c++) {
+//            Bar *bar = indexMap.value(c);
+//            if (!bar) {
+//                bar = unassignedBars.at(unassignedIndex++);
+//                bar->setIndex(c);
+//                indexMap.insert(bar->index(), bar);
+//            }
+//        }
+
+//        m_indexForBarMap.insert(set, indexMap);
+
+//        if (m_animation) {
+//            for (int i = 0; i < unassignedIndex; i++) {
+//                Bar *bar = unassignedBars.at(i);
+//                initializeLayout(s, bar->index(), bar->layoutIndex(), m_resetAnimation);
+//                bar->setRect(m_layout.at(bar->layoutIndex()));
+//                // Make bar initially hidden to avoid artifacts, layout setting will show it
+//                bar->setVisible(false);
+//            }
+//        }
+
+//        m_barMap.insert(set, newBars);
+//    }
 }
 
 void AbstractBarChartItem2::markLabelsDirty(QBarSet *barset, int index, int count)
diff --git a/src/charts/barchart/abstractbarchartitem2_p.h b/src/charts/barchart/abstractbarchartitem2_p.h
index 765c3a41..eedf7a08 100644
--- a/src/charts/barchart/abstractbarchartitem2_p.h
+++ b/src/charts/barchart/abstractbarchartitem2_p.h
@@ -59,7 +59,7 @@ class QT_CHARTS_PRIVATE_EXPORT AbstractBarChartItem2 : public ChartItem2
 {
     Q_OBJECT
 public:
-    AbstractBarChartItem2(QAbstractBarSeries *series, QGraphicsItem* item = 0);
+    AbstractBarChartItem2(QAbstractBarSeries *series, QQuickItem* item = 0);
     virtual ~AbstractBarChartItem2();
 
 public:
diff --git a/src/charts/barchart/vertical/bar/barchartitem2.cpp b/src/charts/barchart/vertical/bar/barchartitem2.cpp
index 56dd77c8..43975357 100644
--- a/src/charts/barchart/vertical/bar/barchartitem2.cpp
+++ b/src/charts/barchart/vertical/bar/barchartitem2.cpp
@@ -35,7 +35,7 @@
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-BarChartItem2::BarChartItem2(QAbstractBarSeries *series, QGraphicsItem* item) :
+BarChartItem2::BarChartItem2(QAbstractBarSeries *series, QQuickItem* item) :
     AbstractBarChartItem2(series, item)
 {
     m_orientation = Qt::Vertical;
diff --git a/src/charts/barchart/vertical/bar/barchartitem2_p.h b/src/charts/barchart/vertical/bar/barchartitem2_p.h
index 5dd13984..de4c3190 100644
--- a/src/charts/barchart/vertical/bar/barchartitem2_p.h
+++ b/src/charts/barchart/vertical/bar/barchartitem2_p.h
@@ -42,7 +42,7 @@
 
 #include "abstractbarchartitem2_p.h"
 #include <QtCharts/QStackedBarSeries>
-#include <QtWidgets/QGraphicsItem>
+#include <QQuickItem>
 #include <QtCharts/private/qchartglobal_p.h>
 
 QT_CHARTS_BEGIN_NAMESPACE
@@ -51,7 +51,7 @@ class QT_CHARTS_PRIVATE_EXPORT BarChartItem2 : public AbstractBarChartItem2
 {
     Q_OBJECT
 public:
-    BarChartItem2(QAbstractBarSeries *series, QGraphicsItem* item = 0);
+    BarChartItem2(QAbstractBarSeries *series, QQuickItem* item = 0);
 
 private Q_SLOTS:
     void handleLabelsPositionChanged();
diff --git a/src/charts/barchart/vertical/bar/qbarseries.cpp b/src/charts/barchart/vertical/bar/qbarseries.cpp
index 7dc41d6c..6fc04574 100644
--- a/src/charts/barchart/vertical/bar/qbarseries.cpp
+++ b/src/charts/barchart/vertical/bar/qbarseries.cpp
@@ -131,12 +131,12 @@ void QBarSeriesPrivate::initializeGraphics(QGraphicsItem* parent)
     QAbstractSeriesPrivate::initializeGraphics(parent);
 }
 
-void QBarSeriesPrivate::initializeGraphics2(QGraphicsItem* parent)
+void QBarSeriesPrivate::initializeGraphics2(QQuickItem* parent)
 {
     Q_Q(QBarSeries);
     BarChartItem2 *bar = new BarChartItem2(q,parent);
     m_item2.reset(bar);
-    QAbstractSeriesPrivate::initializeGraphics(parent);
+    QAbstractSeriesPrivate::initializeGraphics2(parent);
 }
 
 QT_CHARTS_END_NAMESPACE
diff --git a/src/charts/barchart/vertical/bar/qbarseries_p.h b/src/charts/barchart/vertical/bar/qbarseries_p.h
index 3f35814b..70584d44 100644
--- a/src/charts/barchart/vertical/bar/qbarseries_p.h
+++ b/src/charts/barchart/vertical/bar/qbarseries_p.h
@@ -52,7 +52,7 @@ class QT_CHARTS_PRIVATE_EXPORT QBarSeriesPrivate: public QAbstractBarSeriesPriva
 public:
     QBarSeriesPrivate(QBarSeries *q);
     void initializeGraphics(QGraphicsItem* parent);
-    void initializeGraphics2(QGraphicsItem* parent);
+    void initializeGraphics2(QQuickItem* parent);
     void initializeDomain();
 
 private:
diff --git a/src/charts/chartelement2.cpp b/src/charts/chartelement2.cpp
index db06b649..efac1495 100644
--- a/src/charts/chartelement2.cpp
+++ b/src/charts/chartelement2.cpp
@@ -38,8 +38,8 @@
 QT_CHARTS_BEGIN_NAMESPACE
 
 
-ChartElement2::ChartElement2(QGraphicsItem* item):
-      QGraphicsObject(item),
+ChartElement2::ChartElement2(QQuickItem* item):
+      QQuickItem(item),
       m_presenter(0),
       m_themeManager(0),
       m_dataSet(0)
diff --git a/src/charts/chartelement2_p.h b/src/charts/chartelement2_p.h
index 1dab7d05..555c6f18 100644
--- a/src/charts/chartelement2_p.h
+++ b/src/charts/chartelement2_p.h
@@ -44,6 +44,7 @@
 #include <QtCore/QRect>
 #include <QGraphicsObject>
 #include <QtCharts/private/qchartglobal_p.h>
+#include <QQuickItem>
 
 QT_CHARTS_BEGIN_NAMESPACE
 
@@ -54,11 +55,11 @@ class ChartThemeManager;
 class AbstractDomain;
 class ChartDataSet;
 
-class QT_CHARTS_PRIVATE_EXPORT ChartElement2: public QGraphicsObject
+class QT_CHARTS_PRIVATE_EXPORT ChartElement2: public QQuickItem
 {
 
 public:
-    explicit ChartElement2(QGraphicsItem* item = 0);
+    explicit ChartElement2(QQuickItem* item = 0);
 
     virtual ChartAnimation *animation() const { return 0; }
     virtual void setPresenter(ChartPresenter2 *presenter);
diff --git a/src/charts/chartitem2.cpp b/src/charts/chartitem2.cpp
index 2ee0943b..c7f3f9fe 100644
--- a/src/charts/chartitem2.cpp
+++ b/src/charts/chartitem2.cpp
@@ -31,10 +31,11 @@
 #include <private/qabstractseries_p.h>
 #include <private/abstractdomain_p.h>
 #include <QtGui/QPainter>
+#include <QQuickItem>
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-ChartItem2::ChartItem2(QAbstractSeriesPrivate *series,QGraphicsItem* item):
+ChartItem2::ChartItem2(QAbstractSeriesPrivate *series,QQuickItem* item):
       ChartElement2(item),
       m_validData(true),
       m_series(series)
diff --git a/src/charts/chartitem2_p.h b/src/charts/chartitem2_p.h
index feb99fa7..911e43f7 100644
--- a/src/charts/chartitem2_p.h
+++ b/src/charts/chartitem2_p.h
@@ -41,7 +41,8 @@
 
 #include "chartelement2_p.h"
 #include <QtCharts/private/qchartglobal_p.h>
-#include <QtWidgets/QGraphicsItem>
+#include <QQuickItem>
+#include "chartitem_p.h"
 
 QT_CHARTS_BEGIN_NAMESPACE
 
@@ -50,9 +51,9 @@ class QAbstractSeriesPrivate;
 class QT_CHARTS_PRIVATE_EXPORT ChartItem2 : public ChartElement2
 {
     Q_OBJECT
-    enum ChartItemTypes { AXIS_ITEM = UserType + 1, XYLINE_ITEM };
+    enum ChartItemTypes { AXIS_ITEM = ChartItem::UserType + 1, XYLINE_ITEM };
 public:
-    ChartItem2(QAbstractSeriesPrivate *series,QGraphicsItem* item);
+    ChartItem2(QAbstractSeriesPrivate *series,QQuickItem* item);
     AbstractDomain*  domain() const;
     virtual void cleanup();
 
diff --git a/src/charts/chartpresenter2.cpp b/src/charts/chartpresenter2.cpp
index 813d5855..99326420 100644
--- a/src/charts/chartpresenter2.cpp
+++ b/src/charts/chartpresenter2.cpp
@@ -38,7 +38,7 @@
 #include <private/qabstractseries_p.h>
 #include <QtCharts/QAreaSeries>
 #include <private/chartaxiselement_p.h>
-#include <private/chartbackground_p.h>
+#include "chartbackground2_p.h"
 #include "cartesianchartlayout2_p.h"
 #include "polarchartlayout2_p.h"
 #include <private/charttitle_p.h>
@@ -47,6 +47,10 @@
 #include <QtGui/QTextDocument>
 #include <QtWidgets/QGraphicsScene>
 #include <QtWidgets/QGraphicsView>
+#include <QQuickItem>
+#include <QQuickPaintedItem>
+#include <private/abstractdomain_p.h>
+#include "charttitle2_p.h"
 
 QT_CHARTS_BEGIN_NAMESPACE
 
@@ -66,11 +70,12 @@ ChartPresenter2::ChartPresenter2(QChart2 *chart, QChart::ChartType type)
       , m_glUseWidget(true)
 #endif
 {
-    if (type == QChart::ChartTypeCartesian)
-        m_layout = new CartesianChartLayout2(this);
-    else if (type == QChart::ChartTypePolar)
-        m_layout = new PolarChartLayout2(this);
-    Q_ASSERT(m_layout);
+//    TODO
+//    if (type == QChart::ChartTypeCartesian)
+//        m_layout = new CartesianChartLayout2(this);
+//    else if (type == QChart::ChartTypePolar)
+//        m_layout = new PolarChartLayout2(this);
+//    Q_ASSERT(m_layout);
 }
 
 ChartPresenter2::~ChartPresenter2()
@@ -90,7 +95,7 @@ void ChartPresenter2::setFixedGeometry(const QRectF &rect)
         // Update to the latest geometry properly if changed
         if (!isSame) {
             updateGeometry(m_rect);
-            m_layout->updateGeometry();
+//            m_layout->updateGeometry();
         }
     } else {
         updateGeometry(m_fixedRect);
@@ -111,7 +116,7 @@ void ChartPresenter2::updateGeometry(const QRectF &rect)
 {
     foreach (ChartItem2 *chart, m_chartItems) {
         chart->domain()->setSize(rect.size());
-        chart->setPos(rect.topLeft());
+//        chart->setPos(rect.topLeft());
     }
 #ifndef QT_NO_OPENGL
     if (!m_glWidget.isNull())
@@ -134,7 +139,7 @@ void ChartPresenter2::handleAxisAdded(QAbstractAxis *axis)
     item->setThemeManager(m_chart->d_ptr->m_themeManager);
     m_axisItems<<item;
     m_axes<<axis;
-    m_layout->invalidate();
+//    m_layout->invalidate();
 }
 
 void ChartPresenter2::handleAxisRemoved(QAbstractAxis *axis)
@@ -142,12 +147,14 @@ void ChartPresenter2::handleAxisRemoved(QAbstractAxis *axis)
     ChartAxisElement2 *item = axis->d_ptr->m_item2.take();
     if (item->animation())
         item->animation()->stopAndDestroyLater();
-    item->hide();
+
+    // TODO
+    item->setVisible(false);//->hide();
     item->disconnect();
     item->deleteLater();
     m_axisItems.removeAll(item);
     m_axes.removeAll(axis);
-    m_layout->invalidate();
+//    m_layout->invalidate();
 }
 
 
@@ -161,17 +168,17 @@ void ChartPresenter2::handleSeriesAdded(QAbstractSeries *series)
     chart->setThemeManager(m_chart->d_ptr->m_themeManager);
     chart->setDataSet(m_chart->d_ptr->m_dataset);
     chart->domain()->setSize(geometry().size());
-    chart->setPos(geometry().topLeft());
+    chart->setPosition(geometry().topLeft());
     chart->handleDomainUpdated(); //this could be moved to intializeGraphics when animator is refactored
     m_chartItems<<chart;
     m_series<<series;
-    m_layout->invalidate();
+//    m_layout->invalidate();
 }
 
 void ChartPresenter2::handleSeriesRemoved(QAbstractSeries *series)
 {
     ChartItem2 *chart  = series->d_ptr->m_item2.take();
-    chart->hide();
+    chart->setVisible(false);
     chart->cleanup();
     series->disconnect(chart);
     chart->deleteLater();
@@ -179,7 +186,7 @@ void ChartPresenter2::handleSeriesRemoved(QAbstractSeries *series)
         chart->animation()->stopAndDestroyLater();
     m_chartItems.removeAll(chart);
     m_series.removeAll(series);
-    m_layout->invalidate();
+//    m_layout->invalidate();
 }
 
 void ChartPresenter2::setAnimationOptions(QChart::AnimationOptions options)
@@ -196,7 +203,7 @@ void ChartPresenter2::setAnimationOptions(QChart::AnimationOptions options)
             foreach (QAbstractAxis *axis, m_axes)
                 axis->d_ptr->initializeAnimations(m_options, m_animationDuration, m_animationCurve);
         }
-        m_layout->invalidate(); // So that existing animations don't just stop halfway
+//        m_layout->invalidate(); // So that existing animations don't just stop halfway
     }
 }
 
@@ -208,7 +215,7 @@ void ChartPresenter2::setAnimationDuration(int msecs)
             series->d_ptr->initializeAnimations(m_options, m_animationDuration, m_animationCurve);
         foreach (QAbstractAxis *axis, m_axes)
             axis->d_ptr->initializeAnimations(m_options, m_animationDuration, m_animationCurve);
-        m_layout->invalidate(); // So that existing animations don't just stop halfway
+//        m_layout->invalidate(); // So that existing animations don't just stop halfway
     }
 }
 
@@ -220,7 +227,7 @@ void ChartPresenter2::setAnimationEasingCurve(const QEasingCurve &curve)
             series->d_ptr->initializeAnimations(m_options, m_animationDuration, m_animationCurve);
         foreach (QAbstractAxis *axis, m_axes)
             axis->d_ptr->initializeAnimations(m_options, m_animationDuration, m_animationCurve);
-        m_layout->invalidate(); // So that existing animations don't just stop halfway
+//        m_layout->invalidate(); // So that existing animations don't just stop halfway
     }
 }
 
@@ -238,25 +245,25 @@ QChart::AnimationOptions ChartPresenter2::animationOptions() const
 void ChartPresenter2::createBackgroundItem()
 {
     if (!m_background) {
-        m_background = new ChartBackground(rootItem());
-        m_background->setPen(Qt::NoPen); // Theme doesn't touch pen so don't use default
-        m_background->setBrush(QChartPrivate::defaultBrush());
-        m_background->setZValue(ChartPresenter2::BackgroundZValue);
+        m_background = new ChartBackground2(rootItem());
+//        m_background->setPen(Qt::NoPen); // Theme doesn't touch pen so don't use default
+//        m_background->setBrush(QChartPrivate::defaultBrush());
+//        m_background->setZValue(ChartPresenter2::BackgroundZValue);
     }
 }
 
 void ChartPresenter2::createPlotAreaBackgroundItem()
 {
     if (!m_plotAreaBackground) {
-        if (m_chart->chartType() == QChart::ChartTypeCartesian)
-            m_plotAreaBackground = new QGraphicsRectItem(rootItem());
-        else
-            m_plotAreaBackground = new QGraphicsEllipseItem(rootItem());
+//        if (m_chart->chartType() == QChart::ChartTypeCartesian)
+            m_plotAreaBackground = new QQuickItem(rootItem());
+//        else
+//            m_plotAreaBackground = new QGraphicsEllipseItem(rootItem());
         // Use transparent pen instead of Qt::NoPen, as Qt::NoPen causes
         // antialising artifacts with axis lines for some reason.
-        m_plotAreaBackground->setPen(QPen(Qt::transparent));
-        m_plotAreaBackground->setBrush(Qt::NoBrush);
-        m_plotAreaBackground->setZValue(ChartPresenter2::PlotAreaZValue);
+//        m_plotAreaBackground->setPen(QPen(Qt::transparent));
+//        m_plotAreaBackground->setBrush(Qt::NoBrush);
+//        m_plotAreaBackground->setZValue(ChartPresenter2::PlotAreaZValue);
         m_plotAreaBackground->setVisible(false);
     }
 }
@@ -264,8 +271,8 @@ void ChartPresenter2::createPlotAreaBackgroundItem()
 void ChartPresenter2::createTitleItem()
 {
     if (!m_title) {
-        m_title = new ChartTitle(rootItem());
-        m_title->setZValue(ChartPresenter2::BackgroundZValue);
+        m_title = new ChartTitle2(rootItem());
+//        m_title->setZValue(ChartPresenter2::BackgroundZValue);
     }
 }
 
@@ -278,36 +285,36 @@ void ChartPresenter2::startAnimation(ChartAnimation *animation)
 void ChartPresenter2::setBackgroundBrush(const QBrush &brush)
 {
     createBackgroundItem();
-    m_background->setBrush(brush);
-    m_layout->invalidate();
+//    m_background->setBrush(brush);
+//    m_layout->invalidate();
 }
 
 QBrush ChartPresenter2::backgroundBrush() const
 {
-    if (!m_background)
+//    if (!m_background)
         return QBrush();
-    return m_background->brush();
+//    return m_background->brush();
 }
 
 void ChartPresenter2::setBackgroundPen(const QPen &pen)
 {
     createBackgroundItem();
-    m_background->setPen(pen);
-    m_layout->invalidate();
+//    m_background->setPen(pen);
+//    m_layout->invalidate();
 }
 
 QPen ChartPresenter2::backgroundPen() const
 {
-    if (!m_background)
+//    if (!m_background)
         return QPen();
-    return m_background->pen();
+//    return m_background->pen();
 }
 
 void ChartPresenter2::setBackgroundRoundness(qreal diameter)
 {
     createBackgroundItem();
     m_background->setDiameter(diameter);
-    m_layout->invalidate();
+//    m_layout->invalidate();
 }
 
 qreal ChartPresenter2::backgroundRoundness() const
@@ -320,36 +327,36 @@ qreal ChartPresenter2::backgroundRoundness() const
 void ChartPresenter2::setPlotAreaBackgroundBrush(const QBrush &brush)
 {
     createPlotAreaBackgroundItem();
-    m_plotAreaBackground->setBrush(brush);
-    m_layout->invalidate();
+//    m_plotAreaBackground->setBrush(brush);
+//    m_layout->invalidate();
 }
 
 QBrush ChartPresenter2::plotAreaBackgroundBrush() const
 {
     if (!m_plotAreaBackground)
         return QBrush();
-    return m_plotAreaBackground->brush();
+//    return m_plotAreaBackground->brush();
 }
 
 void ChartPresenter2::setPlotAreaBackgroundPen(const QPen &pen)
 {
     createPlotAreaBackgroundItem();
-    m_plotAreaBackground->setPen(pen);
-    m_layout->invalidate();
+//    m_plotAreaBackground->setPen(pen);
+//    m_layout->invalidate();
 }
 
 QPen ChartPresenter2::plotAreaBackgroundPen() const
 {
     if (!m_plotAreaBackground)
         return QPen();
-    return m_plotAreaBackground->pen();
+//    return m_plotAreaBackground->pen();
 }
 
 void ChartPresenter2::setTitle(const QString &title)
 {
     createTitleItem();
     m_title->setText(title);
-    m_layout->invalidate();
+//    m_layout->invalidate();
 }
 
 QString ChartPresenter2::title() const
@@ -362,29 +369,29 @@ QString ChartPresenter2::title() const
 void ChartPresenter2::setTitleFont(const QFont &font)
 {
     createTitleItem();
-    m_title->setFont(font);
-    m_layout->invalidate();
+//    m_title->setFont(font);
+//    m_layout->invalidate();
 }
 
 QFont ChartPresenter2::titleFont() const
 {
-    if (!m_title)
+//    if (!m_title)
         return QFont();
-    return m_title->font();
+//    return m_title->font();
 }
 
 void ChartPresenter2::setTitleBrush(const QBrush &brush)
 {
     createTitleItem();
-    m_title->setDefaultTextColor(brush.color());
-    m_layout->invalidate();
+//    m_title->setDefaultTextColor(brush.color());
+//    m_layout->invalidate();
 }
 
 QBrush ChartPresenter2::titleBrush() const
 {
-    if (!m_title)
+//    if (!m_title)
         return QBrush();
-    return QBrush(m_title->defaultTextColor());
+//    return QBrush(m_title->defaultTextColor());
 }
 
 void ChartPresenter2::setBackgroundVisible(bool visible)
@@ -430,13 +437,13 @@ bool ChartPresenter2::isBackgroundDropShadowEnabled() const
 void ChartPresenter2::setLocalizeNumbers(bool localize)
 {
     m_localizeNumbers = localize;
-    m_layout->invalidate();
+//    m_layout->invalidate();
 }
 
 void ChartPresenter2::setLocale(const QLocale &locale)
 {
     m_locale = locale;
-    m_layout->invalidate();
+//    m_layout->invalidate();
 }
 
 AbstractChartLayout2 *ChartPresenter2::layout()
@@ -454,12 +461,12 @@ void ChartPresenter2::setVisible(bool visible)
     m_chart->setVisible(visible);
 }
 
-ChartBackground *ChartPresenter2::backgroundElement()
+ChartBackground2 *ChartPresenter2::backgroundElement()
 {
     return m_background;
 }
 
-QAbstractGraphicsShapeItem *ChartPresenter2::plotAreaElement()
+QQuickItem *ChartPresenter2::plotAreaElement()
 {
     return m_plotAreaBackground;
 }
@@ -474,7 +481,7 @@ QList<ChartItem2 *> ChartPresenter2::chartItems() const
     return m_chartItems;
 }
 
-ChartTitle *ChartPresenter2::titleElement()
+ChartTitle2 *ChartPresenter2::titleElement()
 {
     return m_title;
 }
@@ -586,30 +593,31 @@ QString ChartPresenter2::numberToString(int value)
 
 void ChartPresenter2::updateGLWidget()
 {
-#ifndef QT_NO_OPENGL
-    // GLWidget pointer is wrapped in QPointer as its parent is not in our control, and therefore
-    // can potentially get deleted unexpectedly.
-    if (!m_glWidget.isNull() && m_glWidget->needsReset()) {
-        m_glWidget->hide();
-        delete m_glWidget.data();
-        m_glWidget.clear();
-    }
-    if (m_glWidget.isNull() && m_glUseWidget && m_chart->scene()) {
-        // Find the view of the scene. If the scene has multiple views, only the first view is
-        // chosen.
-        QList<QGraphicsView *> views = m_chart->scene()->views();
-        if (views.size()) {
-            QGraphicsView *firstView = views.at(0);
-            m_glWidget = new GLWidget(m_chart->d_ptr->m_dataset->glXYSeriesDataManager(),
-                                      m_chart, firstView);
-            m_glWidget->setGeometry(geometry().toRect());
-            m_glWidget->show();
-        }
-    }
-    // Make sure we update the widget in a timely manner
-    if (!m_glWidget.isNull())
-        m_glWidget->update();
-#endif
+    // TODO!!
+//#ifndef QT_NO_OPENGL
+//    // GLWidget pointer is wrapped in QPointer as its parent is not in our control, and therefore
+//    // can potentially get deleted unexpectedly.
+//    if (!m_glWidget.isNull() && m_glWidget->needsReset()) {
+//        m_glWidget->hide();
+//        delete m_glWidget.data();
+//        m_glWidget.clear();
+//    }
+//    if (m_glWidget.isNull() && m_glUseWidget && m_chart->scene()) {
+//        // Find the view of the scene. If the scene has multiple views, only the first view is
+//        // chosen.
+//        QList<QGraphicsView *> views = m_chart->scene()->views();
+//        if (views.size()) {
+//            QGraphicsView *firstView = views.at(0);
+//            m_glWidget = new GLWidget(m_chart->d_ptr->m_dataset->glXYSeriesDataManager(),
+//                                      m_chart, firstView);
+//            m_glWidget->setGeometry(geometry().toRect());
+//            m_glWidget->show();
+//        }
+//    }
+//    // Make sure we update the widget in a timely manner
+//    if (!m_glWidget.isNull())
+//        m_glWidget->update();
+//#endif
 }
 
 QT_CHARTS_END_NAMESPACE
diff --git a/src/charts/chartpresenter2_p.h b/src/charts/chartpresenter2_p.h
index c15ead19..09cbd0f1 100644
--- a/src/charts/chartpresenter2_p.h
+++ b/src/charts/chartpresenter2_p.h
@@ -51,6 +51,8 @@
 #include <QtCore/QPointer>
 #include <QtCore/QEasingCurve>
 
+class QQuickPaintedItem;
+
 QT_CHARTS_BEGIN_NAMESPACE
 
 class ChartItem2;
@@ -60,8 +62,8 @@ class ChartDataSet2;
 class AbstractDomain;
 class ChartAxisElement2;
 class ChartAnimator;
-class ChartBackground;
-class ChartTitle;
+class ChartBackground2;
+class ChartTitle2;
 class ChartAnimation;
 class AbstractChartLayout2;
 
@@ -106,10 +108,10 @@ public:
     QRectF geometry() const;
     void updateGeometry(const QRectF &rect);
 
-    QGraphicsItem *rootItem(){ return m_chart; }
-    ChartBackground *backgroundElement();
-    QAbstractGraphicsShapeItem *plotAreaElement();
-    ChartTitle *titleElement();
+    QQuickItem *rootItem(){ return m_chart; }
+    ChartBackground2 *backgroundElement();
+    QQuickItem *plotAreaElement();
+    ChartTitle2 *titleElement();
     QList<ChartAxisElement2 *> axisItems() const;
     QList<ChartItem2 *> chartItems() const;
 
@@ -209,9 +211,10 @@ private:
     State m_state;
     QPointF m_statePoint;
     AbstractChartLayout2 *m_layout;
-    ChartBackground *m_background;
-    QAbstractGraphicsShapeItem *m_plotAreaBackground;
-    ChartTitle *m_title;
+    ChartBackground2 *m_background;
+    // TODO
+    QQuickItem *m_plotAreaBackground;
+    ChartTitle2 *m_title;
     QRectF m_rect;
     bool m_localizeNumbers;
     QLocale m_locale;
diff --git a/src/charts/charts.pro b/src/charts/charts.pro
index 80d62e2a..a6bcefdb 100644
--- a/src/charts/charts.pro
+++ b/src/charts/charts.pro
@@ -2,7 +2,7 @@
 
 TARGET = QtCharts
 
-QT = core gui widgets
+QT = core gui widgets quick quick-private
 contains(QT_COORD_TYPE, float): DEFINES += QT_QREAL_IS_FLOAT
 
 QMAKE_DOCS = $$PWD/doc/qtcharts.qdocconf
@@ -24,14 +24,17 @@ SOURCES += \
     $$PWD/qchartview.cpp \
     $$PWD/qabstractseries.cpp \
     $$PWD/chartbackground.cpp \
+    $$PWD/chartbackground2.cpp \
     $$PWD/chartelement2.cpp \
     $$PWD/chartelement.cpp \
     $$PWD/chartitem2.cpp \
     $$PWD/chartitem.cpp \
     $$PWD/scroller.cpp \
     $$PWD/charttitle.cpp \
+    $$PWD/charttitle2.cpp \
     $$PWD/qpolarchart.cpp \
-    $$PWD/qpolarchart2.cpp
+    $$PWD/qpolarchart2.cpp \
+    qchart3.cpp
 
 contains(QT_CONFIG, opengl): SOURCES += $$PWD/glwidget.cpp
 
@@ -43,6 +46,7 @@ PRIVATE_HEADERS += \
     $$PWD/chartpresenter_p.h \
     $$PWD/chartthememanager_p.h \
     $$PWD/chartbackground_p.h \
+    $$PWD/chartbackground2_p.h \
     $$PWD/chartelement_p.h \
     $$PWD/chartelement2_p.h \
     $$PWD/chartconfig_p.h \
@@ -52,6 +56,7 @@ PRIVATE_HEADERS += \
     $$PWD/scroller_p.h \
     $$PWD/qabstractseries_p.h \
     $$PWD/charttitle_p.h \
+    $$PWD/charttitle2_p.h \
     $$PWD/charthelpers_p.h \
     $$PWD/qchartglobal_p.h
 
@@ -83,7 +88,8 @@ include($$PWD/layout/layout.pri)
 include($$PWD/boxplotchart/boxplotchart.pri)
 include($$PWD/candlestickchart/candlestickchart.pri)
 
-HEADERS += $$PUBLIC_HEADERS
+HEADERS += $$PUBLIC_HEADERS \
+    qchart3.h
 HEADERS += $$PRIVATE_HEADERS
 HEADERS += $$THEMES
 
diff --git a/src/charts/layout/abstractchartlayout2.cpp b/src/charts/layout/abstractchartlayout2.cpp
index cf0852ca..ab979cdb 100644
--- a/src/charts/layout/abstractchartlayout2.cpp
+++ b/src/charts/layout/abstractchartlayout2.cpp
@@ -32,8 +32,9 @@
 #include <private/qlegend_p.h>
 #include <private/chartaxiselement_p.h>
 #include <private/charttitle_p.h>
-#include <private/chartbackground_p.h>
+#include <private/chartbackground2_p.h>
 #include <QtCore/QDebug>
+#include <charttitle2_p.h>
 #include "qlegend2_p.h"
 
 QT_CHARTS_BEGIN_NAMESPACE
@@ -58,9 +59,9 @@ void AbstractChartLayout2::setGeometry(const QRectF &rect)
     const bool updateLayout = (!m_presenter->isFixedGeometry() || m_presenter->geometry() == rect);
     if (m_presenter->chart()->isVisible()) {
         QList<ChartAxisElement2 *> axes = m_presenter->axisItems();
-        ChartTitle *title = m_presenter->titleElement();
+        ChartTitle2 *title = m_presenter->titleElement();
         QLegend2 *legend = m_presenter->legend();
-        ChartBackground *background = m_presenter->backgroundElement();
+        ChartBackground2 *background = m_presenter->backgroundElement();
 
         QRectF contentGeometry = calculateBackgroundGeometry(rect, background, updateLayout);
 
@@ -75,12 +76,12 @@ void AbstractChartLayout2::setGeometry(const QRectF &rect)
         contentGeometry = calculateAxisGeometry(contentGeometry, axes, updateLayout);
 
         m_presenter->setGeometry(contentGeometry);
-        if (updateLayout) {
-            if (m_presenter->chart()->chartType() == QChart::ChartTypeCartesian)
-                static_cast<QGraphicsRectItem *>(m_presenter->plotAreaElement())->setRect(contentGeometry);
-            else
-                static_cast<QGraphicsEllipseItem *>(m_presenter->plotAreaElement())->setRect(contentGeometry);
-        }
+//        if (updateLayout) {
+//            if (m_presenter->chart()->chartType() == QChart::ChartTypeCartesian)
+//                static_cast<QGraphicsRectItem *>(m_presenter->plotAreaElement())->setRect(contentGeometry);
+//            else
+//                static_cast<QGraphicsEllipseItem *>(m_presenter->plotAreaElement())->setRect(contentGeometry);
+//        }
     }
 
     QGraphicsLayout::setGeometry(rect);
@@ -98,7 +99,7 @@ QRectF AbstractChartLayout2::calculateContentMinimum(const QRectF &minimum) cons
 
 
 QRectF AbstractChartLayout2::calculateBackgroundGeometry(const QRectF &geometry,
-                                                        ChartBackground *background,
+                                                        ChartBackground2 *background,
                                                         bool update) const
 {
     qreal left;
@@ -107,8 +108,9 @@ QRectF AbstractChartLayout2::calculateBackgroundGeometry(const QRectF &geometry,
     qreal bottom;
     getContentsMargins(&left, &top, &right, &bottom);
     QRectF backgroundGeometry = geometry.adjusted(left, top, -right, -bottom);
-    if (background && update)
-        background->setRect(backgroundGeometry);
+    // TODO
+    //    if (background && update)
+//        background->setRect(backgroundGeometry);
     return backgroundGeometry;
 }
 
@@ -125,72 +127,72 @@ QRectF AbstractChartLayout2::calculateBackgroundMinimum(const QRectF &minimum) c
 QRectF AbstractChartLayout2::calculateLegendGeometry(const QRectF &geometry, QLegend2 *legend,
                                                     bool update) const
 {
-    QSizeF size = legend->effectiveSizeHint(Qt::PreferredSize, QSizeF(-1, -1));
+//    QSizeF size = legend->effectiveSizeHint(Qt::PreferredSize, QSizeF(-1, -1));
     QRectF legendRect;
     QRectF result;
 
-    switch (legend->alignment()) {
-    case Qt::AlignTop: {
-        legendRect = QRectF(geometry.topLeft(), QSizeF(geometry.width(), size.height()));
-        result = geometry.adjusted(0, legendRect.height(), 0, 0);
-        break;
-    }
-    case Qt::AlignBottom: {
-        legendRect = QRectF(QPointF(geometry.left(), geometry.bottom() - size.height()), QSizeF(geometry.width(), size.height()));
-        result = geometry.adjusted(0, 0, 0, -legendRect.height());
-        break;
-    }
-    case Qt::AlignLeft: {
-        qreal width = qMin(size.width(), geometry.width() * golden_ratio);
-        legendRect = QRectF(geometry.topLeft(), QSizeF(width, geometry.height()));
-        result = geometry.adjusted(width, 0, 0, 0);
-        break;
-    }
-    case Qt::AlignRight: {
-        qreal width = qMin(size.width(), geometry.width() * golden_ratio);
-        legendRect = QRectF(QPointF(geometry.right() - width, geometry.top()), QSizeF(width, geometry.height()));
-        result = geometry.adjusted(0, 0, -width, 0);
-        break;
-    }
-    default: {
-        legendRect = QRectF(0, 0, 0, 0);
-        result = geometry;
-        break;
-    }
-    }
-    if (update)
-        legend->setGeometry(legendRect);
+//    switch (legend->alignment()) {
+//    case Qt::AlignTop: {
+//        legendRect = QRectF(geometry.topLeft(), QSizeF(geometry.width(), size.height()));
+//        result = geometry.adjusted(0, legendRect.height(), 0, 0);
+//        break;
+//    }
+//    case Qt::AlignBottom: {
+//        legendRect = QRectF(QPointF(geometry.left(), geometry.bottom() - size.height()), QSizeF(geometry.width(), size.height()));
+//        result = geometry.adjusted(0, 0, 0, -legendRect.height());
+//        break;
+//    }
+//    case Qt::AlignLeft: {
+//        qreal width = qMin(size.width(), geometry.width() * golden_ratio);
+//        legendRect = QRectF(geometry.topLeft(), QSizeF(width, geometry.height()));
+//        result = geometry.adjusted(width, 0, 0, 0);
+//        break;
+//    }
+//    case Qt::AlignRight: {
+//        qreal width = qMin(size.width(), geometry.width() * golden_ratio);
+//        legendRect = QRectF(QPointF(geometry.right() - width, geometry.top()), QSizeF(width, geometry.height()));
+//        result = geometry.adjusted(0, 0, -width, 0);
+//        break;
+//    }
+//    default: {
+//        legendRect = QRectF(0, 0, 0, 0);
+//        result = geometry;
+//        break;
+//    }
+//    }
+//    if (update)
+//        legend->setGeometry(legendRect);
 
     return result;
 }
 
 QRectF AbstractChartLayout2::calculateLegendMinimum(const QRectF &geometry, QLegend2 *legend) const
 {
-    if (!legend->isAttachedToChart() || !legend->isVisible()) {
+//    if (!legend->isAttachedToChart() || !legend->isVisible()) {
         return geometry;
-    } else {
-        QSizeF minSize = legend->effectiveSizeHint(Qt::MinimumSize, QSizeF(-1, -1));
-        return geometry.adjusted(0, 0, minSize.width(), minSize.height());
-    }
+//    } else {
+//        QSizeF minSize = legend->effectiveSizeHint(Qt::MinimumSize, QSizeF(-1, -1));
+//        return geometry.adjusted(0, 0, minSize.width(), minSize.height());
+//    }
 }
 
-QRectF AbstractChartLayout2::calculateTitleGeometry(const QRectF &geometry, ChartTitle *title,
+QRectF AbstractChartLayout2::calculateTitleGeometry(const QRectF &geometry, ChartTitle2 *title,
                                                    bool update) const
 {
-    if (update)
-        title->setGeometry(geometry);
-    if (title->text().isEmpty()) {
+//    if (update)
+//        title->setGeometry(geometry);
+//    if (title->text().isEmpty()) {
         return geometry;
-    } else {
-        // Round to full pixel via QPoint to avoid one pixel clipping on the edge in some cases
-        QPointF center((geometry.center() - title->boundingRect().center()).toPoint());
-        if (update)
-            title->setPos(center.x(), title->pos().y());
-        return geometry.adjusted(0, title->boundingRect().height() + 1, 0, 0);
-    }
+//    } else {
+//        // Round to full pixel via QPoint to avoid one pixel clipping on the edge in some cases
+//        QPointF center((geometry.center() - title->boundingRect().center()).toPoint());
+//        if (update)
+//            title->setPos(center.x(), title->pos().y());
+//        return geometry.adjusted(0, title->boundingRect().height() + 1, 0, 0);
+//    }
 }
 
-QRectF AbstractChartLayout2::calculateTitleMinimum(const QRectF &minimum, ChartTitle *title) const
+QRectF AbstractChartLayout2::calculateTitleMinimum(const QRectF &minimum, ChartTitle2 *title) const
 {
     if (!title->isVisible() || title->text().isEmpty()) {
         return minimum;
@@ -205,7 +207,7 @@ QSizeF AbstractChartLayout2::sizeHint(Qt::SizeHint which, const QSizeF &constrai
     Q_UNUSED(constraint);
     if (which == Qt::MinimumSize) {
         QList<ChartAxisElement2 *> axes = m_presenter->axisItems();
-        ChartTitle *title = m_presenter->titleElement();
+        ChartTitle2 *title = m_presenter->titleElement();
         QLegend2 *legend = m_presenter->legend();
         QRectF minimumRect(0, 0, 0, 0);
         minimumRect = calculateBackgroundMinimum(minimumRect);
diff --git a/src/charts/layout/abstractchartlayout2_p.h b/src/charts/layout/abstractchartlayout2_p.h
index 3498f3c6..00385e60 100644
--- a/src/charts/layout/abstractchartlayout2_p.h
+++ b/src/charts/layout/abstractchartlayout2_p.h
@@ -46,11 +46,11 @@
 
 QT_CHARTS_BEGIN_NAMESPACE
 
-class ChartTitle;
+class ChartTitle2;
 class ChartAxisElement2;
 class ChartPresenter2;
 class QLegend2;
-class ChartBackground;
+class ChartBackground2;
 
 class QT_CHARTS_PRIVATE_EXPORT AbstractChartLayout2 : public QGraphicsLayout
 {
@@ -63,14 +63,14 @@ public:
     virtual void setGeometry(const QRectF &rect);
 
 protected:
-    virtual QRectF calculateBackgroundGeometry(const QRectF &geometry, ChartBackground *background,
+    virtual QRectF calculateBackgroundGeometry(const QRectF &geometry, ChartBackground2 *background,
                                                bool update = true) const;
     virtual QRectF calculateBackgroundMinimum(const QRectF &minimum) const;
     virtual QRectF calculateContentGeometry(const QRectF &geometry) const;
     virtual QRectF calculateContentMinimum(const QRectF &minimum) const;
-    virtual QRectF calculateTitleGeometry(const QRectF &geometry, ChartTitle *title,
+    virtual QRectF calculateTitleGeometry(const QRectF &geometry, ChartTitle2 *title,
                                           bool update = true) const;
-    virtual QRectF calculateTitleMinimum(const QRectF &minimum, ChartTitle *title) const;
+    virtual QRectF calculateTitleMinimum(const QRectF &minimum, ChartTitle2 *title) const;
     virtual QRectF calculateLegendGeometry(const QRectF &geometry, QLegend2 *legend,
                                            bool update = true) const;
     virtual QRectF calculateLegendMinimum(const QRectF &minimum, QLegend2 *legend) const;
diff --git a/src/charts/layout/cartesianchartlayout2.cpp b/src/charts/layout/cartesianchartlayout2.cpp
index 381087fb..878c199e 100644
--- a/src/charts/layout/cartesianchartlayout2.cpp
+++ b/src/charts/layout/cartesianchartlayout2.cpp
@@ -50,215 +50,217 @@ QRectF CartesianChartLayout2::calculateAxisGeometry(const QRectF &geometry,
                                                    const QList<ChartAxisElement2 *> &axes,
                                                    bool update) const
 {
-    Q_UNUSED(update)
-    QSizeF left(0,0);
-    QSizeF minLeft(0,0);
-    QSizeF right(0,0);
-    QSizeF minRight(0,0);
-    QSizeF bottom(0,0);
-    QSizeF minBottom(0,0);
-    QSizeF top(0,0);
-    QSizeF minTop(0,0);
-    QSizeF labelExtents(0,0);
-    int leftCount = 0;
-    int rightCount = 0;
-    int topCount = 0;
-    int bottomCount = 0;
-
-    foreach (ChartAxisElement2 *axis , axes) {
-
-        if (!axis->isVisible())
-            continue;
-
-
-        QSizeF size = axis->effectiveSizeHint(Qt::PreferredSize);
-        //this is used to get single thick font size
-        QSizeF minSize = axis->effectiveSizeHint(Qt::MinimumSize);
-
-        switch (axis->axis()->alignment()) {
-        case Qt::AlignLeft:
-           left.setWidth(left.width()+size.width());
-           left.setHeight(qMax(left.height(),size.height()));
-           minLeft.setWidth(minLeft.width()+minSize.width());
-           minLeft.setHeight(qMax(minLeft.height(),minSize.height()));
-           labelExtents.setHeight(qMax(size.height(), labelExtents.height()));
-           leftCount++;
-           break;
-        case Qt::AlignRight:
-            right.setWidth(right.width()+size.width());
-            right.setHeight(qMax(right.height(),size.height()));
-            minRight.setWidth(minRight.width()+minSize.width());
-            minRight.setHeight(qMax(minRight.height(),minSize.height()));
-            labelExtents.setHeight(qMax(size.height(), labelExtents.height()));
-            rightCount++;
-            break;
-        case Qt::AlignTop:
-            top.setWidth(qMax(top.width(),size.width()));
-            top.setHeight(top.height()+size.height());
-            minTop.setWidth(qMax(minTop.width(),minSize.width()));
-            minTop.setHeight(minTop.height()+minSize.height());
-            labelExtents.setWidth(qMax(size.width(), labelExtents.width()));
-            topCount++;
-            break;
-        case Qt::AlignBottom:
-            bottom.setWidth(qMax(bottom.width(), size.width()));
-            bottom.setHeight(bottom.height() + size.height());
-            minBottom.setWidth(qMax(minBottom.width(),minSize.width()));
-            minBottom.setHeight(minBottom.height() + minSize.height());
-            labelExtents.setWidth(qMax(size.width(), labelExtents.width()));
-            bottomCount++;
-            break;
-        default:
-            qWarning()<<"Axis is without alignment !";
-            break;
-        }
-    }
-
-    qreal totalVerticalAxes = leftCount + rightCount;
-    qreal leftSqueezeRatio = 1.0;
-    qreal rightSqueezeRatio = 1.0;
-    qreal vratio = 0;
-
-    if (totalVerticalAxes > 0)
-        vratio = (maxAxisPortion * geometry.width()) / totalVerticalAxes;
-
-    if (leftCount > 0) {
-        int maxWidth = vratio * leftCount;
-        if (left.width() > maxWidth) {
-            leftSqueezeRatio = maxWidth / left.width();
-            left.setWidth(maxWidth);
-        }
-    }
-    if (rightCount > 0) {
-        int maxWidth = vratio * rightCount;
-        if (right.width() > maxWidth) {
-            rightSqueezeRatio = maxWidth / right.width();
-            right.setWidth(maxWidth);
-        }
-    }
-
-    qreal totalHorizontalAxes = topCount + bottomCount;
-    qreal topSqueezeRatio = 1.0;
-    qreal bottomSqueezeRatio = 1.0;
-    qreal hratio = 0;
-
-    if (totalHorizontalAxes > 0)
-        hratio = (maxAxisPortion * geometry.height()) / totalHorizontalAxes;
-
-    if (topCount > 0) {
-        int maxHeight = hratio * topCount;
-        if (top.height() > maxHeight) {
-            topSqueezeRatio = maxHeight / top.height();
-            top.setHeight(maxHeight);
-        }
-    }
-    if (bottomCount > 0) {
-        int maxHeight = hratio * bottomCount;
-        if (bottom.height() > maxHeight) {
-            bottomSqueezeRatio = maxHeight / bottom.height();
-            bottom.setHeight(maxHeight);
-        }
-    }
-
-    qreal minHeight = qMax(minLeft.height(),minRight.height()) + 1;
-    qreal minWidth = qMax(minTop.width(),minBottom.width()) + 1;
-
-    // Ensure that there is enough space for first and last tick labels.
-    left.setWidth(qMax(labelExtents.width(), left.width()));
-    right.setWidth(qMax(labelExtents.width(), right.width()));
-    top.setHeight(qMax(labelExtents.height(), top.height()));
-    bottom.setHeight(qMax(labelExtents.height(), bottom.height()));
-
-    QRectF chartRect = geometry.adjusted(qMax(left.width(),minWidth/2), qMax(top.height(), minHeight/2),-qMax(right.width(),minWidth/2),-qMax(bottom.height(),minHeight/2));
-
-    qreal leftOffset = 0;
-    qreal rightOffset = 0;
-    qreal topOffset = 0;
-    qreal bottomOffset = 0;
-
-    // The axes are positioned here for the first time, so we need to catch any possible resizing
-    // of the chart when in fixed geometry to prevent them being moved out of place.
-    if (m_presenter->isFixedGeometry())
-        chartRect = m_presenter->geometry();
-
-    foreach (ChartAxisElement2 *axis , axes) {
-
-        if (!axis->isVisible())
-            continue;
-
-        QSizeF size = axis->effectiveSizeHint(Qt::PreferredSize);
-
-        switch (axis->axis()->alignment()){
-        case Qt::AlignLeft:{
-            qreal width = size.width();
-            if (leftSqueezeRatio < 1.0)
-                width *= leftSqueezeRatio;
-            leftOffset+=width;
-            axis->setGeometry(QRect(chartRect.left()-leftOffset, geometry.top(),width, geometry.bottom()),chartRect);
-            break;
-        }
-        case Qt::AlignRight:{
-            qreal width = size.width();
-            if (rightSqueezeRatio < 1.0)
-                width *= rightSqueezeRatio;
-            axis->setGeometry(QRect(chartRect.right()+rightOffset,geometry.top(),width,geometry.bottom()),chartRect);
-            rightOffset+=width;
-            break;
-        }
-        case Qt::AlignTop: {
-            qreal height = size.height();
-            if (topSqueezeRatio < 1.0)
-                height *= topSqueezeRatio;
-            axis->setGeometry(QRect(geometry.left(), chartRect.top() - topOffset - height, geometry.width(), height), chartRect);
-            topOffset += height;
-            break;
-        }
-        case Qt::AlignBottom:
-            qreal height = size.height();
-            if (bottomSqueezeRatio < 1.0)
-                height *= bottomSqueezeRatio;
-            axis->setGeometry(QRect(geometry.left(), chartRect.bottom() + bottomOffset, geometry.width(), height), chartRect);
-            bottomOffset += height;
-            break;
-        }
-    }
-
-    return chartRect;
+//    Q_UNUSED(update)
+//    QSizeF left(0,0);
+//    QSizeF minLeft(0,0);
+//    QSizeF right(0,0);
+//    QSizeF minRight(0,0);
+//    QSizeF bottom(0,0);
+//    QSizeF minBottom(0,0);
+//    QSizeF top(0,0);
+//    QSizeF minTop(0,0);
+//    QSizeF labelExtents(0,0);
+//    int leftCount = 0;
+//    int rightCount = 0;
+//    int topCount = 0;
+//    int bottomCount = 0;
+
+//    foreach (ChartAxisElement2 *axis , axes) {
+
+//        if (!axis->isVisible())
+//            continue;
+
+
+//        QSizeF size = axis->effectiveSizeHint(Qt::PreferredSize);
+//        //this is used to get single thick font size
+//        QSizeF minSize = axis->effectiveSizeHint(Qt::MinimumSize);
+
+//        switch (axis->axis()->alignment()) {
+//        case Qt::AlignLeft:
+//           left.setWidth(left.width()+size.width());
+//           left.setHeight(qMax(left.height(),size.height()));
+//           minLeft.setWidth(minLeft.width()+minSize.width());
+//           minLeft.setHeight(qMax(minLeft.height(),minSize.height()));
+//           labelExtents.setHeight(qMax(size.height(), labelExtents.height()));
+//           leftCount++;
+//           break;
+//        case Qt::AlignRight:
+//            right.setWidth(right.width()+size.width());
+//            right.setHeight(qMax(right.height(),size.height()));
+//            minRight.setWidth(minRight.width()+minSize.width());
+//            minRight.setHeight(qMax(minRight.height(),minSize.height()));
+//            labelExtents.setHeight(qMax(size.height(), labelExtents.height()));
+//            rightCount++;
+//            break;
+//        case Qt::AlignTop:
+//            top.setWidth(qMax(top.width(),size.width()));
+//            top.setHeight(top.height()+size.height());
+//            minTop.setWidth(qMax(minTop.width(),minSize.width()));
+//            minTop.setHeight(minTop.height()+minSize.height());
+//            labelExtents.setWidth(qMax(size.width(), labelExtents.width()));
+//            topCount++;
+//            break;
+//        case Qt::AlignBottom:
+//            bottom.setWidth(qMax(bottom.width(), size.width()));
+//            bottom.setHeight(bottom.height() + size.height());
+//            minBottom.setWidth(qMax(minBottom.width(),minSize.width()));
+//            minBottom.setHeight(minBottom.height() + minSize.height());
+//            labelExtents.setWidth(qMax(size.width(), labelExtents.width()));
+//            bottomCount++;
+//            break;
+//        default:
+//            qWarning()<<"Axis is without alignment !";
+//            break;
+//        }
+//    }
+
+//    qreal totalVerticalAxes = leftCount + rightCount;
+//    qreal leftSqueezeRatio = 1.0;
+//    qreal rightSqueezeRatio = 1.0;
+//    qreal vratio = 0;
+
+//    if (totalVerticalAxes > 0)
+//        vratio = (maxAxisPortion * geometry.width()) / totalVerticalAxes;
+
+//    if (leftCount > 0) {
+//        int maxWidth = vratio * leftCount;
+//        if (left.width() > maxWidth) {
+//            leftSqueezeRatio = maxWidth / left.width();
+//            left.setWidth(maxWidth);
+//        }
+//    }
+//    if (rightCount > 0) {
+//        int maxWidth = vratio * rightCount;
+//        if (right.width() > maxWidth) {
+//            rightSqueezeRatio = maxWidth / right.width();
+//            right.setWidth(maxWidth);
+//        }
+//    }
+
+//    qreal totalHorizontalAxes = topCount + bottomCount;
+//    qreal topSqueezeRatio = 1.0;
+//    qreal bottomSqueezeRatio = 1.0;
+//    qreal hratio = 0;
+
+//    if (totalHorizontalAxes > 0)
+//        hratio = (maxAxisPortion * geometry.height()) / totalHorizontalAxes;
+
+//    if (topCount > 0) {
+//        int maxHeight = hratio * topCount;
+//        if (top.height() > maxHeight) {
+//            topSqueezeRatio = maxHeight / top.height();
+//            top.setHeight(maxHeight);
+//        }
+//    }
+//    if (bottomCount > 0) {
+//        int maxHeight = hratio * bottomCount;
+//        if (bottom.height() > maxHeight) {
+//            bottomSqueezeRatio = maxHeight / bottom.height();
+//            bottom.setHeight(maxHeight);
+//        }
+//    }
+
+//    qreal minHeight = qMax(minLeft.height(),minRight.height()) + 1;
+//    qreal minWidth = qMax(minTop.width(),minBottom.width()) + 1;
+
+//    // Ensure that there is enough space for first and last tick labels.
+//    left.setWidth(qMax(labelExtents.width(), left.width()));
+//    right.setWidth(qMax(labelExtents.width(), right.width()));
+//    top.setHeight(qMax(labelExtents.height(), top.height()));
+//    bottom.setHeight(qMax(labelExtents.height(), bottom.height()));
+
+//    QRectF chartRect = geometry.adjusted(qMax(left.width(),minWidth/2), qMax(top.height(), minHeight/2),-qMax(right.width(),minWidth/2),-qMax(bottom.height(),minHeight/2));
+
+//    qreal leftOffset = 0;
+//    qreal rightOffset = 0;
+//    qreal topOffset = 0;
+//    qreal bottomOffset = 0;
+
+//    // The axes are positioned here for the first time, so we need to catch any possible resizing
+//    // of the chart when in fixed geometry to prevent them being moved out of place.
+//    if (m_presenter->isFixedGeometry())
+//        chartRect = m_presenter->geometry();
+
+//    foreach (ChartAxisElement2 *axis , axes) {
+
+//        if (!axis->isVisible())
+//            continue;
+
+//        QSizeF size = axis->effectiveSizeHint(Qt::PreferredSize);
+
+//        switch (axis->axis()->alignment()){
+//        case Qt::AlignLeft:{
+//            qreal width = size.width();
+//            if (leftSqueezeRatio < 1.0)
+//                width *= leftSqueezeRatio;
+//            leftOffset+=width;
+//            axis->setGeometry(QRect(chartRect.left()-leftOffset, geometry.top(),width, geometry.bottom()),chartRect);
+//            break;
+//        }
+//        case Qt::AlignRight:{
+//            qreal width = size.width();
+//            if (rightSqueezeRatio < 1.0)
+//                width *= rightSqueezeRatio;
+//            axis->setGeometry(QRect(chartRect.right()+rightOffset,geometry.top(),width,geometry.bottom()),chartRect);
+//            rightOffset+=width;
+//            break;
+//        }
+//        case Qt::AlignTop: {
+//            qreal height = size.height();
+//            if (topSqueezeRatio < 1.0)
+//                height *= topSqueezeRatio;
+//            axis->setGeometry(QRect(geometry.left(), chartRect.top() - topOffset - height, geometry.width(), height), chartRect);
+//            topOffset += height;
+//            break;
+//        }
+//        case Qt::AlignBottom:
+//            qreal height = size.height();
+//            if (bottomSqueezeRatio < 1.0)
+//                height *= bottomSqueezeRatio;
+//            axis->setGeometry(QRect(geometry.left(), chartRect.bottom() + bottomOffset, geometry.width(), height), chartRect);
+//            bottomOffset += height;
+//            break;
+//        }
+//    }
+
+//    return chartRect;
+    return geometry;
 }
 
 QRectF CartesianChartLayout2::calculateAxisMinimum(const QRectF &minimum, const QList<ChartAxisElement2 *> &axes) const
 {
-    QSizeF left;
-    QSizeF right;
-    QSizeF bottom;
-    QSizeF top;
-
-    foreach (ChartAxisElement2 *axis, axes) {
-        QSizeF size = axis->effectiveSizeHint(Qt::MinimumSize);
-
-        if (!axis->isVisible())
-            continue;
-
-        switch (axis->axis()->alignment()) {
-        case Qt::AlignLeft:
-            left.setWidth(left.width() + size.width());
-            left.setHeight(qMax(left.height(), size.height()));
-            break;
-        case Qt::AlignRight:
-            right.setWidth(right.width() + size.width());
-            right.setHeight(qMax(right.height(), size.height()));
-            break;
-        case Qt::AlignTop:
-            top.setWidth(qMax(top.width(), size.width()));
-            top.setHeight(top.height() + size.height());
-            break;
-        case Qt::AlignBottom:
-            bottom.setWidth(qMax(bottom.width(), size.width()));
-            bottom.setHeight(bottom.height() + size.height());
-            break;
-        }
-    }
-    return minimum.adjusted(0, 0, left.width() + right.width() + qMax(top.width(), bottom.width()), top.height() + bottom.height() + qMax(left.height(), right.height()));
+//    QSizeF left;
+//    QSizeF right;
+//    QSizeF bottom;
+//    QSizeF top;
+
+//    foreach (ChartAxisElement2 *axis, axes) {
+//        QSizeF size = axis->effectiveSizeHint(Qt::MinimumSize);
+
+//        if (!axis->isVisible())
+//            continue;
+
+//        switch (axis->axis()->alignment()) {
+//        case Qt::AlignLeft:
+//            left.setWidth(left.width() + size.width());
+//            left.setHeight(qMax(left.height(), size.height()));
+//            break;
+//        case Qt::AlignRight:
+//            right.setWidth(right.width() + size.width());
+//            right.setHeight(qMax(right.height(), size.height()));
+//            break;
+//        case Qt::AlignTop:
+//            top.setWidth(qMax(top.width(), size.width()));
+//            top.setHeight(top.height() + size.height());
+//            break;
+//        case Qt::AlignBottom:
+//            bottom.setWidth(qMax(bottom.width(), size.width()));
+//            bottom.setHeight(bottom.height() + size.height());
+//            break;
+//        }
+//    }
+//    return minimum.adjusted(0, 0, left.width() + right.width() + qMax(top.width(), bottom.width()), top.height() + bottom.height() + qMax(left.height(), right.height()));
+    return QRectF();
 }
 
 QT_CHARTS_END_NAMESPACE
diff --git a/src/charts/legend/legendlayout2.cpp b/src/charts/legend/legendlayout2.cpp
index 37e30501..b529acfa 100644
--- a/src/charts/legend/legendlayout2.cpp
+++ b/src/charts/legend/legendlayout2.cpp
@@ -54,45 +54,45 @@ LegendLayout2::~LegendLayout2()
 
 void LegendLayout2::setOffset(qreal x, qreal y)
 {
-    bool scrollHorizontal = true;
-    switch (m_legend->alignment()) {
-    case Qt::AlignTop:
-    case Qt::AlignBottom:
-        scrollHorizontal = true;
-        break;
-    case Qt::AlignLeft:
-    case Qt::AlignRight:
-        scrollHorizontal = false;
-        break;
-    }
-
-    // If detached, the scrolling direction is vertical instead of horizontal and vice versa.
-    if (!m_legend->isAttachedToChart())
-        scrollHorizontal = !scrollHorizontal;
-
-    QRectF boundingRect = geometry();
-    qreal left, top, right, bottom;
-    getContentsMargins(&left, &top, &right, &bottom);
-    boundingRect.adjust(left, top, -right, -bottom);
-
-    // Limit offset between m_minOffset and m_maxOffset
-    if (scrollHorizontal) {
-        if (m_width <= boundingRect.width())
-            return;
-
-        if (x != m_offsetX) {
-            m_offsetX = qBound(m_minOffsetX, x, m_maxOffsetX);
-            m_legend->d_ptr->items()->setPos(-m_offsetX, boundingRect.top());
-        }
-    } else {
-        if (m_height <= boundingRect.height())
-            return;
-
-        if (y != m_offsetY) {
-            m_offsetY = qBound(m_minOffsetY, y, m_maxOffsetY);
-            m_legend->d_ptr->items()->setPos(boundingRect.left(), -m_offsetY);
-        }
-    }
+//    bool scrollHorizontal = true;
+//    switch (m_legend->alignment()) {
+//    case Qt::AlignTop:
+//    case Qt::AlignBottom:
+//        scrollHorizontal = true;
+//        break;
+//    case Qt::AlignLeft:
+//    case Qt::AlignRight:
+//        scrollHorizontal = false;
+//        break;
+//    }
+
+//    // If detached, the scrolling direction is vertical instead of horizontal and vice versa.
+//    if (!m_legend->isAttachedToChart())
+//        scrollHorizontal = !scrollHorizontal;
+
+//    QRectF boundingRect = geometry();
+//    qreal left, top, right, bottom;
+//    getContentsMargins(&left, &top, &right, &bottom);
+//    boundingRect.adjust(left, top, -right, -bottom);
+
+//    // Limit offset between m_minOffset and m_maxOffset
+//    if (scrollHorizontal) {
+//        if (m_width <= boundingRect.width())
+//            return;
+
+//        if (x != m_offsetX) {
+//            m_offsetX = qBound(m_minOffsetX, x, m_maxOffsetX);
+////            m_legend->d_ptr->items()->setPos(-m_offsetX, boundingRect.top());
+//        }
+//    } else {
+//        if (m_height <= boundingRect.height())
+//            return;
+
+//        if (y != m_offsetY) {
+//            m_offsetY = qBound(m_minOffsetY, y, m_maxOffsetY);
+////            m_legend->d_ptr->items()->setPos(boundingRect.left(), -m_offsetY);
+//        }
+//    }
 }
 
 QPointF LegendLayout2::offset() const
@@ -102,413 +102,413 @@ QPointF LegendLayout2::offset() const
 
 void LegendLayout2::invalidate()
 {
-    QGraphicsLayout::invalidate();
-    if (m_legend->isAttachedToChart())
-        m_legend->d_ptr->m_presenter->layout()->invalidate();
+//    QGraphicsLayout::invalidate();
+//    if (m_legend->isAttachedToChart())
+//        m_legend->d_ptr->m_presenter->layout()->invalidate();
 }
 
 void LegendLayout2::setGeometry(const QRectF &rect)
 {
-    m_legend->d_ptr->items()->setVisible(m_legend->isVisible());
+//    m_legend->d_ptr->items()->setVisible(m_legend->isVisible());
 
-    QGraphicsLayout::setGeometry(rect);
+//    QGraphicsLayout::setGeometry(rect);
 
-    if (m_legend->isAttachedToChart())
-        setAttachedGeometry(rect);
-    else
-        setDettachedGeometry(rect);
+//    if (m_legend->isAttachedToChart())
+//        setAttachedGeometry(rect);
+//    else
+//        setDettachedGeometry(rect);
 }
 
 void LegendLayout2::setAttachedGeometry(const QRectF &rect)
 {
-    if (!rect.isValid())
-        return;
-
-    qreal oldOffsetX = m_offsetX;
-    qreal oldOffsetY = m_offsetY;
-    m_offsetX = 0;
-    m_offsetY = 0;
-
-    QSizeF size(0, 0);
-
-    if (m_legend->d_ptr->markers().isEmpty()) {
-        return;
-    }
-
-    m_width = 0;
-    m_height = 0;
-
-    qreal left, top, right, bottom;
-    getContentsMargins(&left, &top, &right, &bottom);
-
-    QRectF geometry = rect.adjusted(left, top, -right, -bottom);
-
-    switch(m_legend->alignment()) {
-    case Qt::AlignTop:
-    case Qt::AlignBottom: {
-            // Calculate the space required for items and add them to a sorted list.
-            qreal markerItemsWidth = 0;
-            qreal itemMargins = 0;
-            QList<LegendWidthStruct *> legendWidthList;
-            foreach (QLegendMarker *marker, m_legend->d_ptr->markers()) {
-                LegendMarkerItem *item = marker->d_ptr->item();
-                if (item->isVisible()) {
-                    QSizeF dummySize;
-                    qreal itemWidth = item->sizeHint(Qt::PreferredSize, dummySize).width();
-                    LegendWidthStruct *structItem = new LegendWidthStruct;
-                    structItem->item = item;
-                    structItem->width = itemWidth;
-                    legendWidthList.append(structItem);
-                    markerItemsWidth += itemWidth;
-                    itemMargins += marker->d_ptr->item()->m_margin;
-                }
-            }
-            std::sort(legendWidthList.begin(), legendWidthList.end(), widthLongerThan);
-
-            // If the items would occupy more space than is available, start truncating them
-            // from the longest one.
-            qreal availableGeometry = geometry.width() - right - left * 2 - itemMargins;
-            if (markerItemsWidth >= availableGeometry && legendWidthList.count() > 0) {
-                bool truncated(false);
-                int count = legendWidthList.count();
-                for (int i = 1; i < count; i++) {
-                    int truncateIndex = i - 1;
-
-                    while (legendWidthList.at(truncateIndex)->width >= legendWidthList.at(i)->width
-                           && !truncated) {
-                        legendWidthList.at(truncateIndex)->width--;
-                        markerItemsWidth--;
-                        if (i > 1) {
-                            // Truncate the items that are before the truncated one in the list.
-                            for (int j = truncateIndex - 1; j >= 0; j--) {
-                                if (legendWidthList.at(truncateIndex)->width
-                                        < legendWidthList.at(j)->width) {
-                                    legendWidthList.at(j)->width--;
-                                    markerItemsWidth--;
-                                }
-                            }
-                        }
-                        if (markerItemsWidth < availableGeometry)
-                            truncated = true;
-                    }
-                    // Truncate the last item if needed.
-                    if (i == count - 1) {
-                        if (legendWidthList.at(count - 1)->width
-                                > legendWidthList.at(truncateIndex)->width) {
-                            legendWidthList.at(count - 1)->width--;
-                            markerItemsWidth--;
-                        }
-                    }
-
-                    if (truncated)
-                        break;
-                }
-                // Items are of same width and all of them need to be truncated
-                // or there is just one item that is truncated.
-                while (markerItemsWidth >= availableGeometry) {
-                    for (int i = 0; i < count; i++) {
-                        legendWidthList.at(i)->width--;
-                        markerItemsWidth--;
-                    }
-                }
-            }
-
-            QPointF point(0,0);
-
-            int markerCount = m_legend->d_ptr->markers().count();
-            for (int i = 0; i < markerCount; i++) {
-                QLegendMarker *marker;
-                if (m_legend->d_ptr->m_reverseMarkers)
-                    marker = m_legend->d_ptr->markers().at(markerCount - 1 - i);
-                else
-                    marker = m_legend->d_ptr->markers().at(i);
-                LegendMarkerItem *item = marker->d_ptr->item();
-                if (item->isVisible()) {
-                    QRectF itemRect = geometry;
-                    qreal availableWidth = 0;
-                    for (int i = 0; i < legendWidthList.size(); ++i) {
-                        if (legendWidthList.at(i)->item == item) {
-                            availableWidth = legendWidthList.at(i)->width;
-                            break;
-                        }
-                    }
-                    itemRect.setWidth(availableWidth);
-                    item->setGeometry(itemRect);
-                    item->setPos(point.x(),geometry.height()/2 - item->boundingRect().height()/2);
-                    const QRectF &rect = item->boundingRect();
-                    size = size.expandedTo(rect.size());
-                    qreal w = rect.width();
-                    m_width = m_width + w - item->m_margin;
-                    point.setX(point.x() + w);
-                }
-            }
-            // Delete structs from the container
-            qDeleteAll(legendWidthList);
-
-            // Round to full pixel via QPoint to avoid one pixel clipping on the edge in some cases
-            if (m_width < geometry.width()) {
-                m_legend->d_ptr->items()->setPos(QPoint(geometry.width() / 2 - m_width / 2,
-                                                        geometry.top()));
-            } else {
-                m_legend->d_ptr->items()->setPos(geometry.topLeft().toPoint());
-            }
-            m_height = size.height();
-        }
-        break;
-    case Qt::AlignLeft:
-    case Qt::AlignRight: {
-            QPointF point(0,0);
-            int markerCount = m_legend->d_ptr->markers().count();
-            for (int i = 0; i < markerCount; i++) {
-                QLegendMarker *marker;
-                if (m_legend->d_ptr->m_reverseMarkers)
-                    marker = m_legend->d_ptr->markers().at(markerCount - 1 - i);
-                else
-                    marker = m_legend->d_ptr->markers().at(i);
-                LegendMarkerItem *item = marker->d_ptr->item();
-                if (item->isVisible()) {
-                    item->setGeometry(geometry);
-                    item->setPos(point);
-                    const QRectF &rect = item->boundingRect();
-                    qreal h = rect.height();
-                    size = size.expandedTo(rect.size());
-                    m_height+=h;
-                    point.setY(point.y() + h);
-                }
-            }
-
-            // Round to full pixel via QPoint to avoid one pixel clipping on the edge in some cases
-            if (m_height < geometry.height()) {
-                m_legend->d_ptr->items()->setPos(QPoint(geometry.left(),
-                                                        geometry.height() / 2 - m_height / 2));
-            } else {
-                m_legend->d_ptr->items()->setPos(geometry.topLeft().toPoint());
-            }
-            m_width = size.width();
-            break;
-            }
-        }
-
-    m_minOffsetX = -left;
-    m_minOffsetY = - top;
-    m_maxOffsetX = m_width - geometry.width() - right;
-    m_maxOffsetY = m_height - geometry.height() - bottom;
-
-    setOffset(oldOffsetX, oldOffsetY);
+//    if (!rect.isValid())
+//        return;
+
+//    qreal oldOffsetX = m_offsetX;
+//    qreal oldOffsetY = m_offsetY;
+//    m_offsetX = 0;
+//    m_offsetY = 0;
+
+//    QSizeF size(0, 0);
+
+//    if (m_legend->d_ptr->markers().isEmpty()) {
+//        return;
+//    }
+
+//    m_width = 0;
+//    m_height = 0;
+
+//    qreal left, top, right, bottom;
+//    getContentsMargins(&left, &top, &right, &bottom);
+
+//    QRectF geometry = rect.adjusted(left, top, -right, -bottom);
+
+//    switch(m_legend->alignment()) {
+//    case Qt::AlignTop:
+//    case Qt::AlignBottom: {
+//            // Calculate the space required for items and add them to a sorted list.
+//            qreal markerItemsWidth = 0;
+//            qreal itemMargins = 0;
+//            QList<LegendWidthStruct *> legendWidthList;
+//            foreach (QLegendMarker *marker, m_legend->d_ptr->markers()) {
+//                LegendMarkerItem *item = marker->d_ptr->item();
+//                if (item->isVisible()) {
+//                    QSizeF dummySize;
+//                    qreal itemWidth = item->sizeHint(Qt::PreferredSize, dummySize).width();
+//                    LegendWidthStruct *structItem = new LegendWidthStruct;
+//                    structItem->item = item;
+//                    structItem->width = itemWidth;
+//                    legendWidthList.append(structItem);
+//                    markerItemsWidth += itemWidth;
+//                    itemMargins += marker->d_ptr->item()->m_margin;
+//                }
+//            }
+//            std::sort(legendWidthList.begin(), legendWidthList.end(), widthLongerThan);
+
+//            // If the items would occupy more space than is available, start truncating them
+//            // from the longest one.
+//            qreal availableGeometry = geometry.width() - right - left * 2 - itemMargins;
+//            if (markerItemsWidth >= availableGeometry && legendWidthList.count() > 0) {
+//                bool truncated(false);
+//                int count = legendWidthList.count();
+//                for (int i = 1; i < count; i++) {
+//                    int truncateIndex = i - 1;
+
+//                    while (legendWidthList.at(truncateIndex)->width >= legendWidthList.at(i)->width
+//                           && !truncated) {
+//                        legendWidthList.at(truncateIndex)->width--;
+//                        markerItemsWidth--;
+//                        if (i > 1) {
+//                            // Truncate the items that are before the truncated one in the list.
+//                            for (int j = truncateIndex - 1; j >= 0; j--) {
+//                                if (legendWidthList.at(truncateIndex)->width
+//                                        < legendWidthList.at(j)->width) {
+//                                    legendWidthList.at(j)->width--;
+//                                    markerItemsWidth--;
+//                                }
+//                            }
+//                        }
+//                        if (markerItemsWidth < availableGeometry)
+//                            truncated = true;
+//                    }
+//                    // Truncate the last item if needed.
+//                    if (i == count - 1) {
+//                        if (legendWidthList.at(count - 1)->width
+//                                > legendWidthList.at(truncateIndex)->width) {
+//                            legendWidthList.at(count - 1)->width--;
+//                            markerItemsWidth--;
+//                        }
+//                    }
+
+//                    if (truncated)
+//                        break;
+//                }
+//                // Items are of same width and all of them need to be truncated
+//                // or there is just one item that is truncated.
+//                while (markerItemsWidth >= availableGeometry) {
+//                    for (int i = 0; i < count; i++) {
+//                        legendWidthList.at(i)->width--;
+//                        markerItemsWidth--;
+//                    }
+//                }
+//            }
+
+//            QPointF point(0,0);
+
+//            int markerCount = m_legend->d_ptr->markers().count();
+//            for (int i = 0; i < markerCount; i++) {
+//                QLegendMarker *marker;
+//                if (m_legend->d_ptr->m_reverseMarkers)
+//                    marker = m_legend->d_ptr->markers().at(markerCount - 1 - i);
+//                else
+//                    marker = m_legend->d_ptr->markers().at(i);
+//                LegendMarkerItem *item = marker->d_ptr->item();
+//                if (item->isVisible()) {
+//                    QRectF itemRect = geometry;
+//                    qreal availableWidth = 0;
+//                    for (int i = 0; i < legendWidthList.size(); ++i) {
+//                        if (legendWidthList.at(i)->item == item) {
+//                            availableWidth = legendWidthList.at(i)->width;
+//                            break;
+//                        }
+//                    }
+//                    itemRect.setWidth(availableWidth);
+//                    item->setGeometry(itemRect);
+//                    item->setPos(point.x(),geometry.height()/2 - item->boundingRect().height()/2);
+//                    const QRectF &rect = item->boundingRect();
+//                    size = size.expandedTo(rect.size());
+//                    qreal w = rect.width();
+//                    m_width = m_width + w - item->m_margin;
+//                    point.setX(point.x() + w);
+//                }
+//            }
+//            // Delete structs from the container
+//            qDeleteAll(legendWidthList);
+
+//            // Round to full pixel via QPoint to avoid one pixel clipping on the edge in some cases
+//            if (m_width < geometry.width()) {
+////                m_legend->d_ptr->items()->setPos(QPoint(geometry.width() / 2 - m_width / 2,
+////                                                        geometry.top()));
+//            } else {
+////                m_legend->d_ptr->items()->setPos(geometry.topLeft().toPoint());
+//            }
+//            m_height = size.height();
+//        }
+//        break;
+//    case Qt::AlignLeft:
+//    case Qt::AlignRight: {
+//            QPointF point(0,0);
+//            int markerCount = m_legend->d_ptr->markers().count();
+//            for (int i = 0; i < markerCount; i++) {
+//                QLegendMarker *marker;
+//                if (m_legend->d_ptr->m_reverseMarkers)
+//                    marker = m_legend->d_ptr->markers().at(markerCount - 1 - i);
+//                else
+//                    marker = m_legend->d_ptr->markers().at(i);
+//                LegendMarkerItem *item = marker->d_ptr->item();
+//                if (item->isVisible()) {
+//                    item->setGeometry(geometry);
+//                    item->setPos(point);
+//                    const QRectF &rect = item->boundingRect();
+//                    qreal h = rect.height();
+//                    size = size.expandedTo(rect.size());
+//                    m_height+=h;
+//                    point.setY(point.y() + h);
+//                }
+//            }
+
+//            // Round to full pixel via QPoint to avoid one pixel clipping on the edge in some cases
+//            if (m_height < geometry.height()) {
+////                m_legend->d_ptr->items()->setPos(QPoint(geometry.left(),
+////                                                        geometry.height() / 2 - m_height / 2));
+//            } else {
+////                m_legend->d_ptr->items()->setPos(geometry.topLeft().toPoint());
+//            }
+//            m_width = size.width();
+//            break;
+//            }
+//        }
+
+//    m_minOffsetX = -left;
+//    m_minOffsetY = - top;
+//    m_maxOffsetX = m_width - geometry.width() - right;
+//    m_maxOffsetY = m_height - geometry.height() - bottom;
+
+//    setOffset(oldOffsetX, oldOffsetY);
 }
 
 void LegendLayout2::setDettachedGeometry(const QRectF &rect)
 {
-    if (!rect.isValid())
-        return;
-
-    // Detached layout is different.
-    // In detached mode legend may have multiple rows and columns, so layout calculations
-    // differ a log from attached mode.
-    // Also the scrolling logic is bit different.
-
-    qreal oldOffsetX = m_offsetX;
-    qreal oldOffsetY = m_offsetY;
-    m_offsetX = 0;
-    m_offsetY = 0;
-
-    qreal left, top, right, bottom;
-    getContentsMargins(&left, &top, &right, &bottom);
-    QRectF geometry = rect.adjusted(left, top, -right, -bottom);
-
-    QList<QLegendMarker *> markers = m_legend->d_ptr->markers();
-
-    if (markers.isEmpty())
-        return;
-
-    switch (m_legend->alignment()) {
-    case Qt::AlignTop: {
-        QPointF point(0, 0);
-        m_width = 0;
-        m_height = 0;
-        for (int i = 0; i < markers.count(); i++) {
-            LegendMarkerItem *item = markers.at(i)->d_ptr->item();
-            if (item->isVisible()) {
-                item->setGeometry(geometry);
-                item->setPos(point.x(),point.y());
-                const QRectF &boundingRect = item->boundingRect();
-                qreal w = boundingRect.width();
-                qreal h = boundingRect.height();
-                m_width = qMax(m_width,w);
-                m_height = qMax(m_height,h);
-                point.setX(point.x() + w);
-                if (point.x() + w > geometry.left() + geometry.width() - right) {
-                    // Next item would go off rect.
-                    point.setX(0);
-                    point.setY(point.y() + h);
-                    if (i+1 < markers.count()) {
-                        m_height += h;
-                    }
-                }
-            }
-        }
-        m_legend->d_ptr->items()->setPos(geometry.topLeft());
-
-        m_minOffsetX = -left;
-        m_minOffsetY = -top;
-        m_maxOffsetX = m_width - geometry.width() - right;
-        m_maxOffsetY = m_height - geometry.height() - bottom;
-    }
-    break;
-    case Qt::AlignBottom: {
-        QPointF point(0, geometry.height());
-        m_width = 0;
-        m_height = 0;
-        for (int i = 0; i < markers.count(); i++) {
-            LegendMarkerItem *item = markers.at(i)->d_ptr->item();
-            if (item->isVisible()) {
-                item->setGeometry(geometry);
-                const QRectF &boundingRect = item->boundingRect();
-                qreal w = boundingRect.width();
-                qreal h = boundingRect.height();
-                m_width = qMax(m_width,w);
-                m_height = qMax(m_height,h);
-                item->setPos(point.x(),point.y() - h);
-                point.setX(point.x() + w);
-                if (point.x() + w > geometry.left() + geometry.width() - right) {
-                    // Next item would go off rect.
-                    point.setX(0);
-                    point.setY(point.y() - h);
-                    if (i+1 < markers.count()) {
-                        m_height += h;
-                    }
-                }
-            }
-        }
-        m_legend->d_ptr->items()->setPos(geometry.topLeft());
-
-        m_minOffsetX = -left;
-        m_minOffsetY = -m_height + geometry.height() - top;
-        m_maxOffsetX = m_width - geometry.width() - right;
-        m_maxOffsetY = -bottom;
-    }
-    break;
-    case Qt::AlignLeft: {
-        QPointF point(0, 0);
-        m_width = 0;
-        m_height = 0;
-        qreal maxWidth = 0;
-        for (int i = 0; i < markers.count(); i++) {
-            LegendMarkerItem *item = markers.at(i)->d_ptr->item();
-            if (item->isVisible()) {
-                item->setGeometry(geometry);
-                const QRectF &boundingRect = item->boundingRect();
-                qreal w = boundingRect.width();
-                qreal h = boundingRect.height();
-                m_height = qMax(m_height,h);
-                maxWidth = qMax(maxWidth,w);
-                item->setPos(point.x(),point.y());
-                point.setY(point.y() + h);
-                if (point.y() + h > geometry.bottom() - bottom) {
-                    // Next item would go off rect.
-                    point.setX(point.x() + maxWidth);
-                    point.setY(0);
-                    if (i+1 < markers.count()) {
-                        m_width += maxWidth;
-                        maxWidth = 0;
-                    }
-                }
-            }
-        }
-        m_width += maxWidth;
-        m_legend->d_ptr->items()->setPos(geometry.topLeft());
-
-        m_minOffsetX = -left;
-        m_minOffsetY = -top;
-        m_maxOffsetX = m_width - geometry.width() - right;
-        m_maxOffsetY = m_height - geometry.height() - bottom;
-    }
-    break;
-    case Qt::AlignRight: {
-        QPointF point(geometry.width(), 0);
-        m_width = 0;
-        m_height = 0;
-        qreal maxWidth = 0;
-        for (int i = 0; i < markers.count(); i++) {
-            LegendMarkerItem *item = markers.at(i)->d_ptr->item();
-            if (item->isVisible()) {
-                item->setGeometry(geometry);
-                const QRectF &boundingRect = item->boundingRect();
-                qreal w = boundingRect.width();
-                qreal h = boundingRect.height();
-                m_height = qMax(m_height,h);
-                maxWidth = qMax(maxWidth,w);
-                item->setPos(point.x() - w,point.y());
-                point.setY(point.y() + h);
-                if (point.y() + h > geometry.bottom()-bottom) {
-                    // Next item would go off rect.
-                    point.setX(point.x() - maxWidth);
-                    point.setY(0);
-                    if (i+1 < markers.count()) {
-                        m_width += maxWidth;
-                        maxWidth = 0;
-                    }
-                }
-            }
-        }
-        m_width += maxWidth;
-        m_legend->d_ptr->items()->setPos(geometry.topLeft());
-
-        m_minOffsetX = - m_width + geometry.width() - left;
-        m_minOffsetY = -top;
-        m_maxOffsetX = - right;
-        m_maxOffsetY = m_height - geometry.height() - bottom;
-    }
-    break;
-    default:
-        break;
-    }
-
-    setOffset(oldOffsetX, oldOffsetY);
+//    if (!rect.isValid())
+//        return;
+
+//    // Detached layout is different.
+//    // In detached mode legend may have multiple rows and columns, so layout calculations
+//    // differ a log from attached mode.
+//    // Also the scrolling logic is bit different.
+
+//    qreal oldOffsetX = m_offsetX;
+//    qreal oldOffsetY = m_offsetY;
+//    m_offsetX = 0;
+//    m_offsetY = 0;
+
+//    qreal left, top, right, bottom;
+//    getContentsMargins(&left, &top, &right, &bottom);
+//    QRectF geometry = rect.adjusted(left, top, -right, -bottom);
+
+//    QList<QLegendMarker *> markers = m_legend->d_ptr->markers();
+
+//    if (markers.isEmpty())
+//        return;
+
+//    switch (m_legend->alignment()) {
+//    case Qt::AlignTop: {
+//        QPointF point(0, 0);
+//        m_width = 0;
+//        m_height = 0;
+//        for (int i = 0; i < markers.count(); i++) {
+//            LegendMarkerItem *item = markers.at(i)->d_ptr->item();
+//            if (item->isVisible()) {
+//                item->setGeometry(geometry);
+//                item->setPos(point.x(),point.y());
+//                const QRectF &boundingRect = item->boundingRect();
+//                qreal w = boundingRect.width();
+//                qreal h = boundingRect.height();
+//                m_width = qMax(m_width,w);
+//                m_height = qMax(m_height,h);
+//                point.setX(point.x() + w);
+//                if (point.x() + w > geometry.left() + geometry.width() - right) {
+//                    // Next item would go off rect.
+//                    point.setX(0);
+//                    point.setY(point.y() + h);
+//                    if (i+1 < markers.count()) {
+//                        m_height += h;
+//                    }
+//                }
+//            }
+//        }
+////        m_legend->d_ptr->items()->setPos(geometry.topLeft());
+
+//        m_minOffsetX = -left;
+//        m_minOffsetY = -top;
+//        m_maxOffsetX = m_width - geometry.width() - right;
+//        m_maxOffsetY = m_height - geometry.height() - bottom;
+//    }
+//    break;
+//    case Qt::AlignBottom: {
+//        QPointF point(0, geometry.height());
+//        m_width = 0;
+//        m_height = 0;
+//        for (int i = 0; i < markers.count(); i++) {
+//            LegendMarkerItem *item = markers.at(i)->d_ptr->item();
+//            if (item->isVisible()) {
+//                item->setGeometry(geometry);
+//                const QRectF &boundingRect = item->boundingRect();
+//                qreal w = boundingRect.width();
+//                qreal h = boundingRect.height();
+//                m_width = qMax(m_width,w);
+//                m_height = qMax(m_height,h);
+//                item->setPos(point.x(),point.y() - h);
+//                point.setX(point.x() + w);
+//                if (point.x() + w > geometry.left() + geometry.width() - right) {
+//                    // Next item would go off rect.
+//                    point.setX(0);
+//                    point.setY(point.y() - h);
+//                    if (i+1 < markers.count()) {
+//                        m_height += h;
+//                    }
+//                }
+//            }
+//        }
+////        m_legend->d_ptr->items()->setPos(geometry.topLeft());
+
+//        m_minOffsetX = -left;
+//        m_minOffsetY = -m_height + geometry.height() - top;
+//        m_maxOffsetX = m_width - geometry.width() - right;
+//        m_maxOffsetY = -bottom;
+//    }
+//    break;
+//    case Qt::AlignLeft: {
+//        QPointF point(0, 0);
+//        m_width = 0;
+//        m_height = 0;
+//        qreal maxWidth = 0;
+//        for (int i = 0; i < markers.count(); i++) {
+//            LegendMarkerItem *item = markers.at(i)->d_ptr->item();
+//            if (item->isVisible()) {
+//                item->setGeometry(geometry);
+//                const QRectF &boundingRect = item->boundingRect();
+//                qreal w = boundingRect.width();
+//                qreal h = boundingRect.height();
+//                m_height = qMax(m_height,h);
+//                maxWidth = qMax(maxWidth,w);
+//                item->setPos(point.x(),point.y());
+//                point.setY(point.y() + h);
+//                if (point.y() + h > geometry.bottom() - bottom) {
+//                    // Next item would go off rect.
+//                    point.setX(point.x() + maxWidth);
+//                    point.setY(0);
+//                    if (i+1 < markers.count()) {
+//                        m_width += maxWidth;
+//                        maxWidth = 0;
+//                    }
+//                }
+//            }
+//        }
+//        m_width += maxWidth;
+////        m_legend->d_ptr->items()->setPos(geometry.topLeft());
+
+//        m_minOffsetX = -left;
+//        m_minOffsetY = -top;
+//        m_maxOffsetX = m_width - geometry.width() - right;
+//        m_maxOffsetY = m_height - geometry.height() - bottom;
+//    }
+//    break;
+//    case Qt::AlignRight: {
+//        QPointF point(geometry.width(), 0);
+//        m_width = 0;
+//        m_height = 0;
+//        qreal maxWidth = 0;
+//        for (int i = 0; i < markers.count(); i++) {
+//            LegendMarkerItem *item = markers.at(i)->d_ptr->item();
+//            if (item->isVisible()) {
+//                item->setGeometry(geometry);
+//                const QRectF &boundingRect = item->boundingRect();
+//                qreal w = boundingRect.width();
+//                qreal h = boundingRect.height();
+//                m_height = qMax(m_height,h);
+//                maxWidth = qMax(maxWidth,w);
+//                item->setPos(point.x() - w,point.y());
+//                point.setY(point.y() + h);
+//                if (point.y() + h > geometry.bottom()-bottom) {
+//                    // Next item would go off rect.
+//                    point.setX(point.x() - maxWidth);
+//                    point.setY(0);
+//                    if (i+1 < markers.count()) {
+//                        m_width += maxWidth;
+//                        maxWidth = 0;
+//                    }
+//                }
+//            }
+//        }
+//        m_width += maxWidth;
+////        m_legend->d_ptr->items()->setPos(geometry.topLeft());
+
+//        m_minOffsetX = - m_width + geometry.width() - left;
+//        m_minOffsetY = -top;
+//        m_maxOffsetX = - right;
+//        m_maxOffsetY = m_height - geometry.height() - bottom;
+//    }
+//    break;
+//    default:
+//        break;
+//    }
+
+//    setOffset(oldOffsetX, oldOffsetY);
 }
 
 QSizeF LegendLayout2::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
 {
-    QSizeF size(0, 0);
-    qreal left, top, right, bottom;
-    getContentsMargins(&left, &top, &right, &bottom);
-
-    if(constraint.isValid()) {
-        foreach(QLegendMarker *marker, m_legend->d_ptr->markers()) {
-            LegendMarkerItem *item = marker->d_ptr->item();
-            size = size.expandedTo(item->effectiveSizeHint(which));
-        }
-        size = size.boundedTo(constraint);
-    }
-    else if (constraint.width() >= 0) {
-        qreal width = 0;
-        qreal height = 0;
-        foreach(QLegendMarker *marker, m_legend->d_ptr->markers()) {
-            LegendMarkerItem *item = marker->d_ptr->item();
-            width+=item->effectiveSizeHint(which).width();
-            height=qMax(height,item->effectiveSizeHint(which).height());
-        }
-
-        size = QSizeF(qMin(constraint.width(),width), height);
-    }
-    else if (constraint.height() >= 0) {
-        qreal width = 0;
-        qreal height = 0;
-        foreach(QLegendMarker *marker, m_legend->d_ptr->markers()) {
-            LegendMarkerItem *item = marker->d_ptr->item();
-            width=qMax(width,item->effectiveSizeHint(which).width());
-            height+=height,item->effectiveSizeHint(which).height();
-        }
-        size = QSizeF(width,qMin(constraint.height(),height));
-    }
-    else {
-        foreach(QLegendMarker *marker, m_legend->d_ptr->markers()) {
-            LegendMarkerItem *item = marker->d_ptr->item();
-            size = size.expandedTo(item->effectiveSizeHint(which));
-        }
-    }
-    size += QSize(left + right, top + bottom);
-    return size;
+//    QSizeF size(0, 0);
+//    qreal left, top, right, bottom;
+//    getContentsMargins(&left, &top, &right, &bottom);
+
+//    if(constraint.isValid()) {
+//        foreach(QLegendMarker *marker, m_legend->d_ptr->markers()) {
+//            LegendMarkerItem *item = marker->d_ptr->item();
+//            size = size.expandedTo(item->effectiveSizeHint(which));
+//        }
+//        size = size.boundedTo(constraint);
+//    }
+//    else if (constraint.width() >= 0) {
+//        qreal width = 0;
+//        qreal height = 0;
+//        foreach(QLegendMarker *marker, m_legend->d_ptr->markers()) {
+//            LegendMarkerItem *item = marker->d_ptr->item();
+//            width+=item->effectiveSizeHint(which).width();
+//            height=qMax(height,item->effectiveSizeHint(which).height());
+//        }
+
+//        size = QSizeF(qMin(constraint.width(),width), height);
+//    }
+//    else if (constraint.height() >= 0) {
+//        qreal width = 0;
+//        qreal height = 0;
+//        foreach(QLegendMarker *marker, m_legend->d_ptr->markers()) {
+//            LegendMarkerItem *item = marker->d_ptr->item();
+//            width=qMax(width,item->effectiveSizeHint(which).width());
+//            height+=height,item->effectiveSizeHint(which).height();
+//        }
+//        size = QSizeF(width,qMin(constraint.height(),height));
+//    }
+//    else {
+//        foreach(QLegendMarker *marker, m_legend->d_ptr->markers()) {
+//            LegendMarkerItem *item = marker->d_ptr->item();
+//            size = size.expandedTo(item->effectiveSizeHint(which));
+//        }
+//    }
+//    size += QSize(left + right, top + bottom);
+//    return size;
 }
 
 bool LegendLayout2::widthLongerThan(const LegendWidthStruct *item1,
diff --git a/src/charts/legend/legendlayout2_p.h b/src/charts/legend/legendlayout2_p.h
index a06ef9c3..8c876b3c 100644
--- a/src/charts/legend/legendlayout2_p.h
+++ b/src/charts/legend/legendlayout2_p.h
@@ -41,13 +41,14 @@
 #include <QtWidgets/QGraphicsLayout>
 #include <QtCharts/QChartGlobal>
 #include <QtCharts/private/qchartglobal_p.h>
+#include <QQuickItem>
 
 QT_CHARTS_BEGIN_NAMESPACE
 
 class QLegend2;
 class LegendMarkerItem;
 
-class QT_CHARTS_PRIVATE_EXPORT LegendLayout2 : public QGraphicsLayout
+class QT_CHARTS_PRIVATE_EXPORT LegendLayout2 : public QQuickItem
 {
 public:
 
diff --git a/src/charts/legend/legendscroller2.cpp b/src/charts/legend/legendscroller2.cpp
index 5a3805cb..aad07e36 100644
--- a/src/charts/legend/legendscroller2.cpp
+++ b/src/charts/legend/legendscroller2.cpp
@@ -66,14 +66,14 @@ void LegendScroller2::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
     Scroller::handleMouseReleaseEvent(event);
 
     if (!event->isAccepted()) {
-        QList<QGraphicsItem *> items = scene()->items(event->scenePos());
+//        QList<QQuickItem *> items = scene()->items(event->scenePos());
 
-        foreach (QGraphicsItem *i, items) {
-            if (d_ptr->m_markerHash.contains(i)) {
-                QLegendMarker *marker = d_ptr->m_markerHash.value(i);
-                emit marker->clicked();
-            }
-        }
+//        foreach (QQuickItem *i, items) {
+//            if (d_ptr->m_markerHash.contains(i)) {
+//                QLegendMarker *marker = d_ptr->m_markerHash.value(i);
+//                emit marker->clicked();
+//            }
+//        }
     event->accept();
     }
 }
diff --git a/src/charts/legend/qlegend2.cpp b/src/charts/legend/qlegend2.cpp
index 889f467e..39621e80 100644
--- a/src/charts/legend/qlegend2.cpp
+++ b/src/charts/legend/qlegend2.cpp
@@ -41,7 +41,6 @@
 #include <private/chartdataset_p.h>
 #include <QtGui/QPainter>
 #include <QtGui/QPen>
-#include <QtWidgets/QGraphicsItemGroup>
 
 QT_CHARTS_BEGIN_NAMESPACE
 
@@ -257,14 +256,14 @@ QT_CHARTS_BEGIN_NAMESPACE
     This signal is emitted when the visibility of tooltips is changed to \a showToolTips.
 */
 
-QLegend2::QLegend2(QChart2 *chart): QGraphicsWidget(chart),
+QLegend2::QLegend2(QChart2 *chart): QQuickItem(chart),
     d_ptr(new QLegendPrivate2(chart->d_ptr->m_presenter, chart, this))
 {
-    setZValue(ChartPresenter2::LegendZValue);
-    setFlags(QGraphicsItem::ItemClipsChildrenToShape);
+//    setZValue(ChartPresenter2::LegendZValue);
+    setFlags(QQuickItem::ItemClipsChildrenToShape);
     QObject::connect(chart->d_ptr->m_dataset, SIGNAL(seriesAdded(QAbstractSeries*)), d_ptr.data(), SLOT(handleSeriesAdded(QAbstractSeries*)));
     QObject::connect(chart->d_ptr->m_dataset, SIGNAL(seriesRemoved(QAbstractSeries*)), d_ptr.data(), SLOT(handleSeriesRemoved(QAbstractSeries*)));
-    setLayout(d_ptr->m_layout);
+//    setLayout(d_ptr->m_layout);
 }
 
 /*!
@@ -289,7 +288,9 @@ void QLegend2::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
     painter->setOpacity(opacity());
     painter->setPen(d_ptr->m_pen);
     painter->setBrush(d_ptr->m_brush);
-    painter->drawRoundRect(rect(), d_ptr->roundness(rect().width()), d_ptr->roundness(rect().height()));
+
+    // TODO!!!!!
+//    painter->drawRoundRect(rect(), d_ptr->roundness(rect().width()), d_ptr->roundness(rect().height()));
 }
 
 
@@ -357,16 +358,16 @@ QPen QLegend2::pen() const
 
 void QLegend2::setFont(const QFont &font)
 {
-    if (d_ptr->m_font != font) {
-        // Hide items to avoid flickering
-        d_ptr->items()->setVisible(false);
-        d_ptr->m_font = font;
-        foreach (QLegendMarker *marker, d_ptr->markers()) {
-            marker->setFont(d_ptr->m_font);
-        }
-        layout()->invalidate();
-        emit fontChanged(font);
-    }
+//    if (d_ptr->m_font != font) {
+//        // Hide items to avoid flickering
+//        d_ptr->items()->setVisible(false);
+//        d_ptr->m_font = font;
+//        foreach (QLegendMarker *marker, d_ptr->markers()) {
+//            marker->setFont(d_ptr->m_font);
+//        }
+//        layout()->invalidate();
+//        emit fontChanged(font);
+//    }
 }
 
 QFont QLegend2::font() const
@@ -434,10 +435,10 @@ QColor QLegend2::labelColor() const
 
 void QLegend2::setAlignment(Qt::Alignment alignment)
 {
-    if (d_ptr->m_alignment != alignment) {
-        d_ptr->m_alignment = alignment;
-        layout()->invalidate();
-    }
+//    if (d_ptr->m_alignment != alignment) {
+//        d_ptr->m_alignment = alignment;
+//        layout()->invalidate();
+//    }
 }
 
 Qt::Alignment QLegend2::alignment() const
@@ -450,10 +451,10 @@ Qt::Alignment QLegend2::alignment() const
  */
 void QLegend2::detachFromChart()
 {
-    d_ptr->m_attachedToChart = false;
-//    layout()->invalidate();
-    d_ptr->m_chart->layout()->invalidate();
-    setParent(0);
+//    d_ptr->m_attachedToChart = false;
+////    layout()->invalidate();
+//    d_ptr->m_chart->layout()->invalidate();
+//    setParent(0);
 
 }
 
@@ -462,10 +463,10 @@ void QLegend2::detachFromChart()
  */
 void QLegend2::attachToChart()
 {
-    d_ptr->m_attachedToChart = true;
-//    layout()->invalidate();
-    d_ptr->m_chart->layout()->invalidate();
-    setParent(d_ptr->m_chart);
+//    d_ptr->m_attachedToChart = true;
+////    layout()->invalidate();
+//    d_ptr->m_chart->layout()->invalidate();
+//    setParent(d_ptr->m_chart);
 }
 
 /*!
@@ -512,11 +513,11 @@ bool QLegend2::reverseMarkers()
 
 void QLegend2::setReverseMarkers(bool reverseMarkers)
 {
-    if (d_ptr->m_reverseMarkers != reverseMarkers) {
-        d_ptr->m_reverseMarkers = reverseMarkers;
-        layout()->invalidate();
-        emit reverseMarkersChanged(reverseMarkers);
-    }
+//    if (d_ptr->m_reverseMarkers != reverseMarkers) {
+//        d_ptr->m_reverseMarkers = reverseMarkers;
+//        layout()->invalidate();
+//        emit reverseMarkersChanged(reverseMarkers);
+//    }
 }
 
 /*!
@@ -551,14 +552,14 @@ QLegend::MarkerShape QLegend2::markerShape() const
 
 void QLegend2::setMarkerShape(QLegend::MarkerShape shape)
 {
-    QLegend::MarkerShape newShape = shape;
-    if (newShape == QLegend::MarkerShapeDefault)
-        newShape = QLegend::MarkerShapeRectangle;
-    if (d_ptr->m_markerShape != newShape) {
-        d_ptr->m_markerShape = newShape;
-        layout()->invalidate();
-        emit markerShapeChanged(newShape);
-    }
+//    QLegend::MarkerShape newShape = shape;
+//    if (newShape == QLegend::MarkerShapeDefault)
+//        newShape = QLegend::MarkerShapeRectangle;
+//    if (d_ptr->m_markerShape != newShape) {
+//        d_ptr->m_markerShape = newShape;
+//        layout()->invalidate();
+//        emit markerShapeChanged(newShape);
+//    }
 }
 
 /*!
@@ -567,9 +568,9 @@ void QLegend2::setMarkerShape(QLegend::MarkerShape shape)
  */
 void QLegend2::hideEvent(QHideEvent *event)
 {
-    if (isAttachedToChart())
-        d_ptr->m_presenter->layout()->invalidate();
-    QGraphicsWidget::hideEvent(event);
+//    if (isAttachedToChart())
+//        d_ptr->m_presenter->layout()->invalidate();
+//    QGraphicsWidget::hideEvent(event);
 }
 /*!
     \internal
@@ -577,10 +578,10 @@ void QLegend2::hideEvent(QHideEvent *event)
  */
 void QLegend2::showEvent(QShowEvent *event)
 {
-    if (isAttachedToChart())
-        layout()->invalidate();
-    QGraphicsWidget::showEvent(event);
-    //layout activation will show the items
+//    if (isAttachedToChart())
+//        layout()->invalidate();
+//    QGraphicsWidget::showEvent(event);
+//    //layout activation will show the items
 }
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -590,7 +591,7 @@ QLegendPrivate2::QLegendPrivate2(ChartPresenter2 *presenter, QChart2 *chart, QLe
       m_presenter(presenter),
       m_layout(new LegendLayout2(q)),
       m_chart(chart),
-      m_items(new QGraphicsItemGroup(q)),
+//      m_items(new QQuickItemGroup(q)),
       m_alignment(Qt::AlignTop),
       m_brush(QChartPrivate2::defaultBrush()),
       m_pen(QChartPrivate2::defaultPen()),
@@ -602,7 +603,7 @@ QLegendPrivate2::QLegendPrivate2(ChartPresenter2 *presenter, QChart2 *chart, QLe
       m_showToolTips(false),
       m_markerShape(QLegend::MarkerShapeRectangle)
 {
-    m_items->setHandlesChildEvents(false);
+//    m_items->setHandlesChildEvents(false);
 }
 
 QLegendPrivate2::~QLegendPrivate2()
@@ -667,7 +668,7 @@ void QLegendPrivate2::handleSeriesAdded(QAbstractSeries *series)
     QObject::connect(series, SIGNAL(visibleChanged()), this, SLOT(handleSeriesVisibleChanged()));
 
     m_series.append(series);
-    m_items->setVisible(false);
+//    m_items->setVisible(false);
     m_layout->invalidate();
 }
 
@@ -778,15 +779,15 @@ void QLegendPrivate2::handleCountChanged()
             m_markers.insert(pos, createdMarkers.at(c));
     }
 
-    q_ptr->layout()->invalidate();
+//    q_ptr->layout()->invalidate();
 }
 
 // Helper function for marker insertion except m_markers handling
 void QLegendPrivate2::insertMarkerHelper(QLegendMarker *marker)
 {
     LegendMarkerItem *item = marker->d_ptr->item();
-    m_items->addToGroup(item);
-    m_markerHash.insert(item, marker);
+//    m_items->addToGroup(item);
+//    m_markerHash.insert(item, marker);
 }
 
 void QLegendPrivate2::addMarkers(QList<QLegendMarker *> markers)
@@ -800,11 +801,11 @@ void QLegendPrivate2::addMarkers(QList<QLegendMarker *> markers)
 // Helper function for marker removal except m_markers handling
 void QLegendPrivate2::removeMarkerHelper(QLegendMarker *marker)
 {
-    LegendMarkerItem *item = marker->d_ptr->item();
-    item->setVisible(false);
-    m_items->removeFromGroup(item);
-    m_markerHash.remove(item);
-    delete marker;
+//    LegendMarkerItem *item = marker->d_ptr->item();
+//    item->setVisible(false);
+//    m_items->removeFromGroup(item);
+//    m_markerHash.remove(item);
+//    delete marker;
 }
 
 void QLegendPrivate2::removeMarkers(QList<QLegendMarker *> markers)
diff --git a/src/charts/legend/qlegend2.h b/src/charts/legend/qlegend2.h
index 29c669a6..20c02858 100644
--- a/src/charts/legend/qlegend2.h
+++ b/src/charts/legend/qlegend2.h
@@ -35,6 +35,7 @@
 #include <QtGui/QPen>
 #include <QtGui/QBrush>
 #include <QLegend>
+#include <QQuickItem>
 
 QT_CHARTS_BEGIN_NAMESPACE
 
@@ -43,7 +44,7 @@ class QLegendPrivate2;
 class QLegendMarker;
 class QAbstractSeries;
 
-class QT_CHARTS_EXPORT QLegend2 : public QGraphicsWidget
+class QT_CHARTS_EXPORT QLegend2 : public QQuickItem
 {
     Q_OBJECT
     Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment)
diff --git a/src/charts/legend/qlegend2_p.h b/src/charts/legend/qlegend2_p.h
index 281e1d07..a9893a9e 100644
--- a/src/charts/legend/qlegend2_p.h
+++ b/src/charts/legend/qlegend2_p.h
@@ -61,7 +61,7 @@ public:
     QPointF offset() const;
     int roundness(qreal size);
 
-    QGraphicsItemGroup* items() { return m_items; }
+//    QQuickItemGroup* items() { return m_items; }
 
     QList<QLegendMarker*> markers(QAbstractSeries *series = 0);
     qreal maxMarkerWidth() const;
@@ -89,7 +89,7 @@ private:
     ChartPresenter2 *m_presenter;
     LegendLayout2 *m_layout;
     QChart2 *m_chart;
-    QGraphicsItemGroup *m_items;
+//    QQuickItemGroup *m_items;
     Qt::Alignment m_alignment;
     QBrush m_brush;
     QPen m_pen;
@@ -106,7 +106,7 @@ private:
     QList<QLegendMarker *> m_markers;
     QList<QAbstractSeries *> m_series;
 
-    QHash<QGraphicsItem *, QLegendMarker *> m_markerHash;
+//    QHash<QQuickItem *, QLegendMarker *> m_markerHash;
 
     friend class QLegend2;
     friend class LegendMarkerItem2;
diff --git a/src/charts/qabstractseries_p.h b/src/charts/qabstractseries_p.h
index 9f91f082..6e5ce43b 100644
--- a/src/charts/qabstractseries_p.h
+++ b/src/charts/qabstractseries_p.h
@@ -79,7 +79,7 @@ public:
     virtual void initializeAxes() = 0;
     virtual void initializeTheme(int index, ChartTheme* theme, bool forced = false) = 0;
     virtual void initializeGraphics(QGraphicsItem* parent) = 0;
-    virtual void initializeGraphics2(QGraphicsItem* parent) {}
+    virtual void initializeGraphics2(QQuickItem* parent) {}
     virtual void initializeAnimations(QChart::AnimationOptions options, int duration,
                                       QEasingCurve &curve) = 0;
 
diff --git a/src/charts/qchart2.cpp b/src/charts/qchart2.cpp
index 046668b2..f6a92db5 100644
--- a/src/charts/qchart2.cpp
+++ b/src/charts/qchart2.cpp
@@ -236,8 +236,8 @@ QT_CHARTS_BEGIN_NAMESPACE
  The properties specified by \a wFlags are passed to the QGraphicsWidget constructor.
  This constructor is called only by subclasses.
 */
-QChart2::QChart2(QChart::ChartType type, QGraphicsItem *parent, Qt::WindowFlags wFlags)
-    : QGraphicsWidget(parent, wFlags),
+QChart2::QChart2(QChart::ChartType type, QQuickItem *parent, Qt::WindowFlags wFlags)
+    : QQuickItem(parent/*, wFlags*/),
       d_ptr(new QChartPrivate2(this, type))
 {
     d_ptr->init();
@@ -247,8 +247,8 @@ QChart2::QChart2(QChart::ChartType type, QGraphicsItem *parent, Qt::WindowFlags
  Constructs a chart object that is a child of \a parent.
  The properties specified by \a wFlags are passed to the QGraphicsWidget constructor.
  */
-QChart2::QChart2(QGraphicsItem *parent, Qt::WindowFlags wFlags)
-    : QGraphicsWidget(parent, wFlags),
+QChart2::QChart2(QQuickItem *parent, Qt::WindowFlags wFlags)
+    : QQuickItem(parent/*, wFlags*/),
       d_ptr(new QChartPrivate2(this, QChart::ChartTypeCartesian))
 {
     d_ptr->init();
@@ -885,7 +885,7 @@ void QChartPrivate2::init()
 {
     m_legend = new LegendScroller2(q_ptr);
     q_ptr->setTheme(QChart::ChartThemeLight);
-    q_ptr->setLayout(m_presenter->layout());
+//    q_ptr->setLayout(m_presenter->layout());
 }
 
 void QChartPrivate2::zoomIn(qreal factor)
diff --git a/src/charts/qchart2.h b/src/charts/qchart2.h
index fec8b0aa..919e3cf8 100644
--- a/src/charts/qchart2.h
+++ b/src/charts/qchart2.h
@@ -37,6 +37,7 @@
 
 #include <private/qchart_p.h>
 #include <QChart>
+#include <QtQuick/QQuickItem>
 
 QT_BEGIN_NAMESPACE
 class QGraphicsSceneResizeEvent;
@@ -50,7 +51,7 @@ class QLegend2;
 class QChartPrivate2;
 class QBoxPlotSeries;
 
-class QT_CHARTS_EXPORT QChart2 : public QGraphicsWidget
+class QT_CHARTS_EXPORT QChart2 : public QQuickItem
 {
     Q_OBJECT
     Q_PROPERTY(QChart::ChartTheme theme READ theme WRITE setTheme)
@@ -99,7 +100,7 @@ public:
 //    Q_DECLARE_FLAGS(AnimationOptions, AnimationOption)
 
 public:
-    explicit QChart2(QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = Qt::WindowFlags());
+    explicit QChart2(QQuickItem *parent = nullptr, Qt::WindowFlags wFlags = Qt::WindowFlags());
     ~QChart2();
 
     void addSeries(QAbstractSeries *series);
@@ -184,7 +185,7 @@ Q_SIGNALS:
     void plotAreaChanged(const QRectF &plotArea);
 
 protected:
-    explicit QChart2(QChart::ChartType type, QGraphicsItem *parent, Qt::WindowFlags wFlags);
+    explicit QChart2(QChart::ChartType type, QQuickItem *parent, Qt::WindowFlags wFlags);
     QScopedPointer<QChartPrivate2> d_ptr;
     friend class QLegend2;
     friend class DeclarativeChart;
diff --git a/src/charts/qchart3.cpp b/src/charts/qchart3.cpp
index 16363512..ee40cbd6 100644
--- a/src/charts/qchart3.cpp
+++ b/src/charts/qchart3.cpp
@@ -4,3 +4,8 @@ QChart3::QChart3()
 {
 
 }
+
+void QChart3::paint(QPainter *painter)
+{
+
+}
diff --git a/src/charts/qchart3.h b/src/charts/qchart3.h
index 3668a42d..384b32d5 100644
--- a/src/charts/qchart3.h
+++ b/src/charts/qchart3.h
@@ -2,16 +2,19 @@
 #define QCHART3_H
 
 #include <QQuickItem>
+#include <QQuickPaintedItem>
 
-class QChart3 : public QQuickItem
+class QChart3 : public QQuickPaintedItem
 {
     Q_OBJECT
 public:
     QChart3();
 
+    void paint(QPainter *painter);
 signals:
 
 public slots:
+
 };
 
-#endif // QCHART3_H
\ No newline at end of file
+#endif // QCHART3_H
diff --git a/src/charts/qpolarchart2.cpp b/src/charts/qpolarchart2.cpp
index d21e255b..dc60ddd8 100644
--- a/src/charts/qpolarchart2.cpp
+++ b/src/charts/qpolarchart2.cpp
@@ -77,7 +77,7 @@ QT_CHARTS_BEGIN_NAMESPACE
  Constructs a polar chart as a child of \a parent.
  The properties specified by \a wFlags are passed to the QChart constructor.
  */
-QPolarChart2::QPolarChart2(QGraphicsItem *parent, Qt::WindowFlags wFlags)
+QPolarChart2::QPolarChart2(QQuickItem *parent, Qt::WindowFlags wFlags)
     : QChart2(QChart::ChartTypePolar, parent, wFlags)
 {
 }
diff --git a/src/charts/qpolarchart2.h b/src/charts/qpolarchart2.h
index 2cd27b07..64d7c342 100644
--- a/src/charts/qpolarchart2.h
+++ b/src/charts/qpolarchart2.h
@@ -51,7 +51,7 @@ public:
     Q_DECLARE_FLAGS(PolarOrientations, PolarOrientation)
 
 public:
-    explicit QPolarChart2(QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = Qt::WindowFlags());
+    explicit QPolarChart2(QQuickItem *parent = nullptr, Qt::WindowFlags wFlags = Qt::WindowFlags());
     ~QPolarChart2();
 
     void addAxis(QAbstractAxis *axis, PolarOrientation polarOrientation);
diff --git a/src/chartsqml2/chartsqml2_plugin.cpp b/src/chartsqml2/chartsqml2_plugin.cpp
index 96f7fc94..cc80b7a5 100644
--- a/src/chartsqml2/chartsqml2_plugin.cpp
+++ b/src/chartsqml2/chartsqml2_plugin.cpp
@@ -356,6 +356,7 @@ public:
                                                   QLatin1String("Trying to create uncreatable: AbstractAxis. Use specific types of axis instead."));
         qmlRegisterType<DeclarativeChart, 5>(uri, 2, 1, "ChartView");
         qmlRegisterType<DeclarativeChart2, 5>(uri, 2, 1, "ChartView2");
+        qmlRegisterType<DeclarativeChart2, 5>(uri, 2, 1, "ChartView2");
         qmlRegisterType<DeclarativeScatterSeries, 5>(uri, 2, 1, "ScatterSeries");
         qmlRegisterType<DeclarativeLineSeries, 4>(uri, 2, 1, "LineSeries");
         qmlRegisterType<DeclarativeSplineSeries, 4>(uri, 2, 1, "SplineSeries");
diff --git a/src/chartsqml2/declarativechart2.cpp b/src/chartsqml2/declarativechart2.cpp
index 37629283..7ada45b4 100644
--- a/src/chartsqml2/declarativechart2.cpp
+++ b/src/chartsqml2/declarativechart2.cpp
@@ -433,13 +433,13 @@ QT_CHARTS_BEGIN_NAMESPACE
 */
 
 DeclarativeChart2::DeclarativeChart2(QQuickItem *parent)
-    : QQuickItem(parent)
+    : QQuickPaintedItem(parent)
 {
     initChart(QChart::ChartTypeCartesian);
 }
 
 DeclarativeChart2::DeclarativeChart2(QChart::ChartType type, QQuickItem *parent)
-    : QQuickItem(parent)
+    : QQuickPaintedItem(parent)
 {
     initChart(type);
 }
@@ -480,15 +480,20 @@ void DeclarativeChart2::initChart(QChart::ChartType type)
         m_chart = new QPolarChart2();
     else
         m_chart = new QChart2();
+    m_chart->setParent(this);
+    m_chart->setSize(QSizeF(100, 100));
+//    connect(this, &QQuickItem::widthChanged, m_chart, &QQuickItem::setWidth);
+//    connect(this, &QQuickItem::widthChanged, m_chart, &DeclarativeChart2::checkWidth);
+//    connect(this, &QQuickItem::heightChanged, m_chart, &QQuickItem::setHeight);
 
     m_chart->d_ptr->m_presenter->glSetUseWidget(false);
     m_glXYDataManager = m_chart->d_ptr->m_dataset->glXYSeriesDataManager();
 
-    m_scene = new QGraphicsScene(this);
-    m_scene->addItem(m_chart);
+    m_scene = new QQuickItem(this);
+//    m_scene->addItem(m_chart);
 
     setAntialiasing(QQuickItem::antialiasing());
-    connect(m_scene, &QGraphicsScene::changed, this, &DeclarativeChart2::sceneChanged);
+//    connect(m_scene, &QGraphicsScene::changed, this, &DeclarativeChart2::sceneChanged);
     connect(this, &DeclarativeChart2::needRender, this, &DeclarativeChart2::renderScene,
             Qt::QueuedConnection);
     connect(this, SIGNAL(antialiasingChanged(bool)), this, SLOT(handleAntialiasingChanged(bool)));
@@ -500,18 +505,19 @@ void DeclarativeChart2::initChart(QChart::ChartType type)
     setAcceptHoverEvents(true);
 
     m_margins = new DeclarativeMargins(this);
-    m_margins->setTop(m_chart->margins().top());
-    m_margins->setLeft(m_chart->margins().left());
-    m_margins->setRight(m_chart->margins().right());
-    m_margins->setBottom(m_chart->margins().bottom());
-    connect(m_margins, SIGNAL(topChanged(int,int,int,int)),
-            this, SLOT(changeMargins(int,int,int,int)));
-    connect(m_margins, SIGNAL(bottomChanged(int,int,int,int)),
-            this, SLOT(changeMargins(int,int,int,int)));
-    connect(m_margins, SIGNAL(leftChanged(int,int,int,int)),
-            this, SLOT(changeMargins(int,int,int,int)));
-    connect(m_margins, SIGNAL(rightChanged(int,int,int,int)),
-            this, SLOT(changeMargins(int,int,int,int)));
+    // TODO!!
+//    m_margins->setTop(m_chart->margins().top());
+//    m_margins->setLeft(m_chart->margins().left());
+//    m_margins->setRight(m_chart->margins().right());
+//    m_margins->setBottom(m_chart->margins().bottom());
+//    connect(m_margins, SIGNAL(topChanged(int,int,int,int)),
+//            this, SLOT(changeMargins(int,int,int,int)));
+//    connect(m_margins, SIGNAL(bottomChanged(int,int,int,int)),
+//            this, SLOT(changeMargins(int,int,int,int)));
+//    connect(m_margins, SIGNAL(leftChanged(int,int,int,int)),
+//            this, SLOT(changeMargins(int,int,int,int)));
+//    connect(m_margins, SIGNAL(rightChanged(int,int,int,int)),
+//            this, SLOT(changeMargins(int,int,int,int)));
     connect(m_chart->d_ptr->m_dataset, SIGNAL(seriesAdded(QAbstractSeries*)), this, SLOT(handleSeriesAdded(QAbstractSeries*)));
     connect(m_chart->d_ptr->m_dataset, SIGNAL(seriesRemoved(QAbstractSeries*)), this, SIGNAL(seriesRemoved(QAbstractSeries*)));
     connect(m_chart, SIGNAL(plotAreaChanged(QRectF)), this, SIGNAL(plotAreaChanged(QRectF)));
@@ -700,7 +706,7 @@ void DeclarativeChart2::geometryChanged(const QRectF &newGeometry, const QRectF
 {
     if (newGeometry.isValid()) {
         if (newGeometry.width() > 0 && newGeometry.height() > 0) {
-            m_chart->resize(newGeometry.width(), newGeometry.height());
+//            m_chart->resize(newGeometry.width(), newGeometry.height());
         }
     }
     QQuickItem::geometryChanged(newGeometry, oldGeometry);
@@ -802,31 +808,32 @@ void DeclarativeChart2::sceneChanged(QList<QRectF> region)
 
 void DeclarativeChart2::renderScene()
 {
-    m_updatePending = false;
-    m_sceneImageDirty = true;
-    QSize chartSize = m_chart->size().toSize();
-    if (!m_sceneImage || chartSize != m_sceneImage->size()) {
-        delete m_sceneImage;
-        qreal dpr = window() ? window()->devicePixelRatio() : 1.0;
-        m_sceneImage = new QImage(chartSize * dpr, QImage::Format_ARGB32);
-        m_sceneImage->setDevicePixelRatio(dpr);
-        m_sceneImageNeedsClear = true;
-    }
-
-    if (m_sceneImageNeedsClear) {
-        m_sceneImage->fill(Qt::transparent);
-        // Don't clear the flag if chart background has any transparent element to it
-        if (m_chart->backgroundBrush().color().alpha() == 0xff && !m_chart->isDropShadowEnabled())
-            m_sceneImageNeedsClear = false;
-    }
-    QPainter painter(m_sceneImage);
-    if (antialiasing()) {
-        painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing
-                               | QPainter::SmoothPixmapTransform);
-    }
-    QRect renderRect(QPoint(0, 0), chartSize);
-    m_scene->render(&painter, renderRect, renderRect);
-    update();
+    // TODO
+//    m_updatePending = false;
+//    m_sceneImageDirty = true;
+//    QSize chartSize = m_chart->size().toSize();
+//    if (!m_sceneImage || chartSize != m_sceneImage->size()) {
+//        delete m_sceneImage;
+//        qreal dpr = window() ? window()->devicePixelRatio() : 1.0;
+//        m_sceneImage = new QImage(chartSize * dpr, QImage::Format_ARGB32);
+//        m_sceneImage->setDevicePixelRatio(dpr);
+//        m_sceneImageNeedsClear = true;
+//    }
+
+//    if (m_sceneImageNeedsClear) {
+//        m_sceneImage->fill(Qt::transparent);
+//        // Don't clear the flag if chart background has any transparent element to it
+//        if (m_chart->backgroundBrush().color().alpha() == 0xff && !m_chart->isDropShadowEnabled())
+//            m_sceneImageNeedsClear = false;
+//    }
+//    QPainter painter(m_sceneImage);
+//    if (antialiasing()) {
+//        painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing
+//                               | QPainter::SmoothPixmapTransform);
+//    }
+//    QRect renderRect(QPoint(0, 0), chartSize);
+//    m_scene->render(&painter, renderRect, renderRect);
+//    update();
 }
 
 void DeclarativeChart2::mousePressEvent(QMouseEvent *event)
@@ -1486,6 +1493,19 @@ void DeclarativeChart2::queueRendererMouseEvent(QMouseEvent *event)
     }
 }
 
+void DeclarativeChart2::paint(QPainter *painter)
+{
+    painter->save();
+    painter->setPen(Qt::red);
+//        painter->setPen(pen());
+//        painter->setBrush(brush());
+    QRectF rect;
+    rect.setSize(size());
+
+    painter->drawRoundedRect(rect, 0,0);//rect(), m_diameter, m_diameter);
+    painter->restore();
+}
+
 QPointF DeclarativeChart2::mapToValue(const QPointF &position, QAbstractSeries *series)
 {
     return m_chart->mapToValue(position, series);
diff --git a/src/chartsqml2/declarativechart2_p.h b/src/chartsqml2/declarativechart2_p.h
index 05716745..4228cc6f 100644
--- a/src/chartsqml2/declarativechart2_p.h
+++ b/src/chartsqml2/declarativechart2_p.h
@@ -51,6 +51,7 @@
 #include <QtCore/QLocale>
 #include <QQmlComponent>
 #include <QLegend2>
+#include <QQuickPaintedItem>
 
 QT_CHARTS_BEGIN_NAMESPACE
 
@@ -58,7 +59,7 @@ class DeclarativeMargins;
 class Domain;
 class DeclarativeAxes;
 
-class QT_QMLCHARTS_PRIVATE_EXPORT DeclarativeChart2 : public QQuickItem
+class QT_QMLCHARTS_PRIVATE_EXPORT DeclarativeChart2 : public QQuickPaintedItem
 {
     Q_OBJECT
     Q_PROPERTY(Theme theme READ theme WRITE setTheme)
@@ -237,6 +238,7 @@ private Q_SLOTS:
     void handleSeriesAdded(QAbstractSeries *series);
     void handlePendingRenderNodeMouseEventResponses();
 
+
 protected:
     explicit DeclarativeChart2(QChart::ChartType type, QQuickItem *parent);
 
@@ -251,7 +253,7 @@ private:
     // Extending QChart with DeclarativeChart is not possible because QObject does not support
     // multi inheritance, so we now have a QChart as a member instead
     QChart2 *m_chart;
-    QGraphicsScene *m_scene;
+    QQuickItem *m_scene;
     QPointF m_mousePressScenePoint;
     QPoint m_mousePressScreenPoint;
     QPointF m_lastMouseMoveScenePoint;
@@ -269,6 +271,10 @@ private:
     QVector<QMouseEvent *> m_pendingRenderNodeMouseEvents;
     QVector<MouseEventResponse> m_pendingRenderNodeMouseEventResponses;
     QRectF m_adjustedPlotArea;
+
+    // QQuickPaintedItem interface
+public:
+    void paint(QPainter *painter);
 };
 
 QT_CHARTS_END_NAMESPACE
