diff --git a/src/areachart/areachartitem.cpp b/src/areachart/areachartitem.cpp index 2915e76..9b8783b 100644 --- a/src/areachart/areachartitem.cpp +++ b/src/areachart/areachartitem.cpp @@ -73,10 +73,10 @@ void AreaChartItem::updatePath() { QPainterPath path; - path = m_upper->shape(); + path = m_upper->path(); if (m_lower) { - path.connectPath(m_lower->shape().toReversed()); + path.connectPath(m_lower->path().toReversed()); } else { QPointF first = path.pointAtPercent(0); QPointF last = path.pointAtPercent(1); diff --git a/src/linechart/linechartitem.cpp b/src/linechart/linechartitem.cpp index f52b115..f2afb59 100644 --- a/src/linechart/linechartitem.cpp +++ b/src/linechart/linechartitem.cpp @@ -27,7 +27,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE -const qreal mouseEventMinWidth(14); +const qreal mouseEventMinWidth(12); LineChartItem::LineChartItem(QLineSeries* series,ChartPresenter *presenter): XYChart(series, presenter), diff --git a/src/linechart/linechartitem_p.h b/src/linechart/linechartitem_p.h index fee7758..f518fd6 100644 --- a/src/linechart/linechartitem_p.h +++ b/src/linechart/linechartitem_p.h @@ -52,8 +52,11 @@ public: void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); QPainterPath shape() const; + QPainterPath path() const { return m_path; } + public Q_SLOTS: void handleUpdated(); + protected: void updateGeometry(); void mousePressEvent(QGraphicsSceneMouseEvent *event); @@ -65,7 +68,6 @@ private: QPen m_linePen; QPen m_pointPen; bool m_pointsVisible; - }; QTCOMMERCIALCHART_END_NAMESPACE